-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (52 loc) · 1.85 KB
/
Copy pathMakefile
File metadata and controls
66 lines (52 loc) · 1.85 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
66
# Compiler settings
CC := gcc
CXX := g++
CFLAGS := -I.
CXXFLAGS:= -I.
CSTD := -I/C/msys64/ucrt64/include
CXXSTD := -I/C/msys64/ucrt64/include/c++/15.2.0
# Output files
LITE_EXAMPLE_OUT := output/example/lite
LITE_TEST_OUT := output/test/lite
# Source files
LITE_EXAMPLE_SRC := example/lite/*.cpp
LITE_TEST_SRC := test/lite/*.cpp
# Static analysis targets
LITE_HEADERS := include/meta/lite/*.hpp
ADVA_HEADERS := include/meta/adva/*.hpp
META_HEADERS := include
.PHONY: help \
bitUtilitys-check cgen-check lite-check static-check \
cgen-examples lite-examples cgen-tests lite-tests compile-tests run-tests
# --------------------------------------------------
# Static analysis
# --------------------------------------------------
lite-check:
cppcheck $(CSTD) $(CXXSTD) -I. --std=c++20 --enable=all $(LITE_HEADERS)
static-check:
cppcheck $(CSTD) $(CXXSTD) -I. --std=c++20 --enable=all $(BITUTILS_HEADERS)
cppcheck $(CSTD) $(CXXSTD) -I. --std=c++20 --enable=all $(CGEN_HEADERS)
cppcheck $(CSTD) $(CXXSTD) -I. --std=c++20 --enable=all $(LITE_HEADERS)
# --------------------------------------------------
# Tests
# --------------------------------------------------
compile-tests:
$(CXX) $(CXXFLAGS) $(LITE_TEST_SRC) -o $(LITE_TEST_OUT)
compile-examples:
$(CXX) $(CXXFLAGS) $(LITE_EXAMPLE_SRC) -o $(LITE_EXAMPLE_OUT)
run-tests:
./$(LITE_TEST_OUT)
run-examples:
./$(LITE_EXAMPLE_OUT)
# --------------------------------------------------
# Help
# --------------------------------------------------
help:
@echo "Available targets:"
@echo ""
@echo " static-check : Run cppcheck on all project headers"
@echo ""
@echo " compile-tests : Compile all test programs"
@echo " compile-examples : Compile all example programs"
@echo " run-tests : Run all compiled tests"
@echo " run-examples : Run all compiled examples"