| 1 | # gpSP makefile |
| 2 | # Gilead Kutnick - Exophase |
| 3 | |
| 4 | # Global definitions |
| 5 | |
| 6 | CC = gcc |
| 7 | STRIP = strip |
| 8 | AS = as |
| 9 | |
| 10 | PREFIX = /usr |
| 11 | OBJS = main.o cpu.o memory.o video.o input.o sound.o \ |
| 12 | cpu_threaded.o gui.o x86_stub.o cheats.o zip.o |
| 13 | BIN ?= gpsp.exe |
| 14 | |
| 15 | # Platform specific definitions |
| 16 | |
| 17 | VPATH += .. |
| 18 | CFLAGS += -DPC_BUILD -Wall -m32 |
| 19 | INCLUDES = -I${PREFIX}/include `sdl-config --cflags` |
| 20 | LIBS = -L${PREFIX}/lib `sdl-config --libs` -mconsole -lz -m32 |
| 21 | |
| 22 | # Compilation: |
| 23 | |
| 24 | .SUFFIXES: .c .S |
| 25 | |
| 26 | all: ${BIN} |
| 27 | |
| 28 | %.o: %.c |
| 29 | ${CC} ${CFLAGS} ${INCLUDES} -c -o $@ $< |
| 30 | |
| 31 | %.o: %.S |
| 32 | ${CC} ${CFLAGS} -c -o $@ $< |
| 33 | |
| 34 | cpu.o cpu_threaded.o: CFLAGS += -Wno-unused-variable -Wno-unused-label |
| 35 | |
| 36 | ${BIN}: ${OBJS} |
| 37 | ${CC} ${OBJS} ${LIBS} -o ${BIN} |
| 38 | # ${STRIP} ${BIN} |
| 39 | |
| 40 | clean: |
| 41 | rm -f *.o ${BIN} |
| 42 | |