1 # Makefile for the PSP.
2 # Based on examples at psp-programming.com
6 VERSION = $(shell cat VERSION)
7 GIT_BUILD = $(shell git describe)
8 TARGET = bin/psp/psprpn
9 PSP_EBOOT = bin/psp/EBOOT.PBP
10 PSP_EBOOT_SFO = bin/psp/PARAM.SFO
17 src/Calculator.o src/Commands.o src/Help.o src/History.o src/Main.o \
18 src/Operators.o src/Variables.o src/psp/port.o \
20 OBJS = $(subst $(SRCDIR),$(OBJDIR),$(MYOBJS))
22 $(OBJDIR)%.o: $(SRCDIR)%.cpp
23 @echo Compiling $(notdir $<)
24 @$(CC) $(CFLAGS) $(LFLAGS) -c $< -o $@
26 # The -G0 flag fixes some oddity in the MIPS architecture.
27 CFLAGS = -O2 -G0 -Wall -DRPN_PSP -DRPN_DOUBLE -DGIT_BUILD="\"$(GIT_BUILD)\""
28 CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
35 EXTRA_TARGETS = $(PSP_EBOOT)
36 PSP_EBOOT_TITLE = PSPRPN v. $(VERSION)
37 PSP_EBOOT_ICON = img/psprpn3.png
39 PSPSDK = $(shell psp-config --pspsdk-path)
40 include $(PSPSDK)/lib/build.mak
42 INSTALL_DIR = /media/disk/PSP/GAME/psprpn
44 install: $(EXTRA_TARGETS)
45 $(CP) $(EXTRA_TARGETS) $(INSTALL_DIR)