Add support for 64 bit mingw in the makefiles

By setting an overridable variable in the main makefile, we avoid
having to move the default -DUNIX64 into each of the other unix
platform makefiles, but still allowing the mingw platform to
override it.
This commit is contained in:
Martin Storsjö 2014-01-10 13:28:19 +02:00
parent 41a251630d
commit ba38dc77a5
2 changed files with 13 additions and 4 deletions

View File

@ -29,11 +29,11 @@ endif
ifeq ($(ENABLE64BIT), Yes)
CFLAGS += -m64
LDFLAGS += -m64
ASMFLAGS += -DUNIX64
ASMFLAGS_PLATFORM = -DUNIX64
else
CFLAGS += -m32
LDFLAGS += -m32
ASMFLAGS += -DX86_32
ASMFLAGS_PLATFORM = -DX86_32
endif
include build/platform-$(UNAME).mk
@ -44,7 +44,7 @@ endif
CFLAGS += -DNO_DYNAMIC_VP -DHAVE_CACHE_LINE_ALIGN
LDFLAGS +=
ASMFLAGS += -DNO_DYNAMIC_VP
ASMFLAGS += $(ASMFLAGS_PLATFORM) -DNO_DYNAMIC_VP
#### No user-serviceable parts below this line

View File

@ -1,5 +1,14 @@
ASM = nasm
CFLAGS += -DWIN32 -D__NO_CTYPE
CFLAGS += -D__NO_CTYPE
LDFLAGS +=
ifeq ($(ENABLE64BIT), Yes)
ASMFLAGS += -f win64
ASMFLAGS_PLATFORM = -DWIN64
CFLAGS += -DWIN64
CXX = x86_64-w64-mingw32-g++
AR = x86_64-w64-mingw32-ar
else
ASMFLAGS += -f win32 -DPREFIX
CFLAGS += -DWIN32
endif