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

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


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

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

NORDRAD_C_SRCS =	nordrad.C \
			nor_convert.C


NORDRAD_C_OBJS = ${NORDRAD_C_SRCS:.C=.o}

LLIBS = -lshare -lmisc -ldspi -lhimath -luser -lnordrad -lm ${LSEARCH_BSD}

EXES = nordrad nor_examine

all:	${EXES} iris_signal217.cat

messages.usg : messages.msg
	${MKMSGUSG}

iris_signal217.cat : messages.usg
	rm -f iris_signal217.cat*
	gencat iris_signal217.cat messages.usg
	chmod 664 iris_signal217.cat*

MKDEPEND_CSRCS = ${NORDRAD_C_SRCS} nor_examine.C
depend: makefile.d

makefile.d:
	touch makefile.d
	makedepend -fmakefile.d -- ${CFLAGS} -- ${MKDEPEND_CSRCS} 
	makedepend -fmakefile.d -a -o.usg -- ${CPPMSG} -- messages.msg

nordrad: ${NORDRAD_C_OBJS}
		${CXX} ${LD_OPT} ${NORDRAD_C_OBJS} \
			 ${LDFLAGS} ${LLIBS} -o nordrad
		rootchown operator nordrad ; rootchmod 6775 nordrad

nor_examine: nor_examine.o nor_convert.o
		${CXX} ${LD_OPT} nor_examine.o nor_convert.o \
			${LDFLAGS} ${LLIBS} -o nor_examine
		rootchown operator nor_examine ; rootchmod 775 nor_examine

install: all
		rootcp -p ${EXES} ${IRIS_BIN}
		( cd ${IRIS_BIN} ; \
		  strip ${EXES} ; \
		  rootchown operator ${EXES} ; \
		  rootchmod 6775 nordrad ; \
		  rootchmod  775 nor_examine ; \
		)
		cp iris_signal217.cat* ${IRIS_NLS}

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

-include makefile.d
