8 -include Makefile.local
12 CFLAGS += -ftracer -fstrength-reduce -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math
13 CFLAGS += -fprofile-generate
15 CFLAGS = -ggdb -Wall -falign-functions=2
17 DEFINES = _UNZIP_SUPPORT IO_STATS IN_EVDEV
19 LDFLAGS += -lX11 -lpthread
22 OBJS += platform/gp2x/emu.o blit.o in_evdev.o plat.o sndout_oss.o gp2x.o log_io.o
25 OBJS += platform/common/main.o platform/common/emu.o platform/common/menu.o \
26 platform/common/config.o platform/common/fonts.o platform/common/readpng.o \
27 platform/common/input.o
29 ifeq "$(fake_in_gp2x)" "1"
30 DEFINES += IN_GP2X FAKE_IN_GP2X
31 OBJS += platform/gp2x/in_gp2x.o
35 OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o \
36 pico/videoport.o pico/draw2.o pico/draw.o pico/z80if.o pico/patch.o \
37 pico/sms.o pico/debug.o
39 OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \
40 pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \
41 pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o
43 OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o
45 OBJS += pico/sound/sound.o pico/sound/sn76496.o pico/sound/ym2612.o pico/sound/mix.o
47 OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \
48 pico/carthw/svp/ssp16.o pico/carthw/svp/compiler.o
50 OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \
51 zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o zlib/uncompr.o
53 OBJS += unzip/unzip.o unzip/unzip_stream.o
55 ifeq "$(use_musashi)" "1"
57 OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o
58 OBJS += cpu/musashi/m68kdasm.o
60 ifeq "$(use_fame)" "1"
62 OBJS += cpu/fame/famec.o
65 ifeq "$(use_mz80)" "1"
67 OBJS += cpu/mz80/mz80.o
70 OBJS += cpu/cz80/cz80.o
73 ifeq "$(use_fame)" "1"
74 ifeq "$(use_musashi)" "1"
75 OBJS += pico/debugCPU.o
79 CFLAGS += $(addprefix -D,$(DEFINES))
83 DIRS = platform platform/gp2x platform/common pico pico/cd pico/pico pico/sound pico/carthw/svp \
84 zlib unzip cpu cpu/musashi cpu/fame cpu/mz80 cpu/cz80
92 @make -C ../../cpu/mz80/ clean
93 @make -C ../common/helix/ X86=1 clean
95 PicoDrive : $(OBJS) ../common/helix/helix_mp3_x86.a
97 $(CC) $(CFLAGS) $^ $(LDFLAGS) -lm -lpng -Wl,-Map=PicoDrive.map -o $@
102 pico/carthw/svp/compiler.o : ../../pico/carthw/svp/gen_arm.c
103 pico/pico.o pico/cd/pico.o : ../../pico/pico_cmn.c ../../pico/pico_int.h
104 pico/memory.o pico/cd/memory.o : ../../pico/memory_cmn.c ../../pico/pico_int.h
105 platform/common/menu.o : revision.h
108 @echo "#define REVISION \"`svn info | grep Revision | cut -c 11-`\"" > /tmp/r.tmp
109 @diff -q $@ /tmp/r.tmp > /dev/null 2>&1 || mv -f /tmp/r.tmp $@
111 ../../cpu/musashi/m68kops.c :
112 @make -C ../../cpu/musashi
114 cpu/mz80/mz80.o : ../../cpu/mz80/mz80.asm
116 @nasm -f elf $< -o $@
118 ../../cpu/mz80/mz80.asm :
119 @make -C ../../cpu/mz80/
121 ../common/helix/helix_mp3_x86.a:
122 @make -C ../common/helix/ X86=1 clean all
126 $(CC) $(CFLAGS) -c $< -o $@
129 $(CC) $(CFLAGS) -c $< -o $@
132 cpu/fame/famec.o : ../../cpu/fame/famec.c ../../cpu/fame/famec_opcodes.h
134 $(CC) $(CFLAGS) -Wno-unused -c $< -o $@