diff options
author | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2021-09-23 11:51:46 +0200 |
---|---|---|
committer | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2021-09-23 11:51:46 +0200 |
commit | f5c27ba934802732f4ace381f5c07221cd164ce4 (patch) | |
tree | 53b66fc9ae6f4cfd547b714b54bd33809e384a5d /gui | |
parent | 2d4f6f722ff035b94770f7d5a421cfd7156e72c5 (diff) |
gui/build.sh: properly respect user variables
This ensures proper building when cross-compiling
and allows users to use different toolchain tools if
desired
Bug: https://bugs.gentoo.org/814017
Closes: https://0xacab.org/leap/bitmask-vpn/-/issues/550
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'gui')
-rwxr-xr-x | gui/build.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gui/build.sh b/gui/build.sh index e65aaf2..5ef144b 100755 --- a/gui/build.sh +++ b/gui/build.sh @@ -65,13 +65,13 @@ function buildGoLib { if [ "$XBUILD" == "no" ] then echo "[+] Building Go library with standard Go compiler" - CGO_ENABLED=1 GOOS=$GOOS CC=$CC CGO_CFLAGS=$CGO_CFLAGS CGO_LDFLAGS=$CGO_LDFLAGS go build -mod=vendor -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB + CGO_ENABLED=1 GOOS=$GOOS CC=$CC CGO_CFLAGS=$CGO_CFLAGS CGO_LDFLAGS=$CGO_LDFLAGS go build -mod=vendor -buildmode=c-archive -ldflags="-extar=$AR -extld=$LD -extldflags=$LDFLAGS" -o $TARGET_GOLIB $SOURCE_GOLIB fi if [ "$XBUILD" == "$WIN64" ] then echo "[+] Building Go library with mxe" echo "[+] Using cc:" $CC - CC=$CC CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB + CC=$CC CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -buildmode=c-archive -ldflags="-extar=$AR -extld=$LD -extldflags=$LDFLAGS" -o $TARGET_GOLIB $SOURCE_GOLIB fi } @@ -79,7 +79,7 @@ function buildQmake { echo "[+] Now building Qml app with Qt qmake" echo "[+] Using qmake in:" $QMAKE mkdir -p $QTBUILD - $QMAKE -o "$QTBUILD/Makefile" CONFIG+=release VENDOR_PATH=${VENDOR_PATH} $PROJECT + $QMAKE -early QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX -o "$QTBUILD/Makefile" CONFIG+=release VENDOR_PATH=${VENDOR_PATH} $PROJECT #CONFIG=+force_debug_info CONFIG+=debug CONFIG+=debug_and_release } @@ -120,7 +120,7 @@ function buildDefault { buildQmake make -C $QTBUILD clean - make -C $QTBUILD -j4 all + make -C $QTBUILD $MAKEFLAGS all renameOutput echo "[+] Done." |