-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
47 lines (40 loc) · 1.02 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
BUILD_MODE ?= dev
LIBRARY_TYPE ?= relocatable
PROCESSORS ?= 0
BUILD_DIR ?= .
INSTALL_DIR ?= .
ALL_LIBRARY_TYPES = static static-pic relocatable
.PHONY: lib
lib:
gprbuild -k -P adasat.gpr -p -j$(PROCESSORS) \
--relocate-build-tree="$(BUILD_DIR)" \
-XLIBRARY_TYPE=$(LIBRARY_TYPE) \
-XBUILD_MODE=$(BUILD_MODE)
.PHONY: all-libs
all-libs:
for kind in $(ALL_LIBRARY_TYPES) ; do \
gprbuild -k -P adasat.gpr -p -j$(PROCESSORS) \
--relocate-build-tree="$(BUILD_DIR)" \
-XLIBRARY_TYPE=$$kind \
-XBUILD_MODE=$(BUILD_MODE) ; \
done
.PHONY: install
install:
for kind in $(ALL_LIBRARY_TYPES) ; do \
gprinstall -P adasat.gpr -p -f \
-XLIBRARY_TYPE=$$kind \
-XBUILD_MODE=$(BUILD_MODE) \
--relocate-build-tree="$(BUILD_DIR)" \
--prefix="$(INSTALL_DIR)" \
--build-name=$$kind \
--build-var=LIBRARY_TYPE ; \
done
.PHONY: test
clean:
gprclean -P adasat.gpr \
--relocate-build-tree="$(BUILD_DIR)" \
-XLIBRARY_TYPE=$(LIBRARY_TYPE) \
-XBUILD_MODE=$(BUILD_MODE)
.PHONY: test
test: lib
python3 testsuite/testsuite.py