1TOPLEVEL=$(CURDIR)/../.. 2XEN_ROOT=$(TOPLEVEL)/../.. 3include $(TOPLEVEL)/common.make 4 5CFLAGS += -I../mmap $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) 6CFLAGS += $(APPEND_CFLAGS) 7OCAMLINCLUDE += -I ../mmap 8 9OBJS = xenctrl 10INTF = xenctrl.cmi 11LIBS = xenctrl.cma xenctrl.cmxa 12 13LIBS_xenctrl = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) 14 15xenctrl_OBJS = $(OBJS) 16xenctrl_C_OBJS = xenctrl_stubs 17 18OCAML_LIBRARY = xenctrl 19 20all: $(INTF) $(LIBS) 21 22libs: $(LIBS) 23 24.PHONY: install 25install: $(LIBS) META 26 mkdir -p $(OCAMLDESTDIR) 27 $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenctrl 28 $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenctrl META $(INTF) $(LIBS) *.a *.so *.cmx 29 30.PHONY: uninstall 31uninstall: 32 $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenctrl 33 34xenctrl_stubs.o: xenctrl_abi_check.h 35 36xenctrl_abi_check.h: abi-check xenctrl_stubs.c xenctrl.ml 37 $(PERL) -w $^ >$@.tmp && mv -f $@.tmp $@ 38 39GENERATED_FILES += xenctrl_abi_check.h 40 41include $(TOPLEVEL)/Makefile.rules 42