#########################################################################
#
#       MAKEFILE FOR STAND-ALONE XT CODE APPLICATION.  
#
#       EXECUTABLE      is the name of the executable to be created 
#       MAIN            is the .c file containing your main() function 
#       INTERFACES      is a list of the generated C code files
#       APP_OBJS        is a (possibly empty) list of the object code
#                       files that form the non-interface portion of
#                       your application
#
#       In the first three statements, the variables on the right 
#	of the equal sign will be replaced with their corresponding
#       values when the makefile is automatically generated.
#
#       This template is used for makefiles which do not reference 
#       the Ux runtime library.
#
#  	$Date: 2004/10/19 21:33:45 $ 		$Revision: 806.3 $
#########################################################################

CFLAGS_ALL	= -D${MACH_OS} -DMOTIF -DSYSV -DXT_CODE -DXOPEN_CATALOG \
                  -I./  -I../../include -I${IRIS_ROOT}/include

CFLAGS		= -c ${DEBUGFLAG} ${C_OPT}  ${CFLAGS_ALL}
CXXFLAGS        = -c ${DEBUGFLAG} ${CC_OPT} ${CFLAGS_ALL}
CCFLAGS = ${CXXFLAGS}

LDFLAGS         = -L./ \
		  -L../../libs/lib -L${IRIS_ROOT}/libs/lib ${LPATH_X11}

EXECUTABLE	= utils

all : all_	# Just to insure that it's first

UTILS_CC_SRCS	=	utils.C \
		utilsAS.C \
		utilsApplShell.C \
		utilsFunc.C
UTILS_CC_OBJS	=	${UTILS_CC_SRCS:.C=.o}

LLIBS            = -luxsig -lbxutils -lXpm -lXm -lXt -lX11 -lconfig -luser \
                   -lfileformats -ltiff -ljpeg -lm ${LSEARCH_BSD} 

all_ :		$(EXECUTABLE)

MKDEPEND_CSRCS = ${UTILS_CC_SRCS}
depend:; $(MKDEPEND)

$(EXECUTABLE): $(UTILS_CC_OBJS)
	@echo Linking    $(EXECUTABLE)
	$(CXX) $(LD_OPT) $(UTILS_CC_OBJS) $(LDFLAGS) $(LLIBS) -o $(EXECUTABLE)
	@rootchown operator $(EXECUTABLE)
	@rootchmod 775 $(EXECUTABLE)
	@rootchown operator *.rf
	@rootchmod 664 *.rf

install:	$(EXECUTABLE)
		rootcp -p $(EXECUTABLE) ${IRIS_BIN}
		rootcp -p $(EXECUTABLE).rf $(IRIS_APP_DEFAULTS)$(EXECUTABLE)
		rootcp -p $(EXECUTABLE).rf /usr/lib/X11/app-defaults/$(EXECUTABLE)
		( cd ${IRIS_BIN} ; strip ${EXECUTABLE} ; \
		  rootchown operator ${EXECUTABLE} ; rootchmod 775 ${EXECUTABLE} )
		( cd ${IRIS_APP_DEFAULTS} ; \
		  rootchown operator ${EXECUTABLE} ; rootchmod 664 ${EXECUTABLE} )
		( cd /usr/lib/X11/app-defaults ; \
		  rootchown operator ${EXECUTABLE} ; rootchmod 664 ${EXECUTABLE} )


cleanexe:;	rm -f $(EXECUTABLE) core
clean:		cleanexe
		rm -f *.o


# DO NOT DELETE

utils.o: ../../include/sigtypes.h ../../include/signoarch.h
utils.o: ../../include/user_lib.h ../../include/UxXt.h
utils.o: ../../include/UxInterf.h utils.h utilsApplShell.h
utilsAS.o: ../../include/UxXt.h ../../include/UxInterf.h
utilsAS.o: ../../include/sigtypes.h ../../include/signoarch.h
utilsAS.o: ../../include/user_lib.h ../../include/uxsig_lib.h
utilsAS.o: ../../include/xpm_lib.h utils.h utilsApplShell.h
utilsApplShell.o: utilsApplShell.h
utilsFunc.o: ../../include/sigtypes.h ../../include/signoarch.h utils.h
