revive PC build, support Linux
[gpsp.git] / x86 / Makefile
CommitLineData
2823a4c8 1# gpSP makefile
2# Gilead Kutnick - Exophase
3
4# Global definitions
5
6CC = gcc
7STRIP = strip
8AS = as
9
10PREFIX = /usr
11OBJS = 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
13BIN ?= gpsp.exe
14
15# Platform specific definitions
16
17VPATH += ..
eac69717 18CFLAGS += -DPC_BUILD -m32
2823a4c8 19INCLUDES = -I${PREFIX}/include `sdl-config --cflags`
eac69717 20LIBS = -L${PREFIX}/lib `sdl-config --libs` -mconsole -lz -m32
2823a4c8 21
22# Compilation:
23
24.SUFFIXES: .c .S
25
26%.o: %.c
27 ${CC} ${CFLAGS} ${INCLUDES} -c -o $@ $<
28
29%.o: %.S
eac69717 30 ${CC} ${CFLAGS} -c -o $@ $<
2823a4c8 31
32all: ${OBJS}
33 ${CC} ${OBJS} ${LIBS} -o ${BIN}
34 ${STRIP} ${BIN}
35
36clean:
37 rm -f *.o ${BIN}
38