'shuffled objs1' makefile (for reference)
authornotaz <notasas@gmail.com>
Thu, 6 Aug 2009 22:31:14 +0000 (22:31 +0000)
committernotaz <notasas@gmail.com>
Thu, 6 Aug 2009 22:31:14 +0000 (22:31 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@736 be3aeb3a-fb24-0410-a615-afba39da0efa

platform/gp2x/Makefile

index 8a18e77..54c806a 100644 (file)
@@ -14,7 +14,7 @@ asm_misc = 1
 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
@@ -34,8 +34,8 @@ endif
 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
@@ -55,22 +55,23 @@ LD = $(CROSS)ld
 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
@@ -88,24 +89,15 @@ OBJS += pico/sound/sound.o
 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
@@ -114,6 +106,14 @@ else
 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
@@ -122,13 +122,25 @@ DIRS = platform platform/gp2x platform/linux platform/common pico pico/cd pico/p
        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