school/cs142/final/Makefile
2016-04-06 20:45:34 -07:00

32 lines
718 B
Makefile

CXXFLAGS= -Wall -g
OBJECTS=main.o employee.o hourly.o salaried.o administrator.o faculty.o util.o campus.o
EXE=main
all: $(EXE)
$(EXE): main.o
$(CXX) $(CXXFLAGS) $(OBJECTS) -o $@
main.o: main.cpp employee.o hourly.o salaried.o administrator.o faculty.o util.o campus.o
employee.o: employee.h employee.cpp
hourly.o: hourly.cpp hourly.h employee.h
salaried.o: salaried.h salaried.cpp employee.h
administrator.o: administrator.cpp administrator.h employee.h
faculty.o: faculty.cpp faculty.h employee.h
util.o: util.h util.cpp
campus.o: campus.cpp campus.h
run: $(EXE)
@./$(EXE)
clean:
@rm -vf *.o
@rm -vf $(EXE)
debug: $(EXE)
gdb ./$(EXE)
valgrind: $(EXE)
valgrind --tool=memcheck --leak-check=yes ./$(EXE)