aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..38f7853
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+CXX = g++
+CXXFLAGS = -std=c++14 -g -Wall -Wshadow -Wextra -fsanitize=address -fsanitize=undefined
+
+C_FILES = $(wildcard src/*.cpp)
+H_FILES = $(wildcard src/*.h)
+O_FILES = $(C_FILES:src/%.cpp=build/%.o)
+
+TARGET_APP = solver4
+
+.PHONY = all clean
+.DEFAULT = all
+
+all: $(TARGET_APP)
+
+build:
+ @mkdir -p build
+
+build/%.o: src/%.cpp $(H_FILES) | build
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+$(TARGET_APP): $(O_FILES)
+ $(CXX) $(CXXFLAGS) -o $@ $^
+
+clean:
+ -rm -f $(TARGET_APP)
+ -rm -rf build