-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (47 loc) · 1.94 KB
/
Copy pathMakefile
File metadata and controls
66 lines (47 loc) · 1.94 KB
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
# This is just a convenience Makefile to avoid having to remember
# all the CMake commands and their arguments.
# Set CMAKE_GENERATOR in the environment to select how you build, e.g.:
# CMAKE_GENERATOR=Ninja
BUILD_DIR=build
CLANG_FORMAT=clang-format -i
LIB=./build/libsframe.a
TEST_VECTOR_DIR=./build/test
TEST_BIN=./build/test/sframe_test
OPENSSL_1_1_MANIFEST=alternatives/OPENSSL_1_1
OPENSSL_3_MANIFEST=alternatives/OPENSSL_3
BORINGSSL_MANIFEST=alternatives/BORINGSSL
.PHONY: all dev dev1 devB tidy test clean cclean format
${LIB}: ${BUILD_DIR} src/* include/sframe/*
cmake --build ${BUILD_DIR} --target sframe
${BUILD_DIR}: CMakeLists.txt test/CMakeLists.txt
cmake -B${BUILD_DIR} .
dev: CMakeLists.txt test/CMakeLists.txt
cmake -B${BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DTESTING=ON \
-DCLANG_TIDY=ON -DSANITIZERS=ON \
-DCRYPTO=OPENSSL_3 -DVCPKG_MANIFEST_DIR=${OPENSSL_3_MANIFEST}
dev1: CMakeLists.txt test/CMakeLists.txt
cmake -B${BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DTESTING=ON \
-DCLANG_TIDY=ON -DSANITIZERS=ON \
-DCRYPTO=OPENSSL_1_1 -DVCPKG_MANIFEST_DIR=${OPENSSL_1_1_MANIFEST}
devB: CMakeLists.txt test/CMakeLists.txt
cmake -B${BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DTESTING=ON \
-DCLANG_TIDY=ON -DSANITIZERS=ON \
-DCRYPTO=BORINGSSL -DVCPKG_MANIFEST_DIR=${BORINGSSL_MANIFEST}
dev-nostd: CMakeLists.txt test/CMakeLists.txt
cmake -B${BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCLANG_TIDY=ON -DTESTING=ON -DSANITIZERS=ON -DNO_ALLOC=ON .
${TEST_BIN}: ${LIB} test/*
cmake --build ${BUILD_DIR} --target sframe_test
test: ${TEST_BIN}
cd ${TEST_VECTOR_DIR} && ctest
dtest: ${TEST_BIN}
cd test && ../${TEST_BIN}
dbtest: ${TEST_BIN}
cd test && lldb ../${TEST_BIN}
clean:
cmake --build ${BUILD_DIR} --target clean
cclean:
rm -rf ${BUILD_DIR}
format:
find include -iname "*.h" -or -iname "*.cpp" | xargs ${CLANG_FORMAT}
find src -iname "*.h" -or -iname "*.cpp" | xargs ${CLANG_FORMAT}
find test -iname "*.h" -or -iname "*.cpp" | xargs ${CLANG_FORMAT}