FDS fixed for asm core
[fceu.git] / Makefile.gp2x
CommitLineData
937bf65b 1CROSS = arm-linux-
2CC = $(CROSS)gcc
3STRIP = $(CROSS)strip
4AS = $(CROSS)as
92764e62 5TFLAGS = -Winline -mcpu=arm920t -Izlib -DGP2X=1 -DLSB_FIRST -DUNIX -DPSS_STYLE=1 -DHAVE_ASPRINTF -DZLIB -DFRAMESKIP -D_REENTRANT
937bf65b 6ASFLAGS = -mcpu=arm920t -mfloat-abi=soft
98733207 7RM = rm -f
22f08d95 8B = drivers/gp2x/
15300263 9ifdef DEBUG
10TFLAGS += -ggdb
937bf65b 11LDRIVER += -ggdb
e1591a12 12NOSTRIP = 1
15300263 13else
937bf65b 14TFLAGS += -ftracer -fstrength-reduce -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math
e1591a12 15TFLAGS += -O3 #-pg -fno-omit-frame-pointer
16LDRIVER += -O3 #-pg -fno-omit-frame-pointer
15300263 17endif
98733207 18
e1591a12 19#NOSTRIP = 1
20
af32b6c2 21asm_6502=1
370cff9a 22#debug_asm_6502=1
af32b6c2 23
98733207 24all: fceu
15300263 25
26gpfce: fceu
27 cp fceu gpfce
98733207 28
29include zlib/Makefile
30
937bf65b 31OBJDRIVER = ${B}minimal.o ${B}squidgehack.o ${B}asmutils.o ${B}gp2x.o ${B}main.o ${B}throttle.o \
32 ${B}unix-netplay.o ${B}gp2x-sound.o ${B}gp2x-video.o ${B}lnx-joystick.o \
5a2aa426 33 drivers/common/cheat.o drivers/common/config.o drivers/common/args.o drivers/common/vidblit.o ${UNZIPOBJS} ppu.o movie.o
af32b6c2 34LDRIVER += -L /mnt/sd/lib -L/mnt/sd/gp2x/usr/lib -lm -lz -static -Wl,-Map=fceu.map
35
36ifeq ($(asm_6502),1)
37TFLAGS += -DASM_6502
38OBJDRIVER += ncpu.o
39ifeq ($(debug_asm_6502),1)
40TFLAGS += -DDEBUG_ASM_6502
41OBJDRIVER += x6502.o ncpu_debug.o
42endif
43else
44OBJDRIVER += x6502.o
45endif
46
890e37ba 47x6502.o: x6502.c x6502.h ops.h fce.h sound.h dprintf.h
81bd66a1 48
af32b6c2 49ncpu.o: ncpu.S ncpu.h
92e249b1 50 $(CC) $(TFLAGS) -c $< -o $@
98733207 51
52include Makefile.base
53
9e1b19d0 54${B}main.o: ${B}main.c ${B}main.h ${B}usage.h ${B}input.c
22f08d95 55${B}gp2x.o: ${B}gp2x.c ${B}gp2x.h
98733207 56${B}throttle.o: ${B}throttle.c ${B}main.h ${B}throttle.h
57ppu.o: ppu.c ppu.h
58
59include Makefile.common
15300263 60
937bf65b 61#x6502.o: x6502.c x6502.h ops.h fce.h sound.h
62# $(CC) $(CFLAGS) -finline-limit=60000 -c $< -o $@
63
15300263 64up: fceu
65 cp -v fceu /mnt/gp2x/mnt/sd/emus/Gpfce_v02/gpfce
66
aa2dba92 67# ----------- release -----------
68ifneq ($(findstring rel,$(MAKECMDGOALS)),)
69ifeq ($(VER),)
70$(error need VER)
71endif
72endif
73
74rel: gpfce
75 zip -9 -j Gpfce_v$(VER).zip $^ drivers/gp2x/mmuhack.o out_gp2x/*
76
77