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
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
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 $<
$(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
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)
installworld:
$(INSTALLER) $(PACKAGE) $(OPT_INST) $(EXTRA_INST)
+installmkdir:
+ mkdir -p $(DESTDIR)
+
uninstall:
$(UNINSTALLER) $(PACKAGE)