OBJS += 940ctl.o\r
\r
# common\r
-OBJS += ../common/emu.o ../common/menu.o ../common/fonts.o ../common/config.o ../common/arm_utils.o \\r
- ../common/readpng.o ../common/mp3_helix.o\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/readpng.o platform/common/mp3_helix.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 \\r
- ../../Pico/Pico.o ../../Pico/Sek.o ../../Pico/VideoPort.o ../../Pico/Draw2.o ../../Pico/Draw.o \\r
- ../../Pico/Patch.o\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\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
- ../../Pico/cd/Area.o ../../Pico/cd/Misc.o ../../Pico/cd/pcm.o ../../Pico/cd/buffering.o\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
+ Pico/cd/Area.o Pico/cd/Misc.o Pico/cd/pcm.o Pico/cd/buffering.o\r
endif\r
# Pico - Pico\r
-OBJS += ../../Pico/Pico/Pico.o ../../Pico/Pico/Memory.o ../../Pico/Pico/xpcm.o\r
+OBJS += Pico/Pico/Pico.o Pico/Pico/Memory.o Pico/Pico/xpcm.o\r
# Pico - carthw\r
-OBJS += ../../Pico/carthw/carthw.o ../../Pico/carthw/svp/svp.o ../../Pico/carthw/svp/Memory.o \\r
- ../../Pico/carthw/svp/ssp16.o ../../Pico/carthw/svp/compiler.o ../../Pico/carthw/svp/stub_arm.o\r
+OBJS += Pico/carthw/carthw.o Pico/carthw/svp/svp.o Pico/carthw/svp/Memory.o \\r
+ Pico/carthw/svp/ssp16.o Pico/carthw/svp/compiler.o Pico/carthw/svp/stub_arm.o\r
\r
# asm stuff\r
ifeq "$(asm_render)" "1"\r
DEFINC += -D_ASM_DRAW_C\r
-OBJS += ../../Pico/draw_asm.o ../../Pico/draw2_asm.o\r
+OBJS += Pico/draw_asm.o Pico/draw2_asm.o\r
endif\r
ifeq "$(asm_memory)" "1"\r
DEFINC += -D_ASM_MEMORY_C\r
-OBJS += ../../Pico/memory_asm.o\r
+OBJS += Pico/memory_asm.o\r
endif\r
ifeq "$(asm_ym2612)" "1"\r
DEFINC += -D_ASM_YM2612_C\r
-OBJS += ../../Pico/sound/ym2612_asm.o\r
+OBJS += Pico/sound/ym2612_asm.o\r
endif\r
ifeq "$(asm_misc)" "1"\r
DEFINC += -D_ASM_MISC_C\r
-OBJS += ../../Pico/misc_asm.o\r
-OBJS += ../../Pico/cd/misc_asm.o\r
+OBJS += Pico/misc_asm.o\r
+OBJS += Pico/cd/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
+OBJS += Pico/cd/pico_asm.o\r
endif\r
ifeq "$(asm_cdmemory)" "1"\r
DEFINC += -D_ASM_CD_MEMORY_C\r
-OBJS += ../../Pico/cd/memory_asm.o\r
+OBJS += Pico/cd/memory_asm.o\r
endif\r
\r
# Pico - sound\r
ifneq "$(amalgamate)" "1"\r
-OBJS += ../../Pico/sound/sound.o\r
+OBJS += Pico/sound/sound.o\r
endif\r
-OBJS += ../../Pico/sound/mix_asm.o\r
-OBJS += ../../Pico/sound/sn76496.o ../../Pico/sound/ym2612.o\r
+OBJS += Pico/sound/mix_asm.o\r
+OBJS += Pico/sound/sn76496.o Pico/sound/ym2612.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
+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
+OBJS += unzip/unzip.o unzip/unzip_stream.o\r
# debug\r
ifeq "$(debug_cyclone)" "1"\r
-OBJS += ../../Pico/Debug.o ../../cpu/musashi/m68kdasm.o\r
+OBJS += Pico/Debug.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
+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
+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
-OBJS += ../../cpu/mz80/mz80.o\r
+OBJS += cpu/mz80/mz80.o\r
else\r
DEFINC += -D_USE_DRZ80\r
-OBJS += ../../cpu/DrZ80/drz80.o\r
+OBJS += cpu/DrZ80/drz80.o\r
endif\r
\r
+vpath %.c = ../..\r
+vpath %.s = ../..\r
+vpath %.S = ../..\r
+DIRS = platform platform/gp2x platform/common Pico Pico/cd Pico/Pico Pico/sound Pico/carthw/svp \\r
+ zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools cpu/mz80 cpu/DrZ80\r
\r
-all: PicoDrive.gpe\r
+\r
+all: mkdirs PicoDrive.gpe\r
\r
PicoDrive.gpe : $(OBJS) ../common/helix/helix_mp3.a\r
@echo ">>>" $@\r
\r
# @cmd //C copy PicoDrive.gpe \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\\r
\r
+# cleanup\r
+clean: tidy\r
+ $(RM) PicoDrive.gpe\r
+tidy:\r
+ $(RM) $(OBJS)\r
+ rm -rf $(DIRS)\r
+# @make -C ../../cpu/Cyclone/proj -f Makefile.linux clean\r
+\r
+\r
+clean_prof:\r
+ find ../.. -name '*.gcno' -delete\r
+ find ../.. -name '*.gcda' -delete\r
+\r
+\r
+mkdirs:\r
+ mkdir -p $(DIRS)\r
\r
.c.o:\r
@echo ">>>" $<\r
@echo ">>>" $<\r
$(GCC) $(COPT) $(DEFINC) -c $< -o $@\r
\r
-../../Pico/carthw/svp/compiler.o : ../../Pico/carthw/svp/ssp16.o ../../Pico/carthw/svp/gen_arm.c\r
+Pico/carthw/svp/compiler.o : ../../Pico/carthw/svp/ssp16.o ../../Pico/carthw/svp/gen_arm.c\r
\r
-../../Pico/draw_asm.o : ../../Pico/Draw.s\r
+Pico/draw_asm.o : ../../Pico/Draw.s\r
@echo ">>>" $<\r
$(AS) $(ASOPT) $< -o $@\r
-../../Pico/draw2_asm.o : ../../Pico/Draw2.s\r
+Pico/draw2_asm.o : ../../Pico/Draw2.s\r
@echo ">>>" $<\r
$(AS) $(ASOPT) $< -o $@\r
-../../Pico/memory_asm.o : ../../Pico/Memory.s\r
+Pico/memory_asm.o : ../../Pico/Memory.s\r
@echo ">>>" $<\r
$(AS) $(ASOPT) $< -o $@\r
-../../Pico/sound/ym2612_asm.o : ../../Pico/sound/ym2612.s\r
+Pico/sound/ym2612_asm.o : ../../Pico/sound/ym2612.s\r
@echo ">>>" $<\r
$(AS) $(ASOPT) $< -o $@\r
-../../Pico/sound/mix_asm.o : ../../Pico/sound/mix.s\r
+Pico/sound/mix_asm.o : ../../Pico/sound/mix.s\r
@echo ">>>" $<\r
$(AS) $(ASOPT) $< -o $@\r
-../../Pico/misc_asm.o : ../../Pico/Misc.s\r
+Pico/misc_asm.o : ../../Pico/Misc.s\r
@echo ">>>" $<\r
$(AS) $(ASOPT) $< -o $@\r
-../../Pico/cd/pico_asm.o : ../../Pico/cd/Pico.s\r
+Pico/cd/pico_asm.o : ../../Pico/cd/Pico.s\r
@echo ">>>" $<\r
$(AS) $(ASOPT) $< -o $@\r
-../../Pico/cd/memory_asm.o : ../../Pico/cd/Memory.s\r
+Pico/cd/memory_asm.o : ../../Pico/cd/Memory.s\r
@echo ">>>" $<\r
$(AS) $(ASOPT) $< -o $@\r
-../../Pico/cd/misc_asm.o : ../../Pico/cd/Misc.s\r
+Pico/cd/misc_asm.o : ../../Pico/cd/Misc.s\r
@echo ">>>" $<\r
$(AS) $(ASOPT) $< -o $@\r
\r
../../cpu/musashi/m68kops.c :\r
@make -C ../../cpu/musashi\r
\r
-../../Pico/Pico.o ../../Pico/cd/Pico.o: ../../Pico/PicoFrameHints.c ../../Pico/PicoInt.h\r
-../../Pico/Memory.o Pico/cd/Memory.o : ../../Pico/MemoryCmn.c ../../Pico/PicoInt.h\r
+Pico/Pico.o Pico/cd/Pico.o: ../../Pico/PicoFrameHints.c ../../Pico/PicoInt.h\r
+Pico/Memory.o Pico/cd/Memory.o : ../../Pico/MemoryCmn.c ../../Pico/PicoInt.h\r
\r
# build helix libs\r
../common/helix/helix_mp3.a:\r
make -C ../../tools/ textfilter\r
\r
\r
-# cleanup\r
-clean: tidy\r
- $(RM) PicoDrive.gpe\r
-tidy:\r
- $(RM) $(OBJS)\r
-# @make -C ../../cpu/Cyclone/proj -f Makefile.linux clean\r
-\r
-\r
-clean_prof:\r
- find ../.. -name '*.gcno' -delete\r
- find ../.. -name '*.gcda' -delete\r
-\r
# ----------- release -----------\r
ifneq ($(findstring rel,$(MAKECMDGOALS)),)\r
ifeq ($(VER),)\r
OBJS += main.o emu.o mp3.o menu.o psp.o asm_utils.o\r
\r
# common\r
-OBJS += ../common/emu.o ../common/menu.o ../common/fonts.o ../common/config.o ../common/readpng.o\r
+OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o platform/common/readpng.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 \\r
- ../../Pico/Pico.o ../../Pico/Sek.o ../../Pico/VideoPort.o ../../Pico/Draw2.o ../../Pico/Draw.o \\r
- ../../Pico/Patch.o ../../Pico/Draw_amips.o ../../Pico/Memory_amips.o ../../Pico/Misc_amips.o\r
+OBJS += Pico/Area.o Pico/Cart.o Pico/Memory.o Pico/Misc.o \\r
+ Pico/Pico.o Pico/Sek.o Pico/VideoPort.o Pico/Draw2.o Pico/Draw.o \\r
+ Pico/Patch.o Pico/Draw_amips.o Pico/Memory_amips.o Pico/Misc_amips.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
- ../../Pico/cd/Area.o ../../Pico/cd/Misc.o ../../Pico/cd/pcm.o ../../Pico/cd/buffering.o\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
+ Pico/cd/Area.o Pico/cd/Misc.o Pico/cd/pcm.o Pico/cd/buffering.o\r
# Pico - carthw\r
-OBJS += ../../Pico/carthw/carthw.o ../../Pico/carthw/svp/svp.o ../../Pico/carthw/svp/Memory.o \\r
- ../../Pico/carthw/svp/ssp16.o\r
+OBJS += Pico/carthw/carthw.o Pico/carthw/svp/svp.o Pico/carthw/svp/Memory.o \\r
+ Pico/carthw/svp/ssp16.o\r
# Pico - Pico\r
-OBJS += ../../Pico/Pico/Pico.o ../../Pico/Pico/Memory.o ../../Pico/Pico/xpcm.o\r
+OBJS += Pico/Pico/Pico.o Pico/Pico/Memory.o Pico/Pico/xpcm.o\r
endif\r
\r
# Pico - sound\r
ifneq "$(amalgamate)" "1"\r
-OBJS += ../../Pico/sound/sound.o\r
+OBJS += Pico/sound/sound.o\r
endif\r
-OBJS += ../../Pico/sound/mix.o\r
-OBJS += ../../Pico/sound/sn76496.o ../../Pico/sound/ym2612.o\r
+OBJS += Pico/sound/mix.o\r
+OBJS += Pico/sound/sn76496.o Pico/sound/ym2612.o\r
# zlib (hacked)\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
- ../../zlib/uncompr.o\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
+ zlib/uncompr.o\r
# unzip\r
-OBJS += ../../unzip/unzip.o ../../unzip/unzip_stream.o\r
+OBJS += unzip/unzip.o unzip/unzip_stream.o\r
# CPU cores\r
ifeq "$(use_musashi)" "1"\r
CFLAGS += -DEMU_M68K\r
-OBJS += ../../cpu/musashi/m68kops.o ../../cpu/musashi/m68kcpu.o\r
+OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o\r
else\r
CFLAGS += -DEMU_F68K\r
-OBJS += ../../cpu/fame/famec.o\r
+OBJS += cpu/fame/famec.o\r
endif\r
# z80\r
ifeq "$(use_mz80)" "1"\r
CFLAGS += -D_USE_MZ80\r
-OBJS += ../../cpu/mz80/mz80.o\r
+OBJS += cpu/mz80/mz80.o\r
else\r
CFLAGS += -D_USE_CZ80\r
-OBJS += ../../cpu/cz80/cz80.o\r
+OBJS += cpu/cz80/cz80.o\r
endif\r
# bg images\r
OBJS += data/bg32.o data/bg40.o\r
\r
+vpath %.c = ../..\r
+vpath %.s = ../..\r
+DIRS = platform platform/psp platform/common Pico Pico/cd Pico/Pico Pico/sound Pico/carthw/svp \\r
+ zlib unzip cpu cpu/musashi cpu/fame cpu/mz80 cpu/cz80\r
+\r
\r
LIBS += -lpng -lm -lpspgu -lpsppower -lpspaudio -lpsprtc -lpspaudiocodec -lpspkubridge\r
#LIBS += -lpspprof\r
\r
# target\r
TARGET = PicoDrive\r
-EXTRA_TARGETS = EBOOT.PBP\r
+EXTRA_TARGETS = mkdirs EBOOT.PBP\r
PSP_EBOOT_TITLE = PicoDrive\r
PSP_EBOOT_ICON = data/icon.png\r
#PSP_EBOOT_PIC1 = .png\r
include $(PSPSDK)/lib/build.mak\r
\r
# some additional rules\r
+mkdirs:\r
+ mkdir -p $(DIRS)\r
+\r
.c.o:\r
@echo ">>>" $<\r
$(CC) $(CFLAGS) -c $< -o $@\r
../../cpu/musashi/m68kops.c :\r
make -C ../../cpu/musashi\r
\r
-../../cpu/fame/famec.o : ../../cpu/fame/famec.c\r
+cpu/fame/famec.o : ../../cpu/fame/famec.c\r
@echo ">>>" $<\r
$(CC) $(CFLAGS) -Wno-unused -c $< -o $@\r
\r
-../../Pico/Memory.o : ../../Pico/Memory.c\r
+Pico/Memory.o : ../../Pico/Memory.c\r
@echo ">>>" $<\r
$(CC) $(CFLAGS) -O2 -c $< -o $@ -D_ASM_MEMORY_C -D_ASM_MEMORY_C_AMIPS\r
\r
-../../Pico/cd/Memory.o : ../../Pico/cd/Memory.c\r
+Pico/cd/Memory.o : ../../Pico/cd/Memory.c\r
@echo ">>>" $<\r
$(CC) $(CFLAGS) -O2 -c $< -o $@\r
\r
-../../Pico/Draw.o : ../../Pico/Draw.c\r
+Pico/Draw.o : ../../Pico/Draw.c\r
@echo ">>>" $<\r
$(CC) $(CFLAGS) -c $< -o $@ -D_ASM_DRAW_C_AMIPS\r
\r
-../../Pico/Misc.o : ../../Pico/Misc.c\r
+Pico/Misc.o : ../../Pico/Misc.c\r
@echo ">>>" $<\r
$(CC) $(CFLAGS) -c $< -o $@ -D_ASM_MISC_C_AMIPS\r
\r
-../../Pico/cd/gfx_cd.o : ../../Pico/cd/gfx_cd.c\r
+Pico/cd/gfx_cd.o : ../../Pico/cd/gfx_cd.c\r
@echo ">>>" $<\r
$(CC) $(CFLAGS) -O2 -c $< -o $@\r
\r
# cleanup\r
\r
myclean:\r
+ rm -rf $(DIRS)\r
$(RM) PicoDrive.map\r
make -C ../../cpu/musashi clean\r
\r