# Makefile # CSE 333 Lecture 14 code CXX = g++ CPPFLAGS = -Wall -g -std=c++17 # PROGS = vectorfun vectorcap vectoriterator vectoriterator_2011 vectoralgos listexample mapexample test PROGS = listexample mapexample test # default target builds all executables all: $(PROGS) Tracer.o: Tracer.cc Tracer.h $(CXX) $(CPPFLAGS) -c $< TracerWithHistory.o: TracerWithHistory.cc TracerWithHistory.h $(CXX) $(CPPFLAGS) -c $< # list example listexample: listexample.o Tracer.o TracerWithHistory.o $(CXX) $(CPPFLAGS) -o $@ $^ listexample.o: listexample.cc Tracer.h TracerWithHistory.h $(CXX) $(CPPFLAGS) -c $< # map example mapexample: mapexample.o Tracer.o TracerWithHistory.o $(CXX) $(CPPFLAGS) -o $@ $^ mapexample.o: mapexample.cc Tracer.h TracerWithHistory.h $(CXX) $(CPPFLAGS) -c $< # Iterator Question code test: test.o Tracer.o TracerWithHistory.o $(CXX) $(CPPFLAGS) -o $@ $^ test.o: test.cc Tracer.h TracerWithHistory.h $(CXX) $(CPPFLAGS) -c $< # phony target - remove generated files and backups clean: rm -f *.o $(PROGS)