3 INCLUDEDIR = @OCAML_INCLUDE_DIR@
4 LIBDIR = @OCAML_LIB_DIR@
6 INSTALLDIR = $(PREFIX)$(LIBDIR)/mlminidom
7 OBJECTS = minidom.cmi minidom.cmo ml_minidom.o ominidom.cmi ominidom.cmo
8 OBJECTS_OPT = minidom.cmx ominidom.cmx
9 INST = ml_minidom.h minidom.mli ml_minidom.h
10 INST_OPT = minidom.o ominidom.o
11 DIST_FILES = Makefile.in configure.in configure *.ml *.mli test.xml ml_minidom.c ml_minidom.h
12 DOC_FILES = AUTHORS COPYING ChangeLog NEWS README
16 opt: $(OBJECTS_OPT) test.opt
19 rm -rf $(PACKAGE)-$(VERSION)
20 mkdir $(PACKAGE)-$(VERSION)
21 cp $(DIST_FILES) $(DOC_FILES) $(PACKAGE)-$(VERSION)
22 tar cvfz $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
23 rm -rf $(PACKAGE)-$(VERSION)
25 ml_minidom.o: ml_minidom.c
26 gcc -c -I$(INCLUDEDIR) `glib-config --cflags` `minidom-config --cflags` $<
28 minidom.cmi: minidom.mli
31 minidom.cmo: minidom.ml minidom.cmi
34 minidom.cmx: minidom.ml minidom.cmi
37 ominidom.cmi: ominidom.mli
40 ominidom.cmo: ominidom.ml
43 ominidom.cmx: ominidom.ml
46 test.cmo: test.ml minidom.cmo
49 test.cmx: test.ml minidom.cmx
52 test: test.cmo minidom.cmo ml_minidom.o
53 ocamlc -custom -o test minidom.cmo test.cmo ml_minidom.o \
54 -cclib "`glib-config --libs` `minidom-config --libs`"
56 test.opt: test.cmx minidom.cmx ml_minidom.o
57 ocamlopt -o test.opt minidom.cmx test.cmx ml_minidom.o \
58 -cclib "`glib-config --libs` `minidom-config --libs`"
61 if test -d $(INSTALLDIR); then : ; else mkdir -p $(INSTALLDIR); fi
62 cp $(OBJECTS) $(INST) $(INSTALLDIR)
63 -test -x /usr/bin/ocamlopt && cp $(OBJECTS_OPT) $(INST_OPT) $(INSTALLDIR)
69 rm -f *.o *.cm? test test.opt
72 rm -f config.log config.cache config.status Makefile