X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=psp%2FMakefile;h=69505e32a3ce120805ffef4b87883daa03f257a2;hb=8a091e48251d061ad06ffd12dfe205cbb42c78df;hp=aecad367987672ae9a16b041c371ba1837c1c3cd;hpb=58bf1ea9cb04d3a0b7f218c6361861cd27d31f31;p=libpicofe.git diff --git a/psp/Makefile b/psp/Makefile index aecad36..69505e3 100644 --- a/psp/Makefile +++ b/psp/Makefile @@ -6,30 +6,28 @@ PSPSDK = $(shell psp-config --pspsdk-path) #use_musashi = 1 #use_mz80 = 1 amalgamate = 0 -#profile = 1 -#up = 1 +for_15fw = 1 -CFLAGS += -I../.. -I. -D_UNZIP_SUPPORT -DNO_SYNC -D_ASM_DRAW_C_MIPS # -DBENCHMARK +CFLAGS += -I../.. -I. -DNO_SYNC CFLAGS += -Wall -Winline -G0 +#CFLAGS += -DLPRINTF_STDIO +#CFLAGS += -pg ifeq ($(DEBUG),) CFLAGS += -O2 -ftracer -fstrength-reduce -ffast-math else CFLAGS += -ggdb endif -ifeq "$(profile)" "1" -CFLAGS += -fprofile-generate -endif -ifeq "$(profile)" "2" -CFLAGS += -fprofile-use +ifeq "$(for_15fw)" "1" +CFLAGS += -DFW15 endif -# frontend -OBJS += main.o emu.o mp3.o menu.o psp.o +# frontend and stuff +OBJS += main.o emu.o mp3.o menu.o psp.o asm_utils.o # common -OBJS += ../common/emu.o ../common/menu.o ../common/fonts.o ../common/readpng.o +OBJS += ../common/emu.o ../common/menu.o ../common/fonts.o ../common/config.o ../common/readpng.o # Pico ifeq "$(amalgamate)" "1" @@ -37,11 +35,16 @@ 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/Patch.o ../../Pico/Draw_amips.o + ../../Pico/Patch.o ../../Pico/Draw_amips.o ../../Pico/Memory_amips.o ../../Pico/Misc_amips.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/gfx_cd.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 @@ -76,14 +79,20 @@ endif OBJS += data/bg32.o data/bg40.o -LIBS += -lpng -lm -lpspgu -lpsppower -Wl,-Map=PicoDrive.map -lpspaudio +LIBS += -lpng -lm -lpspgu -lpsppower -lpspaudio -lpsprtc -lpspaudiocodec -lpspkubridge +#LIBS += -lpspprof +LDFLAGS += -Wl,-Map=PicoDrive.map + # target TARGET = PicoDrive EXTRA_TARGETS = EBOOT.PBP -PSP_EBOOT_TITLE = PICODRIVE -#PSP_EBOOT_ICON = .png +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 @@ -103,16 +112,36 @@ AS := psp-as ../../cpu/musashi/m68kops.c : make -C ../../cpu/musashi +../../cpu/fame/famec.o : ../../cpu/fame/famec.c + @echo ">>>" $< + $(CC) $(CFLAGS) -Wno-unused -c $< -o $@ + +../../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/Draw.o : ../../Pico/Draw.c + @echo ">>>" $< + $(CC) $(CFLAGS) -c $< -o $@ -D_ASM_DRAW_C_AMIPS + +../../Pico/Misc.o : ../../Pico/Misc.c + @echo ">>>" $< + $(CC) $(CFLAGS) -c $< -o $@ -D_ASM_MISC_C_AMIPS + +../../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 -../../cpu/fame/famec.o : ../../cpu/fame/famec.c - @echo ">>>" $< - $(CC) $(CFLAGS) -Wno-unused -c $< -o $@ - data/bg32.o: data/bg32.bin bin2o -i $< $@ bgdatac32 @@ -120,13 +149,17 @@ data/bg40.o: data/bg40.bin bin2o -i $< $@ bgdatac40 # +ifndef UPDIR +UPDIR = /media/disk/PSP/GAME/PicoDrive/ +endif up: EBOOT.PBP - @cp -v $^ /media/disk/PSP/GAME/PicoDrive/ + @cp -v $^ $(UPDIR) # cleanup myclean: + $(RM) PicoDrive.map make -C ../../cpu/musashi clean @@ -142,7 +175,25 @@ endif endif # ? -rel: EBOOT.PBP readme.txt - zip -9 -j ../../PicoDrive_$(VER).zip $^ -# zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt +rel: EBOOT.PBP readme.txt ../game_def.cfg + mkdir -p PicoDrive/skin/ + cp $^ PicoDrive/ + cp skin/* PicoDrive/skin/ + zip -9 -r ../../PicoDrive_psp_$(VER).zip PicoDrive + rm -rf PicoDrive + mkdir bin_to_cso_mp3 + cp ../../tools/bin_to_cso_mp3/* bin_to_cso_mp3/ + zip -9 -r ../../PicoDrive_psp_$(VER).zip bin_to_cso_mp3 + rm -rf bin_to_cso_mp3 + +rel_kxploit: readme.txt ../game_def.cfg + mkdir -p PicoDrive/skin/ + cp $^ PicoDrive/ + cp skin/* PicoDrive/skin/ + zip -9 -r ../../PicoDrive_psp_$(VER)_kxploit.zip PicoDrive + zip -9 -r ../../PicoDrive_psp_$(VER)_kxploit.zip PicoDrive% + mkdir bin_to_cso_mp3 + cp ../../tools/bin_to_cso_mp3/* bin_to_cso_mp3/ + zip -9 -r ../../PicoDrive_psp_$(VER)_kxploit.zip bin_to_cso_mp3 + rm -rf bin_to_cso_mp3