--- externals/Makefile (rev 13687) 2010-06-18 14:25:23.000000000 +1000 +++ externals/Makefile (flext) 2010-06-28 12:17:11.000000000 +1000 @@ -128,7 +128,7 @@ # # WARNING! this MUST be all on one line because the automatic package # building scripts rely on it being that way. -LIB_TARGETS = adaptive bassemu boids bsaylor creb cxc cyclone earplug ekext ext13 flashserver flatspace flib freeverb ggee hcs iem_ambi iem_bin_ambi iemlib iemgui iemguts iem_adaptfilt iemmatrix iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders mapping markex maxlib mjlib moocow moonlib motex mrpeach oscx pan pdcontainer pddp pdogg pmpd sigpack smlib tof toxy unauthorized vanilla vbap windowing zexy +LIB_TARGETS = adaptive absattr bassemu boids bsaylor clk creb cxc cyclone earplug ekext ext13 flashserver flatspace flib freeverb ggee hcs iem_ambi iem_bin_ambi iemlib iemgui iemguts iem_adaptfilt iemmatrix iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders mapping markex maxlib mjlib moocow moonlib motex mrpeach oscx pan pdcontainer pddp pdogg pmpd pool py sigpack smlib tof toxy unauthorized vanilla vbap windowing xsample zexy # this is for libraries that don't compile (yet) on all platforms ifeq ($(OS_NAME),windows) @@ -2339,6 +2339,184 @@ earplug_clean: make -C $(externals_src)/earplug~ clean +#------------------------------------------------------------------------------# +# FLEXT +FLEXT_NAME = flext +ifeq ($(OS_NAME),windows) + FLEXT_CONFIG = buildsys/config-win-pd-gcc.txt + FLEXT_CFLAGS = $(OPT_CFLAGS) $(CFLAGS) +else + ifeq ($(OS_NAME),darwin) + FLEXT_CONFIG = buildsys/config-mac-pd-gcc.txt + else + ifeq ($(OS_NAME),linux) + FLEXT_CONFIG = buildsys/config-lnx-pd-gcc.txt + else + FLEXT_CFLAGS = $(OPT_CFLAGS) $(CFLAGS) + endif + endif +endif + +FLEXT_OUTPATH =$(shell grep OUTPATH= $(externals_src)/grill/flext/$(FLEXT_CONFIG) | sed s/^OUTPATH=//) + +$(externals_src)/grill/flext/$(FLEXT_CONFIG): + -cd $(externals_src)/grill/flext && ./build.sh pd gcc + +flext-edit-config: $(externals_src)/grill/flext/$(FLEXT_CONFIG) + sed -i -e 's|^\(PDPATH=\).*|\1$(pd_src)|' -e 's|^\(FLEXTPREFIX=\).*|\1$(DESTDIR)$(prefix)|' -e 's|^\(INSTPATH=\).*|\1$(DESTDIR)$(objectsdir)/$(FLEXT_NAME)|' -e 's|^\(UFLAGS=\).*|\1$(CFLAGS) $(OPT_CFLAGS)|' -e 's|^\(OFLAGS=\).*|\1|' -e 's|^\(OFLAGS+=\).*|\1|' $(externals_src)/grill/flext/$(FLEXT_CONFIG) + + +flext-edit-simd: + -cd $(externals_src)/grill/flext && ./build.sh pd gcc + touch $(externals_src)/grill/flext/config.txt + +flext: flext-edit-config flext-edit-simd + cd $(externals_src)/grill/flext && ./build.sh pd gcc build + +flext_install: flext + cd $(externals_src)/grill/flext && ./build.sh pd gcc install + +flext_clean: + cd $(externals_src)/grill/flext && ./build.sh pd gcc clean + +#------------------------------------------------------------------------------# +# VASP +VASP_NAME=vasp +vasp: flext_install + cd $(externals_src)/grill/vasp && $(externals_src)/grill/flext/build.sh pd gcc build + +vasp_install: vasp +# cd $(externals_src)/grill/vasp && $(externals_src)/grill/flext/build.sh pd gcc install + install -d $(DESTDIR)$(objectsdir)/$(VASP_NAME) + $(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(VASP_NAME) \ + --author "Thomas Grill " \ + --license "GNU GPL" \ + --description "VASP modular - vector assembling signal processor" + install -p $(externals_src)/grill/vasp/$(FLEXT_OUTPATH)/release-multi/vasp.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(VASP_NAME) + install -p $(externals_src)/grill/vasp/pd-help/*.pd $(DESTDIR)$(objectsdir)/$(VASP_NAME) + install -d $(DESTDIR)$(examplesdir)/$(VASP_NAME) + install -p $(externals_src)/grill/vasp/pd/*.pd \ + $(externals_src)/grill/vasp/pd/*.aif \ + $(externals_src)/grill/vasp/pd-ex/*.pd \ + $(DESTDIR)$(examplesdir)/$(VASP_NAME) + +vasp_clean: + cd $(externals_src)/grill/vasp && $(externals_src)/grill/flext/build.sh pd gcc clean + +#------------------------------------------------------------------------------# +# XSAMPLE +XSAMPLE_NAME=xsample +xsample: flext_install + cd $(externals_src)/grill/xsample && $(externals_src)/grill/flext/build.sh pd gcc build + +xsample_install: xsample +# cd $(externals_src)/grill/xsample && $(externals_src)/grill/flext/build.sh pd gcc install + install -d $(DESTDIR)$(objectsdir)/$(XSAMPLE_NAME) + $(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(XSAMPLE_NAME) \ + --author "Thomas Grill " \ + --license "GNU GPL" \ + --description "xsample - extended sample objects for Max/MSP and PD" + install -p $(externals_src)/grill/xsample/$(FLEXT_OUTPATH)/release-single/xsample.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(XSAMPLE_NAME) + install -p $(externals_src)/grill/xsample/pd/*.pd $(DESTDIR)$(objectsdir)/$(XSAMPLE_NAME) + install -d $(DESTDIR)$(examplesdir)/$(XSAMPLE_NAME) + install -p $(externals_src)/grill/xsample/pd-ex/*.pd \ + $(DESTDIR)$(examplesdir)/$(XSAMPLE_NAME) + +xsample_clean: + cd $(externals_src)/grill/xsample && $(externals_src)/grill/flext/build.sh pd gcc clean + +#------------------------------------------------------------------------------# +# POOL +POOL_NAME=pool +pool: flext_install + cd $(externals_src)/grill/pool && $(externals_src)/grill/flext/build.sh pd gcc build + +pool_install: pool +# cd $(externals_src)/grill/pool && $(externals_src)/grill/flext/build.sh pd gcc install + install -d $(DESTDIR)$(objectsdir)/$(POOL_NAME) + $(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(POOL_NAME) \ + --author "Thomas Grill " \ + --license "GNU GPL" \ + --description "pool - a hierarchical storage object for PD and Max/MSP" + install -p $(externals_src)/grill/pool/$(FLEXT_OUTPATH)/release-single/pool.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(POOL_NAME) + install -p $(externals_src)/grill/pool/*.pd $(DESTDIR)$(objectsdir)/$(POOL_NAME) + +pool_clean: + cd $(externals_src)/grill/pool && $(externals_src)/grill/flext/build.sh pd gcc clean + +#------------------------------------------------------------------------------# +# PY +PY_NAME=py +PYTHON_VERSION := $(shell python -c 'import sys; print sys.version[:3]') +PYTHON_PREFIX := $(shell python-config --prefix) +NUMPY := $(shell python -c "exec(\"try:\\n import numpy\\n print 'True'\\nexcept ImportError:\\n print 'False'\")") +NUMERIC := $(shell python -c "exec(\"try:\\n import Numeric\\n print 'True'\\nexcept ImportError:\\n print 'False'\")") +NUMARRAY := $(shell python -c "exec(\"try:\\n import numarray\\n print 'True'\\nexcept ImportError:\\n print 'False'\")") + +$(externals_src)/grill/py/config.txt: + -cd $(externals_src)/grill/py && $(externals_src)/grill/flext/build.sh pd gcc build + if [ $(NUMPY) == "True" ] ; then echo "NUMPY default!"; elif [ $(NUMERIC) == "True" ] ; then sed -i -e "s|^\(PY_NUMPY.*\)|\#\1|" -e "s|^\#[[:space:]]\(PY_NUMERIC.*\)|\1|" $(externals_src)/grill/py/config.txt; elif [ $(NUMARRAY) == "True" ] ; then sed -i -e "s|^\(PY_NUMPY.*\)|\#\1|" -e "s|^\#[[:space:]]\(PY_NUMARRAY.*\)|\1|" $(externals_src)/grill/py/config.txt; else sed -i "s|^\(PY_NUMPY.*\)|\#\1|" $(externals_src)/grill/py/config.txt; fi + sed -i "s|^\(PYTHONVERSION=\).*|\1$(PYTHON_VERSION)|" $(externals_src)/grill/py/config.txt + sed -i "s|^\(PYTHONPREFIX=\).*|\1$(PYTHON_PREFIX)|" $(externals_src)/grill/py/config.txt + cat $(externals_src)/grill/py/config.txt + +py: flext_install $(externals_src)/grill/py/config.txt + cd $(externals_src)/grill/py && $(externals_src)/grill/flext/build.sh pd gcc build + +py_install: py +# cd $(externals_src)/grill/py && $(externals_src)/grill/flext/build.sh pd gcc install + install -d $(DESTDIR)$(objectsdir)/$(PY_NAME) + $(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(PY_NAME) \ + --author "Thomas Grill " \ + --license "GNU GPL" \ + --description "py/pyext - python script objects for PD and Max/MSP" + install -p $(externals_src)/grill/py/$(FLEXT_OUTPATH)/release-multi/py.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(PY_NAME) + install -p $(externals_src)/grill/py/scripts/*.py $(DESTDIR)$(objectsdir)/$(PY_NAME) + install -d $(DESTDIR)$(examplesdir)/$(PY_NAME) + install -p $(externals_src)/grill/py/pd/*.pd $(DESTDIR)$(examplesdir)/$(PY_NAME) + +py_clean: + cd $(externals_src)/grill/py && $(externals_src)/grill/flext/build.sh pd gcc clean + +#------------------------------------------------------------------------------# +# ABSATTR +ABSATTR_NAME=absattr +absattr: flext_install + cd $(externals_src)/grill/absattr && $(externals_src)/grill/flext/build.sh pd gcc build + +absattr_install: absattr +# cd $(externals_src)/grill/absattr && $(externals_src)/grill/flext/build.sh pd gcc install + install -d $(DESTDIR)$(objectsdir)/$(ABSATTR_NAME) + $(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(ABSATTR_NAME) \ + --author "Thomas Grill " \ + --license "GNU GPL" \ + --description "absattr - patcher attributes" + install -p $(externals_src)/grill/absattr/$(FLEXT_OUTPATH)/release-single/absattr.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(ABSATTR_NAME) + install -p $(externals_src)/grill/absattr/*.pd $(DESTDIR)$(objectsdir)/$(ABSATTR_NAME) + +absattr_clean: + cd $(externals_src)/grill/absattr && $(externals_src)/grill/flext/build.sh pd gcc clean + +#------------------------------------------------------------------------------# +# CLK +CLK_NAME=clk +clk: flext_install + cd $(externals_src)/grill/clk && $(externals_src)/grill/flext/build.sh pd gcc build + +clk_install: clk +# cd $(externals_src)/grill/clk && $(externals_src)/grill/flext/build.sh pd gcc install + install -d $(DESTDIR)$(objectsdir)/$(CLK_NAME) + $(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(CLK_NAME) \ + --author "Thomas Grill " \ + --license "GNU GPL" \ + --description "clk - syncable clocking objects" + install -p $(externals_src)/grill/clk/$(FLEXT_OUTPATH)/release-single/clk.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(CLK_NAME) + install -p $(externals_src)/grill/clk/*.pd $(DESTDIR)$(objectsdir)/$(CLK_NAME) + +clk_clean: + cd $(externals_src)/grill/clk && $(externals_src)/grill/flext/build.sh pd gcc clean + + #==============================================================================#