-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 755 Bytes
/
Makefile
File metadata and controls
40 lines (31 loc) · 755 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
36
37
38
39
40
# Compiler and flags
CXX := clang++
CXXFLAGS := -std=c++20 \
-Wall \
-Wextra \
-rdynamic \
-fno-exceptions \
-fno-rtti\
-Wno-missing-designated-field-initializers\
-Wno-multichar \
-Wno-reorder-init-list \
-Wno-unused-parameter \
-Wno-c99-designator
CXXFLAGS_NOANALYZER := -Wno-switch
# Directories
SRC_DIR := src
BIN_DIR := bin
# Source files
SRCS := $(wildcard $(SRC_DIR)/**/*.cpp) $(wildcard $(SRC_DIR)/*.cpp)
# Object files
# OBJS := $(SRCS:$(SRC_DIR)/%.cpp=$(BIN_DIR)/%.o)
test: $(BIN_DIR)
$(CXX) $(CXXFLAGS) $(CXXFLAGS_NOANALYZER) -o $(BIN_DIR)/$@ entry/$@.cpp $(SRCS)
$(BIN_DIR)/$@
analyze:
clang-tidy entry/*.cpp $(SRCS) -- $(CXXFLAGS)
# Ensure bin directory exists
$(BIN_DIR):
mkdir -p $(BIN_DIR)
clean:
rm -rf $(BIN_DIR)