-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (18 loc) · 699 Bytes
/
Copy pathMakefile
File metadata and controls
21 lines (18 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CXX = g++
# Safety and debugging flags:
# -Wall: Enable all warnings
# -Wextra: Enable additional warnings
# -g: Generate debug info
# -fsanitize=address: Enable Address Sanitizer to detect memory errors
# -fstack-protector-all: Enable stack protection
# -D_FORTIFY_SOURCE=2: Use fortify source for additional runtime checks
# -Iinclude and -Iexternal: Include directories
CXXFLAGS = -Wall -Wextra -g -fsanitize=address -fstack-protector-all \
-D_FORTIFY_SOURCE=2 -Iinclude -Iexternal -std=c++17 `pkg-config --cflags opencv4`
LDFLAGS = `pkg-config --libs opencv4`
TARGET = main
all: $(TARGET)
$(TARGET): main.cpp
$(CXX) $(CXXFLAGS) -o $(TARGET) main.cpp $(LDFLAGS)
clean:
rm -f $(TARGET)