2016-03-07 19:37:48 +00:00
|
|
|
#!/bin/bash
|
2016-05-07 17:25:45 +00:00
|
|
|
|
2016-07-08 13:48:47 +00:00
|
|
|
# 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
|
2016-07-09 05:21:08 +00:00
|
|
|
# path can be used as an include path which allows a file in any folder to be built in place.
|
2016-07-08 13:48:47 +00:00
|
|
|
SCRIPT_FILE=$(readlink -f "$0")
|
2016-07-09 05:21:08 +00:00
|
|
|
CODE_HOME=$(dirname "$SCRIPT_FILE")
|
|
|
|
|
|
|
|
SOURCE="$1"
|
|
|
|
if [ -z "$SOURCE" ]; then
|
|
|
|
SOURCE="$CODE_HOME/4coder_default_bindings.cpp"
|
|
|
|
fi
|
|
|
|
|
2017-02-06 15:26:11 +00:00
|
|
|
echo "Building custom_4coders.so from $SOURCE ..."
|
2016-07-08 13:48:47 +00:00
|
|
|
|
2017-02-20 21:05:42 +00:00
|
|
|
SOURCE=$(readlink -f "$SOURCE")
|
|
|
|
|
2017-02-06 15:26:11 +00:00
|
|
|
g++ -I"$CODE_HOME" -Wno-write-strings -std=gnu++0x "$SOURCE" -shared -o custom_4coder.so -fPIC
|
2016-03-07 19:37:48 +00:00
|
|
|
|