# Makefile # CSE 333 Lecture 14 code CXX = g++ CPPFLAGS = -Wall -g -std=c++11 PROGS = functiontemplate functiontemplate_infer valtemplate usepair fib_template # default target all: $(PROGS) # compare example with explicit types functiontemplate: functiontemplate.cc $(CXX) $(CPPFLAGS) -o $@ $^ # compare example with inferred types functiontemplate_infer: functiontemplate_infer.cc $(CXX) $(CPPFLAGS) -o $@ $^ # do computation with the compiler+templates fib_template: fib_template.cc $(CXX) $(CPPFLAGS) -o $@ $^ # valarray example with non-type parameter N valtemplate: valtemplate.cc $(CXX) $(CPPFLAGS) -o $@ $^ # template class Pair example usepair: usepair.cc Pair.h Pair.cc $(CXX) $(CPPFLAGS) -o $@ $< # phony target - remove generated files and backups clean: rm -f *.o *~ $(PROGS)