-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
80 lines (54 loc) · 1.6 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
70
71
72
73
74
75
76
77
78
79
SETUP = ocaml setup.ml
-include makefile.data
build: setup.data
$(SETUP) -build $(BUILDFLAGS)
doc: setup.data build
$(SETUP) -doc $(DOCFLAGS)
test: setup.data build
$(SETUP) -test $(TESTFLAGS)
install: setup.data
$(SETUP) -install $(INSTALLFLAGS)
clean:
$(SETUP) -clean $(CLEANFLAGS)
distclean: rm_makefile.data
$(SETUP) -distclean $(DISTCLEANFLAGS)
setup.data:
$(SETUP) -configure $(CONFIGUREFLAGS)
ifdef LIB
uninstall_base:
ocamlfind remove $(LIB)
else
uninstall_base:
$(SETUP) -uninstall $(UNINSTALLFLAGS)
endif
uninstall:
make uninstall_base
reinstall: uninstall install
rm_makefile.data:
rm makefile.data || true
rm_data: rm_makefile.data
rm setup.data || true
configure_lib:
$(file >makefile.data,LIB = $(LIB))
$(file >>makefile.data,ROOTDIR = $(ROOTDIR))
kernel_lib: CONFIGUREFLAGS = --enable-kernel-lib
kernel_lib: LIB = psyche_kernel_lib
kernel_lib: ROOTDIR = src/lib
kernel: CONFIGUREFLAGS = --enable-kernel
kernel: LIB = psyche_kernel
kernel: ROOTDIR = src/kernel
portfolio: CONFIGUREFLAGS = --enable-portfolio
portfolio: LIB = psyche_portfolio
portfolio: ROOTDIR = src/portfolio
cdsat: CONFIGUREFLAGS = --enable-exec
kernel_lib kernel portfolio: rm_data configure_lib setup.data
cdsat: rm_data setup.data
.PHONY: build doc test libs install reinstall uninstall_libs clean distclean rm_makefile.data rm_data configure_lib kernel_lib kernel portfolio psyche
libs:
make clean kernel_lib build reinstall
make clean kernel build reinstall
make clean portfolio build reinstall
uninstall_libs:
make clean kernel_lib uninstall
make clean kernel uninstall
make clean portfolio uninstall