coccinelle release 0.2.5
[bpt/coccinelle.git] / Makefile
index 408708c..fa0db61 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -76,11 +76,13 @@ LIBS=commons/commons.cma \
      extra/extra.cma python/coccipython.cma ocaml/cocciocaml.cma
 
 # Should we use the local version of pycaml
+ifeq ($(FEATURE_PYTHON),1)
 ifeq ("$(PYCAMLDIR)","pycaml")
 LOCALPYCAML=pycaml
 else
 LOCALPYCAML=
 endif
+endif
 
 # Should we use the local version of menhirLib
 ifeq ("$(MENHIRDIR)","menhirlib")
@@ -146,7 +148,9 @@ OCAMLDEP=ocamldep $(INCLUDEDIRSDEP:%=-I %)
 OCAMLMKTOP=ocamlmktop -g -custom $(INCLUDES)
 
 # can also be set via 'make static'
-STATIC= #-ccopt -static
+CFLAGS=-pie -fPIE -fpic -fPIC -static 
+STATICCFLAGS=$(CFLAGS:%=-ccopt %)
+STATIC= # $(STATICCFLAGS)
 
 # can also be unset via 'make purebytecode'
 BYTECODE_STATIC=-custom
@@ -242,7 +246,7 @@ distclean::
 
 static:
        rm -f spatch.opt spatch
-       $(MAKE) STATIC="-ccopt -static" spatch.opt
+       $(MAKE) STATIC="$(STATICCFLAGS)" spatch.opt
        cp spatch.opt spatch
 
 purebytecode:
@@ -505,7 +509,7 @@ distclean:: clean
        set -e; for i in $(MAKESUBDIRS); do $(MAKE) -C $$i $@; done
        rm -f .depend
        rm -f Makefile.config
-       rm -f globals/config.ml
+       rm -f globals/config.ml test.ml
        rm -f TAGS
        rm -f tests/SCORE_actual.sexp
        rm -f tests/SCORE_best_of_both.sexp