
LIB = ../lib/libdsp.a

LIBI = ../lib/libdspi.a

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

CPPMSG= -DMESSAGE_ONLY -I../../include -I${IRIS_ROOT}/include

all : ${LIB} ${LIBI} iris_signal101.cat

messages.usg : messages.msg
	${MKMSGUSG}

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

DSP_C_SRCS =	customops.c \
		dsp_iagc.c \
		dsp_info.c \
		dsp_open.c \
		dsp_open_for_io.c \
		dsp_read.c \
		dsp_set_prf.c \
		dsp_start.c \
		dsp_strings.c \
		dsp_write.c \
		dspi_mask.c \
		dspr_subs.c \
		DspResetFifo.c \
		dspw_subs.c \
		fradar_constant.c \
		intelhex.c \
		ireadtrigload.c \
		OpenSocket.c \
		stc_table.c \
		trig_wform_gen.c
DSP_C_OBJS = ${DSP_C_SRCS:.c=.o}

DSPI_C_SRCS =	dsp_info.c \
		dsp_open.c \
		dsp_strings.c \
		dspi_mask.c \
		fradar_constant.c \
		intelhex.c \
		OpenSocket.c \
		stc_table.c \
		trig_wform_gen.c
DSPI_C_OBJS = ${DSPI_C_SRCS:.c=.o}

MKDEPEND_CSRCS = ${DSP_C_SRCS} ${DSPI_C_SRCS}
depend: makefile.d

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

${LIB} : ${DSP_C_OBJS} 
		rm -f ${LIB}
		$(AR) -rsc ${LIB} ${DSP_C_OBJS}
		rootchmod 664 ${LIB}

${LIBI} : ${DSPI_C_OBJS} ${DSPI_F_OBJS}
		rm -f ${LIBI}
		$(AR) -rsc ${LIBI} ${DSPI_C_OBJS}
		rootchmod 664 ${LIBI}

install : all
		cp iris_signal101.cat* ${IRIS_NLS}

cleanexe:;	rm -f core
clean:		cleanexe
		rm -f *.o *.usg *.cat* *.d *.d.bak

-include makefile.d
