changeset 353:bf954444cce7

Move to combined Makefile.cross-mingw makefile instead of the separate w32/64 wrappers.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 21 Jan 2020 08:09:13 +0200
parents 4978ff445572
children 0e818307e90b
files Makefile.cross-mingw Makefile.w32 Makefile.w64
diffstat 3 files changed, 54 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.cross-mingw	Tue Jan 21 08:09:13 2020 +0200
@@ -0,0 +1,54 @@
+###
+### For Win32/Win64 version cross-compilation via MinGW
+### compiler suite under Linux/Unix
+###
+#
+# This Makefile assumes that you have MinGW installed under /usr
+# the way Debian MinGW packages do. It also assumes that you have
+# built/installed libogg, Tremor, libpng16, SDL2 ad SDL2_ttf under
+# __ /usr/local __ (not /usr!) in similar fashion.
+#
+# For differing configurations you will have to either edit this
+# file or alternatively provide make parameters, e.g.
+#
+# make -f Makefile.cross-mingw MINGW=64 BINTOOL_PREFIX=foo-bar-zoo
+#
+
+ifeq ($(MINGW),64)
+BINTOOL_PREFIX ?= x86_64-w64-mingw32-
+MINGW_SYS_PATH ?= /usr/x86_64-w64-mingw32
+MINGW_LOCAL_PATH ?= /usr/local/x86_64-w64-mingw32
+OBJPATH ?= ./obj/win64/
+else
+BINTOOL_PREFIX ?= i686-w64-mingw32-
+MINGW_SYS_PATH ?= /usr/i686-w64-mingw32
+MINGW_LOCAL_PATH ?= /usr/local/i686-w64-mingw32
+OBJPATH ?= ./obj/win32/
+endif
+
+
+# Miscellaneous
+PREFIX =
+BINPATH = ./
+BINEXT = .exe
+
+# Compiler flags and linker flags
+CFLAGS += \
+	-mconsole \
+	-DTH_BYTEORDER=TH_LITTLE_ENDIAN \
+	-D_NO_BOOL_TYPEDEF \
+	-DHAVE_STRING_H \
+	-DHAVE_INTTYPES_H
+
+LDFLAGS += -s
+STILGREPC_LDFLAGS += -lole32
+
+
+###
+### Stuff
+###
+#NOINST_TARGETS += $(ENDIANCHK_BIN) config.h
+#THLIBS_DEP += config.h
+
+include Makefile.gen
+
--- a/Makefile.w32	Tue Jan 21 04:41:49 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-#
-# For win32 version cross-compilation with MinGW suite @ Linux
-#
-
-# Compiler, flags and linker flags
-BINTOOL_PREFIX=i686-w64-mingw32-
-
-CFLAGS += -mconsole \
-	-DTH_BYTEORDER=TH_LITTLE_ENDIAN \
-	-D_NO_BOOL_TYPEDEF \
-	-DHAVE_STRING_H \
-	-DHAVE_INTTYPES_H
-
-LDFLAGS += -s
-
-# Miscellaneous
-BINEXT=.exe
-OBJPATH=./obj/win32/
-BINPATH=./
-
-
-###
-### Stuff
-###
-include Makefile.gen
-
--- a/Makefile.w64	Tue Jan 21 04:41:49 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#
-# For win64 version cross-compilation with MinGW suite @ Linux
-#
-
-# Compiler, flags and linker flags
-BINTOOL_PREFIX=x86_64-w64-mingw32-
-
-CFLAGS += -mconsole \
-	-DTH_BYTEORDER=TH_LITTLE_ENDIAN \
-	-D_NO_BOOL_TYPEDEF \
-	-DHAVE_STRING_H \
-	-DHAVE_INTTYPES_H
-
-LDFLAGS += -s
-
-# Miscellaneous
-BINEXT=.exe
-OBJPATH=./obj/win64/
-BINPATH=./
-
-
-###
-### Stuff
-###
-include Makefile.gen