From f6a6595c6df8266673decccbd909aecf4cd60cf0 Mon Sep 17 00:00:00 2001 From: spv Date: Fri, 22 Apr 2022 13:33:36 -0400 Subject: wip compile on device --- build_native.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 build_native.sh (limited to 'build_native.sh') 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 -- cgit v1.2.3