diff options
85 files changed, 1593 insertions, 1181 deletions
diff --git a/externals/grill/flext/build.bat b/externals/grill/flext/build.bat index 93b03ed4..a7936e8b 100644 --- a/externals/grill/flext/build.bat +++ b/externals/grill/flext/build.bat @@ -4,7 +4,7 @@ @rem %1 - platform (win/lnx/mac) @rem %2 - system (pd/max) @rem %3 - compiler (msvc/gcc/mingw/cygwin/bcc/icc) -@rem %4 - target (all/all-debug/all-shared/all-shared-debug/clean/install) +@rem %4 - target (build/clean/install) @set platform=%1 @set rtsys=%2 diff --git a/externals/grill/flext/build.sh b/externals/grill/flext/build.sh index a0969965..c6d8d675 100644 --- a/externals/grill/flext/build.sh +++ b/externals/grill/flext/build.sh @@ -5,7 +5,7 @@ if [ "$flext" = "$0"/ ]; then flext=./ ; fi # $1 - platform (win/lnx/mac) # $2 - system (pd/max) # $3 - compiler (msvc/gcc/mingw/cygwin/bcc/icc) -# $4 - target (all/all-debug/all-shared/all-shared-debug/clean/install) +# $4 - target (build/clean/install) platform=$1 rtsys=$2 @@ -25,8 +25,7 @@ else echo platform ... win / lnx / mac echo system ..... pd / max echo compiler ... msvc / gcc / mingw / cygwin / bcc / icc - echo target ..... all \(default\) / all-debug / all-shared / all-shared-debug / - echo ............ clean / install + echo target ..... build \(default\) / clean / install echo echo Please make sure that your make program and compiler can be accessed with the echo system path and that all relevant environment variables are properly set. diff --git a/externals/grill/flext/buildsys/bmake-ext.inc b/externals/grill/flext/buildsys/bmake-ext.inc new file mode 100644 index 00000000..d959aaca --- /dev/null +++ b/externals/grill/flext/buildsys/bmake-ext.inc @@ -0,0 +1 @@ +OUTNAME=$(NAME)
diff --git a/externals/grill/flext/buildsys/bmake-flext.inc b/externals/grill/flext/buildsys/bmake-flext.inc index 9ee6e5c4..8d3f177c 100644 --- a/externals/grill/flext/buildsys/bmake-flext.inc +++ b/externals/grill/flext/buildsys/bmake-flext.inc @@ -1,90 +1,3 @@ -##############################################
-# flext defines
-##############################################
-
-!ifdef SHARED
-# --- shared ---
-DEFS=$(DEFS) /DFLEXT_SHARED
-
-!else
-!ifdef THREADED
-# --- static multi-threaded ---
-DEFS=$(DEFS) /DFLEXT_THREADS
-
-!else
-# --- static single-threaded ---
-
-!endif
-!endif
-
-
-!ifdef FLEXTBUILD
DEFS=$(DEFS) /DFLEXT_EXPORTS
-!endif
-
-##############################################
-# name of flext library
-##############################################
-
-!ifdef SHARED
-
-!ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_d
-!else
-FLEXTNAME=flext-$(RTSYS)
-!endif
-
-!else
-
-!ifdef THREADED
-!ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_td
-!else
-FLEXTNAME=flext-$(RTSYS)_t
-!endif
-!else
-!ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_d
-!else
-FLEXTNAME=flext-$(RTSYS)
-!endif
-!endif
-
-!endif # SHARED
-
-##############################################
-# build subdirectories
-##############################################
-
-!ifdef FLEXTBUILD
-
-!ifdef SHARED
-
-!ifdef DEBUG
-OUTSUB=dd
-!else
-OUTSUB=dr
-!endif
-
-!else # SHARED
-
-!ifdef THREADED
-!ifdef DEBUG
-OUTSUB=td
-!else
-OUTSUB=tr
-!endif
-!else
-!ifdef DEBUG
-OUTSUB=sd
-!else
-OUTSUB=sr
-!endif
-!endif
-
-!endif # SHARED
-
-!else # FLEXTBUILD
-OUTSUB=.
-!endif # FLEXTBUILD
+OUTNAME=$(FLEXTNAME)
diff --git a/externals/grill/flext/buildsys/bmake-sub.mak b/externals/grill/flext/buildsys/bmake-sub.mak index 4cd3df30..5baa4be9 100644 --- a/externals/grill/flext/buildsys/bmake-sub.mak +++ b/externals/grill/flext/buildsys/bmake-sub.mak @@ -1,8 +1,8 @@ +# general settings !include $(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt ############################### - -# these are project specific +# project-specific definitions # package info !include $(USRINFO) @@ -19,10 +19,43 @@ ############################## +!ifndef TARGETMODE +!ifdef DEBUG +TARGETMODE=debug +!else +TARGETMODE=release +!endif +!endif + +!ifndef TARGETTYPE +!ifdef SHARED +TARGETTYPE=shared +!else +!ifdef THREADED +TARGETTYPE=multi +!else +TARGETTYPE=single +!endif +!endif +!endif + +############################## # flext-specific make stuff -!include $(BUILDPATH)bmake-flext.inc +!include $(BUILDPATH)bmake-$(BUILDCLASS).inc + +!include $(BUILDPATH)bmake.inc + +############################## # platform-specific make stuff -!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\make-$(COMPILER).inc + +!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\bmake-$(COMPILER)-$(BUILDCLASS).inc + +!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\bmake-$(COMPILER).inc + +############################## # general make stuff -!include $(BUILDPATH)$(PLATFORM)\make-$(COMPILER).inc + +!include $(BUILDPATH)$(PLATFORM)\bmake-$(COMPILER)-$(BUILDCLASS).inc + +!include $(BUILDPATH)$(PLATFORM)\bmake-$(COMPILER).inc diff --git a/externals/grill/flext/buildsys/bmake.inc b/externals/grill/flext/buildsys/bmake.inc new file mode 100644 index 00000000..6495c2de --- /dev/null +++ b/externals/grill/flext/buildsys/bmake.inc @@ -0,0 +1,55 @@ +##############################################
+# flext defines
+##############################################
+
+!ifdef SHARED
+# --- shared ---
+DEFS=$(DEFS) /DFLEXT_SHARED
+
+!else
+!ifdef THREADED
+# --- static multi-threaded ---
+DEFS=$(DEFS) /DFLEXT_THREADS
+
+!else
+# --- static single-threaded ---
+
+!endif
+!endif
+
+##############################################
+# name of flext library
+##############################################
+
+!ifdef SHARED
+
+!ifdef DEBUG
+FLEXTNAME=flext-$(RTSYS)_d
+!else
+FLEXTNAME=flext-$(RTSYS)
+!endif
+
+!else
+
+!ifdef THREADED
+!ifdef DEBUG
+FLEXTNAME=flext-$(RTSYS)_td
+!else
+FLEXTNAME=flext-$(RTSYS)_t
+!endif
+!else
+!ifdef DEBUG
+FLEXTNAME=flext-$(RTSYS)_sd
+!else
+FLEXTNAME=flext-$(RTSYS)_s
+!endif
+!endif
+
+!endif # SHARED
+
+##############################################
+# product name and folder
+##############################################
+
+OUTNAME=$(NAME)
+OUTSUB=$(TARGETMODE)-$(TARGETTYPE)
diff --git a/externals/grill/flext/buildsys/bmake.mak b/externals/grill/flext/buildsys/bmake.mak index 2c341029..ef061486 100644 --- a/externals/grill/flext/buildsys/bmake.mak +++ b/externals/grill/flext/buildsys/bmake.mak @@ -5,20 +5,48 @@ # COMPILER - msvc/gcc/mingw/cygwin # BUILDPATH including trailing \ +############################################### # package info + USRINFO=package.txt !include $(USRINFO) +############################################### +# check variables + +!ifndef BUILDCLASS +!error BUILDCLASS must be specified in $(USRINFO) +!endif + +!ifndef BUILDMODE +!error BUILDMODE must be specified in $(USRINFO) +!endif + +!ifndef BUILDTYPE +!error BUILDTYPE must be specified in $(USRINFO) +!endif + +############################## + +!ifndef TARGETMODE +TARGETMODE=$(BUILDMODE) +!endif + +!ifndef TARGETTYPE +TARGETTYPE=$(BUILDTYPE) +!endif + +############################################### SYSCONFIG=$(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt SYSDEFAULT=$(BUILDPATH)$(PLATFORM)\$(RTSYS)\config-$(COMPILER).def - OPTIONS=-f $(BUILDPATH)bmake-sub.mak -N \ PLATFORM=$(PLATFORM) RTSYS=$(RTSYS) COMPILER=$(COMPILER) \ BUILDPATH=$(BUILDPATH) USRINFO=$(USRINFO) +############################################### !ifdef BUILDDIR USRCONFIG=config.txt @@ -29,85 +57,14 @@ USRMAKE=$(BUILDDIR)\makefile-$(PLATFORM)-$(COMPILER).inc OPTIONS=$(OPTIONS) USRCONFIG=$(USRCONFIG) USRMAKE=$(USRMAKE) !endif +############################################### +# include file describing default target dependencies -!ifdef FLEXTBUILD -all: flext -!else -all: build-sr - -shared: build-tr -!endif - -flext: flext-release flext-debug - -flext-release: build-dr build-tr build-sr - -flext-debug: build-dd build-td build-sd - -install: install-dr install-tr install-sr install-dd install-td install-sd - -clean: clean-dr clean-tr clean-sr clean-dd clean-td clean-sd - - -build-sr: config - $(MAKE) $(OPTIONS) _all_ - -build-sd: config - $(MAKE) $(OPTIONS) DEBUG=1 _all_ - -build-tr: config - $(MAKE) $(OPTIONS) THREADED=1 _all_ - -build-td: config - $(MAKE) $(OPTIONS) THREADED=1 DEBUG=1 _all_ - -build-dr: config - $(MAKE) $(OPTIONS) SHARED=1 _all_ - -build-dd: config - $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 _all_ - - -install-sr: - $(MAKE) $(OPTIONS) _install_ - -install-sd: - $(MAKE) $(OPTIONS) DEBUG=1 _install_ - -install-tr: - $(MAKE) $(OPTIONS) THREADED=1 _install_ - -install-td: - $(MAKE) $(OPTIONS) THREADED=1 DEBUG=1 _install_ - -install-dr: - $(MAKE) $(OPTIONS) SHARED=1 _install_ - -install-dd: - $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 _install_ - - -clean-sr: - $(MAKE) $(OPTIONS) _clean_ - -clean-sd: - $(MAKE) $(OPTIONS) DEBUG=1 _clean_ - -clean-tr: - $(MAKE) $(OPTIONS) THREADED=1 _clean_ - -clean-td: - $(MAKE) $(OPTIONS) THREADED=1 DEBUG=1 _clean_ - -clean-dr: - $(MAKE) $(OPTIONS) SHARED=1 _clean_ - -clean-dd: - $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 _clean_ - +!include $(BUILDPATH)targets.inc -config: $(USRMAKE) $(SYSCONFIG) $(USRCONFIG) +!include $(BUILDPATH)targets-$(BUILDCLASS).inc +############################################### .precious: $(SYSCONFIG) $(USRCONFIG) diff --git a/externals/grill/flext/buildsys/gnumake-ext.inc b/externals/grill/flext/buildsys/gnumake-ext.inc new file mode 100644 index 00000000..d959aaca --- /dev/null +++ b/externals/grill/flext/buildsys/gnumake-ext.inc @@ -0,0 +1 @@ +OUTNAME=$(NAME)
diff --git a/externals/grill/flext/buildsys/gnumake-flext.inc b/externals/grill/flext/buildsys/gnumake-flext.inc index bc3a5ab5..f6ec8f65 100644 --- a/externals/grill/flext/buildsys/gnumake-flext.inc +++ b/externals/grill/flext/buildsys/gnumake-flext.inc @@ -1,89 +1,3 @@ -##############################################
-# flext defines
-##############################################
-
-ifdef SHARED
-# --- shared ---
-DEFS+=-DFLEXT_SHARED
-
-else
-ifdef THREADED
-# --- static multi-threaded ---
-DEFS+=-DFLEXT_THREADS
-
-else
-# --- static single-threaded ---
-
-endif
-endif
-
-
-ifdef FLEXTBUILD
DEFS+=-DFLEXT_EXPORTS
-endif
-
-##############################################
-# name of flext library
-##############################################
-
-ifdef SHARED
-
-ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_d
-else
-FLEXTNAME=flext-$(RTSYS)
-endif
-
-else
-
-ifdef THREADED
-ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_td
-else
-FLEXTNAME=flext-$(RTSYS)_t
-endif
-else
-ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_d
-else
-FLEXTNAME=flext-$(RTSYS)
-endif
-endif
-
-endif # SHARED
-
-##############################################
-# build subdirectories
-##############################################
-
-ifdef FLEXTBUILD
-
-ifdef SHARED
-
-ifdef DEBUG
-OUTSUB=dd
-else
-OUTSUB=dr
-endif
-
-else # SHARED
-
-ifdef THREADED
-ifdef DEBUG
-OUTSUB=td
-else
-OUTSUB=tr
-endif
-else
-ifdef DEBUG
-OUTSUB=sd
-else
-OUTSUB=sr
-endif
-endif
-
-endif # SHARED
-else # FLEXTBUILD
-OUTSUB=.
-endif # FLEXTBUILD
+OUTNAME=lib$(FLEXTNAME)
diff --git a/externals/grill/flext/buildsys/gnumake-sub.mak b/externals/grill/flext/buildsys/gnumake-sub.mak index 91440532..46a40de6 100644 --- a/externals/grill/flext/buildsys/gnumake-sub.mak +++ b/externals/grill/flext/buildsys/gnumake-sub.mak @@ -2,28 +2,60 @@ include $(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt ############################### - -# these are project specific +# project specific definitions # package info include $(USRINFO) # special settings ifdef USRCONFIG -include $(USRCONFIG) + include $(USRCONFIG) endif # package specific make stuff ifdef USRMAKE -include $(USRMAKE) + include $(USRMAKE) +endif + +############################## + +ifndef TARGETMODE +ifdef DEBUG + TARGETMODE=debug +else + TARGETMODE=release +endif +endif + +ifndef TARGETTYPE +ifdef SHARED + TARGETTYPE=shared +else +ifdef THREADED + TARGETTYPE=multi +else + TARGETTYPE=single +endif +endif endif ############################## +# flext-specific definitions + +include $(BUILDPATH)gnumake-$(BUILDCLASS).inc -# flext-specific make stuff -include $(BUILDPATH)gnumake-flext.inc +include $(BUILDPATH)gnumake.inc +############################## # platform-specific make stuff -include $(BUILDPATH)$(PLATFORM)/$(RTSYS)/make-$(COMPILER).inc + +include $(BUILDPATH)$(PLATFORM)/$(RTSYS)/gnumake-$(COMPILER)-$(BUILDCLASS).inc + +include $(BUILDPATH)$(PLATFORM)/$(RTSYS)/gnumake-$(COMPILER).inc + +############################## # general make stuff -include $(BUILDPATH)$(PLATFORM)/make-$(COMPILER).inc + +include $(BUILDPATH)$(PLATFORM)/gnumake-$(COMPILER)-$(BUILDCLASS).inc + +include $(BUILDPATH)$(PLATFORM)/gnumake-$(COMPILER).inc diff --git a/externals/grill/flext/buildsys/gnumake.inc b/externals/grill/flext/buildsys/gnumake.inc new file mode 100644 index 00000000..2a333040 --- /dev/null +++ b/externals/grill/flext/buildsys/gnumake.inc @@ -0,0 +1,54 @@ +##############################################
+# flext defines
+##############################################
+
+ifdef SHARED
+# --- shared ---
+DEFS+=-DFLEXT_SHARED
+
+else
+ifdef THREADED
+# --- static multi-threaded ---
+DEFS+=-DFLEXT_THREADS
+
+else
+# --- static single-threaded ---
+
+endif
+endif
+
+##############################################
+# name of flext library
+##############################################
+
+ifdef SHARED
+
+ifdef DEBUG
+FLEXTNAME=flext-$(RTSYS)_d
+else
+FLEXTNAME=flext-$(RTSYS)
+endif
+
+else
+
+ifdef THREADED
+ifdef DEBUG
+FLEXTNAME=flext-$(RTSYS)_td
+else
+FLEXTNAME=flext-$(RTSYS)_t
+endif
+else
+ifdef DEBUG
+FLEXTNAME=flext-$(RTSYS)_sd
+else
+FLEXTNAME=flext-$(RTSYS)_s
+endif
+endif
+
+endif # SHARED
+
+##############################################
+# product name and folder
+##############################################
+
+OUTSUB=$(TARGETMODE)-$(TARGETTYPE)
diff --git a/externals/grill/flext/buildsys/gnumake.mak b/externals/grill/flext/buildsys/gnumake.mak index 5b191702..af83c019 100644 --- a/externals/grill/flext/buildsys/gnumake.mak +++ b/externals/grill/flext/buildsys/gnumake.mak @@ -5,11 +5,39 @@ # COMPILER - msvc/gcc/mingw/cygwin # BUILDPATH including trailing / +############################################### # package info + USRINFO=package.txt include $(USRINFO) +############################################### +# check variables + +ifndef BUILDCLASS + error BUILDCLASS must be specified in $(USRINFO) +endif + +ifndef BUILDMODE + error BUILDMODE must be specified in $(USRINFO) +endif + +ifndef BUILDTYPE + error BUILDTYPE must be specified in $(USRINFO) +endif + +############################## + +ifndef TARGETMODE + TARGETMODE=$(BUILDMODE) +endif + +ifndef TARGETTYPE + TARGETTYPE=$(BUILDTYPE) +endif + +############################################### ifeq ($(PLATFORM),win) # substitute eventual \ by / @@ -18,15 +46,16 @@ else UBUILDPATH=$(BUILDPATH) endif +############################################### SYSCONFIG=$(UBUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt SYSDEFAULT=$(UBUILDPATH)$(PLATFORM)/$(RTSYS)/config-$(COMPILER).def - OPTIONS=-f $(UBUILDPATH)gnumake-sub.mak \ PLATFORM=$(PLATFORM) RTSYS=$(RTSYS) COMPILER=$(COMPILER) \ BUILDPATH=$(UBUILDPATH) USRINFO=$(USRINFO) +############################################### ifdef BUILDDIR USRCONFIG=config.txt @@ -37,86 +66,14 @@ USRMAKE=$(BUILDDIR)/makefile-$(PLATFORM)-$(COMPILER).inc OPTIONS+=USRCONFIG=$(USRCONFIG) USRMAKE=$(USRMAKE) endif +############################################### +# include file describing default target dependencies -ifdef FLEXTBUILD -all: flext -else -all: build-sr - -shared: build-tr -endif - -flext: flext-release flext-debug - -flext-release: build-dr build-tr build-sr - -flext-debug: build-dd build-td build-sd - -install: install-dr install-tr install-sr install-dd install-td install-sd - -clean: clean-dr clean-tr clean-sr clean-dd clean-td clean-sd - - -build-sr: config - $(MAKE) $(OPTIONS) _all_ - -build-sd: config - $(MAKE) $(OPTIONS) DEBUG=1 _all_ - -build-tr: config - $(MAKE) $(OPTIONS) THREADED=1 _all_ - -build-td: config - $(MAKE) $(OPTIONS) THREADED=1 DEBUG=1 _all_ - -build-dr: config - $(MAKE) $(OPTIONS) SHARED=1 _all_ - -build-dd: config - $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 _all_ - - -install-sr: - $(MAKE) $(OPTIONS) _install_ - -install-sd: - $(MAKE) $(OPTIONS) DEBUG=1 _install_ - -install-tr: - $(MAKE) $(OPTIONS) THREADED=1 _install_ - -install-td: - $(MAKE) $(OPTIONS) THREADED=1 DEBUG=1 _install_ - -install-dr: - $(MAKE) $(OPTIONS) SHARED=1 _install_ - -install-dd: - $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 _install_ - - -clean-sr: - $(MAKE) $(OPTIONS) _clean_ - -clean-sd: - $(MAKE) $(OPTIONS) DEBUG=1 _clean_ - -clean-tr: - $(MAKE) $(OPTIONS) THREADED=1 _clean_ - -clean-td: - $(MAKE) $(OPTIONS) THREADED=1 DEBUG=1 _clean_ - -clean-dr: - $(MAKE) $(OPTIONS) SHARED=1 _clean_ - -clean-dd: - $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 _clean_ - - +include $(BUILDPATH)targets.inc -config: $(USRMAKE) $(SYSCONFIG) $(USRCONFIG) +include $(BUILDPATH)targets-$(BUILDCLASS).inc +############################################### .precious: $(SYSCONFIG) $(USRCONFIG) diff --git a/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc new file mode 100644 index 00000000..5b58e659 --- /dev/null +++ b/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc @@ -0,0 +1,41 @@ +# build class specific settings
+
+INCPATH += -I$(FLEXTINC)
+LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB)
+LIBS += -l$(FLEXTNAME)
+
+##############################################
+
+# default target
+_build_: $(TARGET)
+
+$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
+ touch $@
+
+$(TARGETPATH):
+ mkdir -p $@
+
+$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp
+ $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGETPATH)/%.o : $(SRCDIR)/%.c
+ $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGET):: $(TARGETPATH)
+
+$(TARGET):: $(COBJS) $(CPPOBJS)
+ $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
+ chmod 755 $@
+
+##############################################
+
+_clean_:
+ rm $(COBJS) $(CPPOBJS) $(TARGET)
+
+##############################################
+
+$(INSTPATH):
+ -mkdir -p $@
+
+_install_: $(INSTPATH)
+ install $(TARGET) $(INSTPATH)
diff --git a/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc b/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc new file mode 100644 index 00000000..9b22d67c --- /dev/null +++ b/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc @@ -0,0 +1,51 @@ +# build class specific settings
+
+##############################################
+
+# default target
+_build_: $(TARGET)
+
+$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
+ touch $@
+
+$(TARGETPATH):
+ -mkdir -p $@
+
+$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp
+ $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGETPATH)/%.o : $(SRCDIR)/%.c
+ $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGET) :: $(TARGETPATH)
+
+$(TARGET) :: $(COBJS) $(CPPOBJS)
+ifdef SHARED
+ $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
+ chmod 755 $@
+else
+ $(AR) rc $@ $(COBJS) $(CPPOBJS)
+endif
+
+##############################################
+
+_clean_:
+ rm $(COBJS) $(CPPOBJS) $(TARGET)
+
+##############################################
+
+ifdef SHARED
+FLEXTLIBINST=$(FLEXTSHLIB)
+else
+FLEXTLIBINST=$(FLEXTLIB)
+endif
+
+$(FLEXTINC):
+ -mkdir -p $@
+
+$(FLEXTLIBINST):
+ -mkdir -p $@
+
+_install_: $(FLEXTINC) $(FLEXTLIBINST)
+ install $(TARGET) $(FLEXTLIBINST)
+ install $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTINC)
diff --git a/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc b/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc new file mode 100644 index 00000000..f1eb6452 --- /dev/null +++ b/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc @@ -0,0 +1,24 @@ +############################################## + +TARGETPATH=$(OUTPATH)/$(OUTSUB) +TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) + +############################################## + +LDFLAGS += -shared -Wl,-x + +############################################## + +ifdef DEBUG +CFLAGS += -g -D_DEBUG +else +CFLAGS += $(OFLAGS) -DNDEBUG +LDFLAGS += -Wl,-S +endif + +############################################## + +CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) +CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) +COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS))) +CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS))) diff --git a/externals/grill/flext/buildsys/lnx/make-gcc.inc b/externals/grill/flext/buildsys/lnx/make-gcc.inc deleted file mode 100644 index 5e22a236..00000000 --- a/externals/grill/flext/buildsys/lnx/make-gcc.inc +++ /dev/null @@ -1,68 +0,0 @@ -LDFLAGS += -shared -Wl,-x - -ifdef DEBUG -CFLAGS += -g -D_DEBUG -else -CFLAGS += $(OFLAGS) -DNDEBUG -LDFLAGS += -Wl,-S -endif - -############################################## - -INCPATH += -I$(FLEXTPATH) -LIBPATH += -L$(FLEXTPATH) - -ifdef SHARED -# --- shared --- -DEFS += -DFLEXT_SHARED - -else -ifdef THREADED -# --- static multi-threaded --- -DEFS += -DFLEXT_THREADS - -else -# --- static single-threaded --- - -endif -endif - -############################################## - -TARGET=$(OUTPATH)/$(NAME).$(EXT) - -CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) -CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) -COBJS=$(patsubst %.c,$(OUTPATH)/%.o,$(filter %.c,$(SRCS))) -CPPOBJS=$(patsubst %.cpp,$(OUTPATH)/%.opp,$(filter %.cpp,$(SRCS))) - -# default target -all: $(OUTPATH) $(TARGET) - -$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) - touch $@ - -$(OUTPATH): - mkdir $(OUTPATH) - -$(OUTPATH)/%.opp : $(SRCDIR)/%.cpp - $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ - -$(OUTPATH)/%.o : $(SRCDIR)/%.c - $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ - -$(TARGET) : $(COBJS) $(CPPOBJS) - $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS) - chmod 755 $@ - -$(INSTPATH): - mkdir $(INSTPATH) - -install:: $(INSTPATH) - -install:: $(TARGET) - install $^ $(INSTPATH) - -.PHONY: clean -clean: - $(RM) $(COBJS) $(CPPOBJS) $(TARGET) diff --git a/externals/grill/flext/buildsys/lnx/pd/config-gcc.def b/externals/grill/flext/buildsys/lnx/pd/config-gcc.def index e60e92a4..a8f230a8 100644 --- a/externals/grill/flext/buildsys/lnx/pd/config-gcc.def +++ b/externals/grill/flext/buildsys/lnx/pd/config-gcc.def @@ -1,15 +1,27 @@ # where is the PD source package? -PDPATH=/usr/local/src/pd-0.38-0test10 +PDPATH=/usr/local/src/pd -# where should the external be installed? -INSTPATH=/usr/local/lib/pd/extra +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC=/usr/local/include/flext + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=/usr/local/lib + +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(FLEXTLIB) -# where do the flext headers and libraries reside? -FLEXTPATH=/usr/local/lib/pd/flext +############################################################### # where should the external be built? OUTPATH=pd-linux +# where should the external be installed? +INSTPATH=/usr/local/lib/pd/extra + +############################################################### + # user defined compiler flags # (check if they match your system!) OFLAGS=-O2 -march=pentium4 -msse diff --git a/externals/grill/flext/buildsys/lnx/pd/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/lnx/pd/gnumake-gcc-ext.inc new file mode 100644 index 00000000..042ce60f --- /dev/null +++ b/externals/grill/flext/buildsys/lnx/pd/gnumake-gcc-ext.inc @@ -0,0 +1 @@ +EXT=pd_linux
diff --git a/externals/grill/flext/buildsys/lnx/pd/gnumake-gcc-flext.inc b/externals/grill/flext/buildsys/lnx/pd/gnumake-gcc-flext.inc new file mode 100644 index 00000000..b64ecc11 --- /dev/null +++ b/externals/grill/flext/buildsys/lnx/pd/gnumake-gcc-flext.inc @@ -0,0 +1,6 @@ +ifdef SHARED
+EXT=so
+else
+EXT=a
+endif
+
diff --git a/externals/grill/flext/buildsys/lnx/pd/make-gcc.inc b/externals/grill/flext/buildsys/lnx/pd/gnumake-gcc.inc index 3ae01ad0..2b27b02f 100644 --- a/externals/grill/flext/buildsys/lnx/pd/make-gcc.inc +++ b/externals/grill/flext/buildsys/lnx/pd/gnumake-gcc.inc @@ -2,9 +2,3 @@ DEFS += -DFLEXT_SYS=2 INCPATH += -I$(PDPATH)/src LIBPATH += -L$(PDPATH)/bin - -LDFLAGS += - -LIBS += - -EXT=pd_linux diff --git a/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc new file mode 100644 index 00000000..ad4e2856 --- /dev/null +++ b/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc @@ -0,0 +1,51 @@ +# build class specific settings
+
+INCPATH += -I$(FLEXTINC)
+LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB)
+LIBS += -l$(FLEXTNAME)
+
+##############################################
+
+CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS)))
+CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS)))
+COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS)))
+CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS)))
+
+##############################################
+
+# default target
+_build_: $(TARGET)
+
+$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
+ touch $@
+
+$(OBJPATH):
+ -mkdir -p $@
+
+$(TARGETPATH):
+ -mkdir -p $@
+
+$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp
+ $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(OBJPATH)/%.o : $(SRCDIR)/%.c
+ $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGET) :: $(OBJPATH) $(TARGETPATH)
+
+$(TARGET) :: $(COBJS) $(CPPOBJS)
+ $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
+ chmod 755 $@
+
+##############################################
+
+_clean_:
+ rm $(COBJS) $(CPPOBJS) $(TARGET)
+
+##############################################
+
+$(INSTPATH):
+ -mkdir -p $@
+
+_install_:: $(INSTPATH)
+ install $(TARGET) $(INSTPATH)
diff --git a/externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc b/externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc new file mode 100644 index 00000000..1baafe86 --- /dev/null +++ b/externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc @@ -0,0 +1,64 @@ +# build class specific settings
+ +#LDFLAGS += -dylib_install_name $(FLEXTSHLIB) +
+##############################################
+
+CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS)))
+CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS)))
+COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS)))
+CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS)))
+
+# default target
+_build_: $(TARGET)
+
+$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
+ touch $@
+
+$(OBJPATH):
+ -mkdir -p $@
+
+$(TARGETPATH):
+ -mkdir -p $@
+
+$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp
+ $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(OBJPATH)/%.o : $(SRCDIR)/%.c
+ $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGET) :: $(OBJPATH) $(TARGETPATH)
+
+$(TARGET) :: $(COBJS) $(CPPOBJS)
+ifdef SHARED
+ $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
+ chmod 755 $@
+else + libtool -static -o $@ $(COBJS) $(CPPOBJS)
+endif
+ +##############################################
+
+_clean_:
+ rm $(COBJS) $(CPPOBJS) $(TARGET)
+
+##############################################
+
+ifdef SHARED
+FLEXTLIBINST=$(FLEXTSHLIB)
+else
+FLEXTLIBINST=$(FLEXTLIB)
+endif
+
+$(FLEXTINC):
+ -mkdir -p $@
+
+$(FLEXTLIBINST):
+ -mkdir -p $@
+
+_install_: $(FLEXTINC) $(FLEXTLIBINST)
+ install $(TARGET) $(FLEXTLIBINST) +ifndef SHARED + ranlib $(FLEXTLIBINST)/$(OUTNAME).$(EXT) # have to rerun ranlib at install dir ?! +endif
+ install $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTINC)
diff --git a/externals/grill/flext/buildsys/mac/gnumake-gcc.inc b/externals/grill/flext/buildsys/mac/gnumake-gcc.inc new file mode 100644 index 00000000..4567ec41 --- /dev/null +++ b/externals/grill/flext/buildsys/mac/gnumake-gcc.inc @@ -0,0 +1,12 @@ +############################################## + +LDFLAGS += -dynamic -Wl,-x -framework ApplicationServices -framework vecLib + +############################################## + +ifndef DEBUG +CFLAGS += -g -D_DEBUG +else +CFLAGS += $(OFLAGS) -DNDEBUG +LDFLAGS += -Wl,-S +endif diff --git a/externals/grill/flext/buildsys/mac/make-gcc.inc b/externals/grill/flext/buildsys/mac/make-gcc.inc deleted file mode 100644 index a7f6c511..00000000 --- a/externals/grill/flext/buildsys/mac/make-gcc.inc +++ /dev/null @@ -1,102 +0,0 @@ -ifndef FLEXTBUILD -INCPATH += -I$(FLEXTPATH) -LIBPATH += -L$(FLEXTPATH) -LIBS+=$(FLEXTPATH)/$(FLEXTNAME).a -endif - -LDFLAGS += -Wl,-x -framework ApplicationServices -framework vecLib -dynamiclib -dynamic - -############################################## - -ifndef DEBUG -CFLAGS += -g -D_DEBUG -else -CFLAGS += $(OFLAGS) -DNDEBUG -LDFLAGS += -Wl,-S -endif - -############################################## - -ifdef FLEXTBUILD -OUTNAME=$(FLEXTNAME) - -ifdef SHARED -EXT=dylib -else -EXT=a -BUILDLIB=1 -endif - -else -OUTNAME=$(NAME) -endif - -############################################## - -OBJPATH=$(OUTPATH)/$(OUTSUB) - -ifdef FLEXTBUILD -TARGETPATH=$(OBJPATH) -TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) -else -TARGETPATH=$(OBJPATH)/$(OUTNAME).$(EXT)/Contents/MacOS -TARGET=$(TARGETPATH)/$(OUTNAME) -endif - -############################################## - -CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) -CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) -COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS))) -CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS))) - -# default target -_all_: $(TARGET) - -$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) - touch $@ - -$(OBJPATH): - -mkdir -p $@ - -$(TARGETPATH): - -mkdir -p $@ - -$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp - $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ - -$(OBJPATH)/%.o : $(SRCDIR)/%.c - $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ - -$(TARGET) :: $(OBJPATH) $(TARGETPATH) - -$(TARGET) :: $(COBJS) $(CPPOBJS) -ifdef BUILDLIB - libtool -static -o $@ $(COBJS) $(CPPOBJS) -else -# $(CXX) $(LDFLAGS) $(LIBPATH) -dylib_install_name $(INSTPATH)/$(notdir $@) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) - $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) - chmod 755 $@ -endif - -############################################## - -_clean_: - rm $(COBJS) $(CPPOBJS) $(TARGET) - -############################################## - -$(INSTPATH): - -mkdir -p $@ - -$(FLEXTPATH): - -mkdir -p $@ - -_install_:: $(INSTPATH) $(FLEXTPATH) - -_install_:: $(TARGET) -ifdef FLEXTBUILD - cp $(TARGET) $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTPATH) -else - install $(TARGET) $(INSTPATH) -endif diff --git a/externals/grill/flext/buildsys/mac/max/config-gcc.def b/externals/grill/flext/buildsys/mac/max/config-gcc.def index b10869b2..41c0b490 100644 --- a/externals/grill/flext/buildsys/mac/max/config-gcc.def +++ b/externals/grill/flext/buildsys/mac/max/config-gcc.def @@ -2,15 +2,27 @@ # you should have the latest version! MAXSDKPATH=/Volumes/Daten/Prog/MaxMSP-SDK/4.5\ headers/c74support -# where should the external be installed? -INSTPATH=/Library/Application\ Support/Cycling\ \'74/externals +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC=/usr/local/include/flext + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=/usr/local/lib + +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(FLEXTLIB) -# where do the flext headers and libraries reside? -FLEXTPATH=/Library/Application\ Support/Cycling\ \'74/flext +############################################################### # where should the external be built? OUTPATH=max-darwin +# where should the external be installed? +INSTPATH=/Library/Application\ Support/Cycling\ \'74/externals + +############################################################### + # user defined compiler flags # (check if they match your system!) OFLAGS=-O2 -mcpu=G4 -malign-natural -maltivec -faltivec diff --git a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc new file mode 100644 index 00000000..24d90d60 --- /dev/null +++ b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc @@ -0,0 +1,8 @@ +EXT=mxo + +############################################## + +OBJPATH=$(OUTPATH)/$(OUTSUB) + +TARGETPATH=$(OBJPATH)/$(OUTNAME).$(EXT)/Contents/MacOS +TARGET=$(TARGETPATH)/$(OUTNAME) diff --git a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-flext.inc b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-flext.inc new file mode 100644 index 00000000..4cb53259 --- /dev/null +++ b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-flext.inc @@ -0,0 +1,12 @@ +ifdef SHARED +EXT=dylib +else +EXT=a +endif + +############################################## + +OBJPATH=$(OUTPATH)/$(OUTSUB) +TARGETPATH=$(OBJPATH) +TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) + diff --git a/externals/grill/flext/buildsys/mac/max/make-gcc.inc b/externals/grill/flext/buildsys/mac/max/gnumake-gcc.inc index fb5a40ca..cd5740f4 100644 --- a/externals/grill/flext/buildsys/mac/max/make-gcc.inc +++ b/externals/grill/flext/buildsys/mac/max/gnumake-gcc.inc @@ -3,5 +3,5 @@ DEFS += -DFLEXT_SYS=1 INCPATH += -I$(MAXSDKPATH)/max-includes -I$(MAXSDKPATH)/msp-includes LDFLAGS += -framework MaxAPI -framework MaxAudioAPI +LDFLAGS += -dynamiclib -EXT=mxo diff --git a/externals/grill/flext/buildsys/mac/pd/config-gcc.def b/externals/grill/flext/buildsys/mac/pd/config-gcc.def index 9793e4a3..85a9d8bd 100644 --- a/externals/grill/flext/buildsys/mac/pd/config-gcc.def +++ b/externals/grill/flext/buildsys/mac/pd/config-gcc.def @@ -1,18 +1,30 @@ # where is the PD installation including source code? -PDPATH=/Applications/Pd-0.38-0test10.app/Contents/Resources +PDPATH=/Applications/audio/Pd-0.38-0test13.app/Contents/Resources # where is the PD executable? -PDBIN=/usr/local/bin/pd +PDBIN=$(PDPATH)/bin/pd -# where should the external be installed? -INSTPATH=$(PDPATH)/extra +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC=/usr/local/include/flext + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=/usr/local/lib + +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(FLEXTLIB) -# where do the flext headers and libraries reside? -FLEXTPATH=$(PDPATH)/flext +############################################################### # where should the external be built? OUTPATH=pd-darwin +# where should the external be installed? +INSTPATH=$(PDPATH)/extra + +############################################################### + # user defined compiler flags # (check if they match your system!) OFLAGS=-O2 -mcpu=G4 -malign-natural -maltivec -faltivec diff --git a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-ext.inc new file mode 100644 index 00000000..f52bc6db --- /dev/null +++ b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-ext.inc @@ -0,0 +1 @@ +EXT=pd_darwin
diff --git a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-flext.inc b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-flext.inc new file mode 100644 index 00000000..2ebf308d --- /dev/null +++ b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc-flext.inc @@ -0,0 +1,5 @@ +ifdef SHARED
+EXT=dylib
+else
+EXT=a
+endif
diff --git a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc.inc b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc.inc new file mode 100644 index 00000000..ac805f09 --- /dev/null +++ b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc.inc @@ -0,0 +1,13 @@ +DEFS += -DFLEXT_SYS=2 + +INCPATH += -I$(PDPATH)/src +LIBPATH += -L$(PDPATH)/bin + +LDFLAGS += -bundle -bundle_loader $(PDBIN) + +############################################## + +OBJPATH=$(OUTPATH)/$(OUTSUB) +TARGETPATH=$(OBJPATH) +TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) + diff --git a/externals/grill/flext/buildsys/mac/pd/make-gcc.inc b/externals/grill/flext/buildsys/mac/pd/make-gcc.inc deleted file mode 100644 index 05c2cd08..00000000 --- a/externals/grill/flext/buildsys/mac/pd/make-gcc.inc +++ /dev/null @@ -1,10 +0,0 @@ -DEFS += -DFLEXT_SYS=2 - -INCPATH += -I$(PDPATH)/src -LIBPATH += -L$(PDPATH)/bin - -LDFLAGS += -bundle -bundle_loader $(PDBIN) - -LIBS += - -EXT=pd_darwin diff --git a/externals/grill/flext/buildsys/nmake-ext.inc b/externals/grill/flext/buildsys/nmake-ext.inc new file mode 100644 index 00000000..d959aaca --- /dev/null +++ b/externals/grill/flext/buildsys/nmake-ext.inc @@ -0,0 +1 @@ +OUTNAME=$(NAME)
diff --git a/externals/grill/flext/buildsys/nmake-flext.inc b/externals/grill/flext/buildsys/nmake-flext.inc index 7b21e7d0..8d3f177c 100644 --- a/externals/grill/flext/buildsys/nmake-flext.inc +++ b/externals/grill/flext/buildsys/nmake-flext.inc @@ -1,88 +1,3 @@ -##############################################
-# flext defines
-##############################################
-
-!ifdef SHARED
-# --- shared ---
-DEFS=$(DEFS) /DFLEXT_SHARED
-
-!elseifdef THREADED
-# --- static multi-threaded ---
-DEFS=$(DEFS) /DFLEXT_THREADS
-
-!else
-# --- static single-threaded ---
-
-!endif
-
-
-!ifdef FLEXTBUILD
DEFS=$(DEFS) /DFLEXT_EXPORTS
-!endif
-
-##############################################
-# name of flext library
-##############################################
-
-!ifdef SHARED
-
-!ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_d
-!else
-FLEXTNAME=flext-$(RTSYS)
-!endif
-
-!else
-
-!ifdef THREADED
-!ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_td
-!else
-FLEXTNAME=flext-$(RTSYS)_t
-!endif
-!else
-!ifdef DEBUG
-FLEXTNAME=flext-$(RTSYS)_d
-!else
-FLEXTNAME=flext-$(RTSYS)
-!endif
-!endif
-
-!endif # SHARED
-
-##############################################
-# build subdirectories
-##############################################
-
-!ifdef FLEXTBUILD
-
-!ifdef SHARED
-
-!ifdef DEBUG
-OUTSUB=dd
-!else
-OUTSUB=dr
-!endif
-
-!else # SHARED
-
-!ifdef THREADED
-!ifdef DEBUG
-OUTSUB=td
-!else
-OUTSUB=tr
-!endif
-!else
-!ifdef DEBUG
-OUTSUB=sd
-!else
-OUTSUB=sr
-!endif
-!endif
-
-!endif # SHARED
-
-!else # FLEXTBUILD
-OUTSUB=.
-!endif # FLEXTBUILD
+OUTNAME=$(FLEXTNAME)
diff --git a/externals/grill/flext/buildsys/nmake-sub.mak b/externals/grill/flext/buildsys/nmake-sub.mak index 9e640fff..81ba3983 100644 --- a/externals/grill/flext/buildsys/nmake-sub.mak +++ b/externals/grill/flext/buildsys/nmake-sub.mak @@ -2,6 +2,7 @@ !include $(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt ############################## +# project-specific definitions # package info !include $(USRINFO) @@ -18,10 +19,43 @@ ############################## -# flext-specific make stuff -!include $(BUILDPATH)nmake-flext.inc +!ifndef TARGETMODE +!ifdef DEBUG +TARGETMODE=debug +!else +TARGETMODE=release +!endif +!endif + +!ifndef TARGETTYPE +!ifdef SHARED +TARGETTYPE=shared +!else +!ifdef THREADED +TARGETTYPE=multi +!else +TARGETTYPE=single +!endif +!endif +!endif + +############################## +# flext-specific definitions + +!include $(BUILDPATH)nmake-$(BUILDCLASS).inc +!include $(BUILDPATH)nmake.inc + +############################## # platform-specific make stuff -!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\make-$(COMPILER).inc + +!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\nmake-$(COMPILER)-$(BUILDCLASS).inc + +!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\nmake-$(COMPILER).inc + +############################## # general make stuff -!include $(BUILDPATH)$(PLATFORM)\make-$(COMPILER).inc + +!include $(BUILDPATH)$(PLATFORM)\nmake-$(COMPILER)-$(BUILDCLASS).inc + +!include $(BUILDPATH)$(PLATFORM)\nmake-$(COMPILER).inc diff --git a/externals/grill/flext/buildsys/nmake.inc b/externals/grill/flext/buildsys/nmake.inc new file mode 100644 index 00000000..71c4c096 --- /dev/null +++ b/externals/grill/flext/buildsys/nmake.inc @@ -0,0 +1,52 @@ +##############################################
+# flext defines
+##############################################
+
+!ifdef SHARED
+# --- shared ---
+DEFS=$(DEFS) /DFLEXT_SHARED
+
+!elseifdef THREADED
+# --- static multi-threaded ---
+DEFS=$(DEFS) /DFLEXT_THREADS
+
+!else
+# --- static single-threaded ---
+
+!endif
+
+##############################################
+# name of flext library
+##############################################
+
+!ifdef SHARED
+
+!ifdef DEBUG
+FLEXTNAME=flext-$(RTSYS)_d
+!else
+FLEXTNAME=flext-$(RTSYS)
+!endif
+
+!else
+
+!ifdef THREADED
+!ifdef DEBUG
+FLEXTNAME=flext-$(RTSYS)_td
+!else
+FLEXTNAME=flext-$(RTSYS)_t
+!endif
+!else
+!ifdef DEBUG
+FLEXTNAME=flext-$(RTSYS)_sd
+!else
+FLEXTNAME=flext-$(RTSYS)_s
+!endif
+!endif
+
+!endif # SHARED
+
+##############################################
+# product name and folder
+##############################################
+
+OUTSUB=$(TARGETMODE)-$(TARGETTYPE)
diff --git a/externals/grill/flext/buildsys/nmake.mak b/externals/grill/flext/buildsys/nmake.mak index 40a8d8c4..5fe434b4 100644 --- a/externals/grill/flext/buildsys/nmake.mak +++ b/externals/grill/flext/buildsys/nmake.mak @@ -5,20 +5,48 @@ # COMPILER - msvc/gcc/mingw/cygwin # BUILDPATH including trailing \ +############################################### # package info + USRINFO=package.txt !include $(USRINFO) +############################################### +# check variables + +!ifndef BUILDCLASS +!error BUILDCLASS must be specified in $(USRINFO) +!endif + +!ifndef BUILDMODE +!error BUILDMODE must be specified in $(USRINFO) +!endif + +!ifndef BUILDTYPE +!error BUILDTYPE must be specified in $(USRINFO) +!endif + +############################## + +!ifndef TARGETMODE +TARGETMODE=$(BUILDMODE) +!endif + +!ifndef TARGETTYPE +TARGETTYPE=$(BUILDTYPE) +!endif + +############################################### SYSCONFIG=$(BUILDPATH)config-$(PLATFORM)-$(RTSYS)-$(COMPILER).txt SYSDEFAULT=$(BUILDPATH)$(PLATFORM)\$(RTSYS)\config-$(COMPILER).def - OPTIONS=-f $(BUILDPATH)nmake-sub.mak \ PLATFORM=$(PLATFORM) RTSYS=$(RTSYS) COMPILER=$(COMPILER) \ BUILDPATH=$(BUILDPATH) USRINFO=$(USRINFO) +############################################### !ifdef BUILDDIR USRCONFIG=config.txt @@ -29,86 +57,14 @@ USRMAKE=$(BUILDDIR)\makefile-$(PLATFORM)-$(COMPILER).inc OPTIONS=$(OPTIONS) USRCONFIG=$(USRCONFIG) USRMAKE=$(USRMAKE) !endif +############################################### +# include file describing default target dependencies -!ifdef FLEXTBUILD -all: flext -!else -all: build-sr - -shared: build-tr -!endif - -flext: flext-release flext-debug - -flext-release: build-dr build-tr build-sr - -flext-debug: build-dd build-td build-sd - -install: install-dr install-tr install-sr install-dd install-td install-sd - -clean: clean-dr clean-tr clean-sr clean-dd clean-td clean-sd - - -build-sr: config - $(MAKE) $(OPTIONS) _all_ - -build-sd: config - $(MAKE) $(OPTIONS) DEBUG=1 _all_ - -build-tr: config - $(MAKE) $(OPTIONS) THREADED=1 _all_ - -build-td: config - $(MAKE) $(OPTIONS) THREADED=1 DEBUG=1 _all_ - -build-dr: config - $(MAKE) $(OPTIONS) SHARED=1 _all_ - -build-dd: config - $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 _all_ - - -install-sr: - $(MAKE) $(OPTIONS) _install_ - -install-sd: - $(MAKE) $(OPTIONS) DEBUG=1 _install_ - -install-tr: - $(MAKE) $(OPTIONS) THREADED=1 _install_ - -install-td: - $(MAKE) $(OPTIONS) THREADED=1 DEBUG=1 _install_ - -install-dr: - $(MAKE) $(OPTIONS) SHARED=1 _install_ - -install-dd: - $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 _install_ - - -clean-sr: - $(MAKE) $(OPTIONS) _clean_ - -clean-sd: - $(MAKE) $(OPTIONS) DEBUG=1 _clean_ - -clean-tr: - $(MAKE) $(OPTIONS) THREADED=1 _clean_ - -clean-td: - $(MAKE) $(OPTIONS) THREADED=1 DEBUG=1 _clean_ - -clean-dr: - $(MAKE) $(OPTIONS) SHARED=1 _clean_ - -clean-dd: - $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 _clean_ - - +!include $(BUILDPATH)targets.inc -config: $(USRMAKE) $(SYSCONFIG) $(USRCONFIG) +!include $(BUILDPATH)targets-$(BUILDCLASS).inc +############################################### .precious: $(SYSCONFIG) $(USRCONFIG) diff --git a/externals/grill/flext/buildsys/targets-ext.inc b/externals/grill/flext/buildsys/targets-ext.inc new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/externals/grill/flext/buildsys/targets-ext.inc diff --git a/externals/grill/flext/buildsys/targets-flext.inc b/externals/grill/flext/buildsys/targets-flext.inc new file mode 100644 index 00000000..6cf8208d --- /dev/null +++ b/externals/grill/flext/buildsys/targets-flext.inc @@ -0,0 +1,29 @@ +build-default-default: build-all-all
+
+install-default-default: install-all-all
+
+clean-default-default: clean-all-all
+
+###################################################
+
+build-all-all: build-release-all build-debug-all
+
+build-release-all: build-release-single build-release-multi build-release-shared
+
+build-debug-all: build-debug-single build-debug-multi build-debug-shared
+
+###################################################
+
+install-all-all: install-release-all install-debug-all
+
+install-release-all: install-release-single install-release-multi install-release-shared
+
+install-debug-all: install-debug-single install-debug-multi install-debug-shared
+
+###################################################
+
+clean-all-all: clean-release-all clean-debug-all
+
+clean-release-all: clean-release-single clean-release-multi clean-release-shared
+
+clean-debug-all: clean-debug-single clean-debug-multi clean-debug-shared
diff --git a/externals/grill/flext/buildsys/targets.inc b/externals/grill/flext/buildsys/targets.inc new file mode 100644 index 00000000..0372392c --- /dev/null +++ b/externals/grill/flext/buildsys/targets.inc @@ -0,0 +1,77 @@ +all: build-default-default
+
+clean: clean-default-default
+
+install: install-default-default
+
+###########################################################
+
+build-default-default: build-$(TARGETMODE)-$(TARGETTYPE)
+
+install-default-default: install-$(TARGETMODE)-$(TARGETTYPE)
+
+clean-default-default: clean-$(TARGETMODE)-$(TARGETTYPE)
+
+###########################################################
+
+build-release-single: config
+ $(MAKE) $(OPTIONS) _build_
+
+build-debug-single: config
+ $(MAKE) $(OPTIONS) DEBUG=1 _build_
+
+build-release-multi: config
+ $(MAKE) $(OPTIONS) THREADED=1 _build_
+
+build-debug-multi: config
+ $(MAKE) $(OPTIONS) THREADED=1 DEBUG=1 _build_
+
+build-release-shared: config
+ $(MAKE) $(OPTIONS) SHARED=1 _build_
+
+build-debug-shared: config
+ $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 _build_
+
+###########################################################
+
+install-release-single:
+ $(MAKE) $(OPTIONS) _install_
+
+install-debug-single:
+ $(MAKE) $(OPTIONS) DEBUG=1 _install_
+
+install-release-multi:
+ $(MAKE) $(OPTIONS) THREADED=1 _install_
+
+install-debug-multi:
+ $(MAKE) $(OPTIONS) THREADED=1 DEBUG=1 _install_
+
+install-release-shared:
+ $(MAKE) $(OPTIONS) SHARED=1 _install_
+
+install-debug-shared:
+ $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 _install_
+
+###########################################################
+
+clean-release-single:
+ $(MAKE) $(OPTIONS) _clean_
+
+clean-debug-single:
+ $(MAKE) $(OPTIONS) DEBUG=1 _clean_
+
+clean-release-multi:
+ $(MAKE) $(OPTIONS) THREADED=1 _clean_
+
+clean-debug-multi:
+ $(MAKE) $(OPTIONS) THREADED=1 DEBUG=1 _clean_
+
+clean-release-shared:
+ $(MAKE) $(OPTIONS) SHARED=1 _clean_
+
+clean-debug-shared:
+ $(MAKE) $(OPTIONS) SHARED=1 DEBUG=1 _clean_
+
+###########################################################
+
+config: $(USRMAKE) $(SYSCONFIG) $(USRCONFIG)
diff --git a/externals/grill/flext/buildsys/win/bmake-bcc-ext.inc b/externals/grill/flext/buildsys/win/bmake-bcc-ext.inc new file mode 100644 index 00000000..3a61d1be --- /dev/null +++ b/externals/grill/flext/buildsys/win/bmake-bcc-ext.inc @@ -0,0 +1,54 @@ +# build class specific settings
+
+INCPATH=$(INCPATH) -I$(FLEXTINC)
+LIBPATH=$(LIBPATH) -L$(FLEXTLIB)
+LIBS=$(LIBS) $(FLEXTNAME).lib
+
+##############################################
+
+# default target
+_build_: $(TARGET)
+
+$(OUTPATH):
+ if not exist $@ mkdir $@ > nul
+
+$(TARGETPATH): $(OUTPATH)
+ if not exist $@ mkdir $@ > nul
+
+SETUPFUNCTION=$(NAME)_setup
+
+$(TARGETPATH)\$(NAME).def: $(TARGETPATH)
+ @echo EXPORTS $(SETUPFUNCTION) = _$(SETUPFUNCTION) > $@
+# this next line fixes a strange problem with implib - lacking underscore?!
+ @echo IMPORTS _rtext_retext=PD.rtext_retext >> $@
+
+$(TARGET) :: $(TARGETPATH)\$(NAME).def
+
+{$(SRCDIR)}.cpp{}.obj:
+ bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(TARGETPATH) $<
+
+{$(SRCDIR)}.c{}.obj:
+ bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(TARGETPATH) $<
+
+$(TARGET) :: $(TARGETPATH)
+
+$(TARGET) :: $(OBJS)
+ @cd $(TARGETPATH)
+ ilink32 $(LDFLAGS) $(LIBPATH) -L. $(OBJS) ,$(<F),,$(LIBS),$(NAME).def
+ @cd ..\..
+
+##############################################
+# remove build
+
+_clean_:
+ -del /q $(TARGET) > nul
+ -cd $(TARGETPATH)
+ -del /q $(OBJS) > nul
+
+##############################################
+
+$(INSTPATH):
+ if not exist $@ mkdir $@ > nul
+
+_install_: $(INSTPATH)
+ copy $(TARGET) $(INSTPATH) > nul
diff --git a/externals/grill/flext/buildsys/win/bmake-bcc-flext.inc b/externals/grill/flext/buildsys/win/bmake-bcc-flext.inc new file mode 100644 index 00000000..a0486cf6 --- /dev/null +++ b/externals/grill/flext/buildsys/win/bmake-bcc-flext.inc @@ -0,0 +1,84 @@ +# build class specific settings
+
+##############################################
+
+# default target
+_build_: $(TARGET)
+
+$(OUTPATH):
+ if not exist $@ mkdir $@ > nul
+
+$(TARGETPATH): $(OUTPATH)
+ if not exist $@ mkdir $@ > nul
+
+{$(SRCDIR)}.cpp{}.obj:
+ bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(TARGETPATH) $<
+
+{$(SRCDIR)}.c{}.obj:
+ bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(TARGETPATH) $<
+
+
+$(TARGETPATH)\pd.lib : $(PDPATH)\bin\pd.dll
+ implib -a $< $**
+
+$(TARGETPATH)\pthreadVC.lib : $(PDPATH)\bin\pthreadVC.dll
+ implib -a $< $**
+
+PDTARGETS=$(TARGETPATH)\pd.lib $(TARGETPATH)\pthreadVC.lib
+
+
+$(TARGET) :: $(TARGETPATH) $(PDTARGETS)
+
+$(TARGET) :: $(OBJS)
+ @cd $(TARGETPATH)
+!ifdef SHARED
+ ilink32 $(LDFLAGS) $(LIBPATH) -L. $(OBJS) ,$(<F),,$(LIBS)
+ implib -a $(<B).lib $(<F)
+!else
+ -del $(<F)
+ tlib "$(<F)" +$(OBJS: = +)
+!endif
+ @cd ..\..
+
+##############################################
+
+_clean_:
+ -del /q $(TARGET) > nul
+ -cd $(TARGETPATH)
+ -del /q $(OBJS) > nul
+
+##############################################
+
+!ifdef SHARED
+FLEXTLIBINST=$(FLEXTSHLIB)
+!else
+FLEXTLIBINST=$(FLEXTLIB)
+!endif
+
+$(FLEXTINC):
+ if not exist $@ mkdir $@ > nul
+
+!if "$(FLEXTINC)" != "$(FLEXTLIB)"
+$(FLEXTLIB):
+ if not exist $@ mkdir $@ > nul
+
+_install_:: $(FLEXTLIB)
+!endif
+
+!if "$(FLEXTLIBINST)" != "$(FLEXTLIB)" && "$(FLEXTLIBINST)" != "$(FLEXTINC)"
+$(FLEXTLIBINST):
+ if not exist $@ mkdir $@ > nul
+
+_install_:: $(FLEXTLIBINST)
+!endif
+
+_install_:: $(FLEXTINC)
+ copy $(TARGET) $(FLEXTLIBINST) > nul
+!ifdef SHARED
+# copy import library
+ copy $(TARGET:.dll=.lib) $(FLEXTLIB) > nul
+!endif
+# copy headers
+ for %%i in ($(HDRS)) do @copy $(SRCDIR)\%%i $(FLEXTINC) > nul
+# copy import libraries
+ for %%i in ($(PDTARGETS)) do @copy %%i $(FLEXTLIBINST) > nul
diff --git a/externals/grill/flext/buildsys/win/bmake-bcc.inc b/externals/grill/flext/buildsys/win/bmake-bcc.inc new file mode 100644 index 00000000..dc9d6ae1 --- /dev/null +++ b/externals/grill/flext/buildsys/win/bmake-bcc.inc @@ -0,0 +1,41 @@ +!ifdef BCCPATH
+INCPATH=$(INCPATH) -I$(BCCPATH)\include
+LIBPATH=$(LIBPATH) -L$(BCCPATH)\lib
+!endif
+
+##############################################
+
+TARGETPATH=$(OUTPATH)\$(OUTSUB)
+TARGET=$(TARGETPATH)\$(OUTNAME).$(EXT)
+
+##############################################
+# use precompiled headers
+
+!ifndef PRECOMPILE
+CFLAGS=$(CFLAGS) -Hh=flext.h
+!else
+CFLAGS=$(CFLAGS) -Hh=$(PRECOMPILE)
+!endif
+# location of precompiled file
+CFLAGS=$(CFLAGS) -H=$(TARGETPATH)\precompiled.pch
+
+##############################################
+
+LIBS=$(LIBS) cw32.lib import32.lib C0D32.OBJ
+CFLAGS=$(CFLAGS) -tWD -tWM -w-8004 -w-8027 -w-8057
+LDFLAGS=$(LDFLAGS) /C /Tpd
+
+##############################################
+
+!ifdef DEBUG
+CFLAGS=$(CFLAGS) -v -D_DEBUG
+LDFLAGS=$(LDFLAGS) /v
+!else
+CFLAGS=$(CFLAGS) $(OFLAGS) -DNDEBUG
+!endif
+
+##############################################
+# convert both *.c and *.cpp
+
+OBJSTMP= $(SRCS:.c=.obj)
+OBJS= $(OBJSTMP:.objpp=.obj)
diff --git a/externals/grill/flext/buildsys/win/gnumake-cygwin-ext.inc b/externals/grill/flext/buildsys/win/gnumake-cygwin-ext.inc new file mode 100644 index 00000000..95b3125d --- /dev/null +++ b/externals/grill/flext/buildsys/win/gnumake-cygwin-ext.inc @@ -0,0 +1,41 @@ +# build class specific settings
+
+INCPATH += -I$(FLEXTINC)
+LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB)
+LIBS += -l$(FLEXTNAME)
+
+##############################################
+
+# default target
+_build_: $(TARGET)
+
+$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
+ touch $@
+
+$(TARGETPATH):
+ -mkdir -p $@
+
+$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp
+ $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGETPATH)/%.o : $(SRCDIR)/%.c
+ $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGET) :: $(TARGETPATH)
+
+$(TARGET) :: $(COBJS) $(CPPOBJS)
+ $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
+ chmod 755 $@
+
+##############################################
+
+_clean_:
+ rm $(COBJS) $(CPPOBJS) $(TARGET)
+
+##############################################
+
+$(INSTPATH):
+ -mkdir -p $@
+
+_install_: $(INSTPATH)
+ install $(TARGET) $(INSTPATH)
diff --git a/externals/grill/flext/buildsys/win/gnumake-cygwin-flext.inc b/externals/grill/flext/buildsys/win/gnumake-cygwin-flext.inc new file mode 100644 index 00000000..9b22d67c --- /dev/null +++ b/externals/grill/flext/buildsys/win/gnumake-cygwin-flext.inc @@ -0,0 +1,51 @@ +# build class specific settings
+
+##############################################
+
+# default target
+_build_: $(TARGET)
+
+$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
+ touch $@
+
+$(TARGETPATH):
+ -mkdir -p $@
+
+$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp
+ $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGETPATH)/%.o : $(SRCDIR)/%.c
+ $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGET) :: $(TARGETPATH)
+
+$(TARGET) :: $(COBJS) $(CPPOBJS)
+ifdef SHARED
+ $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
+ chmod 755 $@
+else
+ $(AR) rc $@ $(COBJS) $(CPPOBJS)
+endif
+
+##############################################
+
+_clean_:
+ rm $(COBJS) $(CPPOBJS) $(TARGET)
+
+##############################################
+
+ifdef SHARED
+FLEXTLIBINST=$(FLEXTSHLIB)
+else
+FLEXTLIBINST=$(FLEXTLIB)
+endif
+
+$(FLEXTINC):
+ -mkdir -p $@
+
+$(FLEXTLIBINST):
+ -mkdir -p $@
+
+_install_: $(FLEXTINC) $(FLEXTLIBINST)
+ install $(TARGET) $(FLEXTLIBINST)
+ install $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTINC)
diff --git a/externals/grill/flext/buildsys/win/gnumake-cygwin.inc b/externals/grill/flext/buildsys/win/gnumake-cygwin.inc new file mode 100644 index 00000000..73425e5d --- /dev/null +++ b/externals/grill/flext/buildsys/win/gnumake-cygwin.inc @@ -0,0 +1,24 @@ +############################################## + +TARGETPATH=$(OUTPATH)/$(OUTSUB) +TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) + +############################################## + +LDFLAGS += -shared -Wl,-x + +############################################## + +ifdef DEBUG +CFLAGS += -g -D_DEBUG +else +CFLAGS += $(OFLAGS) -DNDEBUG +LDFLAGS += -Wl,-S +endif + +############################################## + +CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) +CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) +COBJS=$(patsubst %.c,$(TARGETPATH)/%.o,$(filter %.c,$(SRCS))) +CPPOBJS=$(patsubst %.cpp,$(TARGETPATH)/%.opp,$(filter %.cpp,$(SRCS))) diff --git a/externals/grill/flext/buildsys/win/gnumake-mingw-ext.inc b/externals/grill/flext/buildsys/win/gnumake-mingw-ext.inc new file mode 100644 index 00000000..6932ae5c --- /dev/null +++ b/externals/grill/flext/buildsys/win/gnumake-mingw-ext.inc @@ -0,0 +1,43 @@ +# build class specific settings
+
+INCPATH += -I$(FLEXTINC)
+LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB)
+LIBS += -l$(FLEXTNAME)
+
+##############################################
+
+# default target
+_build_: $(TARGET)
+
+#$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
+# touch $@
+
+$(OUTPATH):
+ -mkdir $(subst /,\,$@)
+
+$(TARGETPATH): $(OUTPATH)
+ -mkdir $(subst /,\,$@)
+
+$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp
+ $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGETPATH)/%.o : $(SRCDIR)/%.c
+ $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGET) :: $(TARGETPATH)
+
+$(TARGET) :: $(COBJS) $(CPPOBJS)
+ $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
+
+##############################################
+
+_clean_:
+ -del $(subst /,\,$(COBJS) $(CPPOBJS) $(TARGET))
+
+##############################################
+
+$(INSTPATH):
+ -mkdir $(subst /,\,$@)
+
+_install_: $(INSTPATH)
+ copy $(subst /,\,$(TARGET) $(INSTPATH))
diff --git a/externals/grill/flext/buildsys/win/gnumake-mingw-flext.inc b/externals/grill/flext/buildsys/win/gnumake-mingw-flext.inc new file mode 100644 index 00000000..22a6bdfc --- /dev/null +++ b/externals/grill/flext/buildsys/win/gnumake-mingw-flext.inc @@ -0,0 +1,55 @@ +# build class specific settings
+
+##############################################
+
+# default target
+_build_: $(TARGET)
+
+#$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
+# touch $@
+
+$(OUTPATH):
+ -mkdir $(subst /,\,$@)
+
+$(TARGETPATH): $(OUTPATH)
+ -mkdir $(subst /,\,$@)
+
+$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp
+ $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGETPATH)/%.o : $(SRCDIR)/%.c
+ $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
+
+$(TARGET) :: $(TARGETPATH)
+
+$(TARGET) :: $(COBJS) $(CPPOBJS)
+ifdef SHARED
+ $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
+else
+ $(AR) rc $@ $(COBJS) $(CPPOBJS)
+endif
+
+##############################################
+
+_clean_:
+ -del $(subst /,\,$(COBJS) $(CPPOBJS) $(TARGET))
+
+##############################################
+
+ifdef SHARED
+FLEXTLIBINST=$(FLEXTSHLIB)
+else
+FLEXTLIBINST=$(FLEXTLIB)
+endif
+
+$(FLEXTINC):
+ -mkdir $(subst /,\,$@)
+
+$(FLEXTLIBINST):
+ -mkdir $(subst /,\,$@)
+
+_install_:: $(FLEXTINC) $(FLEXTLIBINST)
+
+_install_::
+ copy $(subst /,\,$(TARGET) $(FLEXTLIBINST))
+ -for %%i in ($(HDRS)) do @copy $(SRCDIR)\%%i $(subst /,\,$(FLEXTPATH)) > nul
diff --git a/externals/grill/flext/buildsys/win/gnumake-mingw.inc b/externals/grill/flext/buildsys/win/gnumake-mingw.inc new file mode 100644 index 00000000..7a8aab9c --- /dev/null +++ b/externals/grill/flext/buildsys/win/gnumake-mingw.inc @@ -0,0 +1,24 @@ +############################################## + +TARGETPATH=$(OUTPATH)\$(OUTSUB) +TARGET=$(TARGETPATH)\$(OUTNAME).$(EXT) + +############################################## + +LDFLAGS += -shared -Wl,-x + +############################################## + +ifdef DEBUG +CFLAGS += -g -D_DEBUG +else +CFLAGS += $(OFLAGS) -DNDEBUG +LDFLAGS += -Wl,-S +endif + +############################################## + +CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) +CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) +COBJS=$(patsubst %.c,$(TARGETPATH)/%.o,$(filter %.c,$(SRCS))) +CPPOBJS=$(patsubst %.cpp,$(TARGETPATH)/%.opp,$(filter %.cpp,$(SRCS))) diff --git a/externals/grill/flext/buildsys/win/make-bcc.inc b/externals/grill/flext/buildsys/win/make-bcc.inc deleted file mode 100644 index dbe6b08c..00000000 --- a/externals/grill/flext/buildsys/win/make-bcc.inc +++ /dev/null @@ -1,128 +0,0 @@ -!ifndef FLEXTBUILD -INCPATH=$(INCPATH) -I$(FLEXTPATH) -LIBPATH=$(LIBPATH) -L$(FLEXTPATH) -LIBS=$(LIBS) $(FLEXTNAME).lib -!endif - -!ifdef BCCPATH -INCPATH=$(INCPATH) -I$(BCCPATH)\include -LIBPATH=$(LIBPATH) -L$(BCCPATH)\lib -!endif - -LIBS=$(LIBS) cw32.lib import32.lib C0D32.OBJ -CFLAGS=$(CFLAGS) -tWD -tWM -w-8004 -w-8027 -w-8057 -LDFLAGS=$(LDFLAGS) /C /Tpd - -############################################## - -# use multithreaded static libraries -!ifdef DEBUG -CFLAGS=$(CFLAGS) -v -D_DEBUG -LDFLAGS=$(LDFLAGS) /v -!else -CFLAGS=$(CFLAGS) $(OFLAGS) -DNDEBUG -!endif - -############################################## - -!ifdef FLEXTBUILD -OUTNAME=$(FLEXTNAME) - -!ifdef SHARED -EXT=dll -!else -EXT=lib -BUILDLIB=1 -!endif - -!else -OUTNAME=$(NAME) -!endif - -############################################## - -TARGETPATH=$(OUTPATH)\$(OUTSUB) -TARGET=$(TARGETPATH)\$(OUTNAME).$(EXT) - -############################################## - -!ifdef PDPATH - -$(TARGETPATH)\pd.lib : $(PDPATH)\bin\pd.dll - implib -a $< $** - -$(TARGETPATH)\pthreadVC.lib : $(PDPATH)\bin\pthreadVC.dll - implib -a $< $** - -PDTARGETS=$(TARGETPATH)\pd.lib $(TARGETPATH)\pthreadVC.lib - -!endif - -############################################## - -# default target -_all_: $(TARGET) - -# convert both *.c and *.cpp -OBJSTMP= $(SRCS:.c=.obj) -OBJS= $(OBJSTMP:.objpp=.obj) - -$(TARGETPATH): - if not exist $(OUTPATH) mkdir $(OUTPATH) > nul - if not exist $@ mkdir $@ > nul - -!ifndef FLEXTBUILD -SETUPFUNCTION=$(NAME)_setup - -$(TARGETPATH)\$(NAME).def: - @echo EXPORTS $(SETUPFUNCTION) = _$(SETUPFUNCTION) > $< -# this next line fixes a strange problem with implib - lacking underscore?! - @echo IMPORTS _rtext_retext=PD.rtext_retext >> $< - -$(TARGET) :: $(TARGETPATH)\$(NAME).def -!endif - -{$(SRCDIR)}.cpp{}.obj: - bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(TARGETPATH) $< - -{$(SRCDIR)}.c{}.obj: - bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(TARGETPATH) $< - -$(TARGET) :: $(TARGETPATH) $(PDTARGETS) - -$(TARGET) :: $(OBJS) - cd $(TARGETPATH) -!ifdef BUILDLIB - -del $(<F) - tlib "$(<F)" +$(OBJS: = +) - cd .. -!else - ilink32 $(LDFLAGS) $(LIBPATH) -L. $(OBJS) ,$(<F),,$(LIBS),$(NAME).def -!endif - cd .. - -############################################## - -_clean_: - -del /q $(TARGET) > nul - -cd $(TARGETPATH) - -del /q $(OBJS) > nul - -############################################## - -$(INSTPATH): - if not exist $@ mkdir $@ > nul - -$(FLEXTPATH): - if not exist $@ mkdir $@ > nul - -_install_ :: $(INSTPATH) $(FLEXTPATH) - -_install_ :: -!ifdef FLEXTBUILD - -copy $(TARGET) $(FLEXTPATH) > nul - @cd $(SRCDIR) - -for %%i in ($(HDRS)) do @copy %%i $(FLEXTPATH) > nul -!else - copy $(TARGET) $(INSTPATH) > nul -!endif diff --git a/externals/grill/flext/buildsys/win/make-cygwin.inc b/externals/grill/flext/buildsys/win/make-cygwin.inc deleted file mode 100644 index 6841cf7e..00000000 --- a/externals/grill/flext/buildsys/win/make-cygwin.inc +++ /dev/null @@ -1,91 +0,0 @@ -ifndef FLEXTBUILD -INCPATH += -I$(FLEXTPATH) -LIBPATH += -L$(FLEXTPATH) -LIBS+=$(FLEXTPATH)/$(FLEXTNAME).a -endif - -LDFLAGS += -shared -Wl,-x - -############################################## - -ifdef DEBUG -CFLAGS += -g -D_DEBUG -else -CFLAGS += $(OFLAGS) -DNDEBUG -LDFLAGS += -Wl,-S -endif - -############################################## - -ifdef FLEXTBUILD -OUTNAME=$(FLEXTNAME) - -ifdef SHARED -EXT=dll -else -EXT=a -BUILDLIB=1 -endif - -else -OUTNAME=$(NAME) -endif - -############################################## - -TARGETPATH=$(OUTPATH)/$(OUTSUB) -TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) - -############################################## - -CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) -CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) -COBJS=$(patsubst %.c,$(TARGETPATH)/%.o,$(filter %.c,$(SRCS))) -CPPOBJS=$(patsubst %.cpp,$(TARGETPATH)/%.opp,$(filter %.cpp,$(SRCS))) - -# default target -_all_: $(TARGET) - -$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) - touch $@ - -$(TARGETPATH): - -mkdir -p $@ - -$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp - $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ - -$(TARGETPATH)/%.o : $(SRCDIR)/%.c - $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ - -$(TARGET) :: $(TARGETPATH) - -$(TARGET) :: $(COBJS) $(CPPOBJS) -ifdef BUILDLIB - $(AR) rc $@ $(COBJS) $(CPPOBJS) -else - $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) - chmod 755 $@ -endif - -############################################## - -_clean_: - rm $(COBJS) $(CPPOBJS) $(TARGET) - -############################################## - -$(INSTPATH): - -mkdir -p $@ - -$(FLEXTPATH): - -mkdir -p $@ - -_install_:: $(INSTPATH) $(FLEXTPATH) - -_install_:: $(TARGET) -ifdef FLEXTBUILD - cp $(TARGET) $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTPATH) -else - install $(TARGET) $(INSTPATH) -endif diff --git a/externals/grill/flext/buildsys/win/make-mingw.inc b/externals/grill/flext/buildsys/win/make-mingw.inc deleted file mode 100644 index 693f2947..00000000 --- a/externals/grill/flext/buildsys/win/make-mingw.inc +++ /dev/null @@ -1,93 +0,0 @@ -ifndef FLEXTBUILD -INCPATH += -I$(FLEXTPATH) -LIBPATH += -L$(FLEXTPATH) -LIBS+=$(FLEXTPATH)/$(FLEXTNAME).lib -endif - -LDFLAGS += -shared -Wl,-x - -############################################## - -ifdef DEBUG -CFLAGS += -g -D_DEBUG -else -CFLAGS += $(OFLAGS) -DNDEBUG -LDFLAGS += -Wl,-S -endif - -############################################## - -ifdef FLEXTBUILD -OUTNAME=$(FLEXTNAME) - -ifdef SHARED -EXT=dll -else -EXT=lib -BUILDLIB=1 -endif - -else -OUTNAME=$(NAME) -endif - -############################################## - -TARGETPATH=$(OUTPATH)/$(OUTSUB) -TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) - -############################################## - -CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS))) -CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS))) -COBJS=$(patsubst %.c,$(TARGETPATH)/%.o,$(filter %.c,$(SRCS))) -CPPOBJS=$(patsubst %.cpp,$(TARGETPATH)/%.opp,$(filter %.cpp,$(SRCS))) - - -# default target -_all_: $(TARGET) - -#$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS)) -# touch $@ - -$(TARGETPATH): - -mkdir $(subst /,\,$(OUTPATH)) - -mkdir $(subst /,\,$@) - -$(TARGETPATH)/%.opp : $(SRCDIR)/%.cpp - $(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ - -$(TARGETPATH)/%.o : $(SRCDIR)/%.c - $(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@ - -$(TARGET) :: $(TARGETPATH) - -$(TARGET) :: $(COBJS) $(CPPOBJS) -ifdef BUILDLIB - $(AR) rc $@ $(COBJS) $(CPPOBJS) -else - $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) -endif - -############################################## - -_clean_: - -del $(subst /,\,$(COBJS) $(CPPOBJS) $(TARGET)) - -############################################## - -$(FLEXTPATH): - -mkdir $(subst /,\,$@) - -$(INSTPATH): - -mkdir $(subst /,\,$@) - -_install_:: $(INSTPATH) $(FLEXTPATH) - -_install_:: $(TARGET) -ifdef FLEXTBUILD - copy $(subst /,\,$(TARGET) $(FLEXTPATH)) - -for %%i in ($(subst /,\,$(patsubst %,$(SRCDIR)/%,$(HDRS)))) do @copy %%i $(subst /,\,$(FLEXTPATH)) > nul -else - copy $(subst /,\,$(TARGET) $(INSTPATH)) -endif diff --git a/externals/grill/flext/buildsys/win/make-msvc.inc b/externals/grill/flext/buildsys/win/make-msvc.inc deleted file mode 100644 index eb9e87bf..00000000 --- a/externals/grill/flext/buildsys/win/make-msvc.inc +++ /dev/null @@ -1,103 +0,0 @@ -!ifndef FLEXTBUILD -INCPATH=$(INCPATH) /I$(FLEXTPATH) -LIBPATH=$(LIBPATH) /LIBPATH:$(FLEXTPATH) -LIBS=$(LIBS) $(FLEXTNAME).lib -!endif - -!ifdef MSVCPATH -INCPATH=$(INCPATH) /I$(MSVCPATH)\include -LIBPATH=$(LIBPATH) /LIBPATH:$(MSVCPATH)\lib -!endif - -# for VC7 - enable exception handling -CFLAGS=$(CFLAGS) /EHsc - -############################################## - -!ifdef DEBUG -CFLAGS=$(CFLAGS) /D_DEBUG /DMTd -LDFLAGS=$(LDFLAGS) /DEBUG -!else -CFLAGS=$(CFLAGS) $(OFLAGS) /DNDEBUG /DMT -LDFLAGS=$(LDFLAGS) /INCREMENTAL:NO -!endif - -############################################## - -!ifdef FLEXTBUILD -OUTNAME=$(FLEXTNAME) - -!ifdef SHARED -EXT=dll -!else -EXT=lib -BUILDLIB=1 -!endif - -!else -OUTNAME=$(NAME) -!endif - -############################################## - -TARGETPATH=$(OUTPATH)\$(OUTSUB) -TARGET=$(TARGETPATH)\$(OUTNAME).$(EXT) - -############################################## - -# default target -_all_: $(TARGET) - -# convert both *.c and *.cpp -OBJSTMP= $(SRCS:.c=.obj) -OBJS= $(OBJSTMP:.objpp=.obj) - -$(TARGETPATH): - if not exist $(OUTPATH) mkdir $(OUTPATH) > nul - if not exist $@ mkdir $@ > nul - -{$(SRCDIR)}.cpp{}.obj: - cl /c /LD $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(TARGETPATH)\$@ - -{$(SRCDIR)}.c{}.obj: - cl /c /LD $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(TARGETPATH)\$@ - -$(TARGET):: $(TARGETPATH) - -$(TARGET):: $(OBJS) - @cd $(TARGETPATH) -!ifdef BUILDLIB - lib /OUT:$(@F) $(OBJS) - cd .. -!else - echo $** - link /DLL $(LDFLAGS) $(LIBPATH) $(OBJS) $(LIBS) /out:$(@F) -!endif - cd .. - -############################################## - -# remove build -_clean_: - -del /q $(TARGET) > nul - -cd $(TARGETPATH) - -del /q $(OBJS) > nul - -############################################## - -$(INSTPATH): - if not exist $@ mkdir $@ > nul - -$(FLEXTPATH): - if not exist $@ mkdir $@ > nul - -_install_:: $(INSTPATH) $(FLEXTPATH) - -_install_:: -!ifdef FLEXTBUILD - -copy $(TARGET) $(FLEXTPATH) > nul - @cd $(SRCDIR) - -for %%i in ($(HDRS)) do @copy %%i $(FLEXTPATH) > nul -!else - copy $(TARGET) $(INSTPATH) > nul -!endif diff --git a/externals/grill/flext/buildsys/win/max/config-mingw.def b/externals/grill/flext/buildsys/win/max/config-mingw.def index 5bd543df..d0ce64fa 100644 --- a/externals/grill/flext/buildsys/win/max/config-mingw.def +++ b/externals/grill/flext/buildsys/win/max/config-mingw.def @@ -2,16 +2,32 @@ # you should have the latest version! MAXSDKPATH="c:/data/prog/audio/maxmspsdk_win/4.5 headers/c74support" -# where should the external be installed? -INSTPATH="%CommonProgramFiles%/Cycling '74/externals/flext" +# where is MS VC++? +# (not necessary if the build is run with the compiler environment) +# MSVCPATH=C:/Programme/Microsoft Visual Studio .NET 2003/Vc7 + +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC="%CommonProgramFiles%/Cycling '74/flext" + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) -# where do the flext headers and libraries reside? -FLEXTPATH="%CommonProgramFiles%/Cycling '74/flext" +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(FLEXTINC) + +############################################################### # where should the external be built? # (path for temporary files) OUTPATH=max-mingw +# where should the external be installed? +INSTPATH="%CommonProgramFiles%/Cycling '74/externals/flext" + +############################################################### + # some user-definable flags # (check if they match your system!) OFLAGS=-O2 -march=pentium4 -msse diff --git a/externals/grill/flext/buildsys/win/max/config-msvc.def b/externals/grill/flext/buildsys/win/max/config-msvc.def index ae313e14..1c849d32 100644 --- a/externals/grill/flext/buildsys/win/max/config-msvc.def +++ b/externals/grill/flext/buildsys/win/max/config-msvc.def @@ -2,16 +2,36 @@ # you should have the latest version! MAXSDKPATH="c:\data\prog\audio\maxmspsdk_win\4.5 headers\c74support" -# where should the external be installed? -INSTPATH="%CommonProgramFiles%\Cycling '74\externals\flext" +# where is MS VC++? +# (not necessary if the build is run with the compiler environment) +# MSVCPATH=C:\Programme\Microsoft Visual Studio .NET 2003\Vc7 + +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC="%CommonProgramFiles%\Cycling '74\flext" + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) + +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(FLEXTINC) -# where do the flext headers and libraries reside? -FLEXTPATH="%CommonProgramFiles%\Cycling '74\flext" +############################################################### # where should the external be built? # (path for temporary files) OUTPATH=max-msvc +# where should the external be installed? +INSTPATH="%CommonProgramFiles%\Cycling '74\externals\flext" + +############################################################### + # some user-definable flags # (check if they match your system!) OFLAGS=/G6 /Ox /arch:SSE + +# uncomment to link against dynamic C runtime libraries +# (don't use this if you want to distribute the built product) +#DYNAMIC=1 diff --git a/externals/grill/flext/buildsys/win/max/gnumake-mingw-ext.inc b/externals/grill/flext/buildsys/win/max/gnumake-mingw-ext.inc new file mode 100644 index 00000000..5df7e2f2 --- /dev/null +++ b/externals/grill/flext/buildsys/win/max/gnumake-mingw-ext.inc @@ -0,0 +1 @@ +EXT=mxe
diff --git a/externals/grill/flext/buildsys/win/max/gnumake-mingw-flext.inc b/externals/grill/flext/buildsys/win/max/gnumake-mingw-flext.inc new file mode 100644 index 00000000..da986e52 --- /dev/null +++ b/externals/grill/flext/buildsys/win/max/gnumake-mingw-flext.inc @@ -0,0 +1,6 @@ +ifdef SHARED
+EXT=dll
+else
+EXT=LIB
+endif
+
diff --git a/externals/grill/flext/buildsys/win/max/make-mingw.inc b/externals/grill/flext/buildsys/win/max/gnumake-mingw.inc index baa5c9d7..cf5dc17a 100644 --- a/externals/grill/flext/buildsys/win/max/make-mingw.inc +++ b/externals/grill/flext/buildsys/win/max/gnumake-mingw.inc @@ -4,7 +4,5 @@ CFLAGS += -fpack-struct=2 INCPATH += -I$(MAXSDKPATH)/max-includes -I$(MAXSDKPATH)/msp-includes LIBPATH += -L$(MAXSDKPATH)/max-includes -L$(MAXSDKPATH)/msp-includes -# these are both in PDPATH +# these are both in MAXSDKPATH LIBS += -lmaxapi -lmaxaudio - -EXT=mxe diff --git a/externals/grill/flext/buildsys/win/max/nmake-msvc-ext.inc b/externals/grill/flext/buildsys/win/max/nmake-msvc-ext.inc new file mode 100644 index 00000000..5df7e2f2 --- /dev/null +++ b/externals/grill/flext/buildsys/win/max/nmake-msvc-ext.inc @@ -0,0 +1 @@ +EXT=mxe
diff --git a/externals/grill/flext/buildsys/win/max/nmake-msvc-flext.inc b/externals/grill/flext/buildsys/win/max/nmake-msvc-flext.inc new file mode 100644 index 00000000..a080ae72 --- /dev/null +++ b/externals/grill/flext/buildsys/win/max/nmake-msvc-flext.inc @@ -0,0 +1,5 @@ +!ifdef SHARED
+EXT=dll
+!else
+EXT=lib
+!endif
diff --git a/externals/grill/flext/buildsys/win/max/make-msvc.inc b/externals/grill/flext/buildsys/win/max/nmake-msvc.inc index e3bd547e..02cf3cf5 100644 --- a/externals/grill/flext/buildsys/win/max/make-msvc.inc +++ b/externals/grill/flext/buildsys/win/max/nmake-msvc.inc @@ -6,5 +6,3 @@ LIBPATH=$(LIBPATH) /LIBPATH:$(MAXSDKPATH)\max-includes /LIBPATH:$(MAXSDKPATH)\ms # these are both in MAXSDKPATH LIBS=$(LIBS) maxapi.lib maxaudio.lib - -EXT=mxe diff --git a/externals/grill/flext/buildsys/win/nmake-msvc-ext.inc b/externals/grill/flext/buildsys/win/nmake-msvc-ext.inc new file mode 100644 index 00000000..252d5d2f --- /dev/null +++ b/externals/grill/flext/buildsys/win/nmake-msvc-ext.inc @@ -0,0 +1,45 @@ +# build class specific settings
+
+INCPATH=$(INCPATH) /I$(FLEXTINC)
+LIBPATH=$(LIBPATH) /LIBPATH:$(FLEXTLIB)
+LIBS=$(LIBS) $(FLEXTNAME).lib
+
+##############################################
+
+# default target
+_build_: $(TARGET)
+
+$(OUTPATH):
+ if not exist $@ mkdir $@ > nul
+
+$(TARGETPATH): $(OUTPATH)
+ if not exist $@ mkdir $@ > nul
+
+{$(SRCDIR)}.cpp{}.obj:
+ cl /c $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(TARGETPATH)\$@
+
+{$(SRCDIR)}.c{}.obj:
+ cl /c $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(TARGETPATH)\$@
+
+$(TARGET):: $(TARGETPATH)
+
+$(TARGET):: $(OBJS)
+ @cd $(TARGETPATH)
+ link /DLL $(LDFLAGS) $(LIBPATH) $(OBJS) $(LIBS) /out:$(@F)
+ @cd ..\..
+
+##############################################
+# remove build
+
+_clean_:
+ -del /q $(TARGET) > nul
+ -cd $(TARGETPATH)
+ -del /q $(OBJS) > nul
+
+##############################################
+
+$(INSTPATH):
+ if not exist $@ mkdir $@ > nul
+
+_install_: $(INSTPATH)
+ copy $(TARGET) $(INSTPATH) > nul
diff --git a/externals/grill/flext/buildsys/win/nmake-msvc-flext.inc b/externals/grill/flext/buildsys/win/nmake-msvc-flext.inc new file mode 100644 index 00000000..6c64d682 --- /dev/null +++ b/externals/grill/flext/buildsys/win/nmake-msvc-flext.inc @@ -0,0 +1,66 @@ +# build class specific settings
+
+##############################################
+
+# default target
+_build_: $(TARGET)
+
+$(OUTPATH):
+ if not exist $@ mkdir $@ > nul
+
+$(TARGETPATH): $(OUTPATH)
+ if not exist $@ mkdir $@ > nul
+
+{$(SRCDIR)}.cpp{}.obj:
+ cl /c /LD $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(TARGETPATH)\$@
+
+{$(SRCDIR)}.c{}.obj:
+ cl /c /LD $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(TARGETPATH)\$@
+
+
+$(TARGET):: $(TARGETPATH)
+
+$(TARGET):: $(OBJS)
+ @cd $(TARGETPATH)
+!ifdef SHARED
+ link /DLL $(LDFLAGS) $(LIBPATH) $(OBJS) $(LIBS) /out:$(@F)
+!else
+ lib /OUT:$(@F) $(OBJS)
+!endif
+ @cd ..\..
+
+##############################################
+
+# remove build
+_clean_:
+ -del /q $(TARGET) > nul
+ -cd $(TARGETPATH)
+ -del /q $(OBJS) > nul
+
+##############################################
+
+!ifdef SHARED
+FLEXTLIBINST=$(FLEXTSHLIB)
+!else
+FLEXTLIBINST=$(FLEXTLIB)
+!endif
+
+$(FLEXTINC):
+ if not exist $@ mkdir $@ > nul
+
+$(FLEXTLIB):
+ if not exist $@ mkdir $@ > nul
+
+$(FLEXTLIBINST):
+ if not exist $@ mkdir $@ > nul
+
+_install_:: $(FLEXTINC) $(FLEXTLIB) $(FLEXTLIBINST)
+
+_install_::
+ copy $(TARGET) $(FLEXTLIBINST) > nul
+!ifdef SHARED
+# copy import library
+ copy $(TARGET:.dll=.lib) $(FLEXTLIB) > nul
+!endif
+# copy headers
+ for %%i in ($(HDRS)) do @copy $(SRCDIR)\%%i $(FLEXTINC) > nul
diff --git a/externals/grill/flext/buildsys/win/nmake-msvc.inc b/externals/grill/flext/buildsys/win/nmake-msvc.inc new file mode 100644 index 00000000..fb74a7bf --- /dev/null +++ b/externals/grill/flext/buildsys/win/nmake-msvc.inc @@ -0,0 +1,64 @@ +!ifdef MSVCPATH +INCPATH=$(INCPATH) /I$(MSVCPATH)\include +LIBPATH=$(LIBPATH) /LIBPATH:$(MSVCPATH)\lib +!endif + +############################################## + +TARGETPATH=$(OUTPATH)\$(OUTSUB) +TARGET=$(TARGETPATH)\$(OUTNAME).$(EXT) + +############################################## +# use precompiled headers (automatic mode) + +!ifndef PRECOMPILE +CFLAGS=$(CFLAGS) /YXflext.h +!else +CFLAGS=$(CFLAGS) /YX$(PRECOMPILE) +!endif +# location of precompiled file +CFLAGS=$(CFLAGS) /Fp$(TARGETPATH)\precompiled.pch + +############################################## + +# create code for DLL +CFLAGS=$(CFLAGS) /LD /GD + +# enable exception handling +CFLAGS=$(CFLAGS) /GX + +# no banner +CFLAGS=$(CFLAGS) /nologo +LDFLAGS=$(LDFLAGS) /nologo + +############################################## + +!ifdef DEBUG + +CFLAGS=$(CFLAGS) /D_DEBUG +!ifdef DYNAMIC +CFLAGS=$(CFLAGS) /MDd +!else +CFLAGS=$(CFLAGS) /MTd +!endif + +LDFLAGS=$(LDFLAGS) /DEBUG + +!else + +CFLAGS=$(CFLAGS) $(OFLAGS) /DNDEBUG +!ifdef DYNAMIC +CFLAGS=$(CFLAGS) /MD +!else +CFLAGS=$(CFLAGS) /MT +!endif + +LDFLAGS=$(LDFLAGS) /INCREMENTAL:NO + +!endif + +############################################## +# convert both *.c and *.cpp + +OBJSTMP= $(SRCS:.c=.obj) +OBJS= $(OBJSTMP:.objpp=.obj) diff --git a/externals/grill/flext/buildsys/win/pd/bmake-bcc-ext.inc b/externals/grill/flext/buildsys/win/pd/bmake-bcc-ext.inc new file mode 100644 index 00000000..b2234c5b --- /dev/null +++ b/externals/grill/flext/buildsys/win/pd/bmake-bcc-ext.inc @@ -0,0 +1 @@ +EXT=dll
diff --git a/externals/grill/flext/buildsys/win/pd/bmake-bcc-flext.inc b/externals/grill/flext/buildsys/win/pd/bmake-bcc-flext.inc new file mode 100644 index 00000000..a080ae72 --- /dev/null +++ b/externals/grill/flext/buildsys/win/pd/bmake-bcc-flext.inc @@ -0,0 +1,5 @@ +!ifdef SHARED
+EXT=dll
+!else
+EXT=lib
+!endif
diff --git a/externals/grill/flext/buildsys/win/pd/make-bcc.inc b/externals/grill/flext/buildsys/win/pd/bmake-bcc.inc index c4a9892c..3b257b0d 100644 --- a/externals/grill/flext/buildsys/win/pd/make-bcc.inc +++ b/externals/grill/flext/buildsys/win/pd/bmake-bcc.inc @@ -4,5 +4,3 @@ INCPATH=$(INCPATH) -I$(PDPATH)\src # these are both in FLEXTPATH LIBS=$(LIBS) pd.lib pthreadVC.lib - -EXT=dll diff --git a/externals/grill/flext/buildsys/win/pd/config-bcc.def b/externals/grill/flext/buildsys/win/pd/config-bcc.def index 85f78a22..285e5b02 100644 --- a/externals/grill/flext/buildsys/win/pd/config-bcc.def +++ b/externals/grill/flext/buildsys/win/pd/config-bcc.def @@ -1,18 +1,30 @@ # where is PD? PDPATH=c:\programme\audio\pd -# where should the external be installed? -INSTPATH=$(PDPATH)\extra - -# where do the flext headers and libraries reside? -FLEXTPATH=$(PDPATH)\flext - # where is BorlandC++? BCCPATH=C:\Programme\prog\bcc55 +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC=$(PDPATH)\flext + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) + +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(FLEXTINC) + +############################################################### + # where should the external be built? OUTPATH=pd-bcc +# where should the external be installed? +INSTPATH=$(PDPATH)\extra + +############################################################### + # user defined compiler flags # (check if they match your system!) OFLAGS=-6 -O2 -OS -ff -d diff --git a/externals/grill/flext/buildsys/win/pd/config-cygwin.def b/externals/grill/flext/buildsys/win/pd/config-cygwin.def index 0a63ea3f..11bca921 100644 --- a/externals/grill/flext/buildsys/win/pd/config-cygwin.def +++ b/externals/grill/flext/buildsys/win/pd/config-cygwin.def @@ -1,15 +1,27 @@ # where is PD? PDPATH=/cygdrive/c/programme/audio/pd -# where should the external be installed? -INSTPATH=$(PDPATH)/extra +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC=$(PDPATH)/flext + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) + +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(FLEXTINC) -# where do the flext headers and libraries reside? -FLEXTPATH=$(PDPATH)/flext +############################################################### # where should the external be built? OUTPATH=pd-cygwin +# where should the external be installed? +INSTPATH=$(PDPATH)/extra + +############################################################### + # user defined compiler flags # (check if they match your system!) OFLAGS=-O2 -march=pentium4 -msse diff --git a/externals/grill/flext/buildsys/win/pd/config-mingw.def b/externals/grill/flext/buildsys/win/pd/config-mingw.def index 2082f34b..7b720f58 100644 --- a/externals/grill/flext/buildsys/win/pd/config-mingw.def +++ b/externals/grill/flext/buildsys/win/pd/config-mingw.def @@ -1,15 +1,27 @@ # where is PD? PDPATH=c:/programme/audio/pd -# where should the external be installed? -INSTPATH=$(PDPATH)/extra +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC=$(PDPATH)/flext + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) + +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(FLEXTINC) -# where do the flext headers and libraries reside? -FLEXTPATH=$(PDPATH)/flext +############################################################### # where should the external be built? OUTPATH=pd-mingw +# where should the external be installed? +INSTPATH=$(PDPATH)/extra + +############################################################### + # user defined compiler flags # (check if they match your system!) OFLAGS=-O2 -march=pentium4 -msse diff --git a/externals/grill/flext/buildsys/win/pd/config-msvc.def b/externals/grill/flext/buildsys/win/pd/config-msvc.def index e50837a6..a7171ff2 100644 --- a/externals/grill/flext/buildsys/win/pd/config-msvc.def +++ b/externals/grill/flext/buildsys/win/pd/config-msvc.def @@ -1,19 +1,36 @@ # where is PD? -PDPATH=c:\programme\audio\pd - -# where should the external be installed? -INSTPATH=$(PDPATH)\extra - -# where do the flext headers and libraries reside? -FLEXTPATH=$(PDPATH)\flext +PDPATH=c:\programme\audio\pd # where is MS VC++? # (not necessary if the build is run with the compiler environment) # MSVCPATH=C:\Programme\Microsoft Visual Studio .NET 2003\Vc7 +############################################################### + +# where do/should the flext headers reside/be built? +FLEXTINC=$(PDPATH)\flext + +# where do/should the flext static libraries reside/be built? +FLEXTLIB=$(FLEXTINC) + +# where do/should the flext shared libraries reside/be built? +FLEXTSHLIB=$(FLEXTINC) + +############################################################### + # where should the external be built? +# (relative one-level subpath to project folder) OUTPATH=pd-msvc +# where should externals be installed? +INSTPATH=$(PDPATH)\extra + +############################################################### + # user defined compiler flags # (check if they match your system!) OFLAGS=/G6 /Ox /arch:SSE + +# uncomment to link against dynamic C runtime libraries +# (don't use this if you want to distribute the built product) +#DYNAMIC=1 diff --git a/externals/grill/flext/buildsys/win/pd/gnumake-cygwin-ext.inc b/externals/grill/flext/buildsys/win/pd/gnumake-cygwin-ext.inc new file mode 100644 index 00000000..b2234c5b --- /dev/null +++ b/externals/grill/flext/buildsys/win/pd/gnumake-cygwin-ext.inc @@ -0,0 +1 @@ +EXT=dll
diff --git a/externals/grill/flext/buildsys/win/pd/gnumake-cygwin-flext.inc b/externals/grill/flext/buildsys/win/pd/gnumake-cygwin-flext.inc new file mode 100644 index 00000000..5c8a7a83 --- /dev/null +++ b/externals/grill/flext/buildsys/win/pd/gnumake-cygwin-flext.inc @@ -0,0 +1,5 @@ +ifdef SHARED
+EXT=dll
+else
+EXT=a
+endif
diff --git a/externals/grill/flext/buildsys/win/pd/make-cygwin.inc b/externals/grill/flext/buildsys/win/pd/gnumake-cygwin.inc index d1641769..054526c0 100644 --- a/externals/grill/flext/buildsys/win/pd/make-cygwin.inc +++ b/externals/grill/flext/buildsys/win/pd/gnumake-cygwin.inc @@ -7,5 +7,3 @@ CFLAGS += -include /usr/include/pthread.h -DPTHREAD_H LIBS += $(PDPATH)/bin/pd.dll #LIBS += $(PDPATH)/bin/pthreadVC.dll - -EXT=dll diff --git a/externals/grill/flext/buildsys/win/pd/gnumake-mingw-ext.inc b/externals/grill/flext/buildsys/win/pd/gnumake-mingw-ext.inc new file mode 100644 index 00000000..b2234c5b --- /dev/null +++ b/externals/grill/flext/buildsys/win/pd/gnumake-mingw-ext.inc @@ -0,0 +1 @@ +EXT=dll
diff --git a/externals/grill/flext/buildsys/win/pd/gnumake-mingw-flext.inc b/externals/grill/flext/buildsys/win/pd/gnumake-mingw-flext.inc new file mode 100644 index 00000000..5c8a7a83 --- /dev/null +++ b/externals/grill/flext/buildsys/win/pd/gnumake-mingw-flext.inc @@ -0,0 +1,5 @@ +ifdef SHARED
+EXT=dll
+else
+EXT=a
+endif
diff --git a/externals/grill/flext/buildsys/win/pd/make-mingw.inc b/externals/grill/flext/buildsys/win/pd/gnumake-mingw.inc index 836ef3b6..1002a914 100644 --- a/externals/grill/flext/buildsys/win/pd/make-mingw.inc +++ b/externals/grill/flext/buildsys/win/pd/gnumake-mingw.inc @@ -5,5 +5,3 @@ LIBPATH += -L$(PDPATH)/bin # these are both in PDPATH LIBS += -lpd -lpthreadVC - -EXT=dll diff --git a/externals/grill/flext/buildsys/win/pd/nmake-msvc-ext.inc b/externals/grill/flext/buildsys/win/pd/nmake-msvc-ext.inc new file mode 100644 index 00000000..b2234c5b --- /dev/null +++ b/externals/grill/flext/buildsys/win/pd/nmake-msvc-ext.inc @@ -0,0 +1 @@ +EXT=dll
diff --git a/externals/grill/flext/buildsys/win/pd/nmake-msvc-flext.inc b/externals/grill/flext/buildsys/win/pd/nmake-msvc-flext.inc new file mode 100644 index 00000000..a080ae72 --- /dev/null +++ b/externals/grill/flext/buildsys/win/pd/nmake-msvc-flext.inc @@ -0,0 +1,5 @@ +!ifdef SHARED
+EXT=dll
+!else
+EXT=lib
+!endif
diff --git a/externals/grill/flext/buildsys/win/pd/make-msvc.inc b/externals/grill/flext/buildsys/win/pd/nmake-msvc.inc index 41a7cd30..75a99d4b 100644 --- a/externals/grill/flext/buildsys/win/pd/make-msvc.inc +++ b/externals/grill/flext/buildsys/win/pd/nmake-msvc.inc @@ -5,5 +5,3 @@ LIBPATH=$(LIBPATH) /LIBPATH:$(PDPATH)\bin # these are both in PDPATH LIBS=$(LIBS) pd.lib pthreadVC.lib - -EXT=dll diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt index 7d91724d..37fa5d91 100644 --- a/externals/grill/flext/changes.txt +++ b/externals/grill/flext/changes.txt @@ -1,6 +1,6 @@ flext - C++ layer for Max/MSP and pd (pure data) externals -Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net) +Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. @@ -23,7 +23,7 @@ Version history: - dropped support for Max UI objects - added global system locking - added general atom outlet functions To{Sys,Out,Queue}Atom -- added build system for flext-based externals +- new build system for flext and flext-based externals - flags for object construction and destruction phase (Initing() and Exiting()) - reconsidered flext::buffer::Update diff --git a/externals/grill/flext/config-pd-darwin.txt b/externals/grill/flext/config-pd-darwin.txt index 32811383..f6fa6f86 100644 --- a/externals/grill/flext/config-pd-darwin.txt +++ b/externals/grill/flext/config-pd-darwin.txt @@ -6,7 +6,7 @@ # CXX=g++-3.3 # where are the PD header files? (m_pd.h, m_imp.h, g_canvas.h) -PDPATH=/Applications/Pd-0.38-0test10.app/Contents/Resources/src +PDPATH=/Applications/audio/Pd-0.38-0test13.app/Contents/Resources/src # where is the SndObj include directory? # (leave blank or comment out to disable SndObj support) @@ -21,7 +21,7 @@ TARGDIR=./pd-darwin # where should flext libraries be installed? # (leave blank to omit installation) -INSTDIR=/Applications/Pd-0.38-0test10.app/Contents/Resources/flext +INSTDIR=/Applications/audio/Pd-0.38-0test10.app/Contents/Resources/flext # additional compiler flags # (check if they fit for your system!) diff --git a/externals/grill/flext/package.txt b/externals/grill/flext/package.txt index 386de119..2c85f8cf 100644 --- a/externals/grill/flext/package.txt +++ b/externals/grill/flext/package.txt @@ -1,8 +1,9 @@ NAME=flext
-FLEXTBUILD=1
+BUILDCLASS=flext
+BUILDMODE=all
+BUILDTYPE=all
-BUILDDIR=build
SRCDIR=source
SRCS= \
diff --git a/externals/grill/flext/source/flbase.h b/externals/grill/flext/source/flbase.h index 47db0618..d6c34e29 100644 --- a/externals/grill/flext/source/flbase.h +++ b/externals/grill/flext/source/flbase.h @@ -220,7 +220,8 @@ class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj): bool init_ok; // flags for init and exit procedure; - static bool initing,exiting; + static bool initing; + static bool exiting; public: |