summaryrefslogtreecommitdiff
path: root/contrib/py-bindings/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/py-bindings/Makefile')
-rw-r--r--contrib/py-bindings/Makefile21
1 files changed, 8 insertions, 13 deletions
diff --git a/contrib/py-bindings/Makefile b/contrib/py-bindings/Makefile
index fb2668ac5..bcf78e572 100644
--- a/contrib/py-bindings/Makefile
+++ b/contrib/py-bindings/Makefile
@@ -4,16 +4,17 @@ cbind=../c-bindings
pythoninc=/usr/include/python2.5
debug= #-optc '-DDEBUG=1'
exdir=../../examples/tutorial/embedded
-conf:
- ln -s $(cbind)/PGFFFI.hs
- ln -s $(cbind)/pgf.h
+
build: gf.so
-gf.so: PGFFFI.hs gfmodule.c Query.pgf
+gf.so: PyGF.hs gfmodule.c Query.pgf
ghc $(import) --make -fglasgow-exts -O2 -no-hs-main -c $<
ghc -O2 --make -fglasgow-exts -no-hs-main -optl '-shared' \
- -optc '-DMODULE=PGFFFI' $(debug) -optc '-I$(pythoninc)' -o $@ \
+ -optc '-DMODULE=$(basename $<)' $(debug) -optc '-I$(pythoninc)' -o $@ \
$(filter-out %.pgf, $^)
+
+
+
clean:
rm -f *.hi *.o
rm -f *_stub.*
@@ -21,7 +22,7 @@ clean:
superclean:
make clean
- rm -f PGFFFI.hs pgf.h Query.pgf
+ rm -f Query.pgf
rm -f gf.so
rm -f mtest
@@ -29,10 +30,4 @@ PyGF.hs: PyGF.hsc
hsc2hs -I$(pythoninc) $<
Query.pgf:
- gf --make $(exdir)/QueryEng.gf $(exdir)/QuerySpa.gf
-
-mtest: PyGF.hs mtest.c Query.pgf
- ghc $(import) --make -fglasgow-exts -O2 -no-hs-main -c $<
- ghc -O2 --make -fglasgow-exts -no-hs-main \
- -optc '-DMODULE=PyGF' -optc '-I$(pythoninc)' -o $@ \
- $(filter-out %.pgf, $^) \ No newline at end of file
+ gf --make $(exdir)/QueryEng.gf $(exdir)/QuerySpa.gf \ No newline at end of file