diff options
Diffstat (limited to 'externals/grill/flext/buildsys')
15 files changed, 166 insertions, 84 deletions
diff --git a/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc index b3a20f16..5a26af4c 100644 --- a/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc +++ b/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc @@ -1,9 +1,7 @@ # build class specific settings -TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) - INCPATH += -I$(FLEXTINC) -LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB) +LIBPATH += -L$(FLEXTLIB) LIBS += -l$(FLEXTNAME) ############################################## diff --git a/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc b/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc index 3a84d399..2689e922 100644 --- a/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc +++ b/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc @@ -1,12 +1,5 @@ # build class specific settings -ifdef SHARED -SONAME=$(OUTNAME).$(EXT) -TARGET=$(TARGETPATH)/$(OUTNAME).$(PKGVERSION).$(EXT) -else -TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) -endif - ############################################## # default target @@ -28,7 +21,7 @@ $(TARGET) :: $(TARGETPATH) $(TARGET) :: $(COBJS) $(CPPOBJS) ifdef SHARED - $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ -Wl,-soname,$(SONAME) $(COBJS) $(CPPOBJS) $(LIBS) + $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ -Wl,-soname,$(TARGETNAME) $(COBJS) $(CPPOBJS) $(LIBS) chmod 755 $@ ifndef DEBUG ifndef PROFILE @@ -46,21 +39,24 @@ _clean_: ############################################## -ifdef SHARED -FLEXTLIBINST=$(FLEXTSHLIB) -else -FLEXTLIBINST=$(FLEXTLIB) -endif - -$(FLEXTINC): - -mkdir -p $@ - -$(FLEXTLIBINST): +$(FLEXTINC) $(FLEXTLIB) $(FLEXTSYS) $(FLEXTBIN): -mkdir -p $@ -_install_: $(FLEXTINC) $(FLEXTLIBINST) - install $(TARGET) $(FLEXTLIBINST) +_install_: $(FLEXTINC) $(FLEXTLIB) $(FLEXTSYS) $(FLEXTBIN) + install $(TARGET) $(FLEXTLIB) +ifdef VERNAME ifdef SHARED - /sbin/ldconfig -l $(TARGET) + /sbin/ldconfig -l $(FLEXTLIB)/$(VERNAME) +else + -ln -sf $(FLEXTLIB)/$(VERNAME) $(FLEXTLIB)/$(TARGETNAME) +endif endif install $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTINC) +# transfer build system + cp -rf buildsys $(FLEXTSYS) + install build.sh $(FLEXTSYS) + chmod -R a+rx $(FLEXTSYS) +# make convenience script + echo bash $(FLEXTSYS)/build.sh $$\* > $(FLEXTBIN)/flext-build.sh + chmod a+rx $(FLEXTBIN)/flext-build.sh + diff --git a/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc b/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc index 08945e71..6ff417aa 100644 --- a/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc +++ b/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc @@ -1,7 +1,24 @@ ############################################## +FLEXTINC=$(FLEXTPREFIX)/include/flext +FLEXTLIB=$(FLEXTPREFIX)/lib +FLEXTSYS=$(FLEXTPREFIX)/lib/flext +FLEXTBIN=$(FLEXTPREFIX)/bin + +############################################## + OBJPATH=$(OUTPATH)/$(OUTSUB) TARGETPATH=$(OBJPATH) +TARGETNAME=$(OUTNAME).$(EXT) + +ifdef PKGVERSION +VERNAME=$(OUTNAME).$(PKGVERSION).$(EXT) +TARGET=$(TARGETPATH)/$(VERNAME) +else +TARGET=$(TARGETPATH)/$(TARGETNAME) +endif + +INSTTARGET=$(TARGET) ############################################## diff --git a/externals/grill/flext/buildsys/lnx/gnumake-icc-ext.inc b/externals/grill/flext/buildsys/lnx/gnumake-icc-ext.inc index 58bb7c3d..d19d5966 100644 --- a/externals/grill/flext/buildsys/lnx/gnumake-icc-ext.inc +++ b/externals/grill/flext/buildsys/lnx/gnumake-icc-ext.inc @@ -1,9 +1,7 @@ # build class specific settings -TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) - INCPATH += -I$(FLEXTINC) -LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB) +LIBPATH += -L$(FLEXTLIB) LIBS += -l$(FLEXTNAME) ############################################## diff --git a/externals/grill/flext/buildsys/lnx/gnumake-icc-flext.inc b/externals/grill/flext/buildsys/lnx/gnumake-icc-flext.inc index 8c106e7c..1668f609 100644 --- a/externals/grill/flext/buildsys/lnx/gnumake-icc-flext.inc +++ b/externals/grill/flext/buildsys/lnx/gnumake-icc-flext.inc @@ -1,12 +1,5 @@ # build class specific settings -ifdef SHARED -SONAME=$(OUTNAME).$(EXT) -TARGET=$(TARGETPATH)/$(OUTNAME).$(PKGVERSION).$(EXT) -else -TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) -endif - ############################################## # default target @@ -46,21 +39,24 @@ _clean_: ############################################## -ifdef SHARED -FLEXTLIBINST=$(FLEXTSHLIB) -else -FLEXTLIBINST=$(FLEXTLIB) -endif - -$(FLEXTINC): - -mkdir -p $@ - -$(FLEXTLIBINST): +$(FLEXTINC) $(FLEXTLIB) $(FLEXTSYS) $(FLEXTBIN): -mkdir -p $@ -_install_: $(FLEXTINC) $(FLEXTLIBINST) - install $(TARGET) $(FLEXTLIBINST) +_install_: $(FLEXTINC) $(FLEXTLIB) $(FLEXTSYS) $(FLEXTBIN) + install $(TARGET) $(FLEXTLIB) +ifdef VERNAME ifdef SHARED - /sbin/ldconfig -l $(TARGET) + /sbin/ldconfig -l $(FLEXTLIB)/$(VERNAME) +else + -ln -sf $(FLEXTLIB)/$(VERNAME) $(FLEXTLIB)/$(TARGETNAME) +endif endif install $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTINC) +# transfer build system + cp -rf buildsys $(FLEXTSYS) + install build.sh $(FLEXTSYS) + chmod -R a+rx $(FLEXTSYS) +# make convenience script + echo bash $(FLEXTSYS)/build.sh $$\* > $(FLEXTBIN)/flext-build.sh + chmod a+rx $(FLEXTBIN)/flext-build.sh + diff --git a/externals/grill/flext/buildsys/lnx/gnumake-icc.inc b/externals/grill/flext/buildsys/lnx/gnumake-icc.inc index 96d3d642..d624dc79 100644 --- a/externals/grill/flext/buildsys/lnx/gnumake-icc.inc +++ b/externals/grill/flext/buildsys/lnx/gnumake-icc.inc @@ -1,7 +1,24 @@ ############################################## +FLEXTINC=$(FLEXTPREFIX)/include/flext +FLEXTLIB=$(FLEXTPREFIX)/lib +FLEXTSYS=$(FLEXTPREFIX)/lib/flext +FLEXTBIN=$(FLEXTPREFIX)/bin + +############################################## + OBJPATH=$(OUTPATH)/$(OUTSUB) TARGETPATH=$(OBJPATH) +TARGETNAME=$(OUTNAME).$(EXT) + +ifdef PKGVERSION +VERNAME=$(OUTNAME).$(PKGVERSION).$(EXT) +TARGET=$(TARGETPATH)/$(VERNAME) +else +TARGET=$(TARGETPATH)/$(TARGETNAME) +endif + +INSTTARGET=$(TARGET) ############################################## diff --git a/externals/grill/flext/buildsys/lnx/pd/config-gcc.def b/externals/grill/flext/buildsys/lnx/pd/config-gcc.def index aaff3340..be09f6d8 100644 --- a/externals/grill/flext/buildsys/lnx/pd/config-gcc.def +++ b/externals/grill/flext/buildsys/lnx/pd/config-gcc.def @@ -4,14 +4,12 @@ PDPATH=/usr/local/src/pd ############################################################### -# where do/should the flext headers reside/be built? -FLEXTINC=/usr/local/include/flext +# prefix for flext installation +# headers are in $(FLEXTPREFIX)/include/flext +# libraries are in $(FLEXTPREFIX)/lib +# build system is in $(FLEXTPREFIX)/lib/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) +FLEXTPREFIX=/usr/local ############################################################### diff --git a/externals/grill/flext/buildsys/lnx/pd/config-icc.def b/externals/grill/flext/buildsys/lnx/pd/config-icc.def index b6d6169e..526eba11 100644 --- a/externals/grill/flext/buildsys/lnx/pd/config-icc.def +++ b/externals/grill/flext/buildsys/lnx/pd/config-icc.def @@ -4,14 +4,12 @@ PDPATH=/usr/local/src/pd ############################################################### -# where do/should the flext headers reside/be built? -FLEXTINC=/usr/local/include/flext +# prefix for flext installation +# headers are in $(FLEXTPREFIX)/include/flext +# libraries are in $(FLEXTPREFIX)/lib +# build system is in $(FLEXTPREFIX)/lib/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) +FLEXTPREFIX=/usr/local ############################################################### diff --git a/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc index b5873d50..a44ae23c 100644 --- a/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc +++ b/externals/grill/flext/buildsys/mac/gnumake-gcc-ext.inc @@ -1,7 +1,7 @@ # build class specific settings INCPATH += -I$(FLEXTINC) -LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB) +LIBPATH += -L$(FLEXTLIB) LIBS += -l$(FLEXTNAME) # obviously header precompilation os still buggy with gcc 3.3 @@ -67,4 +67,5 @@ $(INSTPATH): -mkdir -p $(INSTPATH) _install_:: $(INSTPATH) +# copy plain file or whole bundle cp -R $(INSTTARGET) $(INSTPATH) diff --git a/externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc b/externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc index 44b6f6fe..5dd7d903 100644 --- a/externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc +++ b/externals/grill/flext/buildsys/mac/gnumake-gcc-flext.inc @@ -1,7 +1,12 @@ # build class specific settings ifdef SHARED -#LDFLAGS += -dylib_install_name $(FLEXTSHLIB)/$(OUTNAME).$(EXT) +LDFLAGS += -install_name $(FLEXTLIB)/$(TARGETNAME) +# PKGVERSION must be in the 0.0.0 format +LDFLAGS += -current_version $(PKGVERSION) +# strip last number +LDFLAGS += -compatibility_version $(basename $(PKGVERSION)) +LDFLAGS += -preload -seg1addr 0xd0000000 endif ############################################## @@ -56,22 +61,46 @@ _clean_: ############################################## -ifdef SHARED -FLEXTLIBINST=$(FLEXTSHLIB) -else -FLEXTLIBINST=$(FLEXTLIB) -endif - $(FLEXTINC): -mkdir -p $@ -$(FLEXTLIBINST): +$(FLEXTLIB): -mkdir -p $@ -_install_: $(FLEXTINC) $(FLEXTLIBINST) - install $(TARGET) $(FLEXTLIBINST) +_install_: $(FLEXTINC) $(FLEXTLIB) +ifdef FLEXTFRAMEWORK +# --- install as framework --- +ifndef PKGVERSION +$(error Need package version) +endif + mkdir -p $(FLEXTFRAMEWORK)/Versions/$(basename $(PKGVERSION))/Headers + ln -sfh ./$(basename $(PKGVERSION)) $(FLEXTFRAMEWORK)/Versions/Current + ln -sfh ./Versions/Current/Headers $(FLEXTFRAMEWORK)/Headers + install $(TARGET) $(FLEXTFRAMEWORK)/Versions/Current +ifdef SHARED + # make link without lib... and extension + ln -sf ./Versions/Current/$(VERNAME) $(FLEXTFRAMEWORK)/$(patsubst lib%,%,$(basename $(TARGETNAME))) +else + ranlib $(FRAMEWORK)/Versions/Current/$(VERNAME) + ln -sf ./Versions/Current/$(VERNAME) $(FLEXTFRAMEWORK)/$(TARGETNAME) +endif + install $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTFRAMEWORK)/Headers +else +# --- install as dynamic library --- + install $(TARGET) $(FLEXTLIB) ifndef SHARED # have to rerun ranlib at install dir ?! - ranlib $(FLEXTLIBINST)/$(notdir $(TARGET)) + ranlib $(FLEXTLIB)/$(VERNAME) +endif +ifdef VERNAME + ln -sf $(FLEXTLIB)/$(VERNAME) $(FLEXTLIB)/$(TARGETNAME) endif install $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTINC) +endif +# transfer build system + cp -rf buildsys $(FLEXTSYS) + install build.sh $(FLEXTSYS) + chmod -R a+rx $(FLEXTSYS) +# make convenience script + echo bash $(FLEXTSYS)/build.sh $$\* > $(FLEXTBIN)/flext-build.sh + chmod a+rx $(FLEXTBIN)/flext-build.sh diff --git a/externals/grill/flext/buildsys/mac/gnumake-gcc.inc b/externals/grill/flext/buildsys/mac/gnumake-gcc.inc index 1bfe2362..4e7f84af 100644 --- a/externals/grill/flext/buildsys/mac/gnumake-gcc.inc +++ b/externals/grill/flext/buildsys/mac/gnumake-gcc.inc @@ -1,5 +1,23 @@ ############################################## +ifneq (,$(findstring Frameworks,$(FLEXTPREFIX))) +FLEXTFRAMEWORK=$(FLEXTPREFIX)/flext.framework +endif + +ifdef FLEXTFRAMEWORK +FLEXTLIB=$(FLEXTFRAMEWORK) +FLEXTINC=$(FLEXTFRAMEWORK)/Headers +FLEXTSYS=$(FLEXTFRAMEWORK)/Resources +else +FLEXTLIB=$(FLEXTPREFIX)/lib +FLEXTINC=$(FLEXTPREFIX)/include/flext +FLEXTSYS=$(FLEXTPREFIX)/lib/flext +endif + +FLEXTBIN=$(FLEXTPREFIX)/bin + +############################################## + LDFLAGS += -dynamic -Wl,-x -framework ApplicationServices -framework vecLib ############################################## diff --git a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc index 85e01a75..de5afd04 100644 --- a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc +++ b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-ext.inc @@ -4,6 +4,9 @@ EXT=mxo OBJPATH=$(OUTPATH)/$(OUTSUB) +# bundle name (build site) INSTTARGET=$(OBJPATH)/$(OUTNAME).$(EXT) +# folder inside bundle (build site) TARGETPATH=$(INSTTARGET)/Contents/MacOS +# file inside bundle (build site) 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 index b99cfec7..531d92b1 100644 --- a/externals/grill/flext/buildsys/mac/max/gnumake-gcc-flext.inc +++ b/externals/grill/flext/buildsys/mac/max/gnumake-gcc-flext.inc @@ -7,8 +7,16 @@ endif ############################################## OBJPATH=$(OUTPATH)/$(OUTSUB) - TARGETPATH=$(OBJPATH) -TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) + +TARGETNAME=$(OUTNAME).$(EXT) +ifdef PKGVERSION +VERNAME=$(OUTNAME).$(PKGVERSION).$(EXT) +TARGET=$(TARGETPATH)/$(VERNAME) +else +TARGET=$(TARGETPATH)/$(TARGETNAME) +endif + INSTTARGET=$(TARGET) + diff --git a/externals/grill/flext/buildsys/mac/pd/config-gcc.def b/externals/grill/flext/buildsys/mac/pd/config-gcc.def index c9ff54dc..2095518b 100644 --- a/externals/grill/flext/buildsys/mac/pd/config-gcc.def +++ b/externals/grill/flext/buildsys/mac/pd/config-gcc.def @@ -7,14 +7,12 @@ PDBIN=$(PDPATH)/bin/pd ############################################################### -# where do/should the flext headers reside/be built? -FLEXTINC=/usr/local/include/flext +# prefix for flext installation +# headers are in $(FLEXTPREFIX)/include/flext +# libraries are in $(FLEXTPREFIX)/lib +# build system is in $(FLEXTPREFIX)/lib/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) +FLEXTPREFIX=/usr/local ############################################################### diff --git a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc.inc b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc.inc index b57e87c2..4f1648c5 100644 --- a/externals/grill/flext/buildsys/mac/pd/gnumake-gcc.inc +++ b/externals/grill/flext/buildsys/mac/pd/gnumake-gcc.inc @@ -7,6 +7,13 @@ LIBPATH += -L$(PDPATH)/bin OBJPATH=$(OUTPATH)/$(OUTSUB) TARGETPATH=$(OBJPATH) -TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) -INSTTARGET=$(TARGET) +TARGETNAME=$(OUTNAME).$(EXT) + +ifdef PKGVERSION +VERNAME=$(OUTNAME).$(PKGVERSION).$(EXT) +TARGET=$(TARGETPATH)/$(VERNAME) +else +TARGET=$(TARGETPATH)/$(TARGETNAME) +endif +INSTTARGET=$(TARGET) |