forked from roothide/Dopamine2-roothide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
116 lines (92 loc) · 3.25 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#all: mktemp choma
#mktemp:
# rm -rf .build-dir
# mkdir .build-dir
#choma:
# $(MAKE) -C ChOma TARGET=ios DISABLE_SIGNING=1 DYLIB_LDFLAGS="-install_name @loader_path/libchoma.dylib" $@
all: basebin.tar
subprojects: ChOma XPF opainject libjailbreak systemhook forkfix launchdhook boomerang jbctl idownloadd watchdoghook rootlesshooks libroot
ChOma: .build .include
@$(MAKE) -C ChOma TARGET=ios DISABLE_SIGNING=1 DISABLE_TESTS=1 DYLIB_LDFLAGS="-install_name @loader_path/libchoma.dylib"
@cp ChOma/output/ios/lib/libchoma.dylib .build
@cp -r ChOma/output/ios/include/choma .include
XPF: .build .include ChOma
@$(MAKE) -C XPF libxpf.dylib CHOMA_DYLIB_PATH="../.build"
@cp XPF/libxpf.dylib .build
@mkdir -p .include/xpf
@cp XPF/src/xpf.h .include/xpf
opainject: .build .include
$(MAKE) -C opainject FINALPACKAGE=1
@cp opainject/.theos/obj/opainject .build
libjailbreak: .build .include ChOma
$(MAKE) -C libjailbreak
@cp libjailbreak/libjailbreak.dylib .build
@mkdir -p .include/libjailbreak
@cp libjailbreak/src/*.h .include/libjailbreak
systemhook: .build .include libjailbreak
$(MAKE) -C systemhook
@cp systemhook/systemhook.dylib .build
forkfix: .build .include libjailbreak
$(MAKE) -C forkfix
@cp forkfix/forkfix.dylib .build
launchdhook: .build .include libjailbreak
$(MAKE) -C launchdhook
@cp launchdhook/launchdhook.dylib .build
boomerang: .build .include libjailbreak
$(MAKE) -C boomerang
@cp boomerang/boomerang .build
jbctl: .build .include libjailbreak
$(MAKE) -C jbctl
@cp jbctl/jbctl .build
idownloadd: .build .include libjailbreak
$(MAKE) -C idownloadd
@cp idownloadd/idownloadd .build
watchdoghook: .build .include libjailbreak
$(MAKE) -C watchdoghook
@cp watchdoghook/watchdoghook.dylib .build
rootlesshooks: .build .include libjailbreak
$(MAKE) -C rootlesshooks
@cp rootlesshooks/.theos/obj/rootlesshooks.dylib .build
libroot: .build .include libjailbreak
@$(MAKE) -C ../Packages/libroot all
@cp ../Packages/libroot/libroot.dylib .build
.build:
rm -rf .build
mkdir -p .build
cp -r _external/basebin/* .build
cp _external/basebin/.version .build
ifeq ($(NIGHTLY), 1)
echo $(COMMIT_HASH) > .build/.version
endif
.include:
rm -rf .include
mkdir -p .include
cp -r _external/include/* .include
# If the SDK already ships XPC (it does so in iOS 17.4+), remove the local copy of it
ifneq (,$(wildcard $(shell xcrun --sdk iphoneos --show-sdk-path)/usr/include/xpc.modulemap))
rm -rf .include/xpc
endif
basebin.tc: subprojects
trustcache create .build/basebin.tc .build
cp .build/basebin.tc basebin.tc
basebin.tar: basebin.tc
@DYLD_FALLBACK_LIBRARY_PATH="." ./tar --transform "s/^.build/basebin/" -cvf "basebin.tar" ".build" --owner=0 --group=0
clean:
@$(MAKE) -C ChOma $@
@$(MAKE) -C XPF $@
@$(MAKE) -C opainject $@
@$(MAKE) -C libjailbreak $@
@$(MAKE) -C systemhook $@
@$(MAKE) -C forkfix $@
@$(MAKE) -C launchdhook $@
@$(MAKE) -C boomerang $@
@$(MAKE) -C jbctl $@
@$(MAKE) -C idownloadd $@
@$(MAKE) -C watchdoghook $@
@$(MAKE) -C rootlesshooks $@
@$(MAKE) -C ../Packages/libroot clean
@rm -rf .build
@rm -rf .include
@rm -rf basebin.tar
@rm -rf basebin.tc
.PHONY: clean .build .include ChOma XPF opainject libjailbreak systemhook forkfix launchdhook boomerang jbctl idownloadd watchdoghook rootlesshooks libroot basebin.tc basebin.tar