SekRunPS Cyclone integration
[libpicofe.git] / gp2x / Makefile
index 67bbb34..d6ba1d5 100644 (file)
@@ -12,12 +12,13 @@ asm_memory = 0      # TODO
 asm_render = 1\r
 asm_ym2612 = 1\r
 asm_misc = 1\r
+asm_cdpico = 1\r
 #profile = 1\r
 #use_musashi = 1\r
 #up = 1\r
 \r
 DEFINC = -I../.. -I. -DARM -D__GP2X__ -D_UNZIP_SUPPORT # -DBENCHMARK\r
-COPT_COMMON = -static -s -O3 -ftracer -fstrength-reduce -Wall -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math\r
+COPT_COMMON = -static -O3 -ftracer -fstrength-reduce -Wall -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math # -s\r
 ifeq "$(profile)" "1"\r
 COPT_COMMON += -fprofile-generate\r
 endif\r
@@ -61,6 +62,10 @@ ifeq "$(asm_misc)" "1"
 DEFINC += -D_ASM_MISC_C\r
 OBJS += ../../Pico/misc_asm.o\r
 endif\r
+ifeq "$(asm_cdpico)" "1"\r
+DEFINC += -D_ASM_CD_PICO_C\r
+OBJS += ../../Pico/cd/pico_asm.o\r
+endif\r
 # Pico - sound\r
 OBJS += ../../Pico/sound/mix_asm.o\r
 OBJS += ../../Pico/sound/sound.o ../../Pico/sound/sn76496.o ../../Pico/sound/ym2612.o\r
@@ -93,8 +98,10 @@ all: PicoDrive.gpe
 \r
 PicoDrive.gpe : $(OBJS) helix/helix_mp3.a\r
        @echo $@\r
-       @$(GCC) -o $@ $(COPT) $^ -lm\r
+       @$(GCC) -o $@ $(COPT) $^ -lm -Wl,-Map=PicoDrive.map\r
+ifeq ($(DEBUG),)\r
        @$(STRIP) $@\r
+endif\r
 #      @$(GCC) $(COPT) $(OBJS) -lm -o PicoDrive_.gpe\r
 #      @gpecomp PicoDrive_.gpe $@\r
 ifeq "$(up)" "1"\r
@@ -137,6 +144,9 @@ testrefr.gpe : test.o gp2x.o asmutils.o
 ../../Pico/misc_asm.o : ../../Pico/misc.s\r
        @echo $<\r
        @$(AS) $(ASOPT) $< -o $@\r
+../../Pico/cd/pico_asm.o : ../../Pico/cd/Pico.s\r
+       @echo $<\r
+       @$(AS) $(ASOPT) $< -o $@\r
 \r
 # build Cyclone\r
 ../../cpu/Cyclone/proj/Cyclone.s :\r