From 7f5f7c979c0cb49456a54e2833951558a6d51c96 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Tue, 14 Jun 2005 13:29:06 +0000 Subject: [PATCH] finally we understood how to properly link ocaml bindings .... --- helm/DEVEL/lablgtksourceview/Makefile.in | 27 +++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/helm/DEVEL/lablgtksourceview/Makefile.in b/helm/DEVEL/lablgtksourceview/Makefile.in index 4c8ecc588..19dc0d19d 100644 --- a/helm/DEVEL/lablgtksourceview/Makefile.in +++ b/helm/DEVEL/lablgtksourceview/Makefile.in @@ -49,8 +49,8 @@ ARCHIVE = $(PACKAGE) DLL = dll$(ARCHIVE).so NATIVE = @HAVE_OCAMLOPT@ TESTDIR = test -BYTE_INST = $(ARCHIVE).cma $(C_OBJECTS) $(DLL) -OPT_INST = $(BYTE_INST) $(ARCHIVE).a $(ARCHIVE).cmxa +BYTE_INST = $(ARCHIVE).cma lib$(ARCHIVE).a $(C_OBJECTS) $(DLL) +OPT_INST = $(BYTE_INST) $(ARCHIVE).cmxa $(ARCHIVE).a ifeq ($(NATIVE),yes) world: all opt @@ -58,8 +58,8 @@ else world: all endif -all: $(ARCHIVE).cma $(TESTDIR)/test -opt: $(ARCHIVE).cmxa $(TESTDIR)/test.opt +all: $(ARCHIVE).cma lib$(ARCHIVE).a $(DLL) $(TESTDIR)/test +opt: $(ARCHIVE).cmxa $(ARCHIVE).a $(TESTDIR)/test.opt test/test.opt: $(MAKE) -C $(TESTDIR) test.opt @@ -82,7 +82,7 @@ deb: dist rm -rf $(DIST_DIR) ml_gtk_sourceview.o: ml_gtk_sourceview.c - gcc -c -I$(INCLUDEDIR) -fPIC `ocamlfind query -i-format lablgtk2` @GTKSOURCEVIEW_CFLAGS@ $< + gcc -c -I$(INCLUDEDIR) -fPIC `$(OCAMLFIND) query -i-format lablgtk2` @GTKSOURCEVIEW_CFLAGS@ $< %.cmo: %.ml $(OCAMLC) -c $< @@ -99,10 +99,12 @@ depend: *.ml *.mli $(GENERATED_FILES) $(OCAMLDEP) *.ml *.mli >.depend include .depend -$(ARCHIVE).cma $(DLL): $(ML_OBJECTS) $(C_OBJECTS) - $(OCAMLMKLIB) -o $(ARCHIVE) -L$(OCAML_STUB_DIR) $^ $(SHARED_LIBS) -$(ARCHIVE).cmxa $(ARCHIVE).a: $(ML_OBJECTS_OPT) - $(OCAMLMKLIB) -o $(ARCHIVE) -L$(OCAML_STUB_DIR) $^ $(C_OBJECTS) $(SHARED_LIBS) +$(ARCHIVE).cma: $(ML_OBJECTS) + $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS) +$(ARCHIVE).cmxa: $(ML_OBJECTS_OPT) + $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS) +lib$(ARCHIVE).a $(DLL): $(C_OBJECTS) + $(OCAMLMKLIB) -o $(ARCHIVE) $^ $(SHARED_LIBS) ifeq ($(DESTDIR),"") INSTALLER = $(OCAMLFIND) install -ldconf /dev/null @@ -110,9 +112,7 @@ UNINSTALLER = $(OCAMLFIND) remove -ldconf /dev/null else INSTALLER = $(OCAMLFIND) install -destdir $(DESTDIR) -ldconf /dev/null UNINSTALLER = $(OCAMLFIND) remove -destdir $(DESTDIR) -ldconf /dev/null -install: installmkdir -installmkdir: - mkdir -p $(DESTDIR) +install: world installmkdir endif ifeq ($(NATIVE),yes) @@ -126,6 +126,9 @@ installbyte: installworld: $(INSTALLER) $(PACKAGE) $(OPT_INST) $(EXTRA_INST) +installmkdir: + mkdir -p $(DESTDIR) + uninstall: $(UNINSTALLER) $(PACKAGE) -- 2.39.2