posaune
authorMichael Wagner <michael@wagnertech.de>
Tue, 17 Nov 2020 17:30:14 +0000 (18:30 +0100)
committerMichael Wagner <michael@wagnertech.de>
Tue, 17 Nov 2020 17:30:14 +0000 (18:30 +0100)
tools/make/c_configure.sh
tools/make/cpp.make
tools/make/mconfigure

index 246f1ed..57b395e 100755 (executable)
@@ -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
index 52f5409..7f318af 100644 (file)
@@ -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
index ed40855..e128871 100755 (executable)
@@ -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 ]