2009-05-21 17:48:31 +02:00
|
|
|
# gpSP makefile
|
|
|
|
# Gilead Kutnick - Exophase
|
|
|
|
|
|
|
|
# Global definitions
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
STRIP = strip
|
|
|
|
AS = as
|
|
|
|
|
|
|
|
PREFIX = /usr
|
|
|
|
OBJS = main.o cpu.o memory.o video.o input.o sound.o \
|
|
|
|
cpu_threaded.o gui.o x86_stub.o cheats.o zip.o
|
|
|
|
BIN ?= gpsp.exe
|
|
|
|
|
|
|
|
# Platform specific definitions
|
|
|
|
|
|
|
|
VPATH += ..
|
2011-09-05 18:31:58 +02:00
|
|
|
CFLAGS += -DPC_BUILD -Wall -m32
|
2009-05-21 17:48:31 +02:00
|
|
|
INCLUDES = -I${PREFIX}/include `sdl-config --cflags`
|
2011-09-02 23:58:39 +02:00
|
|
|
LIBS = -L${PREFIX}/lib `sdl-config --libs` -mconsole -lz -m32
|
2009-05-21 17:48:31 +02:00
|
|
|
|
|
|
|
# Compilation:
|
|
|
|
|
|
|
|
.SUFFIXES: .c .S
|
|
|
|
|
2011-09-05 18:31:58 +02:00
|
|
|
all: ${BIN}
|
|
|
|
|
2009-05-21 17:48:31 +02:00
|
|
|
%.o: %.c
|
|
|
|
${CC} ${CFLAGS} ${INCLUDES} -c -o $@ $<
|
|
|
|
|
|
|
|
%.o: %.S
|
2011-09-02 23:58:39 +02:00
|
|
|
${CC} ${CFLAGS} -c -o $@ $<
|
2009-05-21 17:48:31 +02:00
|
|
|
|
2011-09-05 18:31:58 +02:00
|
|
|
cpu.o cpu_threaded.o: CFLAGS += -Wno-unused-variable -Wno-unused-label
|
|
|
|
|
|
|
|
${BIN}: ${OBJS}
|
2009-05-21 17:48:31 +02:00
|
|
|
${CC} ${OBJS} ${LIBS} -o ${BIN}
|
2011-09-05 18:31:58 +02:00
|
|
|
# ${STRIP} ${BIN}
|
2009-05-21 17:48:31 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o ${BIN}
|
|
|
|
|