-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (41 loc) · 1.18 KB
/
Copy pathMakefile
File metadata and controls
54 lines (41 loc) · 1.18 KB
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
54
TARGET = Llama2PSP
OBJ_DIR = .objects
BUILD_DIR = build
VPATH = .:src
SOURCES = main.cpp $(wildcard src/*.cpp)
OBJS = $(addprefix $(OBJ_DIR)/,$(notdir $(SOURCES:.cpp=.o)))
INCDIR =
CFLAGS = -O2 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
BUILD_PRX = 1
LIBDIR =
LDFLAGS =
LIBS = -lpspgu -lpsppower
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Llama 2 PSP CONFIG 0
PSP_EBOOT_ICON = assets/ICON0.png
PSP_EBOOT_PIC1 = assets/PIC1.png
.PHONY: build all clean post-build
build: all post-build
post-build:
@echo "post-Build: organizing files in folder $(BUILD_DIR)/"
@mkdir -p $(BUILD_DIR)
@mv EBOOT.PBP $(BUILD_DIR)/
@echo "compiling files..."
@cp resources/stories260K.bin $(BUILD_DIR)/
@cp resources/tok512.bin $(BUILD_DIR)/
@cp $(PSP_EBOOT_ICON) $(BUILD_DIR)/
@cp $(PSP_EBOOT_PIC1) $(BUILD_DIR)/
@echo "finished build: $(BUILD_DIR)"
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
$(OBJ_DIR)/%.o: %.cpp | $(OBJ_DIR)
@echo "compiling $<..."
$(CXX) $(CXXFLAGS) $(INCDIR) -c $< -o $@
$(OBJ_DIR):
@mkdir -p $(OBJ_DIR)
clean:
@echo "cleaning files"
@rm -rf EBOOT.PBP $(TARGET).elf $(TARGET).prx PARAM.SFO
@rm -rf $(OBJ_DIR) $(BUILD_DIR)