school/cs142/smcquay/lab09/Makefile

30 lines
510 B
Makefile
Raw Normal View History

2016-04-06 20:45:34 -07:00
CXX=g++
CPPFLAGS=-Wall -g -std=c++0x
SOURCES=main.cc util.cc person.cc
OBJECTS=$(SOURCES:.cc=.o)
EXE=restaurant
all: $(EXE)
main.o: main.cc util.o person.o
util.o: util.h util.cc
person.o: person.cc person.h
$(EXE): $(OBJECTS)
$(CXX) $(LDFLAGS) $(OBJECTS) -o $@
run: $(EXE)
./$(EXE) people.db /tmp/output.db
cat /tmp/output.db
clean:
@rm -vf *.o
@rm -rvf *.dSYM
@rm -vf $(EXE)
debug: $(EXE)
gdb $(EXE)
valgrind: $(EXE)
valgrind --tool=memcheck --leak-check=yes ./$(EXE) people.db /tmp/output.db