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