Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 79eb1a99 authored by Johnny Jazeix's avatar Johnny Jazeix
Browse files

options for choosing otf dir added in the configure script, plugins window updated

parent 456a70fc
Branches
Tags
No related merge requests found
...@@ -49,6 +49,7 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown ...@@ -49,6 +49,7 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
makefile="Makefile" makefile="Makefile"
with_otf=0 with_otf=0
with_otf_default=1
config_specified=0 config_specified=0
# where will we concatenate options like macros, libs... # where will we concatenate options like macros, libs...
...@@ -58,7 +59,8 @@ compilation_src_pro="src.pro" ...@@ -58,7 +59,8 @@ compilation_src_pro="src.pro"
config="\"CONFIG+=" config="\"CONFIG+="
defines="\"DEFINES+=" defines="\"DEFINES+="
libs="\"LIBS+=" libs="\"LIBS+="
includes="\"INCLUDES+=" includepath="\"INCLUDEPATH+="
dependpath="\"DEPENDPATH+="
sources="\"SOURCES+=" sources="\"SOURCES+="
headers="\"HEADERS+=" headers="\"HEADERS+="
...@@ -103,8 +105,8 @@ usage() ...@@ -103,8 +105,8 @@ usage()
echo " --enable_otf" echo " --enable_otf"
echo " enables the otf support. The otf release used by default is in the src/general directory" echo " enables the otf support. The otf release used by default is in the src/general directory"
## Will be added later ## Will be added later
# echo " --otf_include_dir=<path> set the otf directory path" echo " --otf_include_dir=<path> set the otf directory path (default is general/otf/otflib if --enable_otf is set)"
# echo " --otf_library_dir=<path> set the otf library path (<path>/libotf.a)" echo " --otf_library_dir=<path> set the otf library path (<path>/libotf.a)"
exit 0 exit 0
} }
...@@ -119,10 +121,8 @@ while [ 0 -lt $# ]; do ...@@ -119,10 +121,8 @@ while [ 0 -lt $# ]; do
--enable_otf) # otf support --enable_otf) # otf support
with_otf=1; with_otf=1;
defines="$defines WITH_OTF" 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" sources="$sources parser/ParserOTF.cpp parser/ParserEventOTF.cpp parser/ParserDefinitionOTF.cpp"
headers="$headers parser/ParserOTF.hpp parser/ParserEventOTF.hpp parser/ParserDefinitionOTF.hpp" 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 " #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 :) --enable_spinning_logo) # good openGL spinning rabbit :)
...@@ -136,6 +136,17 @@ while [ 0 -lt $# ]; do ...@@ -136,6 +136,17 @@ while [ 0 -lt $# ]; do
config_specified=1; config_specified=1;
config="$config debug" config="$config debug"
;; ;;
--otf_include_dir=*) # otf include directory
include_dir=`echo $OPT | awk -F"--otf_include_dir=" '{print $2}'`
includepath="$includepath $include_dir"
dependpath="$dependpath $include_dir"
with_otf_default=0
;;
--otf_library_dir=*)
lib_dir=`echo $OPT | awk -F"--otf_library_dir=" '{print $2}'`
libs="$libs $lib_dir/libotf.a -L$lib_dir"
with_otf_default=0
;;
*) *)
echo "invalid option : $OPT"; echo "invalid option : $OPT";
exit 0; exit 0;
...@@ -149,13 +160,24 @@ if [ $config_specified == 1 ]; then ...@@ -149,13 +160,24 @@ if [ $config_specified == 1 ]; then
else else
config="$config release\""; config="$config release\"";
fi fi
if [ $with_otf == 1 -a "$includepath" = "\"INCLUDEPATH+=" ]; then
includepath="$includepath general/otf/otflib/"
dependpath="$dependpath general/otf/otflib/"
fi
if [ $with_otf == 1 -a "$libs" = "\"LIBS+=" ]; then
libs="$libs general/otf/otflib/.libs/libotf.a -Lgeneral/otf/otflib/.libs"
fi
defines="$defines\""; defines="$defines\"";
libs="$libs\""; libs="$libs\"";
includes="$includes\""; includepath="$includepath\"";
dependpath="$dependpath\"";
sources="$sources\""; sources="$sources\"";
headers="$headers\""; headers="$headers\"";
compilation_src_pro="$defines $config $libs $includes $sources $headers"; compilation_src_pro="$defines $config $libs $sources $headers $includepath $dependpath";
# find a make command # find a make command
if [ -z "$MAKE" ]; then if [ -z "$MAKE" ]; then
...@@ -186,7 +208,7 @@ cat > "$makefile" <<EOF ...@@ -186,7 +208,7 @@ cat > "$makefile" <<EOF
######################################################################## ########################################################################
EOF EOF
if [ $with_otf == 1 ]; then # set the directory... should be decided by the user, we will see after how to do beautiful options :) if [ $with_otf == 1 -a $with_otf_default == 1 ]; then # set the directory... should be decided by the user, we will see after how to do beautiful options :)
cat >> "$makefile" <<EOF cat >> "$makefile" <<EOF
OTFLIB_DIR = ./src/general/otf OTFLIB_DIR = ./src/general/otf
...@@ -253,7 +275,7 @@ clean: ...@@ -253,7 +275,7 @@ clean:
cleanall: clean cleanall: clean
EOF EOF
if [ $with_otf == 1 ]; then if [ $with_otf == 1 -a $with_otf_default == 1 ]; then
cat >>"$makefile" <<EOF cat >>"$makefile" <<EOF
make -C \$(OTFLIB_DIR) clean make -C \$(OTFLIB_DIR) clean
EOF EOF
...@@ -278,7 +300,7 @@ fi ...@@ -278,7 +300,7 @@ fi
EOF EOF
if [ $with_otf == 1 ]; then if [ $with_otf == 1 -a $with_otf_default == 1 ]; then
echo >&2 "Configuration of the otf library" echo >&2 "Configuration of the otf library"
cd $OTFLIB_DIR && ./configure cd $OTFLIB_DIR && ./configure
fi fi
......
...@@ -50,8 +50,8 @@ CONFIG+=uitools ...@@ -50,8 +50,8 @@ CONFIG+=uitools
QT+=opengl QT+=opengl
TEMPLATE = app TEMPLATE = app
TARGET = vite TARGET = vite
DEPENDPATH += . common interface parser trace trace/values trace/tree general/otf/otflib info render statistics DEPENDPATH += . common interface parser trace trace/values trace/tree info render statistics
INCLUDEPATH += . general/otf/otflib INCLUDEPATH += .
QMAKE_CFLAGS += -O2 QMAKE_CFLAGS += -O2
QMAKE_CXXFLAGS += -O2 QMAKE_CXXFLAGS += -O2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment