-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
38 lines (29 loc) · 877 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
37
GCC_BIN=`xcrun --sdk iphoneos --find gcc`
SDK=`xcrun --sdk iphoneos --show-sdk-path`
#support iPhone 3GS and above, delete armv6 to avoid SDK error
ARCH_FLAGS=-arch armv7 -arch arm64
LDFLAGS =\
-F$(SDK)/System/Library/Frameworks/\
-framework UIKit\
-framework CoreFoundation\
-framework Foundation\
-framework CoreGraphics\
-framework Security\
-lobjc\
-lsqlite3\
-bind_at_load
GCC_ARM = $(GCC_BIN) -Os -Wimplicit -isysroot $(SDK) $(ARCH_FLAGS)
default: iAex.o list
@$(GCC_ARM) $(LDFLAGS) iAex.o -o iAex
iAex.o: iAex.m
$(GCC_ARM) -c iAex.m
iAex: iAex.m
$(GCC_ARM) -c iAex.m
@$(GCC_ARM) $(LDFLAGS) iAex.o -o iAex
clean:
rm -f iAex *.o
list:
security find-identity -pcodesigning
@printf '\nTo codesign, please run: \n\tCER="<40 character hex string for certificate>" make codesign\n'
codesign:
codesign -fs "$(CER)" --entitlements entitlements.xml iAex