# # @(#)customer-svr4.mk 1.6 93/01/26 SMI # User Makefile for the OSF Motif Demo sample sources # Requires SunOS 5.x (or later) Make(1). # # # Environment set up # # If OPENWINHOME is not set, default to /usr/openwin for the location of # OpenWindows OPENWINHOME:sh = echo ${OPENWINHOME:-/usr/openwin} X11HOME = ${OPENWINHOME} # If MOTIFHOME is not set, default to /opt/SUNWmotif for the location of # Motif MOTIFHOME:sh = echo ${MOTIFHOME:-/opt/SUNWmotif} # Logging compilation messages to file instead of console #LOGGING = 2> $@.errlog > $@.errlog MACH:sh = uname -m | sed -e 's/sun4.*/sun4/' # The UID.${MACH} definition determines if # the uil file will be compiled #UID.prep = periodic.${MACH}.uid UID.prep = UID.i86pc = periodic.${MACH}.uid UID.sun4 = periodic.${MACH}.uid # # Source package description # COMMAND = periodic OBJ = periodic.o SDKcolormap.o UIDFILE = periodic.${MACH}.uid DEFINES = -Dsun # -DDEBUG if debugging output is desired LIBRARIES = -lXm -lMrm -lXt -lX11 -lsocket -lgen -lnsl # # Derived macros # INCLUDES = -I${X11HOME}/include -I${MOTIFHOME}/include CPPFLAGS += ${DEFINES} ${INCLUDES} CFLAGS += -O # -g for debugging # # The CPP symbol "SDK_COLORMAP" indicates that the demo should use the # same colormap as the rest of the demos in the SDK demo suite # CPPFLAGS += -DUID_FILE_NAME="\"$(UIDFILE)\"" -DSDK_COLORMAP LIBDIRS = -L$(X11HOME)/lib -L$(MOTIFHOME)/lib -L/usr/ccs/lib LDFLAGS = $(LIBDIRS) $(LIBRARIES) # # Rule sets # # # UIL suffix rules # .SUFFIXES : .uil .uid all: NOTE.${MACH} ${COMMAND} $(UID.${MACH}) $(UID.$(MACH)): periodic.uil $(MOTIFHOME)/bin/uil -o $(UIDFILE) periodic.uil .c.o: $(COMPILE.c) $(OUTPUT_OPTION) $< $(LOGGING) NOTE.prep: @echo " " @echo "To build this demo, you must have Motif installed." @echo " " @echo "If this build fails, check that you have Motif installed" @echo "and that you have your MOTIFHOME set properly." @echo " " @echo "You must have the SUNWmfdev package to compile" @echo "the uil file. If you wish to compile the uil file" @echo "the line:" @echo " UID.prep =" @echo "should be commented out and the line " @echo " UID.prep = periodic.${MACH}.uid" @echo "should be uncommented." NOTE.sun4: @echo " " @echo "To build this demo, you must have Motif installed." @echo " " @echo "If this build fails, check that you have Motif installed" @echo "and that you have your MOTIFHOME set properly." @echo " " NOTE.i86pc: @echo " " @echo "To build this demo, you must have Motif installed." @echo " " @echo "If this build fails, check that you have Motif installed" @echo "and that you have your MOTIFHOME set properly." @echo " " #${COMMAND}: $(OBJ) $(UIDFILE) ${COMMAND}: $(OBJ) $(CC) $(CFLAGS) $(CPPFLAGS) $(OBJ) $(LDFLAGS) -o $@ clean: rm -f $(OBJ) $(UIDFILE) ${COMMAND} *.errlog # end of Makefile.customer #