#########################################################################
#
#       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: 2005/06/03 16:01:26 $ 		$Revision: 808.1 $
#########################################################################

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}

CFLAGS_RELAXED  = -c ${DEBUGFLAG} ${C_OPT_RELAXED}  ${CFLAGS_ALL}
CCFLAGS_RELAXED = -c ${DEBUGFLAG} ${CC_OPT_RELAXED} ${CFLAGS_ALL}

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

LANGUAGE        = C++
EXECUTABLE	= pview
MAIN		= pView.C

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

INTERFACES	= pViewApplShell.C \
	fileSelectDiag.C 


pViewApplShell.o   : pViewApplShell.C
	${CXX} ${CCFLAGS_RELAXED} pViewApplShell.C
fileSelectDiag.o   : fileSelectDiag.C
	${CXX} ${CCFLAGS_RELAXED} fileSelectDiag.C

APPL_SRCS       = pViewDraw.C
APPL_OBJS       = ${APPL_SRCS:.C=.o}

MISC_CC_SRCS    = 
MISC_CC_OBJS    = ${MISC_CC_SRCS:.C=.o}


PVIEW_C_SRCS = $(MAIN) $(INTERFACES) $(APPL_SRCS) $(MISC_CC_SRCS)
PVIEW_C_OBJS = $(MAIN:.C=.o) $(INTERFACES:.C=.o) \
                $(APPL_OBJS) $(MISC_CC_OBJS)


LLIBS           = -luxsig -ltvsubs -lXpm -lXm -lXt -lX11 \
                  -lmisc -lvtv -lfileformats ${LTIFF} ${LJPEG} \
	  	  -lconfig -luser -lm  ${LSEARCH_BSD}


all_ :		$(EXECUTABLE)


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


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

install:	$(EXECUTABLE) $(CLNT_RECV)
		rootcp -p $(EXECUTABLE) ${IRIS_BIN}
		cat *.rf > temp.rf
		rootcp -p temp.rf $(IRIS_APP_DEFAULTS)$(EXECUTABLE)
		rootcp -p temp.rf /usr/lib/X11/app-defaults/$(EXECUTABLE)
		rm temp.rf
		( 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

pView.o: ../../include/sigtypes.h ../../include/signoarch.h
pView.o: ../../include/headers.h ../../include/setup.h ../../include/UxXt.h
pView.o: ../../include/UxInterf.h pView.h
pViewApplShell.o: ../../include/UxXt.h ../../include/UxInterf.h
pViewApplShell.o: ../../include/sigtypes.h ../../include/signoarch.h
pViewApplShell.o: ../../include/setup.h ../../include/headers.h
pViewApplShell.o: ../../include/output.h ../../include/product.h
pViewApplShell.o: ../../include/user_lib.h ../../include/uxsig_lib.h
pViewApplShell.o: ../../include/xpm_lib.h pView.h
fileSelectDiag.o: ../../include/UxXt.h ../../include/UxInterf.h
fileSelectDiag.o: ../../include/sigtypes.h ../../include/signoarch.h pView.h
pViewDraw.o: ../../include/sigtypes.h ../../include/signoarch.h
pViewDraw.o: ../../include/UxXt.h ../../include/UxInterf.h
pViewDraw.o: ../../include/headers.h ../../include/product.h
pViewDraw.o: ../../include/setup.h ../../include/user_lib.h
pViewDraw.o: ../../include/config_lib.h ../../include/misc_lib.h
pViewDraw.o: ../../include/tvsubs_lib.h ../../include/vtv_lib.h pView.h
