-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.vita
31 lines (25 loc) · 1.15 KB
/
Makefile.vita
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
TARGET = vita-libun7zip.a
OBJS = source/7zAlloc.o source/7zCrc.o source/7zFile.o source/Bra.o source/Delta.o source/Ppmd7Dec.o \
source/7zArcIn.o source/7zCrcOpt.o source/7zFunctions.o source/Bra86.o source/Lzma2Dec.o \
source/7zBuf.o source/7zDec.o source/7zStream.o source/BraIA64.o source/LzmaDec.o \
source/7zBuf2.o source/7zExtractor.o source/Bcj2.o source/CpuArch.o source/Ppmd7.o
PREFIX = $(VITASDK)/bin/arm-vita-eabi
CC = $(PREFIX)-gcc
CXX = $(PREFIX)-g++
AR = $(PREFIX)-ar
CFLAGS = -Wl,-q -Wall -O3 -Wno-unused-variable -Wno-unused-but-set-variable -ffat-lto-objects -flto -D__PSVITA__ -Iinclude
CXXFLAGS = $(CFLAGS) -std=gnu++11 -fno-rtti
.PHONY: all clean
all: $(TARGET)
$(TARGET): $(OBJS)
$(AR) rcu $@ $^
clean:
@rm -rf $(TARGET) $(OBJS)
@echo "Cleaned up!"
install: $(TARGET)
@echo Copying...
@mkdir -p $(DESTDIR)$(VITASDK)/arm-vita-eabi/lib/
@mkdir -p $(DESTDIR)$(VITASDK)/arm-vita-eabi/include/
@cp -frv include/7zExtractor.h $(DESTDIR)$(VITASDK)/arm-vita-eabi/include/un7zip.h
@cp -frv $(TARGET) $(DESTDIR)$(VITASDK)/arm-vita-eabi/lib/libun7zip.a
@echo lib installed!