From ef3364922110680a2f5f30d9804ca1718b1e97c4 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Mon, 13 Nov 2017 12:11:07 -0500 Subject: [PATCH] Added buildsuper_x86.sh --- buildsuper_x86.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 buildsuper_x86.sh diff --git a/buildsuper_x86.sh b/buildsuper_x86.sh new file mode 100644 index 00000000..f563d421 --- /dev/null +++ b/buildsuper_x86.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# Store the real CWD +REAL_PWD="$PWD" + +# Find the code home folder +TARGET_FILE="$0" +cd `dirname $TARGET_FILE` +TARGET_FILE=`basename $TARGET_FILE` +while [ -L "$TARGET_FILE" ] +do + TARGET_FILE=`readlink $TARGET_FILE` + cd `dirname $TARGET_FILE` + TARGET_FILE=`basename $TARGET_FILE` +done +PHYS_DIR=`pwd -P` +SCRIPT_FILE=$PHYS_DIR/$TARGET_FILE +CODE_HOME=$(dirname "$SCRIPT_FILE") + +# Find the most reasonable candidate build file +SOURCE="$1" +if [ -z "$SOURCE" ]; then + SOURCE="$CODE_HOME/4coder_default_bindings.cpp" +fi + +TARGET_FILE="$SOURCE" +cd `dirname $TARGET_FILE` +TARGET_FILE=`basename $TARGET_FILE` +while [ -L "$TARGET_FILE" ] +do + TARGET_FILE=`readlink $TARGET_FILE` + cd `dirname $TARGET_FILE` + TARGET_FILE=`basename $TARGET_FILE` +done +PHYS_DIR=`pwd -P` +SOURCE=$PHYS_DIR/$TARGET_FILE + +FLAGS="-Wno-write-strings -Wno-null-dereference -Wno-comment -Wno-switch -Wno-writable-strings" + +DEBUG=-g + +cd "$REAL_PWD" +echo "Building custom_4coders.so from $SOURCE" +g++ -I"$CODE_HOME" $FLAGS $DEBUG -std=gnu++0x "$SOURCE" -shared -o custom_4coder.so -fPIC + + +