summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-10-16 21:49:02 +0200
committerTom Smeding <tom@tomsmeding.com>2025-10-16 21:49:02 +0200
commitb006ae324da88e3280914b3d00585a740057d4c8 (patch)
treeccab466eb83f32a32b951cd8b3b360d0e4b66a81 /Makefile
InitialHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..00953bd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+CXX = g++
+CXXFLAGS = -Wall -Wextra -std=c++17 -fwrapv
+ifneq ($(DEBUG),)
+ CXXFLAGS += -g
+else
+ CXXFLAGS += -O2
+endif
+BIN = tabulate
+
+.PHONY: all clean
+
+all: $(BIN)
+
+clean:
+ rm -f $(BIN) *.o
+
+
+$(BIN): $(patsubst %.cpp,%.o,$(wildcard *.cpp))
+ $(CXX) -o $@ $^
+
+%.o: %.cpp $(wildcard *.h)
+ $(CXX) $(CXXFLAGS) -c -o $@ $<