mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
paths.ml contains various paths known to configure, and currently is generated via a Makefile rule. Simplify this and generate it through configure, similar to how oxenstored.conf is generated from oxenstored.conf.in. This will allow to reuse the generated file more easily with Dune. No functional change. Signed-off-by: Edwin Török <edvin.torok@citrix.com> Acked-by: Christian Lindig <christian.lindig@citrix.com>
47 lines
1.1 KiB
Makefile
47 lines
1.1 KiB
Makefile
OCAML_TOPLEVEL=$(CURDIR)/../..
|
|
XEN_ROOT=$(OCAML_TOPLEVEL)/../..
|
|
include $(OCAML_TOPLEVEL)/common.make
|
|
|
|
OCAMLINCLUDE += -I ../xb/
|
|
OCAMLOPTFLAGS += -for-pack Xenstore
|
|
|
|
.NOTPARALLEL:
|
|
# Ocaml is such a PITA!
|
|
|
|
PREINTF = xsraw.cmi xst.cmi
|
|
PREOBJS = queueop xsraw xst
|
|
PRELIBS = $(foreach obj, $(PREOBJS),$(obj).cmo) $(foreach obj,$(PREOJBS),$(obj).cmx)
|
|
OBJS = paths queueop xsraw xst xs
|
|
INTF = xsraw.cmi xst.cmi xs.cmi
|
|
LIBS = xenstore.cma xenstore.cmxa
|
|
|
|
all: $(PREINTF) $(PRELIBS) $(INTF) $(LIBS) $(PROGRAMS)
|
|
|
|
bins: $(PROGRAMS)
|
|
|
|
libs: $(LIBS)
|
|
|
|
xenstore_OBJS = xenstore
|
|
OCAML_NOC_LIBRARY = xenstore
|
|
|
|
xenstore.cmx : $(foreach obj, $(OBJS), $(obj).cmx)
|
|
$(E) " CMX $@"
|
|
$(Q)$(OCAMLOPT) -pack -o $@ $^
|
|
|
|
xenstore.cmo : $(foreach obj, $(OBJS), $(obj).cmo)
|
|
$(E) " CMO $@"
|
|
$(Q)$(OCAMLC) -pack -o $@ $^
|
|
|
|
|
|
.PHONY: install
|
|
install: $(LIBS) META
|
|
mkdir -p $(OCAMLDESTDIR)
|
|
$(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenstore
|
|
$(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenstore META $(LIBS) xenstore.cmo xenstore.cmi xenstore.cmx *.a
|
|
|
|
.PHONY: uninstall
|
|
uninstall:
|
|
$(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenstore
|
|
|
|
include $(OCAML_TOPLEVEL)/Makefile.rules
|