#### # # Make and execute tests the rolodex system. # # # Platform type. Use to specify what platform the make is on. At Cal Poly, # the following platform names are used: # # SUN4G: SUN4s galaxy and phoenix # SUN4K: SUN4 kdat # HP700: HP 700 cobra cluster # HP400: HP 400 garden cluster PLATFORM = SUN4G # # Relative paths to rolodex system design and implementation testing # directories. # SYS_DESIGN_DIR = ../../../design SYS_IMPLE_DIR = ../../../implementation SYS_OBJ_DIR = ../../../implementation/$(PLATFORM) # # Model testing object files. # ROLODEX_TEST_OBJS = \ $(SYS_OBJ_DIR)/add-input-errors.o \ $(SYS_OBJ_DIR)/card-list.o \ $(SYS_OBJ_DIR)/card.o \ $(SYS_OBJ_DIR)/change-input-errors.o \ $(SYS_OBJ_DIR)/delete-input-error.o \ $(SYS_OBJ_DIR)/rolodex.o \ rolodex-test-driver.o \ rolodex-test.o # Add defintions for other rolodex module test programs # # View testing object files (NOTE: we are not testing designing automated view # tests in 441 this quarter). # # # Process testing object files. # # # Relative paths to design and implementation testing directories. # DESIGN_DIR = ../../design IMPLE_DIR = .. # # Relative paths to design and implementation directories in both system and # testing subdirectories. # # # Paths to relevant root project directories # RELEASE = alpha PROJECTS_DIR = /home/phoenix/faculty1/gfisher/projects-library/$(RELEASE) PROJECTS_INCLUDE_DIR = $(PROJECTS_DIR)/include PROJECTS_LIB_DIR = $(PROJECTS_DIR)/lib/$(PLATFORM) SUPPORT_DOC_DIR = $(PROJECTS_DIR)/support/documentation # # Paths to the relevant directories of the InterViews GUI toolkit # IV_DIR = $(PROJECTS_DIR)/interviews IV_INCLUDE_DIR = $(IV_DIR)/design IV_LIB_DIR = $(IV_DIR)/implementation/libInterViews/$(PLATFORM) IV_LIB_GRAPHICS_DIR = $(IV_DIR)/implementation/libgraphic/$(PLATFORM) # # InterViews libraries; the _g version is compiled with debugging on, so that # GUI library functions can be traced if necessary. # IV_LIBS = $(IV_LIB_DIR)/libInterViewsX11.a $(IV_LIB_DIR)/libgraphic.a IV_LIBS_g = $(IV_LIB_DIR)/libInterViewsX11-g.a \ $(IV_LIB_GRAPHICS_DIR)/libgraphic-g.a # # X Windows and other system libraries. # X_LIB = -lX11 # X Windows lib OTHER_LIBS = -lsupport \ -liv-local \ -lm -lgen # # Compilation flags and related definitions # CFLAGS = -c -g \ -I$(DESIGN_DIR) -I$(SYS_DESIGN_DIR) \ -I$(PROJECTS_INCLUDE_DIR) -I$(IV_INCLUDE_DIR) \ -Dgcc_2_6_3 -fhandle-exceptions LDFLAGS = -g -L/usr/openwin/lib -L$(PROJECTS_LIB_DIR) CC = g++ GCC = gcc LIBS = $(IV_LIBS) $(X_LIB) $(OTHER_LIBS) LIBS_g = $(IV_LIBS_g) $(X_LIB) $(OTHER_LIBS) DEPEND_SRCS = $(IMPLE_DIR)/*.C DEPEND_FLAGS = -I$(DESIGN_DIR) -I$(SYS_DESIGN_DIR) \ -I$(PROJECTS_INCLUDE_DIR) -I$(IV_INCLUDE_DIR) \ -Dgcc_2_6_3 # # Default definition to make. # default: all-testing # # Add additional module test program names as they are developed. # all-testing: links rolodex-testing # # Perform rolodex testing by running tests (which will compile if necessary) # and comparing results with last good run # rolodex-testing: rolodex-output rolodex-diffs # # Execute test scripts and save output results. By convention, rules ending in # "-output" do this work. # rolodex-output: rolodex-test @csh -q -c "source .make-rolodex-output" # # Compare current output results with last good results. By convention, rules # ending in "-diffs" do this work. # rolodex-diffs: @csh -q -c "source .make-rolodex-diffs" # # Make the current output results the good results. By convention, rules # ending in "-good" so this work. # # NOTE WELL: 'make good' should only be performed after thorough analysis of # current output results to ensure that they are absolutely correct. # good: rolodex-good rolodex-good: @csh -q -c "source .make-rolodex-good" # # Compile the testing scripts. By convention, rules ending in "-test" do this # work. # rolodex-test: $(ROLODEX_TEST_OBJS) $(CC) $(LDFLAGS) $(ROLODEX_TEST_OBJS) $(LIBS_g) -o rolodex-test # # Build the design only, which means just compile the .h files, all of which # are included in compile-stub.C. # design: $(CC) $(CFLAGS) $(DESIGN_DIR)/compile-stub.C # # Generic pattern rules to make testing implemenation files. # %.o: $(IMPLE_DIR)/%.C $(CC) $(CFLAGS) $< @csh -q -c ".make-move-dot-o $< SUN4G" %.E: $(IMPLE_DIR)/%.C $(CC) -E $(CFLAGS) $< > $*.E # # NOTE: the following does not work. It has been replaced with the invocation # of the .make-move-dot-o script in the %.o rule above. Old comment follows. # # Force a remake of any implementation file, if necessary. This is a # convenience during the course of testing. I.e., if a bug is detected during # testing, the implementation fix can be made, and then make can be rerun in # the testing dir, without having to run it separately in the implementation # dir. # %.o: $(SYS_IMPLE_DIR)/%.C @echo in 2nd %.o rule $(CC) $(CFLAGS) $< -o $(IMPLEOBJDIR)/$@ rm -f $@ ln -s $(IMPLEOBJDIR)/$@ . # # Automatically create symbolic links to system .o files. # links: @csh -q -c ".make-links $(SYS_OBJ_DIR)/*.o" # # Run this once to make the testing subdirectories # dirs: @csh -q -c ".make-dirs" # # Delete all testing object files. # clean: rm -f *.o *-test # # Delete all testing AND system object files. # reallyclean: rm -f *.o *-test cd $(SYS_OBJ_DIR); gmake clean # # Generate dependencies using makedepend. # depend: $(DEPEND_SRCS) makedepend $(DEPEND_FLAGS) $? # # Generate printable PostScript output for source files. Format is two-column # 7 point courier font in landscape page layout. # print: print_design print_implementation print_makefile print_support print_design: csh -f -c "cd $(DESIGN_DIR); \ $(SUPPORT_DOC_DIR)/codeprint2.csh \ ../documentation/formatted-code \ rolodex/testing/design \ *.h" print_implementation: csh -f -c "cd $(IMPLE_DIR); \ $(SUPPORT_DOC_DIR)/codeprint2.csh \ ../documentation/formatted-code \ rolodex/testing/implementation \ *.C" print_makefile: csh -f -c "$(SUPPORT_DOC_DIR)/codeprint2.csh \ ../../documentation/formatted-code \ rolodex/testing/implementation \ Makefile" print_support: csh -f -c "cd $(PROJECTS_INCLUDE_DIR) ; \ ../support/documentation/codeprint2.csh \ ../rolodex/documentation/formatted-code \ support/design \ view.h model.h" # DO NOT DELETE THIS LINE -- make depend depends on it. rolodex-test-driver.o: ../../design/rolodex-test.h rolodex-test-driver.o: ../../../design/rolodex.h rolodex-test-driver.o: ../../../design/add-input-errors.h rolodex-test-driver.o: /home/phoenix/faculty1/gfisher/projects-library/alpha/include/std-macros.h rolodex-test-driver.o: /usr/include/setjmp.h rolodex-test-driver.o: /usr/include/sys/feature_tests.h rolodex-test-driver.o: /home/phoenix/faculty1/gfisher/projects-library/alpha/include/str.h rolodex-test-driver.o: /home/phoenix/faculty1/gfisher/projects-library/alpha/include/strlist.h rolodex-test-driver.o: /home/phoenix/faculty1/gfisher/projects-library/alpha/include/list.h rolodex-test-driver.o: ../../../design/basic-types.h rolodex-test-driver.o: ../../../design/card-list.h ../../../design/card.h rolodex-test-driver.o: /home/phoenix/faculty1/gfisher/projects-library/alpha/include/model.h rolodex-test-driver.o: ../../../design/change-input-errors.h rolodex-test-driver.o: ../../../design/delete-input-error.h rolodex-test.o: ../../design/rolodex-test.h ../../../design/rolodex.h rolodex-test.o: ../../../design/add-input-errors.h rolodex-test.o: /home/phoenix/faculty1/gfisher/projects-library/alpha/include/std-macros.h rolodex-test.o: /usr/include/setjmp.h /usr/include/sys/feature_tests.h rolodex-test.o: /home/phoenix/faculty1/gfisher/projects-library/alpha/include/str.h rolodex-test.o: /home/phoenix/faculty1/gfisher/projects-library/alpha/include/strlist.h rolodex-test.o: /home/phoenix/faculty1/gfisher/projects-library/alpha/include/list.h rolodex-test.o: ../../../design/basic-types.h ../../../design/card-list.h rolodex-test.o: ../../../design/card.h rolodex-test.o: /home/phoenix/faculty1/gfisher/projects-library/alpha/include/model.h rolodex-test.o: ../../../design/change-input-errors.h rolodex-test.o: ../../../design/delete-input-error.h /usr/include/stdio.h rolodex-test.o: /usr/include/sys/va_list.h /usr/include/stdlib.h