aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/build/bmake.mak
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/flext/build/bmake.mak')
-rw-r--r--externals/grill/flext/build/bmake.mak87
1 files changed, 68 insertions, 19 deletions
diff --git a/externals/grill/flext/build/bmake.mak b/externals/grill/flext/build/bmake.mak
index 5ee54fbb..1a3fc47d 100644
--- a/externals/grill/flext/build/bmake.mak
+++ b/externals/grill/flext/build/bmake.mak
@@ -1,29 +1,78 @@
-# PLATFORM - win
+# required settings:
+#
+# PLATFORM - win/mac/lnx
# RTSYS - pd/max
-# COMPILER - bcc
+# COMPILER - msvc/gcc/mingw/cygwin
+# BUILDPATH including trailing \
-# this should be improved
-BUILDPATH=..\flext\build
+# package info
+!include build\package.txt
-# general settings
-!include $(BUILDPATH)\config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt
+SYSCONFIG=$(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt
+SYSDEFAULT=$(BUILDPATH)$(PLATFORM)\$(RTSYS)\config-$(COMPILER).def
-###############################
-# these are project specific
+OPTIONS=-f $(BUILDPATH)bmake-sub.mak -N \
+ PLATFORM=$(PLATFORM) RTSYS=$(RTSYS) COMPILER=$(COMPILER) \
+ BUILDPATH=$(BUILDPATH)
-# special package settings
-!include config-$(PLATFORM)-$(COMPILER).txt
+!ifdef HAVECONFIG
+USRCONFIG=config.txt
+USRDEFAULT=build\config-$(PLATFORM).def
+OPTIONS=$(OPTIONS) USRCONFIG=$(USRCONFIG)
+!endif
-# package specific make stuff
-!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) $@
+
+
+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
-# platform-specific make stuff
-!include $(BUILDPATH)\make-$(PLATFORM)-$(RTSYS)-$(COMPILER).inc
-# general make stuff
-!include $(BUILDPATH)\make-$(PLATFORM)-gen-$(COMPILER).inc
+!ifdef HAVEMAKE
+$(USRMAKE):
+ @echo -------------------------------------------------------------------------
+ @echo Your combination of platform, system and compiler is not supported yet.
+ @echo Required file: $(USRMAKE)
+ @echo -------------------------------------------------------------------------
+ @exit 1
+!endif