aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-03-01 15:53:02 +0100
committertomsmeding <tom.smeding@gmail.com>2017-03-01 15:53:02 +0100
commitfd56574a4d60e553c610615660198f0a84bcb7a1 (patch)
treebd9e1dd576fa4494187a5176099772f22aeb360c /Makefile
Initial
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..009c5bc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+CXX = g++
+CXXFLAGS = -Wall -Wextra -std=c++11 -g -fwrapv
+TARGET = sim
+
+.PHONY: all clean remake
+
+all: $(TARGET)
+
+clean:
+ rm -f $(TARGET) *.o
+
+remake: clean
+ $(MAKE) all
+
+
+$(TARGET): $(patsubst %.cpp,%.o,$(wildcard *.cpp))
+ $(CXX) -o $@ $^
+
+%.o: %.cpp $(wildcard *.h)
+ $(CXX) $(CXXFLAGS) -c -o $@ $<