# # specify all .h files here # H = Point.h # # specify all .cc files here # C = main.cc # # should not have to change anything else below # CXX = g++ -std=c++17 -pedantic -Wall -g O=$(C:.cc=.o) main: $(O) $(CXX) $(O) -o main %.o: %.cc $(H) $(CXX) -c $< clean: rm -f a.out core $(O) main #--- # rules, from the GNU make manual: https://www.gnu.org/software/make/manual/make.html # # target : prerequisites # recipe # # A target is usually the name of a file that is generated by a program. # A prerequisite is a file that is used as input to create the target. # A recipe is an action that make carries out. # # THERE MUST BE A TAB CHARACTER (not spaces) AT THE BEGINNING OF EVERY RECIPE LINE # # otherwise make will fail with an error message like: *** missing separator. Stop. #---