shithub: openh264

Download patch

ref: ba38dc77a5995d43077f4699aae21ffd00494379
parent: 41a251630d35744d4a268d2df340cddecb71adaa
author: Martin Storsjö <[email protected]>
date: Fri Jan 10 08:28:19 EST 2014

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.

--- a/Makefile
+++ b/Makefile
@@ -29,11 +29,11 @@
 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 @@
 
 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
--- a/build/platform-mingw_nt.mk
+++ b/build/platform-mingw_nt.mk
@@ -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