X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/ceffe6cd00a822d29681a0d35d98fc8fb83aa73b..3efab3e6baa3404fe596e927bdb1b4b27a4ba43f:/projects/sgauth/build diff --git a/projects/sgauth/build b/projects/sgauth/build index 81a897f9..a323cc09 100755 --- a/projects/sgauth/build +++ b/projects/sgauth/build @@ -24,7 +24,7 @@ else then DEFS="-DDEBUG" MAKEOPTS="-j1" - CXXFLAGS="$CXXFLAGS -g3 -W -Wall" + CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall" else MAKEOPTS="-j1" fi @@ -92,6 +92,16 @@ else SHELL="/usr/local/bin/bash" fi +if [ -z "$CC" ] +then + CC=gcc +fi + +if [ -z "$CXX" ] +then + CXX=g++ +fi + echo -n "Checking CC... " $CC --version > /dev/null 2> /dev/null if [ $? != 0 ] @@ -113,7 +123,7 @@ echo "found" echo -n "Checking endianess... " echo "int main() { int probe = 0x00000001; return *(char *)&probe; }" > build_check.c -$CC $CXXFLAGS $LDFLAGS build_check.c -o fake > /dev/null 2> /dev/null +$CC $CFLAGS $LDFLAGS build_check.c -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then echo "FAIL!" @@ -125,10 +135,12 @@ else then ARCH=le CXXFLAGS="$CXXFLAGS -DARCH_LE" + CFLAGS="$CFLAGS -DARCH_LE" echo "Little Endian" else ARCH=be CXXFLAGS="$CXXFLAGS -DARCH_BE" + CFLAGS="$CFLAGS -DARCH_BE" echo "Big Endian" fi fi @@ -152,6 +164,7 @@ echo "" >> $CONFFILE echo "LIB_THREAD=$LIB_THREAD" >> $CONFFILE echo "SHELL=$SHELL" >> $CONFFILE echo "CXXFLAGS=$CXXFLAGS" >> $CONFFILE +echo "CFLAGS=$CFLAGS" >> $CONFFILE echo "LDFLAGS=$LDFLAGS" >> $CONFFILE echo "PREFIX=$PREFIX" >> $CONFFILE echo "BIN_MODE=$BIN_MODE" >> $CONFFILE