#### # # Makefile for a simple box-arrow diagram. Note that this example follows MVP # conventions (sort of), as discussed elsewhere. # # # Model object files. # MODEL_OBJS = \ box-arrow.o # # View object files. # VIEW_OBJS = \ box-arrow-diagram.o # # Process object files. # PROCESS_OBJS = \ main.o # # All of the object files. # ALL_OBJS = $(MODEL_OBJS) $(VIEW_OBJS) $(PROCESS_OBJS) # # Other object files # GBT_OBJS = \ grblock-test.o # # Other object files GBLT_OBJS = \ grblock-link-test.o # # Relative paths to design and implementation directories. # DESIGN_DIR = .. IMPLE_DIR = .. # # 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 # # Note that on kdat, the SUN4K directory may not always exists. If it does # not, the SUN4G directory holds the executables. This is because # galaxy/phoenix executables will run on kdat, but in order to make native on # kdat, a different makefile is need to accomodate differences between kdat # and galaxy, such as absolute file paths. # PLATFORM = SUN4G # # Paths to relevant root project directories # LEVEL = work PROJECTS_DIR = /home/phoenix/faculty1/gfisher/projects/$(LEVEL) 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 -lg++ -lgen # # Compilation flags and related definitions # CFLAGS = -c -g \ -I$(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$(PROJECTS_INCLUDE_DIR) -I$(IV_INCLUDE_DIR) \ -Dgcc_2_6_3 # # Default definition to make. # default: box-arrow # # Build a complete tool. # box-arrow: $(ALL_OBJS) $(CC) $(LDFLAGS) $(ALL_OBJS) $(LIBS_g) -o box-arrow # # Build a graphics block test # grblock-test: $(GBT_OBJS) $(CC) $(LDFLAGS) $(GBT_OBJS) $(LIBS_g) -o grblock-test # # Build a graphics block link test # grblock-link-test: $(GBT_OBJS) $(CC) $(LDFLAGS) $(GBLT_OBJS) $(LIBS_g) -o grblock-link-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 all of the implemenation files. # %.o: $(IMPLE_DIR)/%.C $(CC) $(CFLAGS) $< %.E: $(IMPLE_DIR)/%.C $(CC) -E $(CFLAGS) $< > $*.E # # Delete all object files. # clean: rm -f *.o box-arrow # # 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_support print_design: csh -f -c "cd $(DESIGN_DIR); \ $(SUPPORT_DOC_DIR)/codeprint2.csh \ ../documentation/formatted-code \ box-arrow/design \ *.h" print_implementation: csh -f -c "cd $(IMPLE_DIR); \ $(SUPPORT_DOC_DIR)/codeprint2.csh \ ../documentation/formatted-code \ box-arrow/implementation \ *.C" 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. box-arrow-diagram.o: ../box-arrow-diagram.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/label.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/font-by-name.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/font.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/resource.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/defs.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/message.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/interactor.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/view.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/std-macros.h box-arrow-diagram.o: /usr/include/setjmp.h /usr/include/sys/feature_tests.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/model.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/iv-support.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/world.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/scene.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/color.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/graphic.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/base.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/painter.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/geomobjs.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/persistent.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/classes.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/ppaint.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/paint.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/brush.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/pattern.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/objman.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/pfile.h box-arrow-diagram.o: /usr/include/stdio.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/ref.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/reflist.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/grconstruct.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/picture.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/grblock.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/polygons.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/lines.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/perspective.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/frame.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/panner.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/sensor.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/event.h box-arrow-diagram.o: /usr/include/sys/types.h /usr/include/sys/isa_defs.h box-arrow-diagram.o: /usr/include/sys/machtypes.h /usr/include/sys/time.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/tray.h box-arrow-diagram.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/shape.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/grblock.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/interactor.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/defs.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/picture.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/base.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/painter.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/resource.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/geomobjs.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/persistent.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/classes.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/ppaint.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/paint.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/brush.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/color.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/font.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/pattern.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/objman.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/pfile.h grblock-test.o: /usr/include/stdio.h /usr/include/sys/feature_tests.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/ref.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/reflist.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/perspective.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/sensor.h grblock-test.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/event.h grblock-test.o: /usr/include/sys/types.h /usr/include/sys/isa_defs.h grblock-test.o: /usr/include/sys/machtypes.h /usr/include/sys/time.h main.o: ../box-arrow-diagram.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/label.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/font-by-name.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/font.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/resource.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/defs.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/message.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/interactor.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/view.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/std-macros.h main.o: /usr/include/setjmp.h /usr/include/sys/feature_tests.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/model.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/iv-support.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/world.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/scene.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/color.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/graphic.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/base.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/painter.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/geomobjs.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/persistent.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/classes.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/ppaint.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/paint.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/brush.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/pattern.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/objman.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/pfile.h main.o: /usr/include/stdio.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/ref.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/reflist.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/grconstruct.h main.o: /home/phoenix/faculty1/gfisher/projects/work/include/InterViews/Graphic/picture.h