diff options
author | couriersud <couriersud@arcor.de> | 2015-03-29 03:29:22 +0200 |
---|---|---|
committer | couriersud <couriersud@arcor.de> | 2015-03-29 03:29:22 +0200 |
commit | 935c280b4d68c581a97e2fbf2f91419773928b3c (patch) | |
tree | b482b2120f446d3d256609c81f9078b53bb8e4ba | |
parent | f2d6f4cde9fec14de2808e9df7997d109df43327 (diff) |
Fix cross-compile. The following will build mame64.exe on linux
make TARGETOS=windows PTR64=1 OSD=windows OS=linux VERBOSE=1 \
OVERRIDE_CC="@ccache x86_64-w64-mingw32-gcc" \
OVERRIDE_CXX="@ccache x86_64-w64-mingw32-g++" \
OVERRIDE_LD="x86_64-w64-mingw32-g++" \
WINDRES="x86_64-w64-mingw32-windres" \
MINGW64=/usr $*
-rw-r--r-- | makefile | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -133,6 +133,8 @@ ARCHITECTURE = x64 endif endif +else +CROSS_BUILD = 1 endif # TARGET_OS ifdef PTR64 @@ -191,16 +193,22 @@ PARAMS+= --distro=$(DISTRO) ifdef OVERRIDE_CC PARAMS+= --CC='$(OVERRIDE_CC)' +ifndef CROSS_BUILD CC = $(OVERRIDE_CC) endif +endif ifdef OVERRIDE_CXX PARAMS+= --CXX='$(OVERRIDE_CXX)' +ifndef CROSS_BUILD CXX = $(OVERRIDE_CXX) endif +endif ifdef OVERRIDE_LD PARAMS+= --LD='$(OVERRIDE_LD)' +ifndef CROSS_BUILD LD = $(OVERRIDE_LD) endif +endif #------------------------------------------------- # sanity check the configuration @@ -299,10 +307,10 @@ endif # extension for executables EXE = -ifeq ($(TARGETOS),windows) +ifeq ($(OS),windows) EXE = .exe endif -ifeq ($(TARGETOS),os2) +ifeq ($(OS),os2) EXE = .exe endif |