-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
60 lines (45 loc) · 1.41 KB
/
Makefile
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
55
56
57
58
59
60
TARGET = udcd_uvc
OBJS = src/main.o
LIBS = -lSceSysmemForDriver_stub -lSceThreadmgrForDriver_stub \
-lSceCpuForDriver_stub -lSceUdcdForDriver_stub \
-lSceDisplayForDriver_stub -lSceIftuForDriver_stub \
-ltaihenForKernel_stub
ifeq ($(DEBUG), 1)
OBJS += debug/log.o debug/draw.o debug/console.o debug/font_data.o
CFLAGS += -DDEBUG -Idebug
LIBS += -lSceSysclibForDriver_stub -lSceIofilemgrForDriver_stub
endif
ifeq ($(DISPLAY_OFF_OLED), 1)
CFLAGS += -DDISPLAY_OFF_OLED
LIBS += -lSceOledForDriver_stub
endif
ifeq ($(DISPLAY_OFF_LCD), 1)
CFLAGS += -DDISPLAY_OFF_LCD
LIBS += -lSceLcdForDriver_stub
endif
PREFIX = arm-vita-eabi
CC = $(PREFIX)-gcc
CFLAGS += -Wl,-q -Wall -O2 -nostartfiles -mcpu=cortex-a9 -mthumb-interwork -Iinclude
DEPS = $(OBJS:.o=.d)
all: $(TARGET).skprx
%.skprx: %.velf
vita-make-fself -c $< $@
%.velf: %.elf
vita-elf-create -e $(TARGET).yml $< $@
$(TARGET).elf: $(OBJS)
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LIBS)
%.o: %.c
$(CC) $(CFLAGS) -MMD -MP -c $< -o $@
.PHONY: clean send
clean:
@rm -rf $(TARGET).skprx $(TARGET).velf $(TARGET).elf $(OBJS) $(DEPS)
send: $(TARGET).skprx
curl -T $(TARGET).skprx ftp://$(PSVITAIP):1337/ux0:/data/tai/kplugin.skprx
@echo "Sent."
launch: send
echo "load_skprx ux0:/data/tai/kplugin.skprx" | nc $(PSVITAIP) 1338
@echo "Launched!"
taisend: $(TARGET).skprx
curl -T $(TARGET).skprx ftp://$(PSVITAIP):1337/ux0:/tai/$(TARGET).skprx
@echo "Sent."
-include $(DEPS)