From bb388c87ee61094d4730d28c19667e8b498ff480 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Mon, 2 Jan 2006 01:28:18 +0000 Subject: aliasing classes in order to exploit polymorphism svn path=/trunk/abstractions/pureunity/; revision=4346 --- Makefile | 14 ++++++++++++-- pureunity.c | 9 +++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 pureunity.c diff --git a/Makefile b/Makefile index 5045335..76c27ba 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,16 @@ PD = /home/matju/pd_0_38_4/bin/pd -noaudio #PD = pd -PDFLAGS = -noaudio -path generics -path specifics +PDFLAGS = -lib pureunity -noaudio -path generics -path specifics -test:: +test:: built $(PD) $(PDFLAGS) main.pd + +built: Makefile pureunity.pd_linux + # for z in associator commutator distributor invertor; do sed s/inlet/inlet~/ < generics/$$z.pd > generics/$$z~.pd; done + echo > built + +generic/%~.pd: generic/%.pd + +pureunity.pd_linux: pureunity.c Makefile + $(CC) -shared -o pureunity.pd_linux pureunity.c + diff --git a/pureunity.c b/pureunity.c new file mode 100644 index 0000000..a68887b --- /dev/null +++ b/pureunity.c @@ -0,0 +1,9 @@ +/*#include */ +#include "../../pd/src/m_pd.h" +void pureunity_setup() { + t_pd *m = &pd_objectmaker; + class_addcreator((t_newmethod)getfn(m,gensym( "inlet" )),gensym("f.inlet" ),A_GIMME,0); + class_addcreator((t_newmethod)getfn(m,gensym( "inlet~")),gensym("~.inlet" ),A_GIMME,0); + class_addcreator((t_newmethod)getfn(m,gensym("outlet" )),gensym("f.outlet"),A_GIMME,0); + class_addcreator((t_newmethod)getfn(m,gensym("outlet~")),gensym("~.outlet"),A_GIMME,0); +} -- cgit v1.2.1