diff options
Diffstat (limited to 'externals/grill/flext/buildsys/mac')
7 files changed, 87 insertions, 23 deletions
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) |