PACKAGE = @PACKAGE@ VERSION = @VERSION@ INCLUDEDIR = @OCAML_INCLUDE_DIR@ PREFIX = OBJECTS_C = ml_minidom.o OBJECTS = minidom.cmo ominidom.cmo OBJECTS_OPT = minidom.cmx ominidom.cmx INST = ml_minidom.h minidom.mli minidom.cmi ominidom.mli ominidom.cmi META DIST_FILES = Makefile.in configure.in configure *.ml *.mli test.xml ml_minidom.c ml_minidom.h META.in mlminidom.spec.in .depend DOC_FILES = AUTHORS COPYING ChangeLog NEWS README REQUIRES = PREDICATES = OCAMLC = ocamlfind ocamlc OCAMLOPT = ocamlfind ocamlopt OCAMLDEP = ocamldep DESTDIR = @OCAML_LIB_DIR@ ARCHIVE = $(PACKAGE).cma ARCHIVE_C = $(PACKAGE).a ARCHIVE_OPT = $(PACKAGE).cmxa TMPDIR = .test TMPPKGDIR = $(TMPDIR)/$(PACKAGE) all: $(OBJECTS_C) $(ARCHIVE) test opt: $(OBJECTS_C) $(ARCHIVE_OPT) test.opt dist: rm -rf $(PACKAGE)-$(VERSION) mkdir $(PACKAGE)-$(VERSION) cp $(DIST_FILES) $(DOC_FILES) $(PACKAGE)-$(VERSION) tar cvfz $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) rm -rf $(PACKAGE)-$(VERSION) ml_minidom.o: ml_minidom.c gcc -c -I$(INCLUDEDIR) `glib-config --cflags` `minidom-config --cflags` $< .SUFFIXES: .cmo .cmi .cmx .ml .mli .ml.cmo: $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" \ -c $< .mli.cmi: $(OCAMLC) -package "$(REQUIRES)" -predicates "$(PREDICATES)" \ -c $< .ml.cmx: $(OCAMLOPT) -package "$(REQUIRES)" -predicates "$(PREDICATES)" \ -c $< depend: *.ml *.mli $(OCAMLDEP) *.ml *.mli >.depend include .depend $(ARCHIVE): $(OBJECTS) $(OCAMLC) -a -custom -package "$(REQUIRES)" \ -predicates "$(PREDICATES)" -o $@ $^ \ -cclib "`glib-config --libs` `minidom-config --libs`" $(ARCHIVE_OPT): $(OBJECTS_OPT) $(OCAMLOPT) -a -package "$(REQUIRES)" \ -predicates "$(PREDICATES)" -o $@ $^ \ -cclib "`glib-config --libs` `minidom-config --libs`" test: test.ml $(OBJECTS_C) $(ARCHIVE) mkdir -p $(TMPPKGDIR) cp $(OBJECTS_C) $(ARCHIVE) $(INST) $(TMPPKGDIR) cp test.ml $(TMPDIR) cd $(TMPDIR) ; export OCAMLPATH=.:$$OCAMLPATH ; \ $(OCAMLC) -package "$(PACKAGE)" -linkpkg -predicates "" -o $@ test.ml mv $(TMPDIR)/$@ . rm -r $(TMPDIR) test.opt: test.ml $(OBJECTS_C) $(ARCHIVE_C) $(ARCHIVE_OPT) mkdir -p $(TMPPKGDIR) cp $(OBJECTS_C) $(ARCHIVE_C) $(ARCHIVE_OPT) $(INST) $(TMPPKGDIR) cp test.ml $(TMPDIR) cd $(TMPDIR) ; export OCAMLPATH=.:$$OCAMLPATH ; \ $(OCAMLOPT) -package "$(PACKAGE)" -linkpkg -predicates "" -o $@ test.ml mv $(TMPDIR)/$@ . rm -r $(TMPDIR) install: test ! -f $(ARCHIVE_OPT) || extra="$(ARCHIVE_C) $(ARCHIVE_OPT)" ; \ ocamlfind install -destdir $(DESTDIR) $(PACKAGE) $(OBJECTS_C) $(ARCHIVE) $(INST) $$extra uninstall: ocamlfind remove $(PACKAGE) clean: rm -f *.o *.cm? test test.opt $(ARCHIVE) $(ARCHIVE_C) $(ARCHIVE_OPT) rm -rf $(TMPDIR) distclean: clean rm -f config.log config.cache config.status Makefile META mlminidom.spec