]> matita.cs.unibo.it Git - helm.git/commitdiff
* Linking was still static for native compilation.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 12 Mar 2002 17:41:44 +0000 (17:41 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 12 Mar 2002 17:41:44 +0000 (17:41 +0000)
* Automatic compilation of the test in native mode can no more be performed
  because the dynamic library is always searched in the position where
  it will be installed ;-(

helm/DEVEL/lablgtkmathview/META.in
helm/DEVEL/lablgtkmathview/Makefile.in

index f312805fdde0889e05b44ea680a334e9a93e00c4..84d671aee38f01771b4de024aa946d2d11301b72 100644 (file)
@@ -1,5 +1,5 @@
 requires="gdome2 lablgtk"
 version="@VERSION@"
-archive(byte)="lablgtkmathview.cma ml_gtk_mathview.o"
-archive(native)="lablgtkmathview.cmxa ml_gtk_mathview.o"
+archive(byte)="lablgtkmathview.cma"
+archive(native)="lablgtkmathview.cmxa"
 linkopts=""
index 782acb049c1ad62c803129dcd596aba87e5e2b36..7883c0525d5852d45cc673edc053b0729dcc7fbf 100644 (file)
@@ -30,7 +30,7 @@ TMPPKGDIR = $(TMPDIR)/$(PACKAGE)
 
 all: $(ARCHIVE) $(ARCHIVE_SO) $(TESTDIR)/test
 
-opt: $(OBJECTS_C) $(ARCHIVE_OPT) $(ARCHIVE_A) $(ARCHIVE_SO) $(TESTDIR)/test.opt
+opt: $(OBJECTS_C) $(ARCHIVE_OPT) $(ARCHIVE_A) $(ARCHIVE_SO) #$(TESTDIR)/test.opt
 
 dist:
        rm -rf $(PACKAGE)-$(VERSION)
@@ -63,9 +63,11 @@ $(ARCHIVE): $(OBJECTS) $(ARCHIVE_SO)
         -predicates "$(PREDICATES)" -o $@ $^ \
         -cclib "`glib-config --libs` `gdome-config --libs` `gtkmathview-config --libs`" -dllib -l$(PACKAGE)
 $(ARCHIVE_OPT) $(ARCHIVE_A): $(OBJECTS_OPT)
+       INSTPATH=`ocamlfind query gdome2` ; \
        $(OCAMLOPT) -a -package "$(REQUIRES)" \
         -predicates "$(PREDICATES)" -o $@ $^ \
-        -cclib "`glib-config --libs` `gdome-config --libs` `gtkmathview-config --libs`"
+        -cclib "`glib-config --libs` `gdome-config --libs` `gtkmathview-config --libs`" \
+        -cclib "`echo $$INSTPATH | sed "s/\\(.*\\)\\/gdome2/\\1/"`/$(PACKAGE)/$(ARCHIVE_SO)"
 
 $(ARCHIVE_SO): $(OBJECTS_C)
        gcc -shared -o $@ $< `gtkmathview-config --libs` -lmlgdome -L `ocamlfind query gdome2` -Xlinker -rpath -Xlinker `ocamlfind query gdome2`