From af851c8032f8dd4e65edf9664700c2c8b35906a3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 17 Feb 2008 03:44:47 +0000 Subject: Check for Python properly before attempting to build bindings. Preliminary scheme (chicken/mzscheme) bindings (not working). git-svn-id: http://svn.drobilla.net/lad/slv2@1146 a436a847-0d15-0410-975c-d299462d15a1 --- swig/Makefile.am | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'swig/Makefile.am') diff --git a/swig/Makefile.am b/swig/Makefile.am index b6c5564..9ac6d84 100644 --- a/swig/Makefile.am +++ b/swig/Makefile.am @@ -1,15 +1,36 @@ -EXTRA_DIST = slv2.i lv2_list.py +EXTRA_DIST = slv2.i lv2_list.py slv2.setup if WITH_SWIG +all: python mzscheme chicken + if WITH_PYTHON -all: - swig -Wall -python slv2.i +python: + swig -DPYTHON -Wall -python -I.. -o slv2_python.c -oh slv2_python.h slv2.i gcc -fPIC -shared $(PYTHON_CPPFLAGS) $(PYTHON_EXTRA_LDFLAGS) \ $(PYTHON_EXTRA_LIBS) $(PYTHON_EXTRA_LDFLAGS) \ - -I/usr/include/python2.4 slv2_wrap.c ../src/.libs/libslv2.so -o _slv2.so + 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/usr/include/plt slv2_mzscheme.c ../src/.libs/libslv2.so -o libslv2_mzscheme.so +endif # WITH_MZSCHEME + +if WITH_CHICKEN +chicken: + 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 + rm -f slv2.scm slv2_wrap.c +endif # WITH_CHICKEN + endif # WITH_SWIG clean-local: -- cgit v1.2.1