-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (24 loc) · 687 Bytes
/
Makefile
File metadata and controls
35 lines (24 loc) · 687 Bytes
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
.PHONY: all build rebuild rsa _test unistall clean
all: build
build: rsa
mkdir -p ./bin
cp ./build/RSA ./bin
rebuild: clean build
define CRYPTO_TARGET
$(1): $(1)_app
endef
$(foreach app, rsa, $(eval $(call CRYPTO_TARGET,$(app))))
%_app:
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release
cmake --build ./build --config Release
tests: rsa_test
%_test:
cmake -S ./tests -B ./tests/build
cmake --build ./tests/build
cd ./tests/build; ./TEST
unistall:
find ./ -name "build" -type d -exec rm -rf {} +
clean: unistall
rm -rf ./bin
style:
find . -type f \( -name "*.cc" -o -name "*.h" \) -exec clang-format -i --verbose -style=Google {} +