diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2018-08-08 22:58:13 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2018-08-08 22:58:13 +0200 |
commit | ddb57cb49a60b6173712341940195e0275ef1c9d (patch) | |
tree | fe00bf906937b4d43c2514bb0793c2082532aeb1 /Makefile | |
parent | 9fe062538f302cccc8473b8152922637a2999088 (diff) |
Haskell solver that uses rules
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 6 insertions, 16 deletions
@@ -1,24 +1,14 @@ CXX = g++ -CXXFLAGS = -Wall -Wextra -std=c++11 -fwrapv -g -ifneq ($(DEBUG),) - CXXFLAGS += -g -else - CXXFLAGS += -O2 -endif -BIN = solve +CXXFLAGS = -Wall -Wextra -std=c++11 -fwrapv -O2 +CXXTARGETS = solve solve2 .PHONY: all clean remake -all: $(BIN) +all: $(CXXTARGETS) clean: - rm -rf $(BIN) *.o *.dSYM + rm -rf $(CXXTARGETS) *.o *.dSYM -remake: clean all - -$(BIN): $(patsubst %.cpp,%.o,$(wildcard *.cpp)) - $(CXX) -o $@ $^ - -%.o: %.cpp $(wildcard *.h) - $(CXX) $(CXXFLAGS) -c -o $@ $< +$(CXXTARGETS): %: %.cpp + $(CXX) $(CXXFLAGS) -o $@ $^ |