X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=tools%2Fmake%2Fc_configure.sh;h=c7b610ad560f220953f0cfcdc17aaeee703bfb3b;hb=f98036f07e88d9bf219ef068a78250c7ed6c7938;hp=8882c07c35a969c9a5f36e3b9f9e09a1f3ca936e;hpb=c8af998eae0c5d2dab14d5e36cccb9d9b6f60d0c;p=projects.git diff --git a/tools/make/c_configure.sh b/tools/make/c_configure.sh index 8882c07..c7b610a 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 @@ -30,12 +31,14 @@ function install_cpp_make { echo "CC = arm-linux-gnueabi-g++" >> make.pre echo "CXXFLAGS += -D_ARMEL" >> make.pre echo 'export PATH := /opt/eldk-5.0/armv5te/sysroots/i686-oesdk-linux/usr/bin/armv5te-linux-gnueabi/:/opt/eldk-5.0/armv5te/sysroots/i686-oesdk-linux/bin/armv5te-linux-gnueabi/:$(PATH)' >> make.pre + 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 @@ -48,7 +51,18 @@ 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 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 @@ -57,6 +71,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