# # @(#)Makefile.fcs 4.1 95/10/03 SMI # # Makefile for demo/examples directory # # Makefile to build XGL 3.2 example programs. # # If OpenWindows and XGL are not in their default # locations, then the environment variables OPENWINHOME # and XGLHOME must be set before using this Makefile. # Default locations: # # OpenWindows - /usr/openwin # XGL 3.2 - /opt/SUNWits/Graphics-sw/xgl # .KEEP_STATE: # to get OS major version number...for differences # between 4.x and SVr4 OSVER:sh=/usr/bin/uname -r | /usr/bin/cut -f1 -d. # to set up a default for XGLHOME XGLHOMELIB:sh=echo ${XGLHOME-/opt/SUNWits/Graphics-sw/xgl} # to set up a default for OPENWINHOME OPENWINHOMELIB:sh=echo ${OPENWINHOME-/usr/openwin} CFLAGS = -g INCFLAGS = -I$(OPENWINHOMELIB)/include -I$(XGLHOMELIB)/include -I/usr/dt/include CPPFLAGS_5 = -D__SVR4__ $(INCFLAGS) CPPFLAGS = $(CPPFLAGS_$(OSVER)) XGL_LIB = -lxgl SYS_LIBS = -lXol -lXt -lxview -lolgx -lX11 -ldga -ldl OS_LIBS_5 = -lintl -lnsl -lsocket OS_LIBS = $(OS_LIBS_$(OSVER)) LIBS = -L$(OPENWINHOMELIB)/lib -L$(XGLHOMELIB)/lib \ $(XGL_LIB) $(SYS_LIBS) $(OS_LIBS) -lm # # Progams using the example utility package # EX_PROGS = prims_2d tran light dcue view color nurbs lpat pick_2d gspixel EX_PROGS += copy_raster gcache # # EX_FILES gets set depending on which program is being made # EX_FILES = prims_2d := EX_FILES = prims_2d_main.c prims_2d_pgon.c \ prims_2d_marker.c prims_2d_umarker.c \ prims_2d_circle.c prims_2d_rect.c tran := EX_FILES = tran_main.c tran_2d_orig.c tran_2d_transl.c \ tran_2d_rot.c tran_2d_scale.c tran_3d.c light := EX_FILES = light_main.c light_facet.c light_vertex.c dcue := EX_FILES = dcue_main.c dcue_linear.c dcue_scaled.c color_show.c view := EX_FILES = view_main.c view_perspect.c color := EX_FILES = color_main.c color_simple.c color_ramp.c \ color_dbuf.c color_show.c nurbs := EX_FILES = nurbs_main.c \ nurbs_circle.c nurbs_bezier.c \ nurbs_sphere.c lpat := EX_FILES = lpat_main.c lpat_lines.c lpat_pgon_edges.c pick_2d := EX_FILES = pick_2d_main.c pick_2d_prims.c gspixel := EX_FILES = gspixel_main.c gspixel.c copy_raster := EX_FILES = copy_raster_main.c copy_raster.c gcache := EX_FILES = gcache_main.c gcache_nsi_pgon.c gcache_complex_pgon.c $(EX_PROGS): $$(EX_FILES:%.c=%.o) ex_utils.o $(LINK.c) $(EX_FILES:%.c=%.o) ex_utils.o $(LIBS) \ -R /opt/SUNWits/Graphics-sw/xgl/lib:/usr/openwin/lib:/usr/ucblib \ -o $@ # # Example programs that do not use the ex_utils package but its own util # raster_text : $$@.o $$@_util.o $(LINK.c) $@.o $@_util.o $(LIBS) \ -R /opt/SUNWits/Graphics-sw/xgl/lib:/usr/openwin/lib:/usr/ucblib \ -o $@ color_cube_motif: $$@.o $(LINK.c) $@.o -L$(OPENWINHOMELIB)/lib -L$(XGLHOMELIB)/lib \ -L/usr/dt/lib \ -lxgl -lXm -lXt -lXext -lX11 -lm -lnsl -lgen -lsocket \ -R /opt/SUNWits/Graphics-sw/xgl/lib:/usr/openwin/lib:/usr/dt/lib:/usr/ucblib \ -o $@ transparency_ovl: $$@.o $(LINK.c) $@.o -L$(OPENWINHOMELIB)/lib -L$(XGLHOMELIB)/lib \ -lxgl -ldga -lXol -lXt -lxview -lolgx -lX11 -lXext -lm -ldl \ -R /opt/SUNWits/Graphics-sw/xgl/lib:/usr/openwin/lib \ -o $@ # # Example programs that do not use the ex_utils package # PROGS = ow_xview ow_xlib ow_olit ow_memras_xlib hello_world inq stroke_text \ texture color_cube $(PROGS): $$@.o $(LINK.c) $@.o $(LIBS) \ -R /opt/SUNWits/Graphics-sw/xgl/lib:/usr/openwin/lib:/usr/ucblib \ -o $@ # # Generic targets # all: $(PROGS) $(EX_PROGS) raster_text color_cube_motif transparency_ovl clean: rm -f *.o $(PROGS) $(EX_PROGS) raster_text color_cube_motif transparency_ovl default: @echo "XGL example programs" @echo "make one of:" @echo " $(PROGS) $(EX_PROGS) raster_text color_cube_motif transparency_ovl" @echo "or all" echo_all: @echo $(PROGS) $(EX_PROGS) raster_text color_cube_motif transparency_ovl