-
Notifications
You must be signed in to change notification settings - Fork 146
/
Makefile
38 lines (31 loc) · 1.21 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
OBJROOT = BUILD/obj
DSTROOT = BUILD/dst
SYMROOT = BUILD/sym
LDID = ldid
SFLAGS = -Stfp0.plist
SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/
CC = xcrun -sdk iphoneos clang -arch armv7
CFLAGS = -no-integrated-as -DINLINE_IT_ALL
LDFLAGS = -miphoneos-version-min=6.0 -framework IOKit -framework CoreFoundation
all: multi_kloader kloader ibsspatch img3maker
kloader: kloader.c
SDKROOT=$(SDKROOT) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
$(LDID) $(SFLAGS) $@
multi_kloader: multi_kloader.c
SDKROOT=$(SDKROOT) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
$(LDID) $(SFLAGS) $@
ibsspatch: patch.c util.c ibootsup.c iboot_patcher.c
SDKROOT=$(SDKROOT) $(CC) $(CFLAGS) -o $@ patch.c util.c ibootsup.c iboot_patcher.c
$(LDID) $@
img3maker: img3maker.c
SDKROOT=$(SDKROOT) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
$(LDID) $@
clean:
rm -f kloader ibsspatch img3maker multi_kloader
rm -rf $(OBJROOT) $(DSTROOT) $(SYMROOT)
install: all
mkdir -p $(DSTROOT)/usr/local/bin
install -c -m 755 multi_kloader $(DSTROOT)/usr/local/bin
install -c -m 755 kloader $(DSTROOT)/usr/local/bin
install -c -m 755 ibsspatch $(DSTROOT)/usr/local/bin
install -c -m 755 img3maker $(DSTROOT)/usr/local/bin