# Makefile for ompiling the SchoolDirectory program, written in C++ # # Written by Henry M. Walker, 9 January 2023 # Type "make" in the directory with the required classes. # to construct the full application # Use the gcc compiler CC = g++ # Set preprocessor flags #CPPFLAGS= # Set appropriate compiling flags CFLAGS=-Wall -std=c++98 all: SchoolDirectory SchoolDirectory: SchoolDirectory.cpp Entry.o Student.o Faculty.o Staff.o Makefile $(CC) $(CFLAGS) -o SchoolDirectory SchoolDirectory.cpp Entry.o Student.o Faculty.o Staff.o Entry.o: Entry.cpp Entry.h $(CC) $(CFLAGS) -c Entry.cpp Student.o: Student.cpp Student.h $(CC) $(CFLAGS) -c Student.cpp Faculty.o: Faculty.cpp Faculty.h $(CC) $(CFLAGS) -c Faculty.cpp Staff.o: Staff.h Staff.cpp $(CC) $(CFLAGS) -c Staff.cpp #---------------------------------------------------------------------------- # cleanup rules: To invoke this command, type "make clean". # Use this target to clean up your directory, deleting (without warning) # object files, old emacs source versions, and core dumps. clean: rm -f *.o *~ core*