# on turing, use next line; on other platforms, use the following line #CROSS=-m32 CROSS= CC=g++ CFLAGS=-g -Wall $(CROSS) LFLAGS=$(CROSS) OBJS=CreditCard.o Test_CreditCard.o EXOBJS=CreditCardExtra.o Test_CreditCardExtra.o default: test all: test extra test: $(OBJS) $(CC) -o Test_CreditCard $(LFLAGS) $(OBJS) extra: $(EXOBJS) $(CC) -o Test_CreditCardExtra $(LFLAGS) $(EXOBJS) # list of file dependencies Test_CreditCard.o: CreditCard.h CreditCard.o: CreditCard.h Test_CreditCardExtra.o: CreditCardExtra.h CreditCardExtra.o: CreditCardExtra.h # the following rule is used to compile .cpp files to .o .cpp.o: $(CC) $(CFLAGS) -c $< # the following removes all .o files, but leaves the executable clean: rm -f *.o