forked from ptoomey3/Keychain-Dumper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·34 lines (27 loc) · 892 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
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 armv7s -arch arm64
LDFLAGS =\
-F$(SDK)/System/Library/Frameworks/\
-F$(SDK)/System/Library/PrivateFrameworks/\
-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: main.o list
@$(GCC_ARM) $(LDFLAGS) main.o -o keychain_dumper
main.o: main.m
$(GCC_ARM) -c main.m
clean:
rm -f keychain_dumper *.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 keychain_dumper