summaryrefslogtreecommitdiffstats
path: root/debian/pyrex/pyrex-0.9.9/Demos/embed/Makefile.unix
diff options
context:
space:
mode:
Diffstat (limited to 'debian/pyrex/pyrex-0.9.9/Demos/embed/Makefile.unix')
-rw-r--r--debian/pyrex/pyrex-0.9.9/Demos/embed/Makefile.unix30
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/pyrex/pyrex-0.9.9/Demos/embed/Makefile.unix b/debian/pyrex/pyrex-0.9.9/Demos/embed/Makefile.unix
new file mode 100644
index 00000000..c8c7dbeb
--- /dev/null
+++ b/debian/pyrex/pyrex-0.9.9/Demos/embed/Makefile.unix
@@ -0,0 +1,30 @@
+PYVERSION = 2.2
+PYHOME = $(HOME)/pkg/python/$(PYVERSION)
+PYARCH = $(PYHOME)/$(ARCH)
+PYINCLUDE = \
+ -I$(PYHOME)/include/python$(PYVERSION) \
+ -I$(PYARCH)/include/python$(PYVERSION)
+PYLIB = -L$(PYARCH)/lib/python$(PYVERSION)/config \
+ -lpython$(PYVERSION) \
+ -ldl -lpthread -lutil -lm
+
+%.c: %.pyx
+ ../../bin/pyrexc $<
+
+%.o: %.c
+ gcc -c -fPIC $(PYINCLUDE) $<
+
+#%.so: %.o
+# gcc -shared $< -lm -o $@
+
+all: main
+
+main: main.o embedded.o
+ gcc main.o embedded.o $(PYLIB) -o main
+
+clean:
+ @echo Cleaning Demos/embed
+ @rm -f *~ *.o *.so core core.* embedded.h embedded.c main
+
+embedded.h: embedded.c
+main.o: embedded.h