summaryrefslogtreecommitdiff
path: root/build_native.sh
diff options
context:
space:
mode:
authorspv <aquaticvegetable@gmail.com>2022-04-22 13:33:36 -0400
committerspv <aquaticvegetable@gmail.com>2022-04-22 13:33:36 -0400
commitf6a6595c6df8266673decccbd909aecf4cd60cf0 (patch)
treecd06d24ffd1fa8d67d95f4fd298a8133038383ff /build_native.sh
parent64ef7cbaf51af9a60c19ff28c8cb5537c8134454 (diff)
wip compile on device
Diffstat (limited to 'build_native.sh')
-rwxr-xr-xbuild_native.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/build_native.sh b/build_native.sh
new file mode 100755
index 0000000..12ec3b9
--- /dev/null
+++ b/build_native.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+cat js/*.js > 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