33 lines
480 B
Makefile
33 lines
480 B
Makefile
CXX=g++
|
|
CPPFLAGS=-Wall -g -std=c++0x
|
|
SOURCES=cookies.cc main.cc
|
|
OBJECTS=$(SOURCES:.cc=.o)
|
|
EXE=app
|
|
|
|
all: $(EXE)
|
|
|
|
main.o: cookies.cc cookies.h
|
|
cookies.o: cookies.cc cookies.h
|
|
|
|
$(EXE): $(OBJECTS)
|
|
$(CXX) $(LDFLAGS) $(OBJECTS) -o $@
|
|
|
|
|
|
clean:
|
|
@rm -vf *.o
|
|
@rm -rvf *.dSYM
|
|
@rm -vf app
|
|
|
|
|
|
run: $(EXE)
|
|
./$(EXE)
|
|
|
|
debug: $(EXE)
|
|
gdb $(EXE)
|
|
|
|
valgrind: $(EXE)
|
|
valgrind --tool=memcheck --leak-check=yes ./$(EXE)
|
|
|
|
autov: $(EXE)
|
|
valgrind --tool=memcheck --leak-check=yes ./$(EXE) < test.txt
|