FreeBSD support

Use "gmake" instead of "make" when gmake is available.

The makefile used for libssp is a handwritten one that requires
GNU make features. mingw-w64 uses automake, which in principle should
work with BSD make, but mingw-w64-headers hangs indefinitely if built
with BSD make.
This commit is contained in:
russellhaley authored and Martin Storsjö committed 2020-03-04 09:52:22 +02:00
1 parent 3e35338ab3
commit 5fe2e05419
2 files changed
+17 -6

No files matched your search

+7 -1
View File
@@ -6,6 +6,12 @@ if [ $# -lt 1 ]; then
echo $0 dest
exit 1
fi
MAKE=make
if [ "$(which gmake)" != "" ]; then
MAKE=gmake
fi
PREFIX="$1"
mkdir -p "$PREFIX"
PREFIX="$(cd "$PREFIX" && pwd)"
@@ -41,7 +47,7 @@ cat ssp/ssp.h.in | sed 's/@ssp_have_usable_vsnprintf@/define/' > ssp/ssp.h
for arch in $ARCHS; do
mkdir -p build-$arch
cd build-$arch
make -f ../Makefile -j$CORES CROSS=$arch-w64-mingw32-
$MAKE -f ../Makefile -j$CORES CROSS=$arch-w64-mingw32-
mkdir -p "$PREFIX/$arch-w64-mingw32/bin"
cp libssp.a "$PREFIX/$arch-w64-mingw32/lib"
cp libssp_nonshared.a "$PREFIX/$arch-w64-mingw32/lib"