aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2006-01-02 01:28:18 +0000
committerN.N. <matju@users.sourceforge.net>2006-01-02 01:28:18 +0000
commitbb388c87ee61094d4730d28c19667e8b498ff480 (patch)
treeccea4af336de1c2de484a3f6d15c41bb28f5b993
parentf79e74a29d91f74e16f6494d95217aac0cea0a1d (diff)
aliasing classes in order to exploit polymorphism
svn path=/trunk/abstractions/pureunity/; revision=4346
-rw-r--r--Makefile14
-rw-r--r--pureunity.c9
2 files changed, 21 insertions, 2 deletions
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 <m_pd.h>*/
+#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);
+}