diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-10-28 23:14:38 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-10-28 23:14:38 +0200 |
commit | 756a8c48b567901d2483e6ea2213c00e5ca47931 (patch) | |
tree | fa41dce238a827969a9276ca8c1bae4f3640288f /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..ef6cc85 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +CXX = g++ +CXXFLAGS = -Wall -Wextra -std=c++11 -fwrapv -g +ifneq ($(DEBUG),) + CXXFLAGS += -g +else + CXXFLAGS += -O2 +endif +BIN = solve + +.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 $@ $< |