# # @(#)Makefile.fcs 4.1 95/10/03 SMI # # Makefile for the demo directory # # Makefile to build XGL 3.2 demo 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} # programs in this directory PROGS = \ install_check # Compile and link flags # put -g in CFLAGS_LOCAL for debug version # put any SVr4-specific compile switches in CFLAGS5 CFLAGS_LOCAL = CFLAGS5 = CFLAGS = $(CFLAGS_LOCAL) $(CFLAGS$(OSVER)) CPPFLAGS = -I$(OPENWINHOMELIB)/include -I$(XGLHOMELIB)/include XGL_BIND = -Bdynamic XGL_LIB = -lxgl SYS_LIBS = -lxview -lolgx -lX11 LINK_DIRS = -L. -L$(OPENWINHOMELIB)/lib -L$(XGLHOMELIB)/lib # # Library Dependency # xgllib-Bdynamic: FRC # # Force Re-Compliation # FRC: @echo "forcing remake" NONE: # dummy target that always succeeds quietly # Removes .o's .nse stuff and .make_state clean: -@rm -rf .sb -@rm -f *.o .nse* .make_state -@if [ "$(SUBDIRS)" != "NONE" ]; then \ for i in $(SUBDIRS) ; do \ ( cd $$i; \ echo "Cleaning up: `pwd`" ; \ $(MAKE) clean ); \ done; \ fi all: $(PROGS) #opt executable $(PROGS): $$@.o -@echo XGLHOME = $(XGLHOMELIB); $(LINK.c) \ $@.o $(LINK_DIRS) $(XGL_BIND) $(XGL_LIB) \ -R /opt/SUNWits/Graphics-sw/xgl/lib:/usr/openwin/lib \ -Bdynamic $(SYS_LIBS) -o $@