summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-10-06 12:16:37 +0200
committertomsmeding <tom.smeding@gmail.com>2016-10-06 12:16:37 +0200
commitd624d8483e15efa59c9165d6f883caf65175bd4e (patch)
treeef0de149b7107fa964328d1c4c75d38e35d43447 /Makefile
Initial
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c3486fa
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+CXX = g++
+CXXFLAGS = -Wall -Wextra -std=c++11 -fwrapv
+ifneq ($(DEBUG),)
+ CXXFLAGS += -g
+else
+ CXXFLAGS += -O2
+endif
+BIN = histogram
+
+.PHONY: all clean remake
+
+all: $(BIN)
+
+clean:
+ rm -rf $(BIN) *.o *.dSYM
+
+remake: clean all
+
+
+$(BIN): $(patsubst %.cpp,%.o,$(wildcard *.cpp))
+ $(CXX) -o $@ $^
+
+%.o: %.cpp $(wildcard *.h)
+ $(CXX) $(CXXFLAGS) -c -o $@ $<