summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2018-08-08 22:58:13 +0200
committerTom Smeding <tom.smeding@gmail.com>2018-08-08 22:58:13 +0200
commitddb57cb49a60b6173712341940195e0275ef1c9d (patch)
treefe00bf906937b4d43c2514bb0793c2082532aeb1 /Makefile
parent9fe062538f302cccc8473b8152922637a2999088 (diff)
Haskell solver that uses rules
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 6 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index ef6cc85..89c0b26 100644
--- a/Makefile
+++ b/Makefile
@@ -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 $@ $^