From: kub Date: Tue, 30 Mar 2021 18:15:29 +0000 (+0200) Subject: build improvements for gph/psp devices X-Git-Tag: v2.00~568 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88a58f34a0924f78a15e2ea04640d7533e93f4f3;p=picodrive.git build improvements for gph/psp devices --- diff --git a/platform/gp2x/Makefile b/platform/gp2x/Makefile index ced50a4f..083ce14f 100644 --- a/platform/gp2x/Makefile +++ b/platform/gp2x/Makefile @@ -8,6 +8,8 @@ ifneq "$(BUILD)" "" VER := $(VER)_$(BUILD) endif +include ../../config.mak + all: rel ../../tools/textfilter: ../../tools/textfilter.c @@ -18,7 +20,10 @@ readme.txt: ../../tools/textfilter ../base_readme.txt ../../ChangeLog CODE940 = code940/pico940_v3.bin -rel: ../../PicoDrive PicoDrive.gpe $(CODE940) readme.txt ../game_def.cfg \ +PicoDrive: ../../PicoDrive + $(STRIP) $^ -o $@ + +rel: PicoDrive PicoDrive.gpe $(CODE940) readme.txt ../game_def.cfg \ PicoDrive.png PicoDrive_s.png PicoDrive_t.png \ warm_2.4.25.o warm_2.4.26-open2x.o warm_2.6.24.ko \ ../../pico/carthw.cfg diff --git a/platform/psp/Makefile b/platform/psp/Makefile index 1e451537..ee6ed25f 100644 --- a/platform/psp/Makefile +++ b/platform/psp/Makefile @@ -1,179 +1,4 @@ -# pspdev is expected to be in path -PSPSDK = $(shell psp-config --pspsdk-path) - -# settings -#use_musashi = 1 -#use_mz80 = 1 -amalgamate = 0 -for_15fw = 1 -# :!touch platform/psp/psp.c - - -CFLAGS += -I../.. -I. -DNO_SYNC -D_ASM_DRAW_C_AMIPS -CFLAGS += -Wall -Winline -G0 -#CFLAGS += -DLPRINTF_STDIO -#CFLAGS += -pg -ifeq ($(DEBUG),) -CFLAGS += -O2 -ftracer -fstrength-reduce -ffast-math -else -CFLAGS += -ggdb -endif -ifeq "$(for_15fw)" "1" -CFLAGS += -DFW15 -endif - -ifneq "$(BUILD)" "" -# frontend and stuff -OBJS += main.o emu.o mp3.o menu.o psp.o asm_utils.o - -# common -OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o platform/common/readpng.o - -# Pico -ifeq "$(amalgamate)" "1" -OBJS += ../../picoAll.o -else -OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o pico/videoport.o \ - pico/draw2.o pico/draw.o pico/z80if.o pico/patch.o pico/draw_amips.o pico/memory_amips.o \ - pico/misc_amips.o pico/debug.o -# Pico - CD -OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \ - pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \ - pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o -# Pico - carthw -OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \ - pico/carthw/svp/ssp16.o -# Pico - Pico -OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o -endif - -# Pico - sound -ifneq "$(amalgamate)" "1" -OBJS += pico/sound/sound.o -endif -OBJS += pico/sound/mix.o -OBJS += pico/sound/sn76496.o pico/sound/ym2612.o -# zlib (hacked) -OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \ - zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o \ - zlib/uncompr.o -# unzip -OBJS += unzip/unzip.o unzip/unzip_stream.o -# CPU cores -ifeq "$(use_musashi)" "1" -CFLAGS += -DEMU_M68K -OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o -else -CFLAGS += -DEMU_F68K -OBJS += cpu/fame/famec.o -endif -# z80 -ifeq "$(use_mz80)" "1" -CFLAGS += -D_USE_MZ80 -OBJS += cpu/mz80/mz80.o -else -CFLAGS += -D_USE_CZ80 -OBJS += cpu/cz80/cz80.o -endif -# bg images -OBJS += data/bg32.o data/bg40.o - -vpath %.c = ../.. -vpath %.s = ../.. -DIRS = platform platform/psp platform/common pico pico/cd pico/pico pico/sound pico/carthw/svp \ - zlib unzip cpu cpu/musashi cpu/fame cpu/mz80 cpu/cz80 - - -LIBS += -lpng -lm -lpspgu -lpsppower -lpspaudio -lpsprtc -lpspaudiocodec -lpspkubridge -#LIBS += -lpspprof -LDFLAGS += -Wl,-Map=PicoDrive.map - - -# target -TARGET = PicoDrive -EXTRA_TARGETS = mkdirs EBOOT.PBP -PSP_EBOOT_TITLE = PicoDrive -PSP_EBOOT_ICON = data/icon.png -#PSP_EBOOT_PIC1 = .png -ifneq "$(for_15fw)" "1" -BUILD_PRX = 1 -endif - -CUSTOM_CLEAN = myclean - -include $(PSPSDK)/lib/build.mak - -# some additional rules -mkdirs: - mkdir -p $(DIRS) - -.c.o: - @echo ">>>" $< - $(CC) $(CFLAGS) -c $< -o $@ - -AS := psp-as - -.s.o: - @echo ">>>" $< - $(AS) -march=allegrex -mtune=allegrex $< -o $@ - -../../cpu/musashi/m68kops.c : - make -C ../../cpu/musashi - -cpu/fame/famec.o : ../../cpu/fame/famec.c - @echo ">>>" $< - $(CC) $(CFLAGS) -Wno-unused -c $< -o $@ - -pico/misc.o : ../../pico/misc.c - @echo ">>>" $< - $(CC) $(CFLAGS) -c $< -o $@ -D_ASM_MISC_C_AMIPS - -pico/memory.o : ../../pico/memory.c - @echo ">>>" $< - $(CC) $(CFLAGS) -O2 -c $< -o $@ -D_ASM_MEMORY_C -D_ASM_MEMORY_C_AMIPS - -pico/cd/memory.o : ../../pico/cd/memory.c - @echo ">>>" $< - $(CC) $(CFLAGS) -O2 -c $< -o $@ - -pico/cd/gfx_cd.o : ../../pico/cd/gfx_cd.c - @echo ">>>" $< - $(CC) $(CFLAGS) -O2 -c $< -o $@ - -readme.txt: ../../tools/textfilter ../base_readme.txt - ../../tools/textfilter ../base_readme.txt $@ PSP - -../../tools/textfilter: ../../tools/textfilter.c - make -C ../../tools/ textfilter - -data/bg32.o: data/bg32.bin - bin2o -i $< $@ bgdatac32 - -data/bg40.o: data/bg40.bin - bin2o -i $< $@ bgdatac40 - -# -ifndef UPDIR -UPDIR = /media/disk/PSP/GAME/PicoDrive/ -endif -up: EBOOT.PBP - @cp -v $^ $(UPDIR) - - -# cleanup - -myclean: - #rm -rf $(DIRS) - $(RM) PicoDrive.map - make -C ../../cpu/musashi clean - - -clean_prof: - find ../.. -name '*.gcno' -delete - find ../.. -name '*.gcda' -delete -endif - # ----------- release ----------- ifneq ($(findstring rel,$(MAKECMDGOALS)),) ifeq ($(VER),) @@ -182,7 +7,7 @@ endif endif # ? -rel: EBOOT.PBP readme.txt ../game_def.cfg +rel: ../../EBOOT.PBP readme.txt ../game_def.cfg mkdir -p PicoDrive/skin/ cp $^ PicoDrive/ cp skin/* PicoDrive/skin/