FDS fixed for asm core
[fceu.git] / Makefile.gp2x
... / ...
CommitLineData
1CROSS = arm-linux-
2CC = $(CROSS)gcc
3STRIP = $(CROSS)strip
4AS = $(CROSS)as
5TFLAGS = -Winline -mcpu=arm920t -Izlib -DGP2X=1 -DLSB_FIRST -DUNIX -DPSS_STYLE=1 -DHAVE_ASPRINTF -DZLIB -DFRAMESKIP -D_REENTRANT
6ASFLAGS = -mcpu=arm920t -mfloat-abi=soft
7RM = rm -f
8B = drivers/gp2x/
9ifdef DEBUG
10TFLAGS += -ggdb
11LDRIVER += -ggdb
12NOSTRIP = 1
13else
14TFLAGS += -ftracer -fstrength-reduce -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math
15TFLAGS += -O3 #-pg -fno-omit-frame-pointer
16LDRIVER += -O3 #-pg -fno-omit-frame-pointer
17endif
18
19#NOSTRIP = 1
20
21asm_6502=1
22#debug_asm_6502=1
23
24all: fceu
25
26gpfce: fceu
27 cp fceu gpfce
28
29include zlib/Makefile
30
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 \
33 drivers/common/cheat.o drivers/common/config.o drivers/common/args.o drivers/common/vidblit.o ${UNZIPOBJS} ppu.o movie.o
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
47x6502.o: x6502.c x6502.h ops.h fce.h sound.h dprintf.h
48
49ncpu.o: ncpu.S ncpu.h
50 $(CC) $(TFLAGS) -c $< -o $@
51
52include Makefile.base
53
54${B}main.o: ${B}main.c ${B}main.h ${B}usage.h ${B}input.c
55${B}gp2x.o: ${B}gp2x.c ${B}gp2x.h
56${B}throttle.o: ${B}throttle.c ${B}main.h ${B}throttle.h
57ppu.o: ppu.c ppu.h
58
59include Makefile.common
60
61#x6502.o: x6502.c x6502.h ops.h fce.h sound.h
62# $(CC) $(CFLAGS) -finline-limit=60000 -c $< -o $@
63
64up: fceu
65 cp -v fceu /mnt/gp2x/mnt/sd/emus/Gpfce_v02/gpfce
66
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