summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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 $@ $^