changeset 36:d17d31b736c2

Improve build system.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 04 Oct 2012 06:47:16 +0300
parents 1bac8390dafc
children fdbf6e90804d
files Makefile Makefile.gwin Makefile.w32 Makefile.w64 config.mak
diffstat 5 files changed, 26 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Oct 04 06:42:20 2012 +0300
+++ b/Makefile	Thu Oct 04 06:47:16 2012 +0300
@@ -11,6 +11,4 @@
 OBJPATH ?= ./obj/unix/
 EXEEXT ?= .bin
 
-BINARIES=krapula
-
 include $(DMLIB)Makefile.gen
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.gwin	Thu Oct 04 06:47:16 2012 +0300
@@ -0,0 +1,20 @@
+#
+# Generic Windows cross-compilation with MinGW suite @ Linux
+# (included from Makefile.w32/w64)
+#
+
+DMLIB = ./dmlib/
+
+# C-compiler, flags and linker flags
+CC=$(MINGW_PREFIX)gcc
+AR=$(MINGW_PREFIX)ar
+RANLIB=$(MINGW_PREFIX)ranlib
+RM=rm
+
+SDL_CFLAGS=`$(MINGW_PATH)/bin/sdl-config --cflags`
+SDL_LDFLAGS=`$(MINGW_PATH)/bin/sdl-config --libs` -lSDL -L$(BINPATH)
+
+#CFLAGS=-mwindows
+LDFLAGS=-lmingw32 -s
+
+include $(DMLIB)Makefile.gen
--- a/Makefile.w32	Thu Oct 04 06:42:20 2012 +0300
+++ b/Makefile.w32	Thu Oct 04 06:47:16 2012 +0300
@@ -4,23 +4,8 @@
 MINGW_PREFIX=i686-w64-mingw32-
 MINGW_PATH=/usr/i686-w64-mingw32
 
-DMLIB = ./dmlib/
 BINPATH ?= ./
 OBJPATH ?= ./obj/win32/
 EXEEXT ?= .exe
 
-# C-compiler, flags and linker flags
-CC=$(MINGW_PREFIX)gcc
-AR=$(MINGW_PREFIX)ar
-RANLIB=$(MINGW_PREFIX)ranlib
-RM=rm
-
-SDL_CFLAGS=`$(MINGW_PATH)/bin/sdl-config --cflags`
-SDL_LDFLAGS=`$(MINGW_PATH)/bin/sdl-config --libs` -lSDL -L$(BINPATH)
-
-#CFLAGS=-mwindows
-LDFLAGS=-lmingw32 -s
-
-BINARIES=krapula
-
-include $(DMLIB)Makefile.gen
+include Makefile.gwin
--- a/Makefile.w64	Thu Oct 04 06:42:20 2012 +0300
+++ b/Makefile.w64	Thu Oct 04 06:47:16 2012 +0300
@@ -4,26 +4,8 @@
 MINGW_PREFIX=x86_64-w64-mingw32-
 MINGW_PATH=/usr/x86_64-w64-mingw32
 
-DMLIB = ./dmlib/
 BINPATH ?= ./exe/
-OBJPATH ?= ./win64/
-OBJPATH ?= ./obj/win32/
+OBJPATH ?= ./obj/win64/
 EXEEXT ?= -w64.exe
 
-# C-compiler, flags and linker flags
-CC=$(MINGW_PREFIX)gcc
-AR=$(MINGW_PREFIX)ar
-RANLIB=$(MINGW_PREFIX)ranlib
-RM=rm
-
-SDL_CFLAGS=`$(MINGW_PATH)/bin/sdl-config --cflags`
-SDL_LDFLAGS=`$(MINGW_PATH)/bin/sdl-config --libs` -lSDL -L$(BINPATH)
-TREMOR_CFLAGS=-I$(MINGW_PATH)/include/tremor
-TREMOR_LDFLAGS=$(MINGW_PATH)/lib/libvorbisidec.a  $(MINGW_PATH)/lib/libogg.a
-
-#CFLAGS=-mwindows
-LDFLAGS=-lmingw32 -s
-
-BINARIES=krapula
-
-include $(DMLIB)Makefile.gen
+include Makefile.gwin
--- a/config.mak	Thu Oct 04 06:42:20 2012 +0300
+++ b/config.mak	Thu Oct 04 06:47:16 2012 +0300
@@ -1,3 +1,6 @@
+# Additional binaries (aka the demo)
+BINARIES=krapula
+
 # Build engine tests and tools? (Please notice that what
 # actually gets built it also affected by other options)
 DM_BUILD_TESTS=no