From 687cb61c43b5bfeb0b20a32cac3cf8a0069aa99a Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Fri, 8 Jul 2016 09:48:47 -0400 Subject: [PATCH] upgrade to buildsuper.sh --- buildsuper.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/buildsuper.sh b/buildsuper.sh index 23fc510b..91df38b6 100755 --- a/buildsuper.sh +++ b/buildsuper.sh @@ -7,5 +7,11 @@ then SOURCE="4coder_default_bindings.cpp" fi -g++ -Wno-write-strings -std=gnu++0x $SOURCE -shared -o 4coder_custom.so -fPIC +# NOTE(allen): This code here is pulled from stack exchange, it could totally be wrong +# but I just don't know. The goal is to get the path to the buildsuper.sh script so that +# path can be used as an include path which allows a file in any folder to be built in plcace. +SCRIPT_FILE=$(readlink -f "$0") +CODE_HOME=$(dirname "$SCRIPT") + +g++ -I"$CODE_HOME" -Wno-write-strings -std=gnu++0x $SOURCE -shared -o 4coder_custom.so -fPIC