#########################################################################
#
#########################################################################

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	= Install

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

INSTALL_CC_SRCS	= install.C \
		installAS.C \
		installApplShell.C \
 		stat.C \
 		statDiag.C \
 		err.C \
 		errDiag.C \
 		installFunc.C 
INSTALL_CC_OBJS    = ${INSTALL_CC_SRCS:.C=.o}

LLIBS            = -luxsig -lbxutils -lXm -lXt -lX11 -luser -lm  ${LSEARCH_BSD}


all_ :		$(EXECUTABLE)


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


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

install:        $(EXECUTABLE)
		rootcp -p install ${IRIS_ROOT}/install
		rootcp -p install.rf ${IRIS_ROOT}/install/install.rf
		( cd ${IRIS_ROOT}/install ; strip install ; \
		  rootchown operator install    ; rootchmod 775 install ; \
		  rootchown operator install.rf ; rootchmod 664 install.rf)
		rootcp get_manuals    ${IRIS_ROOT}/install
		rootcp instiris       ${IRIS_ROOT}/install
		rootcp make_release   ${IRIS_ROOT}/install
		rootcp make_iris_tape ${IRIS_ROOT}/install
		rootcp prepare ${IRIS_ROOT}/install
		( cd  ${IRIS_ROOT}/install ; \
		  rootchown operator get_manuals    ; rootchmod 775 get_manuals ; \
		  rootchown operator instiris       ; rootchmod 775 instiris ; \
		  rootchown operator make_release   ; rootchmod 775 make_release ; \
		  rootchown operator make_iris_tape ; rootchmod 775 make_iris_tape ; \
		  rootchown operator prepare        ; rootchmod 775 prepare )

cleanexe:;	rm -f install core
clean:		cleanexe
		rm -f *.o



# DO NOT DELETE

install.o: ../../include/sigtypes.h ../../include/signoarch.h
install.o: ../../include/user_lib.h ../../include/UxXt.h
install.o: ../../include/UxInterf.h install.h installApplShell.h
installAS.o: ../../include/UxXt.h ../../include/UxInterf.h
installAS.o: ../../include/sigtypes.h ../../include/signoarch.h
installAS.o: installApplShell.h install.h
installApplShell.o: installApplShell.h
stat.o: ../../include/UxXt.h ../../include/UxInterf.h
stat.o: ../../include/sigtypes.h ../../include/signoarch.h install.h
stat.o: statDiag.h
statDiag.o: statDiag.h
err.o: ../../include/UxXt.h ../../include/UxInterf.h ../../include/sigtypes.h
err.o: ../../include/signoarch.h install.h errDiag.h
errDiag.o: errDiag.h
installFunc.o: ../../include/UxXt.h ../../include/UxInterf.h
installFunc.o: ../../include/sigtypes.h ../../include/signoarch.h
installFunc.o: ../../include/headers.h ../../include/user_lib.h install.h
