1TOPLEVEL=$(CURDIR)/../.. 2XEN_ROOT=$(TOPLEVEL)/../.. 3include $(TOPLEVEL)/common.make 4 5OCAMLINCLUDE += -I ../xb/ 6OCAMLOPTFLAGS += -for-pack Xenstore 7 8.NOTPARALLEL: 9# Ocaml is such a PITA! 10 11PREINTF = xsraw.cmi xst.cmi 12PREOBJS = queueop xsraw xst 13PRELIBS = $(foreach obj, $(PREOBJS),$(obj).cmo) $(foreach obj,$(PREOJBS),$(obj).cmx) 14OBJS = paths queueop xsraw xst xs 15INTF = xsraw.cmi xst.cmi xs.cmi 16LIBS = xenstore.cma xenstore.cmxa 17 18all: $(PREINTF) $(PRELIBS) $(INTF) $(LIBS) $(PROGRAMS) 19 20bins: $(PROGRAMS) 21 22libs: $(LIBS) 23 24xenstore_OBJS = xenstore 25OCAML_NOC_LIBRARY = xenstore 26 27xenstore.cmx : $(foreach obj, $(OBJS), $(obj).cmx) 28 $(E) " CMX $@" 29 $(Q)$(OCAMLOPT) -pack -o $@ $^ 30 31xenstore.cmo : $(foreach obj, $(OBJS), $(obj).cmo) 32 $(E) " CMO $@" 33 $(Q)$(OCAMLC) -pack -o $@ $^ 34 35 36.PHONY: install 37install: $(LIBS) META 38 mkdir -p $(OCAMLDESTDIR) 39 $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenstore 40 $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenstore META $(LIBS) xenstore.cmo xenstore.cmi xenstore.cmx *.a 41 42.PHONY: uninstall 43uninstall: 44 $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenstore 45 46include $(TOPLEVEL)/Makefile.rules 47 48genpath-target = $(call buildmakevars2module,paths.ml) 49$(eval $(genpath-target)) 50 51GENERATED_FILES += paths.ml 52