aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/build/nmake.mak
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2004-12-19 05:04:19 +0000
committerThomas Grill <xovo@users.sourceforge.net>2004-12-19 05:04:19 +0000
commit48c6d0ca4c82a190683380e45821159636080e51 (patch)
tree26f5606b683c0aa998ce68d1670fb5a528755c65 /externals/grill/flext/build/nmake.mak
parentf90c5622c0eb6fbecb35e2d1f9d4f37963d29f89 (diff)
simplified make system
updated make system svn path=/trunk/; revision=2412
Diffstat (limited to 'externals/grill/flext/build/nmake.mak')
-rw-r--r--externals/grill/flext/build/nmake.mak83
1 files changed, 66 insertions, 17 deletions
diff --git a/externals/grill/flext/build/nmake.mak b/externals/grill/flext/build/nmake.mak
index c8c599f1..35b3de0c 100644
--- a/externals/grill/flext/build/nmake.mak
+++ b/externals/grill/flext/build/nmake.mak
@@ -1,30 +1,79 @@
+# required settings:
+#
# PLATFORM - win/mac/lnx
# RTSYS - pd/max
# COMPILER - msvc/gcc/mingw/cygwin
+# BUILDPATH including trailing \
-# general settings
-!include config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt
+# package info
+!include build\package.txt
+
+SYSCONFIG=$(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt
+SYSDEFAULT=$(BUILDPATH)$(PLATFORM)\$(RTSYS)\config-$(COMPILER).def
-###############################
-# these are project specific
+OPTIONS=-f $(BUILDPATH)nmake-sub.mak \
+ PLATFORM=$(PLATFORM) RTSYS=$(RTSYS) COMPILER=$(COMPILER) \
+ BUILDPATH=$(BUILDPATH)
-# special package settings
-!if exist(config-$(PLATFORM)-$(COMPILER).txt)
-!include config-$(PLATFORM)-$(COMPILER).txt
+
+!ifdef HAVECONFIG
+USRCONFIG=config.txt
+USRDEFAULT=build\config-$(PLATFORM).def
+OPTIONS=$(OPTIONS) USRCONFIG=$(USRCONFIG)
!endif
-# package specific make stuff
-!if exist(makefile-$(PLATFORM)-$(COMPILER).txt)
-!include makefile-$(PLATFORM)-$(COMPILER).txt
+!ifdef HAVEMAKE
+USRMAKE=build\makefile-$(PLATFORM)-$(COMPILER).inc
+OPTIONS=$(OPTIONS) USRMAKE=$(USRMAKE)
!endif
-# package info
-!include make-files.txt
-##############################
+all: config
+ $(MAKE) $(OPTIONS) all
+
+all-debug: config
+ $(MAKE) $(OPTIONS) DEBUG=1 $@
+
+all-shared: config
+ $(MAKE) $(OPTIONS) SHARED=1 $@
+
+all-shared-debug: config
+ $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 $@
+
+clean install:
+ $(MAKE) $(OPTIONS) $@
-# platform-specific make stuff
-!include make-$(PLATFORM)-$(RTSYS)-$(COMPILER).inc
-# general make stuff
-!include make-$(PLATFORM)-gen-$(COMPILER).inc
+
+config: $(USRMAKE) $(SYSCONFIG) $(USRCONFIG)
+
+
+.precious: $(SYSCONFIG) $(USRCONFIG)
+
+$(SYSCONFIG): $(SYSDEFAULT)
+ @copy $** $@
+ @echo -------------------------------------------------------------------------
+ @echo A default system configuration file has been created.
+ @echo Please edit $(SYSCONFIG)
+ @echo to match your platform and start again.
+ @echo -------------------------------------------------------------------------
+ @exit 1
+
+!ifdef HAVECONFIG
+$(USRCONFIG): $(USRDEFAULT)
+ @copy $** $@
+ @echo -------------------------------------------------------------------------
+ @echo A default package configuration file has been created.
+ @echo Please edit $(USRCONFIG) and start again.
+ @echo -------------------------------------------------------------------------
+ @exit 1
+!endif
+
+!ifdef HAVEMAKE
+$(USRMAKE):
+ @echo -------------------------------------------------------------------------
+ @echo Your combination of platform, system and compiler is not supported yet.
+ @echo Required file: $(USRMAKE)
+ @echo -------------------------------------------------------------------------
+ @exit 1
+!endif