PACKAGE = @PACKAGE@ VERSION = @VERSION@ INCLUDEDIR = @OCAML_INCLUDE_DIR@ PROPCC = @OCAML_LIB_DIR@/lablgtk2/propcc DESTDIR = NULL = C_OBJECTS = ml_gtk_sourceview.o ML_OBJECTS = \ gtkSourceViewProps.cmo \ ogtkSourceViewProps.cmo \ gtk_sourceview.cmo \ gtkSourceView.cmo \ gSourceView.cmo \ $(NULL) ML_OBJECTS_OPT = $(patsubst %.cmo,%.cmx,$(ML_OBJECTS)) GENERATED_FILES = gtkSourceViewProps.ml ogtkSourceViewProps.ml EXTRA_INST = \ META \ gSourceView.mli \ gSourceView.cmi \ gtkSourceView.cmi \ gtk_sourceview.cmi \ $(NULL) DIST_FILES = \ Makefile.in \ configure \ gSourceView.ml \ gSourceView.mli \ gtkSourceView.ml \ gtk_sourceview.ml \ ml_gtk_sourceview.c \ META.in \ .depend \ debian/ \ test/ \ gtkSourceView.props \ $(NULL) DIST_DIR = $(PACKAGE)-$(VERSION) EXTRA_DIST = ACKNOWLEDGEMENTS AUTHORS CHANGES COPYING LICENSE NEWS README REQUIRES = lablgtk2 SHARED_LIBS = @GTKSOURCEVIEW_LIBS@ OCAMLFIND = ocamlfind OCAMLC = $(OCAMLFIND) ocamlc -package "$(REQUIRES)" OCAMLOPT = $(OCAMLFIND) ocamlopt -package "$(REQUIRES)" OCAMLDEP = ocamldep OCAMLMKLIB = ocamlmklib OCAML_STUB_DIR = @OCAML_STUB_DIR@ ARCHIVE = $(PACKAGE) DLL = dll$(ARCHIVE).so NATIVE = @HAVE_OCAMLOPT@ TESTDIR = test BYTE_INST = $(ARCHIVE).cma lib$(ARCHIVE).a $(C_OBJECTS) $(DLL) OPT_INST = $(BYTE_INST) $(ARCHIVE).cmxa $(ARCHIVE).a ifeq ($(NATIVE),yes) world: all opt else world: all endif 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 test/test: $(MAKE) -C $(TESTDIR) test dist: distclean rm -rf $(DIST_DIR)/ mkdir -p $(DIST_DIR)/ cp -a $(DIST_FILES) $(EXTRA_DIST) $(DIST_DIR)/ -find $(DIST_DIR) -name CVS -type d -exec rm -rf {} \; -find $(DIST_DIR) -name .cvsignore -type f -exec rm {} \; tar cvfz $(DIST_DIR).tar.gz $(DIST_DIR)/ rm -rf $(DIST_DIR)/ deb: dist rm -rf $(DIST_DIR) tar xvzf $(DIST_DIR).tar.gz (cd $(DIST_DIR)/ && debuild) rm -rf $(DIST_DIR) ml_gtk_sourceview.o: ml_gtk_sourceview.c gcc -c -I$(INCLUDEDIR) -fPIC `$(OCAMLFIND) query -i-format lablgtk2` @GTKSOURCEVIEW_CFLAGS@ $< %.cmo: %.ml $(OCAMLC) -c $< %.cmi: %.mli $(OCAMLC) -c $< %.cmx: %.ml $(OCAMLOPT) -c $< $(GENERATED_FILES): gtkSourceView.props %Props.ml o%Props.ml: %.props $(PROPCC) $< depend: *.ml *.mli $(GENERATED_FILES) $(OCAMLDEP) *.ml *.mli >.depend include .depend $(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 UNINSTALLER = $(OCAMLFIND) remove -ldconf /dev/null else INSTALLER = $(OCAMLFIND) install -destdir $(DESTDIR) -ldconf /dev/null UNINSTALLER = $(OCAMLFIND) remove -destdir $(DESTDIR) -ldconf /dev/null install: world installmkdir endif ifeq ($(NATIVE),yes) install: installworld else install: installbyte endif installbyte: $(INSTALLER) $(PACKAGE) $(BYTE_INST) $(EXTRA_INST) installworld: $(INSTALLER) $(PACKAGE) $(OPT_INST) $(EXTRA_INST) installmkdir: mkdir -p $(DESTDIR) uninstall: $(UNINSTALLER) $(PACKAGE) clean: rm -f *.[ao] *.cm[iaxo] *.cmxa *.so $(GENERATED_FILES) make -C $(TESTDIR) clean distclean: clean rm -f config.log config.cache config.status Makefile META make -C $(TESTDIR) distclean .PHONY: world uninstall clean distclean test/test test/test.opt .PHONY: install installmkdir installbyte installworld