asm_cdpico = 1\r
asm_cdmemory = 1\r
amalgamate = 0\r
-#profile = 1\r
+profile = 2\r
#use_musashi = 1\r
#up = 1\r
\r
DEFINC = -I../.. -I. -DARM -D__GP2X__ -DIN_GP2X -DIN_EVDEV # -DBENCHMARK\r
CFLAGS += -Wall -Winline\r
ifeq ($(DEBUG),)\r
-# -ftracer # TODO measure impact\r
-CFLAGS += -O3 -fstrength-reduce -fomit-frame-pointer -fstrict-aliasing -ffast-math\r
+# -ftracer -fstrength-reduce # TODO measure impact\r
+CFLAGS += -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math\r
else\r
CFLAGS += -ggdb\r
endif\r
OBJCOPY = $(CROSS)objcopy\r
\r
# frontend\r
-OBJS += soc.o soc_mmsp2.o soc_pollux.o pollux_set.o emu.o in_gp2x.o plat.o warm.o\r
+OBJS += plat.o warm.o pollux_set.o soc.o soc_mmsp2.o soc_pollux.o emu.o in_gp2x.o\r
# 940 core control\r
OBJS += 940ctl.o\r
\r
# common\r
-OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o \\r
- platform/common/arm_utils.o platform/common/arm_linux.o platform/common/readpng.o \\r
- platform/common/mp3_helix.o platform/common/input.o platform/common/main.o \\r
+OBJS += platform/common/emu.o platform/common/input.o platform/common/menu.o \\r
+ platform/common/fonts.o platform/common/config.o platform/common/arm_utils.o \\r
+ platform/common/arm_linux.o platform/common/readpng.o \\r
+ platform/common/mp3_helix.o platform/common/main.o \\r
platform/linux/sndout_oss.o platform/linux/plat.o platform/linux/in_evdev.o\r
\r
# Pico\r
ifeq "$(amalgamate)" "1"\r
OBJS += ../../picoAll.o\r
else\r
-OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o \\r
- pico/videoport.o pico/draw2.o pico/draw.o pico/patch.o pico/debug.o\r
+OBJS += pico/memory.o pico/videoport.o pico/draw.o pico/draw2.o pico/pico.o pico/sek.o \\r
+ pico/area.o pico/cart.o pico/misc.o pico/patch.o pico/debug.o\r
# Pico - CD\r
OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \\r
pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \\r
endif\r
OBJS += pico/sound/mix_arm.o\r
OBJS += pico/sound/sn76496.o pico/sound/ym2612.o\r
+# unzip\r
+OBJS += unzip/unzip.o unzip/unzip_stream.o\r
# zlib\r
OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \\r
zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o\r
-# unzip\r
-OBJS += unzip/unzip.o unzip/unzip_stream.o\r
# debug\r
ifeq "$(debug_cyclone)" "1"\r
OBJS += pico/DebugCPU.o cpu/musashi/m68kdasm.o\r
endif\r
-# CPU cores\r
-ifeq "$(use_musashi)" "1"\r
-DEFINC += -DEMU_M68K\r
-OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o\r
-endif\r
-ifeq "$(use_cyclone)" "1"\r
-DEFINC += -DEMU_C68K\r
-OBJS += cpu/Cyclone/proj/Cyclone.o cpu/Cyclone/tools/idle.o\r
-endif\r
# drz80/mz80\r
ifeq "$(mz80)" "1"\r
DEFINC += -D_USE_MZ80\r
DEFINC += -D_USE_DRZ80\r
OBJS += cpu/DrZ80/drz80.o\r
endif\r
+ifeq "$(use_musashi)" "1"\r
+DEFINC += -DEMU_M68K\r
+OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o\r
+endif\r
+ifeq "$(use_cyclone)" "1"\r
+DEFINC += -DEMU_C68K\r
+OBJS += cpu/Cyclone/proj/Cyclone.o cpu/Cyclone/tools/idle.o\r
+endif\r
\r
vpath %.c = ../..\r
vpath %.s = ../..\r
pico/carthw/svp zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools cpu/mz80 cpu/DrZ80\r
\r
\r
-all: mkdirs PicoDrive\r
+all: mkdirs PicoDrive_dyn PicoDrive_sta\r
\r
include ../common/common_arm.mak\r
\r
-PicoDrive : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a\r
+PicoDrive.o : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a\r
+ $(LD) -r -o $@ $^\r
+\r
+PicoDrive_dyn : PicoDrive.o\r
+ @echo ">>>" $@\r
+ $(CC) -o $@ $(CFLAGS) $^ -Wl,-Bstatic -lm -Wl,-Bdynamic -lpng -Wl,-Map=$@.map\r
+ifeq ($(DEBUG),)\r
+ $(STRIP) $@\r
+endif\r
+# $(CC) -o $@ $(CFLAGS) $^ -lm -lpng -Wl,-Map=$@.map\r
+# $(CC) -o $@ $(CFLAGS) $^ -Wl,-Bstatic -lm -Wl,-Bdynamic -lpng -Wl,-Map=$@.map\r
+\r
+PicoDrive_sta : PicoDrive.o\r
@echo ">>>" $@\r
- $(CC) -o $@ $(CFLAGS) $^ -lm -lpng -Wl,-Map=PicoDrive.map\r
+ $(CC) -static -o $@ $(CFLAGS) $^ -lm -lpng -Wl,-Map=$@.map\r
ifeq ($(DEBUG),)\r
$(STRIP) $@\r
endif\r