# # Makefile # SHELL = /bin/sh # # Don't change these flags # CXXFLAGS = -g -Wall -W -pedantic -DMT_NO_LONGLONG # Compatability with Sun's make CXX = g++ CCC = $(CXX) CCFLAGS = $(CXXFLAGS) # # If you add new files to the program, list them (as .o files) in OBJECTS # OBJECTS = executable.o \ plant.o \ plantiterator.o \ location.o \ node.o all: executable executable: $(OBJECTS) $(CXX) $(CXXFLAGS) -o executable $(OBJECTS) # Magic rule to build dependencies. It is worth studying how this works. # Note that the doubled dollar sign ($$) in the sed command is # translated to a single dollar by make, so sed sees only one dollar # sign. # depend: mv Makefile Makefile.bak sed '/^# DO NOT DELETE THIS LINE/,$$d' Makefile.bak > Makefile echo '# DO NOT DELETE THIS LINE' >> Makefile echo '#' >> Makefile echo '# Automatically generated dependencies follow.' >> Makefile echo '#' >> Makefile $(CXX) -MM *.cc >> Makefile clean: rm -f executable $(OBJECTS) Makefile.bak # # Automatically generated dependencies follow. # assign_10.o: assign_10.cc hashfuncs.o: hashfuncs.cc hashfuncs.hh hashtable.o: hashtable.cc hashtable.hh hashfuncs.hh # DO NOT DELETE THIS LINE # # Automatically generated dependencies follow. # executable.o: executable.cc location.hh node.hh plant.hh plantiterator.hh location.o: location.cc location.hh node.o: node.cc node.hh location.hh plant.o: plant.cc plant.hh plantiterator.hh node.hh location.hh plantiterator.o: plantiterator.cc plantiterator.hh node.hh location.hh \ plant.hh