CXX=clang++ CPPFLAGS=-Wall -g -std=c++0x SOURCES=main.cc OBJECTS=$(SOURCES:.cc=.o) EXE=app all: $(EXE) main.o: main.cc $(EXE): $(OBJECTS) $(CXX) $(LDFLAGS) $(OBJECTS) -o $@ run: $(EXE) ./$(EXE) clean: @rm -vf *.o @rm -rvf *.dSYM @rm -vf $(EXE) debug: $(EXE) gdb $(EXE) valgrind: $(EXE) valgrind --tool=memcheck --leak-check=yes ./$(EXE)