]> matita.cs.unibo.it Git - helm.git/commitdiff
- added -fPIC when creating .so
authorStefano Zacchiroli <zack@upsilon.cc>
Fri, 12 Apr 2002 13:38:54 +0000 (13:38 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Fri, 12 Apr 2002 13:38:54 +0000 (13:38 +0000)
- added PREFIX variable support

helm/DEVEL/gdome_xslt/ocaml/gdome_xslt/Makefile.in

index fa719897ee3ad55ad6c78f2d2fc697361f476be9..eafebde9ed1eddeda3b7b3e825d1bb019193a0ba 100644 (file)
@@ -40,7 +40,7 @@ dist:
        rm -rf $(PACKAGE)-$(VERSION)
 
 ml_gdome_xslt.o: ml_gdome_xslt.c
-       gcc -c -I$(INCLUDEDIR) `gdome-config --cflags` `ocamlfind query -i-format gdome2` -I$(CGDOMEXSLTPATH) $<
+       gcc -c -I$(INCLUDEDIR) -fPIC `gdome-config --cflags` `ocamlfind query -i-format gdome2` -I$(CGDOMEXSLTPATH) $<
 
 .SUFFIXES: .cmo .cmi .cmx .ml .mli
 
@@ -76,7 +76,11 @@ $(ARCHIVE_SO): $(OBJECTS_C)
 
 install:
        test ! -f $(ARCHIVE_OPT) || extra="$(ARCHIVE_A) $(ARCHIVE_OPT) $(INSTOPT)" ; \
-       ocamlfind install $(PACKAGE) $(ARCHIVE) $(ARCHIVE_SO) $(INST) $$extra
+       if [ "$(PREFIX)" = "" ]; then \
+               ocamlfind install $(PACKAGE) $(ARCHIVE) $(ARCHIVE_SO) $(INST) $$extra; \
+       else \
+               ocamlfind install -destdir $(PREFIX) $(PACKAGE) $(ARCHIVE) $(ARCHIVE_SO) $(INST) $$extra; \
+       fi
 
 uninstall:
        ocamlfind remove $(PACKAGE)