#### # # This is a sample Makefile for building with the IdrawInterface class library. # It builds a simple testing program in idraw-interface-main, and links to the # pre-compiled idraw-interface library in ~gfisher/projects/alpha/lib/ # libidraw-interface.a. # # IMPORTANT NOTES for building with the idraw-interface lib: # # 1) Update the Makefile to use the idraw-interface pre-compiled library. # To see how this is done in this sample Makefile, search for the lines # commented with "NEW" below. # # 2) When including idraw-related .h files, prefix the file in the include # directive with "idraw", as in # # #include # # # # Model object files. N.A. -- this is a simple testing program. # MODEL_OBJS = # # View object files. N.A. -- this is a simple testing program. # VIEW_OBJS = # # Process object files. # PROCESS_OBJS = \ idraw-interface-main+.o # # All of the object files. # ALL_OBJS = $(MODEL_OBJS) $(VIEW_OBJS) $(PROCESS_OBJS) # # Relative paths to design and implementation directories. # DESIGN_DIR = ../../design 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 # RELEASE = projects/alpha PROJECTS_DIR = /home/phoenix/faculty1/gfisher/$(RELEASE) PROJECTS_INCLUDE_DIR = $(PROJECTS_DIR)/include PROJECTS_LIB_DIR = $(PROJECTS_DIR)/lib/$(PLATFORM) # # Paths to relevant projects/support directories for various support functions, # such as source code printing. # SUPPORT_DIR = $(PROJECTS_DIR)/support SUPPORT_DOC_DIR = $(SUPPORT_DIR)/documentation SUPPORT_ADMIN_DIR = $(SUPPORT_DIR)/administration # # 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_GRAPHICS_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. # IDRAW_INTERFACE_LIB = -lidraw-interface # NEW 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$(PROJECTS_INCLUDE_DIR) -I$(IV_INCLUDE_DIR) \ -Dgcc_2_6_3 LDFLAGS = -g -L/usr/openwin/lib -L$(PROJECTS_LIB_DIR) CC = g++ GCC = gcc LIBS = $(IV_LIBS) $(X_LIB) $(OTHER_LIBS) LIBS_g = -L. $(IDRAW_INTERFACE_LIB) $(IV_LIBS_g) $(X_LIB) $(OTHER_LIBS) # NEW: ^^^^^^^^^^^^^^^^^^^^^^ DEPEND_SRCS = $(IMPLE_DIR)/*.C DEPEND_FLAGS = -I$(DESIGN_DIR) -I$(PROJECTS_INCLUDE_DIR) -I$(IV_INCLUDE_DIR) \ -Dgcc_2_6_3 \ -I/opt/gnu/include/g++ -I/opt/gnu/sparc-sun-solaris2.6/include # # Default definition to make. # default: idraw-interface-main+ # # Build a complete tool. # idraw-interface-main+: $(ALL_OBJS) $(CC) $(LDFLAGS) $(ALL_OBJS) $(LIBS_g) -o idraw-interface-main+ # # 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 implemenation files. # %.o: $(IMPLE_DIR)/%.C $(CC) $(CFLAGS) $< %.E: $(IMPLE_DIR)/%.C $(CC) -E $(CFLAGS) $< > $*.E # # Delete all object files. # clean: rm -f idraw-interface-main.o idraw-interface-main # # Generate dependencies using makedepend. # depend: $(DEPEND_SRCS) makedepend $(DEPEND_FLAGS) -fsample-Makefile $? # DO NOT DELETE THIS LINE -- make depend depends on it. ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/quit-exception.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/std-macros.h ../idraw-interface-main.o: /usr/include/setjmp.h ../idraw-interface-main.o: /usr/include/sys/feature_tests.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/iv-support.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/world.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/scene.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/interactor.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/defs.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/box.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/button.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/subject.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/resource.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/event.h ../idraw-interface-main.o: /usr/include/sys/types.h ../idraw-interface-main.o: /usr/include/sys/isa_defs.h ../idraw-interface-main.o: /usr/include/sys/machtypes.h ../idraw-interface-main.o: /usr/include/sys/int_types.h ../idraw-interface-main.o: /usr/include/sys/select.h /usr/include/sys/time.h ../idraw-interface-main.o: /usr/include/sys/time.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/idraw/idraw-interface.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/idraw/drawing.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/idraw/idraw.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/idraw/editor.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/idraw/selection.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/Graphic/picture.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/Graphic/base.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/painter.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/Graphic/geomobjs.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/Graphic/persistent.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/Graphic/classes.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/Graphic/ppaint.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/paint.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/brush.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/color.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/font.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/pattern.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/Graphic/objman.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/Graphic/pfile.h ../idraw-interface-main.o: /usr/include/stdio.h /usr/include/sys/va_list.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/Graphic/ref.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/InterViews/Graphic/reflist.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/idraw/listselectn.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/idraw/list.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/view.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/model.h ../idraw-interface-main.o: /home/phoenix/faculty1/gfisher/projects/alpha/include/idraw/default-idraw-properties.h