CFLAGS= -c  ${DEBUGFLAG}  ${C_OPT} -D${MACH_OS} \
        -I./  -I../../include -I${IRIS_ROOT}/include

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

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

SETUP	  = setup

EXECS = ${SETUP}

C_SRCS =	setup.C \
		support.C \
		rcp_setup.C \
		dsp_setup.C \
		ingest_setup.C \
		iris_general_setup.C \
		input_setup.C \
		license_setup.C \
		output_setup.C \
		product_setup.C \
		web_setup.C
C_OBJS = ${C_SRCS:.C=.o}

LLIBS=  -lxsig -lXpm -lXm -lXt -lX11 -lmisc -lconfig -luser -lm ${LSEARCH_BSD}

all:            ${EXECS}

MKDEPEND_CSRCS = ${C_SRCS}
depend: makefile.d

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

${SETUP}:	${C_OBJS}
		${CXX} ${LD_OPT} ${C_OBJS} ${LDFLAGS} ${LLIBS} -o ${SETUP}
		@rootchown operator ${SETUP}
		@rootchmod 775 ${SETUP}

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



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

-include makefile.d
