#
CC=gcc
CCFLAGS=-O
CFLAGS=$(CCFLAGS) -I. -I../include
LINTFLAGS=-I. -I../include -hbz -Cdatlink
AR=ar
SRCS=clock.c close.c cubits.c dsp.c dsprw.c mode.c open.c read.c remote.c serial.c \
     sendmsg.c status.c write.c seekread.c params.c perror.c reload.c
OBJS=clock.o close.o cubits.o dsp.o dsprw.o mode.o open.o read.o remote.o serial.o \
     sendmsg.o status.o write.o seekread.o params.o perror.o reload.o

all : libdatlink.a

libdatlink.a : $(OBJS)
	$(AR) cr libdatlink.a $(OBJS)
	(ranlib libdatlink.a) >/dev/null 2>&1 || true

$(OBJS): ../Configuration

install : all $(INSTALLROOT)/lib $(INSTALLROOT)/lib/libdatlink.a

$(INSTALLROOT)/lib :
	if	 test ! -d $(INSTALLROOT)/lib; \
	then	rm -rf $(INSTALLROOT)/lib && mkdir $(INSTALLROOT)/lib  		  \
	||  true; \
	fi

$(INSTALLROOT)/lib/libdatlink.a : libdatlink.a
	{ cp libdatlink.a $(INSTALLROOT)/lib/libdatlink.a 2>/dev/null   \
	;} || true
	(ranlib $(INSTALLROOT)/lib/libdatlink.a) >/dev/null 2>&1 || true


clean :
	rm -f $(OBJS) libdatlink.a llib-ldatlink.ln

lint : llib-ldatlink.ln

llib-ldatlink.ln: $(SRCS)
	lint $(LINTFLAGS) $(SRCS)
clock.o: clock.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h
close.o: close.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h
cubits.o: cubits.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h
dsp.o: dsp.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h ../include/pgm.h \
 ../include/support.h ../include/pgmspecs.h
mode.o: mode.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h
dsprw.o: dsprw.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h ../include/support.h
open.o: open.c ../include/naversion.h libdefs.h ../include/sysdefs.h \
 ../include/pmacro.h ../include/dat_types.h ../include/syscap.h \
 ../include/sysdecls.h ../include/datlink.h ../include/dat_errno.h \
 ../include/host_if.h ../include/dsp_mode.h ../include/debug.h \
 ../include/defaults.h
read.o: read.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h ../include/support.h
remote.o: remote.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h ../include/dat_remote.h \
 ../include/defaults.h
sendmsg.o: sendmsg.c libdefs.h ../include/sysdefs.h \
 ../include/pmacro.h ../include/dat_types.h ../include/syscap.h \
 ../include/sysdecls.h ../include/datlink.h ../include/dat_errno.h \
 ../include/host_if.h ../include/dsp_mode.h ../include/debug.h \
 ../include/support.h
status.o: status.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h ../include/support.h
write.o: write.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h ../include/support.h
seekread.o: seekread.c libdefs.h ../include/sysdefs.h \
 ../include/pmacro.h ../include/dat_types.h ../include/syscap.h \
 ../include/sysdecls.h ../include/datlink.h ../include/dat_errno.h \
 ../include/host_if.h ../include/dsp_mode.h ../include/debug.h
params.o: params.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h
perror.o: perror.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h
reload.o: reload.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h ../include/defaults.h
serial.o: serial.c libdefs.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/datlink.h ../include/dat_errno.h ../include/host_if.h \
 ../include/dsp_mode.h ../include/debug.h
