forked from xapi-project/ocaml-xen-lowlevel-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (55 loc) · 1.56 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
.PHONY: all clean install build
all: build doc
BINDIR?=/usr/lib/xcp/lib
J=4
include config.mk
config.mk:
echo Please re-run configure
exit 1
BINDIR ?= /usr/bin
SBINDIR ?= /usr/sbin
DESTDIR ?= /
export OCAMLRUNPARAM=b
setup.bin: setup.ml
@ocamlopt.opt -o $@ $< || ocamlopt -o $@ $< || ocamlc -o $@ $<
@rm -f setup.cmx setup.cmi setup.o setup.cmo
setup.data: setup.bin config.mk
@./setup.bin -configure $(ENABLE_XENGUEST42) $(ENABLE_XENTOOLLOG)
build: setup.data setup.bin
@./setup.bin -build -j $(J)
ifeq ($(ENABLE_XENGUEST),true)
(cd xenguest-$(XENGUEST_VERSION) && make)
endif
doc: setup.data setup.bin
@./setup.bin -doc -j $(J)
install: setup.bin
@./setup.bin -install
ifeq ($(ENABLE_XENGUEST42),--enable-xenguest42)
mkdir -p $(BINDIR)
install -m 0755 _build/xenguest-4.2/xenguest_main.native $(BINDIR)/xenguest
endif
ifeq ($(ENABLE_XENGUEST),true)
(cd xenguest-$(XENGUEST_VERSION) && make install BINDIR=$(BINDIR))
endif
test: setup.bin build
@./setup.bin -test
reinstall: setup.bin
@ocamlfind remove xenctrl || true
@ocamlfind remove xenlight || true
@./setup.bin -reinstall
ifeq ($(ENABLE_XENGUEST),true)
(cd xenguest-$(XENGUEST_VERSION) && make install BINDIR=$(BINDIR))
endif
uninstall:
@ocamlfind remove xenctrl || true
@ocamlfind remove xenlight || true
@ocamlfind remove xentoollog || true
ifeq ($(ENABLE_XENGUEST),true)
(cd xenguest-$(XENGUEST_VERSION) && make uninstall BINDIR=$(BINDIR))
endif
clean:
@ocamlbuild -clean
@rm -f setup.data setup.log setup.bin
ifeq ($(ENABLE_XENGUEST),true)
(cd xenguest-$(XENGUEST_VERSION) && make clean)
endif