-
Notifications
You must be signed in to change notification settings - Fork 84
/
Makefile
36 lines (28 loc) · 959 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
31
32
33
34
35
36
TARGET = v0rtex
PACKAGE = net.siguza.v0rtex
VERSION = 1.0.0
BIN = bin
SRC = src
RES = res
APP = $(BIN)/Payload/$(TARGET).app
PNGS := $(wildcard $(RES)/*.png)
FILES := $(TARGET) Info.plist $(PNGS:$(RES)/%=%)
IGCC ?= xcrun -sdk iphoneos gcc
ARCH ?= -arch armv7 -arch arm64
IGCC_FLAGS ?= -Wall -O3 -Llib -fmodules -framework IOKit $(CFLAGS)
STRIP ?= xcrun -sdk iphoneos strip
.PHONY: all clean
all: $(TARGET).ipa
$(TARGET).ipa: $(addprefix $(APP)/, $(FILES))
cd $(BIN) && zip -x .DS_Store -qr9 ../$@ Payload
$(APP)/$(TARGET): $(SRC)/*.m | $(APP)
$(IGCC) $(ARCH) -o $@ $(IGCC_FLAGS) $^
$(STRIP) $@
$(APP)/Info.plist: $(RES)/Info.plist | $(APP)
sed 's/$$(TARGET)/$(TARGET)/g;s/$$(PACKAGE)/$(PACKAGE)/g;s/$$(VERSION)/$(VERSION)/g' $(RES)/Info.plist > $@
$(APP)/%.png: $(RES)/$(@F) | $(APP)
cp $(RES)/$(@F) $@
$(APP):
mkdir -p $@
clean:
rm -rf $(BIN) $(TARGET).ipa