CXX = g++ CXXFLAGS = -Wall -Wextra -std=c++11 -g -fwrapv LDFLAGS = TARGET = boog .PHONY: all clean remake all: $(TARGET) clean: rm -f *.o $(TARGET) rm -rf *.dSYM remake: clean make all $(TARGET): $(patsubst %.cpp,%.o,$(wildcard *.cpp)) $(CXX) $^ -o $@ $(LDFLAGS) %.o: %.cpp $(wildcard *.h) $(CXX) $(CXXFLAGS) -c -o $@ $<