From: Michael Wagner Date: Tue, 17 Nov 2020 17:30:14 +0000 (+0100) Subject: posaune X-Git-Tag: verleihnix_0.1-2~3 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=491387902adf40b1223a3dd2d93bd064e1addeff;p=projects.git posaune --- diff --git a/tools/make/c_configure.sh b/tools/make/c_configure.sh index 246f1ed..57b395e 100755 --- a/tools/make/c_configure.sh +++ b/tools/make/c_configure.sh @@ -38,6 +38,13 @@ function install_cpp_make { echo " $file \\" >> make.pre done echo >> make.pre + if [ "$DEB_HOST_ARCH" != "$DEB_BUILD_ARCH" ] + then + #cross compiling + echo "PREFIX = $DEB_HOST_GNU_TYPE-" >> make.pre + echo "SYSROOT = --sysroot=$HOME/cross" >> make.pre + fi + if [ "$ARCH" = "armel" ] then echo "CXX = arm-linux-gnueabi-g++" >> make.pre diff --git a/tools/make/cpp.make b/tools/make/cpp.make index 52f5409..7f318af 100644 --- a/tools/make/cpp.make +++ b/tools/make/cpp.make @@ -1,7 +1,8 @@ # Generic cpp makefile for mBuild build process # default parameters -CC = g++ +CC = $(PREFIX)g++ +CXX = $(PREFIX)g++ include make.pre @@ -19,5 +20,6 @@ clean: ar r $(TARGET) *.o %.so: $(SOURCE:%.cpp=%.o) $(LDLIBS) - $(CXX) -shared -o $(TARGET) *.o $(LDFLAGS) $(LDLIBS) $(EXTLIB) + echo $(PATH) + $(CXX) -shared $(SYSROOT) -o $(TARGET) *.o $(LDFLAGS) $(LDLIBS) $(EXTLIB) -include make.post diff --git a/tools/make/mconfigure b/tools/make/mconfigure index ed40855..e128871 100755 --- a/tools/make/mconfigure +++ b/tools/make/mconfigure @@ -207,6 +207,7 @@ then # build prepare if [ -x debian/$paket.prepare ] then + . debian/setenv.sh debian/$paket.prepare fi if [ -e debian/$paket.build ]