Makefile upkeep

* Add DEBUG flag to build PRX, don't build by default (shrinks binary by 700kB)
* Add some MAKEFLAGS to enable multiple processes (multithread building)
* Renamed Application to "Nazi Zombies: Portable"
* Lowered firmware version requirement to 4.00
* Clear unneeded library links
* have `make clean` remove the build directory instead of leaving it
This commit is contained in:
Ian 2023-06-25 20:50:32 -04:00
parent 946cb5708e
commit eb069e78d2
2 changed files with 29 additions and 27 deletions

View file

@ -1,15 +1,16 @@
MAKEFLAGS+="-j -l $(shell grep -c ^processor /proc/cpuinfo) "
PSPSDK = $(shell psp-config --pspsdk-path) PSPSDK = $(shell psp-config --pspsdk-path)
PSPLIBSDIR = $(PSPSDK)/.. PSPLIBSDIR = $(PSPSDK)/..
TARGET = nzportable TARGET = nzportable
PSP_EBOOT_TITLE = Nazi Zombies Portable Reboot PSP_EBOOT_TITLE = Nazi Zombies: Portable
PSP_EBOOT_ICON = source/psp/pics/icon.png PSP_EBOOT_ICON = source/psp/pics/icon.png
PSP_EBOOT_SND0 = source/psp/pics/snd0.at3 PSP_EBOOT_SND0 = source/psp/pics/snd0.at3
PSP_EBOOT_PIC1 = source/psp/pics/pic.png PSP_EBOOT_PIC1 = source/psp/pics/pic.png
PSP_FW_VERSION=660 PSP_FW_VERSION=400
MODE=-DKERNEL_MODE MODE=-DKERNEL_MODE
@ -17,8 +18,10 @@ ifeq ($(USE_GPROF),1)
GPROF_LIBS = -lpspprof GPROF_LIBS = -lpspprof
GPROF_FLAGS = -pg -DPROFILE GPROF_FLAGS = -pg -DPROFILE
else else
ifeq ($(DEBUG),1)
BUILD_PRX = 1 BUILD_PRX = 1
endif endif
endif
COMMON_OBJS = \ COMMON_OBJS = \
source/psp/battery.o \ source/psp/battery.o \
@ -104,15 +107,13 @@ HARDWARE_VIDEO_ONLY_OBJS = \
source/psp/video_hardware_dxtn.o source/psp/video_hardware_dxtn.o
HARDWARE_VIDEO_ONLY_FLAGS = -DPSP_HARDWARE_VIDEO HARDWARE_VIDEO_ONLY_FLAGS = -DPSP_HARDWARE_VIDEO
OBJS = $(COMMON_OBJS) $(HARDWARE_VIDEO_ONLY_OBJS) OBJS = $(COMMON_OBJS) $(HARDWARE_VIDEO_ONLY_OBJS)
SDL_LIBS = -lSDL2 -lSDL2main -lvorbisfile -lvorbis -logg -lGL -lGLU -lglut SDL_LIBS = -lSDL2 -lSDL2main -lGL
GU_LIBS = -lpspgum_vfpu -lpspvfpu -lpspgu -lpspvram GU_LIBS = -lpspgum_vfpu -lpspvfpu -lpspgu -lpspvram
AUDIO_LIBS = -lpspaudiolib -lpspaudio -lpspmp3 source/psp/m33libs/libpspaudiocodec.a source/psp/m33libs/libpspkubridge.a AUDIO_LIBS = -lpspaudio -lpspmp3 source/psp/m33libs/libpspaudiocodec.a source/psp/m33libs/libpspkubridge.a
MISC_LIBS = -lpsprtc -lpsppower -lpspmath -lpsphprm -ljpeg -lpng -lz MISC_LIBS = -lpsppower -lpspmath -lpsphprm -ljpeg -lpng -lz
NET_LIBS = -lpspwlan -lpspnet_adhoc -lpspnet_adhocctl NET_LIBS = -lpspwlan -lpspnet_adhoc -lpspnet_adhocctl
STD_LIBS = -lstdc++ -lm -lc STD_LIBS = -lstdc++ -lm -lc
LIBS = $(GPROF_LIBS) $(SDL_LIBS) $(GU_LIBS) $(AUDIO_LIBS) $(MISC_LIBS) $(STD_LIBS) $(NET_LIBS) LIBS = $(GPROF_LIBS) $(SDL_LIBS) $(GU_LIBS) $(AUDIO_LIBS) $(MISC_LIBS) $(STD_LIBS) $(NET_LIBS)
@ -123,15 +124,16 @@ ASFLAGS = $(CFLAGS) -c
include $(PSPSDK)/lib/build.mak include $(PSPSDK)/lib/build.mak
ifneq ($(VS_PATH),) clean:
CC = vs-psp-gcc rm -rf build/
CXX = vs-psp-g++ rm source/*.o
endif
install: EBOOT.PBP install: EBOOT.PBP
mkdir -p build/exec/ mkdir -p build/exec/
mv EBOOT.PBP build/ mv EBOOT.PBP build/
mv *.elf build/exec/ ifeq ($(DEBUG),1)
mv *.prx build/exec/ mv *.prx build/exec/
endif
mv *.elf build/exec/
mv *.SFO build/exec/ mv *.SFO build/exec/
@echo DONE @echo DONE

View file

@ -1,17 +1,16 @@
MAKEFLAGS+="-j -l $(shell grep -c ^processor /proc/cpuinfo) "
PSPSDK = $(shell psp-config --pspsdk-path) PSPSDK = $(shell psp-config --pspsdk-path)
PSPLIBSDIR = $(PSPSDK)/.. PSPLIBSDIR = $(PSPSDK)/..
TARGET = nzportable TARGET = nzportable
PSP_EBOOT_TITLE = Nazi Zombies Portable Reboot PSP_EBOOT_TITLE = Nazi Zombies: Portable
PSP_EBOOT_ICON = source/psp/pics/icon.png PSP_EBOOT_ICON = source/psp/pics/icon.png
PSP_EBOOT_SND0 = source/psp/pics/snd0.at3 PSP_EBOOT_SND0 = source/psp/pics/snd0.at3
PSP_EBOOT_PIC1 = source/psp/pics/pic.png PSP_EBOOT_PIC1 = source/psp/pics/pic.png
PSP_FW_VERSION=660 PSP_FW_VERSION=400
PSP_LARGE_MEMORY = 1
MODE=-DKERNEL_MODE MODE=-DKERNEL_MODE
@ -19,8 +18,10 @@ ifeq ($(USE_GPROF),1)
GPROF_LIBS = -lpspprof GPROF_LIBS = -lpspprof
GPROF_FLAGS = -pg -DPROFILE GPROF_FLAGS = -pg -DPROFILE
else else
ifeq ($(DEBUG),1)
BUILD_PRX = 1 BUILD_PRX = 1
endif endif
endif
COMMON_OBJS = \ COMMON_OBJS = \
source/psp/battery.o \ source/psp/battery.o \
@ -106,15 +107,13 @@ HARDWARE_VIDEO_ONLY_OBJS = \
source/psp/video_hardware_dxtn.o source/psp/video_hardware_dxtn.o
HARDWARE_VIDEO_ONLY_FLAGS = -DPSP_HARDWARE_VIDEO HARDWARE_VIDEO_ONLY_FLAGS = -DPSP_HARDWARE_VIDEO
OBJS = $(COMMON_OBJS) $(HARDWARE_VIDEO_ONLY_OBJS) OBJS = $(COMMON_OBJS) $(HARDWARE_VIDEO_ONLY_OBJS)
SDL_LIBS = -lSDL2 -lSDL2main -lvorbisfile -lvorbis -logg -lGL -lGLU -lglut SDL_LIBS = -lSDL2 -lSDL2main -lGL
GU_LIBS = -lpspgum_vfpu -lpspvfpu -lpspgu -lpspvram GU_LIBS = -lpspgum_vfpu -lpspvfpu -lpspgu -lpspvram
AUDIO_LIBS = -lpspaudiolib -lpspaudio -lpspmp3 source/psp/m33libs/libpspaudiocodec.a source/psp/m33libs/libpspkubridge.a AUDIO_LIBS = -lpspaudio -lpspmp3 source/psp/m33libs/libpspaudiocodec.a source/psp/m33libs/libpspkubridge.a
MISC_LIBS = -lpsprtc -lpsppower -lpspmath -lpsphprm -ljpeg -lpng -lz MISC_LIBS = -lpsppower -lpspmath -lpsphprm -ljpeg -lpng -lz
NET_LIBS = -lpspwlan -lpspnet_adhoc -lpspnet_adhocctl NET_LIBS = -lpspwlan -lpspnet_adhoc -lpspnet_adhocctl
STD_LIBS = -lstdc++ -lm -lc STD_LIBS = -lstdc++ -lm -lc
LIBS = $(GPROF_LIBS) $(SDL_LIBS) $(GU_LIBS) $(AUDIO_LIBS) $(MISC_LIBS) $(STD_LIBS) $(NET_LIBS) LIBS = $(GPROF_LIBS) $(SDL_LIBS) $(GU_LIBS) $(AUDIO_LIBS) $(MISC_LIBS) $(STD_LIBS) $(NET_LIBS)
@ -125,15 +124,16 @@ ASFLAGS = $(CFLAGS) -c
include $(PSPSDK)/lib/build.mak include $(PSPSDK)/lib/build.mak
ifneq ($(VS_PATH),) clean:
CC = vs-psp-gcc rm -rf build/
CXX = vs-psp-g++ rm source/*.o
endif
install: EBOOT.PBP install: EBOOT.PBP
mkdir -p build/exec/ mkdir -p build/exec/
mv EBOOT.PBP build/EBOOT2000.PBP mv EBOOT.PBP build/EBOOT2000.PBP
mv *.elf build/exec/ ifeq ($(DEBUG),1)
mv *.prx build/exec/ mv *.prx build/exec/
endif
mv *.elf build/exec/
mv *.SFO build/exec/ mv *.SFO build/exec/
@echo DONE @echo DONE