Set up proper -m flag manipulation for cross-compiling builds.
This commit is contained in:
parent
598a499072
commit
49595bb18d
|
@ -19,11 +19,13 @@ xCFLAGS = \
|
|||
-Wno-switch \
|
||||
--std=c99 \
|
||||
$(CFLAGS) \
|
||||
$(archmflag) \
|
||||
$(baseCFLAGS)
|
||||
|
||||
xLDFLAGS = \
|
||||
-g \
|
||||
$(LDFLAGS) \
|
||||
$(archmflag) \
|
||||
$(baseLDFLAGS)
|
||||
|
||||
OUT = $(OUTDIR)/$(OUTBASE)$(baseSUFFIX)
|
||||
|
|
|
@ -39,5 +39,5 @@ baseSUFFIX = $(osLIBSUFFIX)
|
|||
include GNUbase.mk
|
||||
|
||||
test: $(OUT)
|
||||
$(MAKE) -f GNUmaketest.mk osLIB=$(OUT) osEXESUFFIX=$(osEXESUFFIX) CC=$(CC)
|
||||
$(MAKE) -f GNUmaketest.mk osLIB=$(OUT) osEXESUFFIX=$(osEXESUFFIX) CC=$(CC) archmflag=$(archmflag)
|
||||
.PHONY: test
|
||||
|
|
|
@ -31,6 +31,7 @@ osLIBSUFFIX = .dylib
|
|||
osEXESUFFIX =
|
||||
|
||||
ifeq ($(ARCH),386)
|
||||
osCFLAGS += -m32
|
||||
osLDFLAGS += -m32
|
||||
archmflag = -m32
|
||||
else
|
||||
archmflag = -m64
|
||||
endif
|
||||
|
|
|
@ -38,11 +38,9 @@ osEXESUFFIX = .exe
|
|||
ifeq ($(ARCH),amd64)
|
||||
CC = x86_64-w64-mingw32-gcc
|
||||
RC = x86_64-w64-mingw32-windres
|
||||
osCFLAGS += -m64
|
||||
osLDFLAGS += -m64
|
||||
archmflag = -m64
|
||||
else
|
||||
CC = i686-w64-mingw32-gcc
|
||||
RC = i686-w64-mingw32-windres
|
||||
osCFLAGS += -m32
|
||||
osLDFLAGS += -m32
|
||||
archmflag = -m32
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue