CC = g++ # We use -fno-elide-constructors to disable return value optimization, so that # we can see our lovely copy constructors in use. CFLAGS = -Wall -g -std=c++11 -fno-elide-constructors PROGS = usepoint noisycopies all: $(PROGS) usepoint: usepoint.cc Point.o $(CC) $(CFLAGS) -o $@ $^ noisycopies: noisycopies.cc Point.o $(CC) $(CFLAGS) -o $@ $^ Point.o: Point.cc Point.h $(CC) $(CFLAGS) -c $< clean: rm -f *.o $(PROGS) *~