27 lines
351 B
Makefile
27 lines
351 B
Makefile
|
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)
|