summaryrefslogtreecommitdiff
path: root/x86/Makefile
blob: 276996da2a220ad32b0353b8ba83bd3912bd905b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# 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      += ..
CFLAGS     += -DPC_BUILD -Wall -m32
INCLUDES   = -I${PREFIX}/include `sdl-config --cflags`
LIBS       = -L${PREFIX}/lib `sdl-config --libs` -lz -m32

# Compilation:

.SUFFIXES: .c .S

all:	${BIN}

%.o: %.c
	${CC} ${CFLAGS} ${INCLUDES} -c -o $@ $<

%.o: %.S
	${CC} ${CFLAGS} -c -o $@ $<

cpu.o cpu_threaded.o: CFLAGS += -Wno-unused-variable -Wno-unused-label

${BIN}:	${OBJS}
	${CC} ${OBJS} ${LIBS} -o ${BIN}  
#	${STRIP} ${BIN}

clean:
	rm -f *.o ${BIN}