# on turing, use next line; on other platforms use following CROSS=-m32 #CROSS= CC=g++ CFLAGS=-g -Wall $(CROSS) LFLAGS=$(CROSS) OBJS=Survivor.o ArrayGame.o LinkedGame.o all: Survivor # rule for building the executable Survivor: $(OBJS) $(CC) -o Survivor $(LFLAGS) $(OBJS) # list of file dependencies Survivor.o: Game.h ArrayGame.h LinkedGame.h ArrayGame.o: Game.h ArrayGame.h GameOverException.h LinkedGame.o: Game.h LinkedGame.h GameOverException.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