-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
99 lines (88 loc) · 2.15 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
BUILD_MODE ?= dev
LIBRARY_TYPE ?= relocatable
PROCESSORS ?= 0
ALL_LIBRARY_TYPES = static static-pic relocatable
LIB_PROJECT = prettier_ada.gpr
TEST_PROGRAMS = testsuite/test_programs/test_programs.gpr
.PHONY: lib
lib:
gprbuild \
-v \
-k \
-XLIBRARY_TYPE=$(LIBRARY_TYPE) \
-XPRETTIER_ADA_LIBRARY_TYPE=$(LIBRARY_TYPE) \
-XPRETTIER_ADA_BUILD_MODE=$(BUILD_MODE) \
-P $(LIB_PROJECT) \
-p \
-j$(PROCESSORS) ; \
.PHONY: all
all:
for library_type in $(ALL_LIBRARY_TYPES) ; do \
gprbuild \
-v \
-k \
-XPRETTIER_ADA_LIBRARY_TYPE=$$library_type \
-XLIBRARY_TYPE=$$library_type \
-XPRETTIER_ADA_BUILD_MODE=$(BUILD_MODE) \
-P $(LIB_PROJECT) \
-p \
-j$(PROCESSORS) ; \
done;
.PHONY: clean
clean:
rm -rf lib;
rm -rf obj;
rm -rf testsuite/test_programs/bin;
rm -rf testsuite/test_programs/obj;
.PHONY: install
install:
gprinstall \
-XPRETTIER_ADA_LIBRARY_TYPE=$(LIBRARY_TYPE) \
-XLIBRARY_TYPE=$(LIBRARY_TYPE) \
-XPRETTIER_ADA_BUILD_MODE=$(BUILD_MODE) \
--prefix="$(PREFIX)" \
--install-name=prettier_ada \
--sources-subdir=include/prettier_ada \
--build-name=$(LIBRARY_TYPE) \
--build-var=LIBRARY_TYPE \
-P $(LIB_PROJECT) -p -f ; \
.PHONY: install-all
install-all:
for library_type in $(ALL_LIBRARY_TYPES) ; do \
gprinstall \
-XPRETTIER_ADA_LIBRARY_TYPE=$$library_type \
-XLIBRARY_TYPE=$$library_type \
-XPRETTIER_ADA_BUILD_MODE=$(BUILD_MODE) \
--prefix="$(PREFIX)" \
--install-name=prettier_ada \
--sources-subdir=include/prettier_ada \
--build-name=$$library_type \
--build-var=LIBRARY_TYPE \
-P $(LIB_PROJECT) -p -f ; \
done ;
.PHONY: test-programs
test-programs:
gprbuild \
-v \
-k \
-XLIBRARY_TYPE=static \
-XPRETTIER_ADA_LIBRARY_TYPE=static \
-XPRETTIER_ADA_BUILD_MODE=$(BUILD_MODE) \
-P$(TEST_PROGRAMS) \
-p \
-j$(PROCESSORS); \
.PHONY: install-test-programs
install-test-programs:
gprinstall \
-XLIBRARY_TYPE=static \
-XPRETTIER_ADA_LIBRARY_TYPE=static \
-XPRETTIER_ADA_BUILD_MODE=$(BUILD_MODE) \
--prefix="$(PREFIX)" \
--install-name=test_programs \
--mode=usage \
-P$(TEST_PROGRAMS) \
-p \
-f
.PHONY: test
test: test-programs
python3 testsuite/testsuite.py