blob: 392ce3448025732002b11c3283770fe233ca279a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/bin/bash
# If any command errors, stop the script
set -e
# Set up directories
ORIGINAL=$PWD
ME="$(readlink -f "$0")"
LOCATION="$(dirname "$ME")"
cd $LOCATION
cd ..
CUSTOM_ROOT=$PWD
cd $ORIGINAL
target=$1
if [ -z "$target" ]
then
echo error: no input file
exit 1
fi
full_target=$target
if [[ ${target:0:1} != "/" ]];
then
full_target="$PWD/$target"
fi
dst=$2
if [[ $dst == "" ]];
then
dst=.
fi
debug=-g
opts="-Wno-write-strings -Wno-null-dereference -Wno-comment -Wno-switch -Wno-missing-declarations -Wno-logical-op-parentheses -g -DOS_LINUX=1 -DOS_WINDOWS=0 -DOS_MAC=0"
pushd $dst
g++ -I"$CUSTOM_ROOT" $opts $full_target -o one_time
popd
|