summaryrefslogtreecommitdiff
path: root/liboctopus/python/Makefile
diff options
context:
space:
mode:
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