mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
Fix compilation for MXE on Linux and WSL
Even though this isn't usually an option on the wiki, this will allow for cross-compilation of sm64pc through MXE on both Linux and WSL, making Wine testing much easier.
This commit is contained in:
parent
b8897eb5b4
commit
07aa2cd234
1 changed files with 26 additions and 5 deletions
31
Makefile
31
Makefile
|
@ -428,9 +428,17 @@ else
|
||||||
LD := $(CC)
|
LD := $(CC)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CPP := $(CROSS)cpp -P
|
ifeq ($(WINDOWS_BUILD),1) # fixes compilation in MXE on Linux and WSL
|
||||||
|
CPP := cpp -P
|
||||||
|
else
|
||||||
|
CPP := $(CROSS)cpp -P
|
||||||
|
endif
|
||||||
OBJDUMP := $(CROSS)objdump
|
OBJDUMP := $(CROSS)objdump
|
||||||
OBJCOPY := $(CROSS)objcopy
|
ifeq ($(WINDOWS_BUILD),1) # fixes compilation in MXE on Linux and WSL
|
||||||
|
OBJCOPY := $(CROSS)objcopy
|
||||||
|
else
|
||||||
|
OBJCOPY := $(CROSS)objcopy
|
||||||
|
endif
|
||||||
PYTHON := python3
|
PYTHON := python3
|
||||||
SDLCONFIG := $(CROSS)sdl2-config
|
SDLCONFIG := $(CROSS)sdl2-config
|
||||||
|
|
||||||
|
@ -473,9 +481,22 @@ LDFLAGS := -lm -lGL -lSDL2 -no-pie -s TOTAL_MEMORY=20MB -g4 --source-map-base ht
|
||||||
else
|
else
|
||||||
|
|
||||||
ifeq ($(WINDOWS_BUILD),1)
|
ifeq ($(WINDOWS_BUILD),1)
|
||||||
LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -Llib -lpthread -lglew32 `$(SDLCONFIG) --static-libs` -lm -lglu32 -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -lopengl32 -no-pie -static
|
ifeq ($(CROSS),i686-w64-mingw32.static-)
|
||||||
ifeq ($(WINDOWS_CONSOLE),1)
|
LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -Llib -lpthread -lglew32 `$(SDLCONFIG) --static-libs` -lm -lglu32 -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -lopengl32 -static
|
||||||
LDFLAGS += -mconsole
|
ifeq ($(WINDOWS_CONSOLE),1)
|
||||||
|
LDFLAGS += -mconsole
|
||||||
|
endif
|
||||||
|
else ifeq ($(CROSS),x86_64-w64-mingw32.static-)
|
||||||
|
LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -Llib -lpthread -lglew32 `$(SDLCONFIG) --static-libs` -lm -lglu32 -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -lopengl32 -static
|
||||||
|
ifeq ($(WINDOWS_CONSOLE),1)
|
||||||
|
LDFLAGS += -mconsole
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -Llib -lpthread -lglew32 `$(SDLCONFIG) --static-libs` -lm -lglu32 -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -lopengl32 -no-pie -static
|
||||||
|
ifeq ($(WINDOWS_CONSOLE),1)
|
||||||
|
LDFLAGS += -mconsole
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue