summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2025-03-18 16:23:01 +0100
committerToni Uhlig <matzeton@googlemail.com>2025-03-19 12:03:29 +0100
commitc652e22dd1cfe059a30604e772529f1d86a1a28d (patch)
treea6ecd392f5f45c1434f78697fd3e64bffaaf1a5b /Makefile
initial commitHEADmain
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4222b3d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+CXX = g++
+CXXFLAGS = -Wall -Wextra
+
+ifneq ($(ENABLE_SANITIZER),)
+CXXFLAGS += -fsanitize=address -fsanitize=leak -fsanitize=undefined
+else
+ifneq ($(ENABLE_THREAD_SANITIZER),)
+CXXFLAGS += -fsanitize=thread -fsanitize=undefined
+endif
+endif
+ifneq ($(DEBUG),)
+CXXFLAGS += -g3
+endif
+
+all: test
+
+test: main.cpp fastbuffer.hpp
+ $(CXX) $(CXXFLAGS) main.cpp -o $@
+
+clean:
+ rm -f test
+
+.PHONY: clean