X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=tools%2Fmake%2Fc_configure.sh;h=011d048245afafd4a9a307369e007452ce401331;hb=c98bffa28b232b7e57ada05268ce7fe5316f15e9;hp=98d6191f4c3b608c04c2102d3cf8209fbf5dff9e;hpb=63c591ceca5b2c3a48887ecf45c4c8c0704954b7;p=projects.git diff --git a/tools/make/c_configure.sh b/tools/make/c_configure.sh index 98d6191..011d048 100755 --- a/tools/make/c_configure.sh +++ b/tools/make/c_configure.sh @@ -16,8 +16,9 @@ function install_cpp_make { src=$(pwd); pushd $1 if [ -f makefile ]; then rm makefile; fi + if [ -L makefile ]; then rm makefile; fi if [ -f make.post ]; then rm make.post; fi - ln -s $cwd/Make/cpp.make makefile + ln -s $cwd/projects/tools/make/cpp.make makefile echo "SOURCE = \\" > make.pre for file in $(ls *.cpp) do @@ -33,11 +34,11 @@ function install_cpp_make { else echo "CXXFLAGS += -std=c++0x" >> make.pre fi - echo "CXXFLAGS += -I$src/util" >> make.pre popd } function append_dependency { +# adds another drectory, where a c++ compile is performed # parameter: # $1: main directory # $2: dependency directory @@ -50,7 +51,28 @@ function append_dependency { echo "" >> $1/make.post } +function add_include { +# adds a include directory +# parameter: +# $1: main directory +# $2: include dir + + src=$(pwd) + echo "CXXFLAGS += -I$src/$2" >> $1/make.pre +} + +function add_library { +# adds a extern library +# parameter: +# $1: main directory +# $2: library name (without l or lib ) + + src=$(pwd) + echo "EXTLIB += -l$2" >> $1/make.pre +} + function append_library { +# same as append_dependency. In addition a include statement + a link to the library is added to "main directory" # parameter: # $1: main directory # $2: dependency directory @@ -59,6 +81,7 @@ function append_library { src=$(pwd) echo "DEPS += $3" >> $1/make.pre echo "LDLIBS += $3" >> $1/make.pre + echo "CXXFLAGS += -I$src/$2" >> $1/make.pre echo "$3:" >> $1/make.post echo " cd $src/$2 && make TARGET=$3" >> $1/make.post echo " ln -sf $src/$2/$3 ." >> $1/make.post