2 CROSS=i586-mingw32msvc-
8 -include Makefile.local
15 DEFINES = _UNZIP_SUPPORT IN_VK
16 CFLAGS += -O2 -Wall -falign-functions=2 -ffast-math
17 CFLAGS += -I../.. -I. -I../../zlib/ -Idirectx/include/
18 LDFLAGS += -mwindows -L. -Ldirectx/lib/ -lgdi32 -lcomdlg32 -lddraw -ldsound -ldxguid
21 OBJS += main.o plat.o direct.o dsnd.o in_vk.o
24 OBJS += platform/common/emu.o platform/common/menu.o \
25 platform/common/config.o platform/common/fonts.o platform/common/readpng.o \
26 platform/common/input.o
29 OBJS += pico/area.o pico/cart.o pico/memory.o pico/pico.o pico/sek.o \
30 pico/videoport.o pico/draw2.o pico/draw.o pico/z80if.o pico/patch.o \
31 pico/mode4.o pico/sms.o pico/misc.o pico/eeprom.o pico/debug.o
33 OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \
34 pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \
35 pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o
37 OBJS += pico/32x/32x.o pico/32x/memory.o pico/32x/draw.o pico/32x/pwm.o
39 OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o
41 OBJS += pico/sound/sound.o pico/sound/sn76496.o pico/sound/ym2612.o pico/sound/mix.o
43 OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \
44 pico/carthw/svp/ssp16.o pico/carthw/svp/compiler.o
46 OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \
47 zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o zlib/uncompr.o
49 OBJS += unzip/unzip.o unzip/unzip_stream.o
51 ifeq "$(use_musashi)" "1"
53 OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o
54 #OBJS += cpu/musashi/m68kdasm.o
56 ifeq "$(use_fame)" "1"
58 OBJS += cpu/fame/famec.o
61 ifeq "$(use_mz80)" "1"
63 OBJS += cpu/mz80/mz80.o
66 OBJS += cpu/cz80/cz80.o
69 OBJS += cpu/sh2mame/sh2pico.o
71 ifeq "$(use_fame)" "1"
72 ifeq "$(use_musashi)" "1"
73 OBJS += pico/debugCPU.o
77 CFLAGS += $(addprefix -D,$(DEFINES))
82 DIRS = platform platform/gp2x platform/common pico pico/cd pico/pico pico/sound pico/carthw/svp \
83 pico/32x zlib unzip cpu cpu/musashi cpu/fame cpu/mz80 cpu/cz80 cpu/sh2mame
85 TARGET = PicoDrive.exe
91 $(RM) $(OBJS) $(TARGET).map
96 $(CC) $(CFLAGS) $^ $(LDFLAGS) -lm -lpng -Wl,-Map=$(TARGET).map -o $@
102 include ../common/revision.mak
104 pico/carthw/svp/compiler.o : ../../pico/carthw/svp/gen_arm.c
105 pico/pico.o pico/cd/pico.o : ../../pico/pico_cmn.c ../../pico/pico_int.h
106 pico/memory.o pico/cd/memory.o : ../../pico/pico_int.h ../../pico/memory.h
108 ../../cpu/musashi/m68kops.c :
109 @make -C ../../cpu/musashi
111 cpu/mz80/mz80.o : ../../cpu/mz80/mz80.asm
113 @nasm -f elf $< -o $@
115 ../../cpu/mz80/mz80.asm :
116 @make -C ../../cpu/mz80/
120 $(CC) $(CFLAGS) -c $< -o $@
123 $(CC) $(CFLAGS) -c $< -o $@
126 cpu/fame/famec.o : ../../cpu/fame/famec.c ../../cpu/fame/famec_opcodes.h
128 $(CC) $(CFLAGS) -Wno-unused -c $< -o $@
130 # ----------- release -----------
131 ifneq ($(findstring rel,$(MAKECMDGOALS)),)
137 rel: $(TARGET) readme.txt carthw.cfg
138 zip -9 -j ../../PicoDrive_win32_$(VER).zip $^