summaryrefslogtreecommitdiff
path: root/build_native.sh
blob: 44e1d45d520a8aa6cb795159f051a6e8a23909f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

rm exp.js
find js -name '*.js' -exec cat {} \; >> exp.js
echo >> exp.js
echo "main();" >> exp.js

# build for host
gcc	-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_arm															\
		-D__WHOAMI__="\"$(whoami)\""										\
		-D__PWD__="\"$(pwd)\""												\
		-g \
		--std=c99

ldid -Sent.xml bin/main_arm