Last active
November 1, 2016 08:58
-
-
Save mtavkhelidze/40881de5463645116e16b537a5a3f5a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generic Makefile with deps for C++ | |
CXX = g++ | |
CXXFLAGS = -std=c++14 -Wall -Wextra -Werror -pedantic-errors \ | |
-Wno-unused-const-variable -Wno-missing-braces \ | |
-Wfatal-errors -MMD -O0 -g | |
SRC = $(wildcard *.cpp) | |
BIN = $(patsubst %.cpp,%.bin,$(SRC)) | |
OBJ = $(SRC:.cpp=.o) | |
DEPS = $(SRC:.cpp=.d) | |
all: $(BIN) | |
%.bin: %.o | |
$(CXX) -o $@ $< | |
clean: | |
rm -fr $(BIN) $(OBJ) $(DEPS) *.dSYM | |
-include $(DEPS) | |
.PHONY: all clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment