
CXXFLAGS= -c ${OPTIMIZEFLAG} ${CC_OPT} -D${MACH_OS} \
        -I./ -I../../include -I${IRIS_ROOT}/include
CCFLAGS = ${CXXFLAGS}


CPPMSG= -DMESSAGE_ONLY -I./ -I${IRIS_ROOT}/iris/output

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

OUTPUT_C_SRCS =		inord_copy.C \
			isend_to_display.C \
			isend_to_network.C \
			out_net_tcpip.C \
			output_state.C \
			window_subs.C

OUTPUT_C_OBJS = ${OUTPUT_C_SRCS:.C=.o}


LLIBS = -lout -lshare -lmisc -ldsp -lprivate -lconfig -ltvsubs -lvtv \
	-llink -lfileformats ${LTIFF} ${LJPEG} -lmaps -lhimath \
        -luser -lnordrad -lm ${LSEARCH_BSD}

EXES = output

all:	${EXES} test_c test_run

MKDEPEND_CSRCS = output.C test_c.C ${OUTPUT_C_SRCS}
depend: makefile.d

makefile.d:
	touch makefile.d
	makedepend -fmakefile.d -- ${CXXFLAGS} -- ${MKDEPEND_CSRCS} 

output: output.o ${OUTPUT_C_OBJS}
		${CXX} ${LD_OPT} output.o ${OUTPUT_C_OBJS}  \
			 ${LDFLAGS} ${LLIBS} -o output
		rootchown operator output ; rootchmod 6775 output

test_c: test_c.o 
		${CXX} ${LD_OPT} test_c.o -o test_c
		rootchmod 775 test_c ; rootchown operator test_c

test_run:	test_c
		test_c ; touch test_run

install: all
		rootcp -p ${EXES} ${IRIS_BIN}
		( cd ${IRIS_BIN} ; \
		  strip ${EXES} ; \
		  rootchown operator ${EXES} ; \
		  rootchmod 6775 ${EXES} ; \
		)

cleanexe:;	rm -f ${EXES} test_c core
clean:		cleanexe
		rm -f *.o *.usg *.cat* *.d *.d.bak test_run

-include makefile.d
