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

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../../libs/lib -L${IRIS_ROOT}/libs/lib ${LPATH_X11}

IRISNET		= irisnet 
IRISNET_STAT	= irisnetstat

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

IRISNET_CC_SRCS =	irisNet.C \
		irisNetAS.C \
		irisNetApplShell.C \
		config.C \
		configDiag.C \
		rmtCmdStat.C \
		rmtCmdStatDiag.C \
		siteName.C \
		siteNameDiag.C \
		siteTools.C \
		siteToolsDiag.C \
		irisNetDraw.C \
		irisNetFunc.C \
		irisNetIPC.C \
		irisNetRmtCmd.C
IRISNET_CC_OBJS = $(IRISNET_CC_SRCS:.C=.o)


IRISNET_STAT_CC_SRCS	= irisNetStat.C \
			irisNetIPC.C 
IRISNET_STAT_CC_OBJS	= ${IRISNET_STAT_CC_SRCS:.C=.o}


LLIBS_NET	= -lXpm -luxsig -lbxutils -ltvsubs -lXm -lXt -lXmu -lX11 \
		-lfileformats -lsigaudio -luser \
		-lm ${LSEARCH_BSD}

LLIBS_STAT	= -lmisc -luser ${LNSL} -lm ${LSEARCH_BSD}

all_ :          $(IRISNET) $(IRISNET_STAT)

MKDEPEND_CSRCS =	${IRISNET_CC_SRCS} ${IRISNET_STAT_CC_SRCS}
depend:; $(MKDEPEND)

$(IRISNET): $(IRISNET_CC_OBJS) $(IRISNET_C_OBJS)
	@echo Linking    $(IRISNET)
	$(CXX) $(LD_OPT) $(IRISNET_CC_OBJS) $(IRISNET_C_OBJS) \
		$(LDFLAGS) $(LLIBS_NET) -o $(IRISNET)
	@rootchown root $(IRISNET)
	@rootchmod 6775 $(IRISNET)
	@rootchown operator *.rf
	@rootchmod 664 *.rf

$(IRISNET_STAT): $(IRISNET_STAT_CC_OBJS) $(IRISNET_STAT_C_OBJS)
	@echo Linking    $(IRISNET_STAT)
	$(CXX) $(LD_OPT) $(IRISNET_STAT_CC_OBJS) $(IRISNET_STAT_C_OBJS) \
		 $(LDFLAGS) $(LLIBS_STAT) -o $(IRISNET_STAT)
	@rootchown operator $(IRISNET_STAT)
	@rootchmod 775 $(IRISNET_STAT)

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

cleanexe:;	rm -f $(IRISNET) $(IRISNET_STAT) core
clean:		cleanexe 
		rm -f *.o
# DO NOT DELETE

irisNet.o: ../../include/sigtypes.h ../../include/signoarch.h
irisNet.o: ../../include/user_lib.h ../../include/uxsig_lib.h
irisNet.o: ../../include/audio_lib.h irisNetDefine.h irisNetDraw.h
irisNet.o: irisNetIPC.h irisNet.h irisNetApplShell.h
irisNetAS.o: ../../include/sigtypes.h ../../include/signoarch.h
irisNetAS.o: ../../include/user_lib.h ../../include/uxsig_lib.h
irisNetAS.o: ../../include/audio_lib.h ../../include/xpm_lib.h
irisNetAS.o: irisNetDefine.h irisNetDraw.h irisNetFunc.h irisNetIPC.h
irisNetAS.o: irisNetRmtCmd.h irisNet.h irisNetApplShell.h
irisNetApplShell.o: irisNetApplShell.h
config.o: ../../include/sigtypes.h ../../include/signoarch.h
config.o: ../../include/audio_lib.h ../../include/UxXt.h
config.o: ../../include/UxInterf.h irisNetDefine.h irisNet.h configDiag.h
configDiag.o: configDiag.h
rmtCmdStat.o: ../../include/sigtypes.h ../../include/signoarch.h
rmtCmdStat.o: ../../include/audio_lib.h ../../include/UxXt.h
rmtCmdStat.o: ../../include/UxInterf.h irisNetDefine.h irisNet.h
rmtCmdStat.o: rmtCmdStatDiag.h
rmtCmdStatDiag.o: rmtCmdStatDiag.h
siteName.o: ../../include/sigtypes.h ../../include/signoarch.h
siteName.o: ../../include/audio_lib.h ../../include/UxXt.h
siteName.o: ../../include/UxInterf.h irisNetDefine.h irisNet.h irisNetDraw.h
siteName.o: irisNetIPC.h siteNameDiag.h
siteNameDiag.o: siteNameDiag.h
siteTools.o: ../../include/sigtypes.h ../../include/signoarch.h
siteTools.o: ../../include/uxsig_lib.h ../../include/audio_lib.h
siteTools.o: ../../include/xpm_lib.h ../../include/UxXt.h
siteTools.o: ../../include/UxInterf.h irisNetDefine.h irisNet.h
siteTools.o: irisNetRmtCmd.h siteToolsDiag.h
siteToolsDiag.o: siteToolsDiag.h
irisNetDraw.o: ../../include/UxXt.h ../../include/UxInterf.h
irisNetDraw.o: ../../include/sigtypes.h ../../include/signoarch.h
irisNetDraw.o: ../../include/user_lib.h ../../include/xpm_lib.h
irisNetDraw.o: ../../include/fileformats_lib.h ../../include/tvsubs_lib.h
irisNetDraw.o: ../../include/uxsig_lib.h ../../include/audio_lib.h
irisNetDraw.o: irisNetDefine.h irisNet.h irisNetIPC.h irisNetRmtCmd.h
irisNetDraw.o: irisNetDraw.h
irisNetFunc.o: ../../include/UxXt.h ../../include/UxInterf.h
irisNetFunc.o: ../../include/sigtypes.h ../../include/signoarch.h
irisNetFunc.o: ../../include/audio_lib.h irisNetDefine.h irisNet.h
irisNetFunc.o: irisNetFunc.h
irisNetIPC.o: ../../include/UxXt.h ../../include/UxInterf.h
irisNetIPC.o: ../../include/sigtypes.h ../../include/signoarch.h
irisNetIPC.o: ../../include/event_flags.h ../../include/user_lib.h
irisNetIPC.o: irisNetDefine.h irisNetIPC.h
irisNetRmtCmd.o: ../../include/UxXt.h ../../include/UxInterf.h
irisNetRmtCmd.o: ../../include/sigtypes.h ../../include/signoarch.h
irisNetRmtCmd.o: ../../include/user_lib.h ../../include/audio_lib.h
irisNetRmtCmd.o: irisNetDefine.h irisNetFunc.h irisNet.h irisNetRmtCmd.h
irisNetStat.o: ../../include/sigtypes.h ../../include/signoarch.h
irisNetStat.o: ../../include/signetwork.h ../../include/headers.h
irisNetStat.o: ../../include/product.h ../../include/user_lib.h
irisNetStat.o: ../../include/misc_lib.h irisNetDefine.h irisNetIPC.h
irisNetIPC.o: ../../include/UxXt.h ../../include/UxInterf.h
irisNetIPC.o: ../../include/sigtypes.h ../../include/signoarch.h
irisNetIPC.o: ../../include/event_flags.h ../../include/user_lib.h
irisNetIPC.o: irisNetDefine.h irisNetIPC.h
