Permalink
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (36 sloc) 1.04 KB
include ../config.mk
OBJS = uuid
INTF = $(foreach obj, $(OBJS),$(obj).cmi)
LIBS = uuid.cma uuid.cmxa
all: $(INTF) $(LIBS) $(PROGRAMS)
bins: $(PROGRAMS)
libs: $(LIBS)
uuid.cmxa: $(foreach obj,$(OBJS),$(obj).cmx)
$(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $@ $(foreach obj,$(OBJS),$(obj).cmx)
uuid.cma: $(foreach obj,$(OBJS),$(obj).cmo)
$(OCAMLC) -a -o $@ $(foreach obj,$(OBJS),$(obj).cmo)
%.cmo: %.ml
$(OCAMLC) -c -o $@ $<
%.cmi: %.mli
$(OCAMLC) -c -o $@ $<
%.cmx: %.ml
$(OCAMLOPT) $(OCAMLOPTFLAGS) -c -o $@ $<
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
META: META.in
sed 's/@VERSION@/$(VERSION)/g' < $< > $@
.PHONY: install
install: $(LIBS) META
mkdir -p $(OCAMLDESTDIR)
ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore uuid META $(INTF) $(LIBS) *.a *.cmx $(SPOT)
.PHONY: uninstall
uninstall:
ocamlfind remove uuid
.PHONY: doc
doc: $(INTF)
python ../doc/doc.py $(DOCDIR) "uuid" "package" "$(OBJS)" "." "" ""
clean:
rm -f *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot $(SPOT) $(LIBS) $(PROGRAMS)
.PHONY: blah
blah:
echo $(SPOT)