summaryrefslogtreecommitdiff
path: root/liboctopus/python/Makefile
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2011-10-11 21:50:49 +0200
committerYves Fischer <yvesf-git@xapek.org>2011-10-11 21:50:49 +0200
commit324c5ba9098c1010d0aa8c1e26b95509878ce9f2 (patch)
treef6ef2d537decaa2e1af6d4b9c4c31161b22333ec /liboctopus/python/Makefile
downloadmini-octopus-324c5ba9098c1010d0aa8c1e26b95509878ce9f2.tar.gz
mini-octopus-324c5ba9098c1010d0aa8c1e26b95509878ce9f2.zip
Mini-Octopus build from r@171
Diffstat (limited to 'liboctopus/python/Makefile')
-rw-r--r--liboctopus/python/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/liboctopus/python/Makefile b/liboctopus/python/Makefile
new file mode 100644
index 0000000..e0e6f29
--- /dev/null
+++ b/liboctopus/python/Makefile
@@ -0,0 +1,19 @@
+CC=gcc
+CFLAGS= -fPIC
+CFLAGS+=-I..
+CFLAGS+=`python-config --cflags`
+LDFLAGS=`pkg-config --libs libusb`
+
+all: octopus.o octopus_wrap.o
+ gcc -fPIC -shared octopus_wrap.o octopus.o $(LDFLAGS) -o _octopus.so
+
+octopus_wrap.o:
+ swig -python octopus.i
+ $(CC) -c -o octopus_wrap.o octopus_wrap.c $(CFLAGS)
+
+octopus.o:
+ $(CC) -c -o octopus.o ../octopus.c $(CFLAGS)
+
+.PHONY: clean
+clean:
+ rm -vf octopus.o octopus.py _octopus.so octopus_wrap.o octopus.pyc octopus_wrap.c