libretro: satisfy vita's dynarec needs in a cleaner way
[picodrive.git] / platform / gizmondo / Makefile
... / ...
CommitLineData
1\r
2# you may or may not need to change this\r
3export CROSS = arm-wince-cegcc-\r
4\r
5# settings\r
6asm_memory = 1\r
7asm_render = 1\r
8asm_ym2612 = 1\r
9asm_misc = 1\r
10asm_cdmemory = 1\r
11amalgamate = 0\r
12#profile = 1\r
13\r
14\r
15\r
16DEFINC = -I../.. -I. -D__GIZ__ -DNO_SYNC\r
17COPT_COMMON = -Wall -Winline\r
18ifeq ($(DEBUG),)\r
19COPT_COMMON += -O2 -ftracer -fomit-frame-pointer -fstrict-aliasing -ffast-math\r
20else\r
21COPT_COMMON += -ggdb\r
22endif\r
23ifeq "$(profile)" "1"\r
24COPT_COMMON += -fprofile-generate\r
25endif\r
26ifeq "$(profile)" "2"\r
27COPT_COMMON += -fprofile-use\r
28endif\r
29CFLAGS = $(COPT_COMMON) -mcpu=arm920t -mtune=arm920t\r
30SFLAGS = $(CFLAGS)\r
31ASFLAGS = -mcpu=arm920t -mfloat-abi=soft\r
32CC = $(CROSS)gcc\r
33STRIP = $(CROSS)strip\r
34AS = $(CROSS)as\r
35LD = $(CROSS)ld\r
36\r
37# frontend\r
38OBJS += main.o emu.o menu.o giz.o asm_utils.o\r
39\r
40# common\r
41OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o \\r
42 platform/common/arm_utils.o platform/common/readpng.o platform/common/mp3_helix.o\r
43\r
44# Pico\r
45ifeq "$(amalgamate)" "1"\r
46OBJS += picoAll.o\r
47else\r
48OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o \\r
49 pico/videoport.o pico/draw2.o pico/draw.o pico/z80if.o pico/patch.o pico/debug.o\r
50# Pico - CD\r
51OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \\r
52 pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/gfx_cd.o pico/cd/cue.o \\r
53 pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o\r
54endif\r
55# Pico - Pico\r
56OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o\r
57# Pico - carthw\r
58OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \\r
59 pico/carthw/svp/ssp16.o pico/carthw/svp/compiler.o pico/carthw/svp/stub_arm.o\r
60\r
61# Pico - sound\r
62ifneq "$(amalgamate)" "1"\r
63OBJS += pico/sound/sound.o\r
64endif\r
65OBJS += pico/sound/mix_asm.o\r
66OBJS += pico/sound/sn76496.o pico/sound/ym2612.o\r
67# zlib\r
68OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \\r
69 zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o\r
70# unzip\r
71OBJS += unzip/unzip.o unzip/unzip_stream.o\r
72# CPU cores\r
73# Cyclone\r
74DEFINC += -DEMU_C68K\r
75OBJS += cpu/Cyclone/proj/Cyclone.o cpu/Cyclone/tools/idle.o\r
76# drz80\r
77DEFINC += -D_USE_DRZ80\r
78OBJS += cpu/DrZ80/drz80.o\r
79\r
80vpath %.c = ../..\r
81vpath %.s = ../..\r
82vpath %.S = ../..\r
83DIRS = platform platform/common pico pico/cd pico/pico pico/sound pico/carthw/svp \\r
84 zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools cpu/mz80 cpu/DrZ80\r
85\r
86\r
87all: mkdirs PicoDrive.exe readme.txt\r
88\r
89PicoDrive.exe : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a\r
90 @echo ">>>" $@\r
91 $(CC) -o $@ -static $(CFLAGS) $^ -lm -lpng -Lkgsdk/ -lKGSDK -Wl,-Map=PicoDrive.map \\r
92 2>&1 | grep -v ".idata$$4" # | grep -v "supports interworking, whereas"\r
93ifeq ($(DEBUG),)\r
94 $(STRIP) $@\r
95endif\r
96ifeq "$(profile)" "1"\r
97 ../../tools/gcda $@\r
98endif\r
99\r
100\r
101readme.txt: ../../tools/textfilter ../base_readme.txt\r
102 ../../tools/textfilter ../base_readme.txt $@ GIZ\r
103\r
104include ../common/common_arm.mak\r
105\r
106\r
107# cleanup\r
108clean: tidy\r
109 @$(RM) PicoDrive.exe\r
110tidy:\r
111 @$(RM) $(OBJS)\r
112\r
113\r
114up: PicoDrive.exe\r
115 synce-pcp -d 3 PicoDrive.exe ":/SD Card/emus/PicoDrive/PicoDrive.exe"\r
116\r
117run: up\r
118 synce-prun "/SD Card/emus/PicoDrive/PicoDrive.exe"\r
119\r
120run_only:\r
121 synce-prun "/SD Card/emus/PicoDrive/PicoDrive.exe"\r
122\r
123# ----------- release -----------\r
124ifneq ($(findstring rel,$(MAKECMDGOALS)),)\r
125ifeq ($(VER),)\r
126$(error need VER)\r
127endif\r
128endif\r
129\r
130rel: PicoDrive.exe kgsdk/ARMV4IRel/KGSDK.dll ../game_def.cfg readme.txt\r
131 zip -9 -j ../../PicoDrive_giz_$(VER).zip $^\r
132 ln -s ../gp2x/skin skin\r
133 zip -9 -r ../../PicoDrive_giz_$(VER).zip skin -i \*.png -i \*.txt\r
134 rm skin\r
135\r