cache (on framebuffer mem) flush fix from 2007 (gpsp09-2xb_2)
[gpsp.git] / gp2x / Makefile
CommitLineData
2823a4c8 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 cpu_speed.o cpuctrl.o \
13 gp2xminilib.o font.o display.o speedtest.o cmdline.o daemon.o \
01087863 14 arm_stub.o video_blend.o flush_cache.o
2823a4c8 15BIN = gpsp.gpe
16
17# Platform specific definitions
18
19VPATH += ..
20CFLAGS += -DARM_ARCH -DGP2X_BUILD
21# NOTE: -funroll-loops will slow down compiling considerably
22CFLAGS += -O3 -std=c99 -msoft-float -funsigned-char -fno-common \
23 -fno-builtin \
24
5da9148d 25INCLUDES = `$(PREFIX)/bin/sdl-config --cflags` -I$(PREFIX)/include
26LIBS = `$(PREFIX)/bin/sdl-config --libs` \
2823a4c8 27 -lm -ldl -lpthread -lz -static
28
29# Compilation:
30
31.SUFFIXES: .c
32
33%.z: %.c
34 $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
35
36%.u: %.c
37 $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
38
39%.o: %.c
40 $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
41
42%.o: %.S
43 $(CC) $(ASFLAGS) $(INCLUDES) -c -o $@ $<
44
45all: $(OBJS)
46 $(CC) $(OBJS) $(LIBS) -o $(BIN)
47 $(STRIP) $(BIN)
48
49clean:
50 rm -f *.o *.u *.z $(BIN)
51