CC = g++ CFLAGS = -Wall -g -std=c++11 PROGS = sanepoint_2011 testcomplex heappoint strtest arrays all: $(PROGS) sanepoint_2011: sanepoint_2011.o Point_2011.o $(CC) $(CFLAGS) -o $@ $^ sanepoint_2011.o: sanepoint_2011.cc Point_2011.h $(CC) $(CFLAGS) -c $< Point_2011.o: Point_2011.cc Point_2011.h $(CC) $(CFLAGS) -c $< testcomplex: testcomplex.o Complex.o $(CC) $(CFLAGS) -o $@ $^ testcomplex.o: testcomplex.cc Complex.h $(CC) $(CFLAGS) -c $< Complex.o: Complex.cc Complex.h $(CC) $(CFLAGS) -c $< strtest: strtest.o Str.o $(CC) $(CFLAGS) -o $@ $^ strtest.o: strtest.cc Str.h $(CC) $(CFLAGS) -c $< Str.o: Str.cc Str.h $(CC) $(CFLAGS) -c $< heappoint: heappoint.o Point.o $(CC) $(CFLAGS) -o $@ $^ heappoint.o: heappoint.cc Point.h $(CC) $(CFLAGS) -c $< arrays: arrays.o Point.o $(CC) $(CFLAGS) -o $@ $^ arrays.o: arrays.cc Point.h $(CC) $(CFLAGS) -c $< Point.o: Point.cc Point.h $(CC) $(CFLAGS) -c $< clean: rm -f *.o $(PROGS)