-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathMakefile
67 lines (56 loc) · 1.64 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
#
# ecgen, tool for generating Elliptic curve domain parameters
# Copyright (C) 2017 J08nY
#
# Default target first
all:
+$(MAKE) -C lib all
+$(MAKE) -C src all
clean:
+$(MAKE) -C src clean
+$(MAKE) -C test clean
clean-cov:
+$(MAKE) -C src clean-cov
+$(MAKE) -C test clean-cov
rm -rf *.gcov
clean-all:
+$(MAKE) -C lib clean
+$(MAKE) -C src clean-all
+$(MAKE) -C test clean-all
rm -rf docs/html docs/latex
format:
+$(MAKE) -C src format
+$(MAKE) -C test format
docs:
doxygen Doxyfile
test: all
+$(MAKE) -C test test
unittest: all
+$(MAKE) -C test unittest
help:
@echo "ecgen, tool for generating Elliptic curve domain parameters"
@echo
@echo "Available targets:"
@echo " - all : builds all"
@echo " - ecgen : builds the main binary"
@echo " - docs : generate doxygen docs"
@echo " - test : test the main binary"
@echo " - unittest : "
@echo " - clean : cleans up after a build"
@echo " - clean-cov : cleans up coverage files"
@echo " - clean-all : cleans all"
@echo " - format : run clang-format on source files"
@echo " - help : print this help"
@echo
@echo "Available variables:"
@echo " - CC : The compiler to use"
@echo " - DEBUG : Whether to enable DEBUG build = default 0"
@echo " - TEST : Whether to enable TEST build(code coverage) = default 0"
@echo " - FAST : Whether to enable additional optimization(gcc only) = default 0"
@echo " - STATIC : Whether to link PARI statically = default 0"
.PHONY: all clean clean-all docs test unittest help
ifeq (, $(filter all clean clean-cov clean-all format docs test unittest help, $(MAKECMDGOALS)))
# Just pass all targets to a Makefile in src
$(MAKECMDGOALS):
+$(MAKE) -C src $@
endif