summaryrefslogtreecommitdiff
path: root/build.sh
blob: 03fbe43eb0f885e5eb9086c52db134307615b164 (plain)
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
#!/bin/bash

cat js/*.js > exp.js
echo >> exp.js
echo "main();" >> exp.js

# build for host
clang	-I $(pwd)/inc/														\
		src/main.c															\
		src/ip_tools.c														\
		src/stage0_primitives.c												\
		src/stage1_primitives.c												\
		src/patchfinder.c													\
		src/stage2.c														\
		src/shit.c															\
		-o bin/main															\
		-D__WHOAMI__="\"$(whoami)\""										\
		-D__PWD__="\"$(pwd)\""												\
		-g 

# build armv7 (for untether install)
xcrun -sdk iphoneos clang -arch armv7	src/main.c							\
										src/ip_tools.c						\
										src/stage0_primitives.c				\
										src/stage1_primitives.c				\
										src/patchfinder.c					\
										src/stage2.c						\
										src/shit.c							\
										-o bin/main_arm						\
										-D__WHOAMI__="\"$(whoami)\""		\
										-D__PWD__="\"$(pwd)\""				\
										-framework JavaScriptCore			\
										-g

ldid -Sent.xml bin/main_arm