From 2cd12ad217c63068c0e33cd70e80ee6344af3216 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 30 Jul 2008 21:16:51 +0000 Subject: Move stuff for various binding languages to own directories. git-svn-id: http://svn.drobilla.net/lad/slv2@1315 a436a847-0d15-0410-975c-d299462d15a1 --- swig/Makefile.am | 36 ++---------------------------------- swig/chicken/Makefile.am | 15 +++++++++++++++ swig/chicken/lv2_list.scm | 13 +++++++++++++ swig/chicken/slv2.setup | 2 ++ swig/lv2_list.py | 8 -------- swig/lv2_list.scm | 13 ------------- swig/mzscheme/Makefile.am | 10 ++++++++++ swig/python/Makefile.am | 12 ++++++++++++ swig/python/lv2_list.py | 8 ++++++++ swig/slv2.setup | 2 -- 10 files changed, 62 insertions(+), 57 deletions(-) create mode 100644 swig/chicken/Makefile.am create mode 100644 swig/chicken/lv2_list.scm create mode 100644 swig/chicken/slv2.setup delete mode 100755 swig/lv2_list.py delete mode 100644 swig/lv2_list.scm create mode 100644 swig/mzscheme/Makefile.am create mode 100644 swig/python/Makefile.am create mode 100755 swig/python/lv2_list.py delete mode 100644 swig/slv2.setup (limited to 'swig') diff --git a/swig/Makefile.am b/swig/Makefile.am index 3555c3a..8a6f8ae 100644 --- a/swig/Makefile.am +++ b/swig/Makefile.am @@ -1,40 +1,8 @@ -EXTRA_DIST = slv2.i lv2_list.py slv2.setup +EXTRA_DIST = slv2.i if WITH_SWIG -all: python mzscheme chicken - -if WITH_PYTHON -python: - swig -DPYTHON -Wall -python -I.. -o slv2_python.c -oh slv2_python.h slv2.i - gcc -fPIC -shared -I.. $(PYTHON_CPPFLAGS) $(PYTHON_EXTRA_LDFLAGS) \ - $(PYTHON_EXTRA_LIBS) $(PYTHON_EXTRA_LDFLAGS) \ - slv2_python.c ../src/.libs/libslv2.so -o _slv2.so -else -python: - -endif # WITH_PYTHON - -if WITH_MZSCHEME -mzscheme: - swig -DMZSCHEME -Wall -mzscheme -I.. -o slv2_mzscheme.c -oh slv2_mzscheme.h slv2.i - gcc -fPIC -shared -Iplt -I.. \ - -I/usr/include/plt slv2_mzscheme.c -o libslv2_mzscheme.so -endif # WITH_MZSCHEME - -if WITH_CHICKEN -chicken: - rm -f slv2.scm slv2_wrap.c - rm -rf eggs - mkdir -p eggs - swig -DCHICKEN -Wall -chicken -proxy -nounit -I.. -o slv2_wrap.c -oh slv2_wrap.h slv2.i - tar -czf eggs/slv2.egg slv2.setup slv2.scm slv2_wrap.c -endif # WITH_CHICKEN +SUBDIRS = python mzscheme chicken endif # WITH_SWIG -clean-local: - rm -f *.cxx - rm -f *.so - rm -f *.o - rm -f slv2.py 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")) diff --git a/swig/lv2_list.py b/swig/lv2_list.py deleted file mode 100755 index 685b62b..0000000 --- a/swig/lv2_list.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python -import slv2; - -w = slv2.World() -w.load_all() - -for p in w.get_all_plugins(): - print p.uri(), "-", p.name() diff --git a/swig/lv2_list.scm b/swig/lv2_list.scm deleted file mode 100644 index cc23e0d..0000000 --- a/swig/lv2_list.scm +++ /dev/null @@ -1,13 +0,0 @@ -; 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/mzscheme/Makefile.am b/swig/mzscheme/Makefile.am new file mode 100644 index 0000000..afc8f10 --- /dev/null +++ b/swig/mzscheme/Makefile.am @@ -0,0 +1,10 @@ +if WITH_MZSCHEME +all: + swig -DMZSCHEME -Wall -mzscheme -I../.. -o slv2_mzscheme.c -oh slv2_mzscheme.h ../slv2.i + gcc -fPIC -shared -Iplt -I../.. \ + -I/usr/include/plt slv2_mzscheme.c -o libslv2_mzscheme.so + +clean-local: + rm -f *.[ch] *.so *.o +endif + diff --git a/swig/python/Makefile.am b/swig/python/Makefile.am new file mode 100644 index 0000000..8a7afc7 --- /dev/null +++ b/swig/python/Makefile.am @@ -0,0 +1,12 @@ +EXTRA_DIST = lv2_list.py + +if WITH_PYTHON +all: + swig -DPYTHON -Wall -python -I../.. -o slv2_python.c -oh slv2_python.h ../slv2.i + gcc -fPIC -shared -I../.. $(PYTHON_CPPFLAGS) $(PYTHON_EXTRA_LDFLAGS) \ + $(PYTHON_EXTRA_LIBS) $(PYTHON_EXTRA_LDFLAGS) \ + slv2_python.c ../../src/.libs/libslv2.so -o _slv2.so + +clean-local: + rm -f *.[ch] *.so *.o slv2.py +endif diff --git a/swig/python/lv2_list.py b/swig/python/lv2_list.py new file mode 100755 index 0000000..685b62b --- /dev/null +++ b/swig/python/lv2_list.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python +import slv2; + +w = slv2.World() +w.load_all() + +for p in w.get_all_plugins(): + print p.uri(), "-", p.name() diff --git a/swig/slv2.setup b/swig/slv2.setup deleted file mode 100644 index ef15f6d..0000000 --- a/swig/slv2.setup +++ /dev/null @@ -1,2 +0,0 @@ -(run (csc -s -o slv2.so slv2.scm slv2_wrap.c -lslv2)) -(install-extension 'slv2 '("slv2.so")) -- cgit v1.2.1