pollux_dpc_set integrated
[gpsp.git] / gp2x / Makefile
... / ...
CommitLineData
1# gpSP makefile
2# Gilead Kutnick - Exophase
3# GP2X port(ion) - Z
4
5# Global definitions
6
7PREFIX = /opt/open2x/gcc-4.1.1-glibc-2.3.6
8CC = $(PREFIX)/bin/arm-open2x-linux-gcc
9STRIP = $(PREFIX)/bin/arm-open2x-linux-strip
10
11OBJS = main.o cpu.o memory.u video.o input.o sound.o gp2x.o gui.o \
12 cheats.o zip.o cpu_threaded.z arm_stub.o video_blend.o \
13 warm.o upscale_aspect.o
14ifeq ($(WIZ),1)
15OBJS += pollux_dpc_set.o
16BIN = gpsp_wiz
17else
18BIN = gpsp_gp2x
19endif
20
21# Platform specific definitions
22
23VPATH += ..
24CFLAGS += -DARM_ARCH -DGP2X_BUILD
25ifeq ($(WIZ),1)
26CFLAGS += -DWIZ_BUILD
27endif
28# NOTE: -funroll-loops will slow down compiling considerably
29CFLAGS += -O3 -std=c99 -msoft-float -funsigned-char -fno-common \
30 -fno-builtin \
31
32INCLUDES = `$(PREFIX)/bin/sdl-config --cflags` -I$(PREFIX)/include
33LIBS = `$(PREFIX)/bin/sdl-config --libs` \
34 -lm -ldl -lpthread -lz
35ifneq ($(WIZ),1)
36LIBS += -static
37endif
38
39# Compilation:
40
41.SUFFIXES: .c
42
43%.z: %.c
44 $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
45
46%.u: %.c
47 $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
48
49%.o: %.c
50 $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
51
52%.o: %.S
53 $(CC) $(ASFLAGS) $(INCLUDES) -c -o $@ $<
54
55%.o: %.s
56 $(CC) $(ASFLAGS) $(INCLUDES) -c -o $@ $<
57
58all: $(OBJS)
59 $(CC) $(OBJS) $(LIBS) -o $(BIN)
60 $(STRIP) $(BIN)
61
62clean:
63 rm -f *.o *.u *.z $(BIN)
64