diff options
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 $@ $^ |