diff options
author | tomsmeding <tom.smeding@gmail.com> | 2018-03-12 00:20:50 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2018-03-12 00:20:50 +0100 |
commit | b26b8840e2cebec9ea8294d24ceb6663942005d4 (patch) | |
tree | 295d74c04bc9b6496e5a06a76234d87e876b3fe9 /Makefile |
Initial
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..04267f9 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +CXX = g++ +CXXFLAGS = -Wall -Wextra -std=c++14 -O2 -fwrapv +TARGET = chess + +OBJDIR = obj + +.PHONY: all clean + +.SUFFIXES: + +all: $(TARGET) + +clean: + @echo "Cleaning" + @rm -f $(TARGET) + @rm -rf $(OBJDIR) + + +$(OBJDIR)/%.o: %.cpp $(wildcard *.h) + @mkdir -p $(OBJDIR) + @echo "CXX $<" + @$(CXX) $(CXXFLAGS) -c -o $@ $< + +$(TARGET): $(patsubst %.cpp,$(OBJDIR)/%.o,$(wildcard *.cpp)) + @echo "LD -o $@" + @$(CXX) -o $@ $^ |