-
Notifications
You must be signed in to change notification settings - Fork 0
/
psp.mk
54 lines (40 loc) · 1.29 KB
/
psp.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# PSP target Makefile
SOURCES_C = $(wildcard src/targets/psp/resources/*.c)
OBJS = $(addprefix $(BUILD_DIR)/, $(SOURCES:src/%.cpp=%.o)) $(addprefix $(BUILD_DIR)/, $(SOURCES_C:src/%.c=%.o))
HEADERS += -Iextlibs/gLib2D
CFLAGS = -O2 -G0 -Wall -DTARGET_PSP
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LDFLAGS = -Lextlibs/gLib2D
LIBS = -ljpeg -lpng -lz -lpspgum -lpspgu -lpsprtc -lm -lpspvram
#
PSP_EBOOT = bin/psp/EBOOT.PBP
PSP_EBOOT_SFO = bin/psp/PARAM.SFO
PSP_EBOOT_TITLE = Open TGM
#PSP_EBOOT_ICON = ICON0.png
#PSP_EBOOT_PIC1 = PIC1.png
# PSPSDK build system needs this
TARGET = ./build/psp/open-tgm
EXTRA_TARGETS = $(PSP_EBOOT)
all: print_info $(FINAL_TARGET)
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
$(BUILD_DIR)%.o: $(SRC_DIR)%.cpp
@echo $(CXX) $<
@$(CXX) $(CXXFLAGS) $(HEADERS) -o $@ -c $<
$(BUILD_DIR)%.o: $(SRC_DIR)%.c
@echo $(CC) $<
@$(CC) $(CFLAGS) $(HEADERS) -o $@ -c $<
#logo.o: logo.raw
# bin2o -i logo.raw logo.o logo
#finalize:
# mkdir -p ./build/psp
# mv EBOOT.PBP ./build/psp
# rm -rf ./build/psp/resources
# cp -r ./data/platform_specific/psp ./build/psp
# mv ./build/psp/psp ./build/psp/resources
print_info:
@echo C compiler: $(CC)
@echo C++ compiler: $(CXX)
@mkdir -p $(BUILD_DIR)/targets/psp/resources
.PHONY: print_info