Commit d3a397a7 authored by Johnny Jazeix's avatar Johnny Jazeix

Modification of the configure script in order to easily add defines or options

parent 5ac10cdd
......@@ -50,8 +50,15 @@ makefile="Makefile"
with_otf=0
# where will we concatenate options like macros, libs...
compilation_src_pro="src.pro"
# For qmake
defines="\"DEFINES+="
libs="\"LIBS+="
includes="\"INCLUDES+="
sources="\"SOURCES+="
headers="\"HEADERS+="
usage()
{
......@@ -63,6 +70,7 @@ usage()
echo " --help"
echo " -h print this page"
echo
echo " --enable_spinning_logo makes the rabbit to turn when no trace is loaded"
echo " --enable_otf enables the otf support. The otf release used by default is in the src/general directory"
## Will be added later
# echo " --otf_include_dir=<path> set the otf directory path"
......@@ -80,7 +88,15 @@ while [ 0 -lt $# ]; do
;;
--enable_otf) # otf support
with_otf=1;
compilation_src_pro="\"DEFINES+=WITH_OTF\" \"LIBS+=general/otf/otflib/.libs/libotf.a -Lgeneral/otf/otflib/.libs\" \"SOURCES+=parser/ParserOTF.cpp parser/ParserEventOTF.cpp parser/ParserDefinitionOTF.cpp\" \"HEADERS+=parser/ParserOTF.hpp parser/ParserEventOTF.hpp parser/ParserDefinitionOTF.hpp\" src.pro "
defines="$defines WITH_OTF"
libs="$libs general/otf/otflib/.libs/libotf.a -Lgeneral/otf/otflib/.libs"
sources="$sources parser/ParserOTF.cpp parser/ParserEventOTF.cpp parser/ParserDefinitionOTF.cpp"
headers="$headers parser/ParserOTF.hpp parser/ParserEventOTF.hpp parser/ParserDefinitionOTF.hpp"
includes="$includes "
#compilation_src_pro="\"DEFINES+=WITH_OTF\" \"LIBS+=general/otf/otflib/.libs/libotf.a -Lgeneral/otf/otflib/.libs\" \"SOURCES+=parser/ParserOTF.cpp parser/ParserEventOTF.cpp parser/ParserDefinitionOTF.cpp\" \"HEADERS+=parser/ParserOTF.hpp parser/ParserEventOTF.hpp parser/ParserDefinitionOTF.hpp\" src.pro "
;;
--enable_spinning_logo) # good openGL spinning rabbit :)
defines="$defines SPINNING_LOGO"
;;
*)
echo "invalid option : $OPT";
......@@ -90,6 +106,14 @@ while [ 0 -lt $# ]; do
done
#end the qmake options
defines="$defines\"";
libs="$libs\"";
includes="$includes\"";
sources="$sources\"";
headers="$headers\"";
compilation_src_pro="$defines $libs $includes $sources $headers";
# find a make command
if [ -z "$MAKE" ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment