-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile.ut4
50 lines (39 loc) · 2.05 KB
/
Makefile.ut4
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
TARGET := urbanterror
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags)
SOURCES := code/renderercommon code/qcommon code/botlib code/client code/server code/renderergl1 code/psp2 code/sys
INCLUDES := code/renderercommon code/qcommon code/botlib code/client code/server code/renderergl1 code/psp2 code/sys
LIBS = -lSceAppMgr_stub -lvitaGL -lvorbisfile -lvorbis -logg -lspeexdsp -lmpg123 \
-lc -lSceCommonDialog_stub -lSceAudio_stub -lSceLibKernel_stub \
-lSceNet_stub -lSceNetCtl_stub -lpng -lz -lSceDisplay_stub -lSceGxm_stub \
-lSceSysmodule_stub -lSceCtrl_stub -lSceTouch_stub -lSceMotion_stub -lm \
-lSceAppUtil_stub -lScePgf_stub -ljpeg -lSceRtc_stub -lScePower_stub -lcurl \
-lssl -lcrypto -lSceSsl_stub -lmathneon -lSceKernelDmacMgr_stub
CFILES := $(filter-out code/psp2/psp2_dll_hacks.c,$(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(CPPSOURCES), $(wildcard $(dir)/*.cpp))
BINFILES := $(foreach dir,$(DATA), $(wildcard $(dir)/*.bin))
OBJS := $(addsuffix .o,$(BINFILES)) $(CFILES:.c=.o) $(CPPFILES:.cpp=.o)
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(dir))
PREFIX = arm-vita-eabi
CC = $(PREFIX)-gcc
CXX = $(PREFIX)-g++
CFLAGS = $(INCLUDE) -D__PSP2__ -D__FLOAT_WORD_ORDER=1 -D__GNU__ -DRELEASE \
-DUSE_ICON -DARCH_STRING=\"arm\" -DBOTLIB \
-DDEFAULT_BASEDIR=\"ux0:/data/ioq3\" -DURBANTERROR \
-DPRODUCT_VERSION=\"1.36_GIT_ba68b99c-2018-01-23\" -DHAVE_VM_COMPILED=true \
-mfpu=neon -mcpu=cortex-a9 -fsigned-char \
-Wl,-q -O2 -ftree-vectorize -g -ffast-math -fno-short-enums
CXXFLAGS = $(CFLAGS) -fno-exceptions -std=gnu++11
ASFLAGS = $(CFLAGS)
all: $(TARGET).bin
$(TARGET).bin: $(TARGET).velf
vita-make-fself -c -s $< build/$(TARGET).bin
eboot.bin: $(TARGET).velf
vita-make-fself -s $< eboot.bin
%.velf: %.elf
cp $< $<.unstripped.elf
$(PREFIX)-strip -g $<
vita-elf-create $< $@
$(TARGET).elf: $(OBJS)
$(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@
clean:
@rm -rf $(TARGET).velf $(TARGET).elf $(OBJS) $(TARGET).elf.unstripped.elf $(TARGET).vpk build/$(TARGET).bin