+LIBDIR = /usr/lib/ocaml
+INSTALLDIR = $(LIBDIR)/lablgtk/mathview/minidom
+OBJECTS = minidom.cmi minidom.cmo minidom.cmx minidom.mli ml_minidom.h \
+ ml_minidom.o minidom.o
-all: ml_minidom.o minidom.cmi minidom.cmo minidom.cmx test test.opt
+all: test
+
+opt: test.opt
ml_minidom.o: ml_minidom.c
- gcc -c -I../ -I/usr/lib/ocaml/caml/ `glib-config --cflags` `xml-config --cflags` `gtkmathview-config --cflags` $<
+ gcc -c -I/usr/lib/ocaml/caml/ `glib-config --cflags` `xml-config --cflags` `gtkmathview-config --cflags` $<
minidom.cmi: minidom.mli
ocamlc -c $<
-minidom.cmo: minidom.ml
+minidom.cmo: minidom.ml minidom.cmi
ocamlc -c $<
-minidom.cmx: minidom.ml
+minidom.cmx: minidom.ml minidom.cmi
ocamlopt -c $<
-test.cmo: test.ml
+test.cmo: test.ml minidom.cmo
ocamlc -c test.ml
-test.cmx: test.ml
+test.cmx: test.ml minidom.cmx
ocamlopt -c test.ml
-test: test.cmo minidom.cmi ml_minidom.o
+test: test.cmo minidom.cmo ml_minidom.o
ocamlc -custom -o test minidom.cmo test.cmo ml_minidom.o \
-cclib "`xml-config --libs`" -cclib "`glib-config --libs`" \
-cclib "`gtkmathview-config --libs`"
-test.opt: test.cmx minidom.cmi ml_minidom.o
+test.opt: test.cmx minidom.cmx ml_minidom.o
ocamlopt -o test.opt minidom.cmx test.cmx ml_minidom.o \
-cclib "`xml-config --libs`" -cclib "`glib-config --libs`" \
-cclib "`gtkmathview-config --libs`"
-clean:
- rm -f *.o *.cm? test
+install:
+ if test -d $(INSTALLDIR); then : ; else mkdir -p $(INSTALLDIR); fi
+ cp $(OBJECTS) $(INSTALLDIR)
-cleanbak:
- rm -f *~
+clean:
+ rm -f *.o *.cm? test test.opt