diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-10-03 13:00:14 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-10-03 13:00:14 +0200 |
commit | 2bf5effe95641667a1ed51c04eff7760f6a42ef4 (patch) | |
tree | ee02ed7d87ebcfae07ac1e69017d6edced3ed386 /Makefile |
Initial
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..14220de --- /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 = main + +.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 $@ $< |