| 1 | CROSS = arm-linux- |
| 2 | CC = $(CROSS)gcc |
| 3 | STRIP = $(CROSS)strip |
| 4 | AS = $(CROSS)as |
| 5 | TFLAGS = -Winline -mcpu=arm920t -Izlib -DGP2X=1 -DLSB_FIRST -DUNIX -DPSS_STYLE=1 -DZLIB -DFRAMESKIP -D_REENTRANT |
| 6 | ASFLAGS = -mcpu=arm920t -mfloat-abi=soft |
| 7 | RM = rm -f |
| 8 | B = drivers/gp2x/ |
| 9 | ifdef DEBUG |
| 10 | TFLAGS += -ggdb |
| 11 | LDRIVER += -ggdb |
| 12 | else |
| 13 | TFLAGS += -ftracer -fstrength-reduce -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math |
| 14 | TFLAGS += -O3 # -pg |
| 15 | LDRIVER += -O3 # -pg |
| 16 | endif |
| 17 | |
| 18 | all: fceu |
| 19 | |
| 20 | gpfce: fceu |
| 21 | cp fceu gpfce |
| 22 | |
| 23 | include zlib/Makefile |
| 24 | |
| 25 | OBJDRIVER = ${B}minimal.o ${B}squidgehack.o ${B}asmutils.o ${B}gp2x.o ${B}main.o ${B}throttle.o \ |
| 26 | ${B}unix-netplay.o ${B}gp2x-sound.o ${B}gp2x-video.o ${B}lnx-joystick.o \ |
| 27 | drivers/common/cheat.o drivers/common/config.o drivers/common/args.o drivers/common/vidblit.o ${UNZIPOBJS} ppu.o |
| 28 | LDRIVER += -L /mnt/sd/lib -L/mnt/sd/gp2x/usr/lib -lm -lz -static |
| 29 | |
| 30 | include Makefile.base |
| 31 | |
| 32 | ${B}main.o: ${B}main.c ${B}main.h ${B}usage.h ${B}input.c |
| 33 | ${B}gp2x.o: ${B}gp2x.c ${B}gp2x.h |
| 34 | ${B}throttle.o: ${B}throttle.c ${B}main.h ${B}throttle.h |
| 35 | ppu.o: ppu.c ppu.h |
| 36 | |
| 37 | include Makefile.common |
| 38 | |
| 39 | #x6502.o: x6502.c x6502.h ops.h fce.h sound.h |
| 40 | # $(CC) $(CFLAGS) -finline-limit=60000 -c $< -o $@ |
| 41 | |
| 42 | up: fceu |
| 43 | cp -v fceu /mnt/gp2x/mnt/sd/emus/Gpfce_v02/gpfce |
| 44 | |