fixed build flags
This commit is contained in:
parent
b098af3ebf
commit
360ef5eefe
18
build.sh
18
build.sh
@ -22,14 +22,14 @@ includeDirectory="/usr/include/why2"
|
|||||||
|
|
||||||
flags="-Wall -ljson-c -lcurl"
|
flags="-Wall -ljson-c -lcurl"
|
||||||
|
|
||||||
function runTest()
|
runTest()
|
||||||
{
|
{
|
||||||
###
|
###
|
||||||
echo "Using '$compiler' as default compiler."
|
echo "Using '$compiler' as default compiler."
|
||||||
###
|
###
|
||||||
|
|
||||||
# Check for debug flag
|
# Check for debug flag
|
||||||
if [[ "$2" == "debug" ]]; then ########## TEST & DEBUG ##########
|
if [[ "$1" == "debug" ]]; then ########## TEST & DEBUG ##########
|
||||||
flags="$flags -g"
|
flags="$flags -g"
|
||||||
echo "Using debug flag"
|
echo "Using debug flag"
|
||||||
fi
|
fi
|
||||||
@ -54,7 +54,7 @@ function runTest()
|
|||||||
###
|
###
|
||||||
}
|
}
|
||||||
|
|
||||||
function runInstall()
|
runInstall()
|
||||||
{
|
{
|
||||||
###
|
###
|
||||||
echo "Installing header files..."
|
echo "Installing header files..."
|
||||||
@ -68,7 +68,7 @@ function runInstall()
|
|||||||
cp $includeFiles $includeDirectory
|
cp $includeFiles $includeDirectory
|
||||||
ln -sf $includeDirectory/why2.h /usr/include/why2.h
|
ln -sf $includeDirectory/why2.h /usr/include/why2.h
|
||||||
|
|
||||||
if [[ "$2" == "include" ]]; then
|
if [[ "$1" == "include" ]]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -123,14 +123,14 @@ function runInstall()
|
|||||||
rm -rf *.o
|
rm -rf *.o
|
||||||
}
|
}
|
||||||
|
|
||||||
function runApp()
|
runApp()
|
||||||
{
|
{
|
||||||
###
|
###
|
||||||
echo "Using '$compiler' as default compiler."
|
echo "Using '$compiler' as default compiler."
|
||||||
###
|
###
|
||||||
|
|
||||||
# Check for debug flag
|
# Check for debug flag
|
||||||
if [[ "$2" == "debug" ]]; then ########## TEST & DEBUG ##########
|
if [[ "$1" == "debug" ]]; then ########## TEST & DEBUG ##########
|
||||||
flags="$flags -g"
|
flags="$flags -g"
|
||||||
echo "Using debug flag"
|
echo "Using debug flag"
|
||||||
fi
|
fi
|
||||||
@ -156,11 +156,11 @@ function runApp()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [[ "$1" == "test" ]]; then ########## TEST ##########
|
if [[ "$1" == "test" ]]; then ########## TEST ##########
|
||||||
runTest
|
runTest "$2"
|
||||||
elif [[ "$1" == "install" ]]; then ########## INSTALL ##########
|
elif [[ "$1" == "install" ]]; then ########## INSTALL ##########
|
||||||
runInstall
|
runInstall "$2"
|
||||||
elif [[ "$1" == "app" ]]; then ########## BUILD APP ##########
|
elif [[ "$1" == "app" ]]; then ########## BUILD APP ##########
|
||||||
runApp
|
runApp "$2"
|
||||||
else ########## ELSE ##########
|
else ########## ELSE ##########
|
||||||
if [[ "$1" == "installTest" ]]; then ########## INSTALL & TEST ##########
|
if [[ "$1" == "installTest" ]]; then ########## INSTALL & TEST ##########
|
||||||
runInstall
|
runInstall
|
||||||
|
Loading…
x
Reference in New Issue
Block a user