# on turing, use next line; on other platforms, use the following line #CROSS=-m32 CROSS= CC=g++ CFLAGS=-g -Wall $(CROSS) LFLAGS=$(CROSS) OBJS=test_editor.o MenuDriver.o editor.o EOBJS=test_extra.o MenuDriver.o editorExtra.o default: test all: test extra test: $(OBJS) $(CC) -o test_editor $(LFLAGS) $(OBJS) extra: $(EOBJS) $(CC) -o test_extra $(LFLAGS) $(EOBJS) # list of file dependencies editor.o: editor.h test_editor.o: editor.h MenuDriver.h MenuDriver.tcc MenuDriver.o: MenuDriver.h MenuDriver.tcc editorExtra.o: editorExtra.h test_extra.o: editorExtra.h MenuDriver.h MenuDriver.tcc test_extra.o: $(CC) $(CFLAGS) -DEXTRA -o test_extra.o -c test_editor.cpp # 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