-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
30 lines (23 loc) · 797 Bytes
/
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
TARGET := libimgui
CPPSOURCES := .
CFILES :=
CPPFILES := $(foreach dir,$(CPPSOURCES), $(wildcard $(dir)/*.cpp))
BINFILES := $(foreach dir,$(DATA), $(wildcard $(dir)/*.bin))
OBJS := $(addsuffix .o,$(BINFILES)) $(CFILES:.c=.o) $(CPPFILES:.cpp=.o)
PREFIX = arm-vita-eabi
CC = $(PREFIX)-gcc
CXX = $(PREFIX)-g++
CFLAGS = -Wl,-q -O2 -g -mtune=cortex-a9 -mfpu=neon -ftree-vectorize
CXXFLAGS = $(CFLAGS) -fno-exceptions -std=gnu++17 -fpermissive
ASFLAGS = $(CFLAGS)
AR = $(PREFIX)-gcc-ar
all: $(TARGET).a
$(TARGET).a: $(OBJS)
$(AR) -rc $@ $^
install: $(TARGET).a
@mkdir -p $(VITASDK)/$(PREFIX)/lib/
cp $(TARGET).a $(VITASDK)/$(PREFIX)/lib/
@mkdir -p $(VITASDK)/$(PREFIX)/include/
cp *.h $(VITASDK)/$(PREFIX)/include/
clean:
@rm -rf $(TARGET).a $(TARGET).elf $(OBJS)