diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-11-05 18:28:07 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-11-05 18:28:07 +0100 |
commit | 3b36e04bc4e0ef7ac3c968eb854f266946516b52 (patch) | |
tree | 6d220667eec5ae74c01ae0bc9c149168517a0d2a /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..a8bf246 --- /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 = lp + +.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 $@ $< |