summaryrefslogtreecommitdiffstats
path: root/swig/chicken
diff options
context:
space:
mode:
Diffstat (limited to 'swig/chicken')
-rw-r--r--swig/chicken/Makefile.am15
-rw-r--r--swig/chicken/lv2_list.scm13
-rw-r--r--swig/chicken/slv2.setup2
3 files changed, 30 insertions, 0 deletions
diff --git a/swig/chicken/Makefile.am b/swig/chicken/Makefile.am
new file mode 100644
index 0000000..8e3de73
--- /dev/null
+++ b/swig/chicken/Makefile.am
@@ -0,0 +1,15 @@
+EXTRA_DIST = slv2.setup lv2_list.scm
+
+if WITH_CHICKEN
+all:
+ rm -f slv2.scm slv2_wrap.c
+ swig -DCHICKEN -Wall -chicken -proxy -nounit -I../.. -o slv2_wrap.c -oh slv2_wrap.h ../slv2.i
+ tar -czf slv2.egg slv2.setup slv2.scm slv2_wrap.c
+
+#install-exec-local:
+# chicken-setup ./slv2.egg
+
+clean-local:
+ rm -f *.[ch] *.so *.o slv2.egg slv2.scm
+endif
+
diff --git a/swig/chicken/lv2_list.scm b/swig/chicken/lv2_list.scm
new file mode 100644
index 0000000..cc23e0d
--- /dev/null
+++ b/swig/chicken/lv2_list.scm
@@ -0,0 +1,13 @@
+; Least idiomatic scheme bindings ever. Work in progress...
+
+(require-extension slv2)
+
+(define world (slv2-world-new))
+(slv2-world-load-all world)
+
+(define plugins (slv2-world-get-all-plugins world))
+
+(let ((p (slv2-plugins-get-at plugins 0)))
+ (display (slv2-value-as-string (slv2-plugin-get-uri p)))
+ (newline))
+
diff --git a/swig/chicken/slv2.setup b/swig/chicken/slv2.setup
new file mode 100644
index 0000000..ef15f6d
--- /dev/null
+++ b/swig/chicken/slv2.setup
@@ -0,0 +1,2 @@
+(run (csc -s -o slv2.so slv2.scm slv2_wrap.c -lslv2))
+(install-extension 'slv2 '("slv2.so"))