#
# Copyright 1992 Brent Townshend (bst%tt@cam.org)
# Townshend Computer Tools
# Montreal, Quebec
#
# Sat Jan 11 18:15:52 EST 1992
#
# Revision History: $Log: oldMakefile,v $
# Revision 1.13  1996/10/15  00:31:45  bst
# Corrected some filenames to match Makefile.
#
# Revision 1.12  1993/03/17  21:57:33  bst
# Removed .o dependencies
#
# Revision 1.11  1992/12/17  04:46:38  bst
# Added na_dsp.3
# Added dspio
#
# Revision 1.10  1992/05/17  20:33:32  bst
# Added dsp.c
#
# Revision 1.9  1992/03/06  01:25:25  bst
# Added na_info.3
#
# Revision 1.8  1992/02/15  19:50:19  bst
# Added pause_server.c
#
# Revision 1.7  1992/02/12  04:32:07  bst
# Added xdr_free.c
#
# Revision 1.6  1992/02/02  21:59:04  bst
# Changed 'clean' action.
#
# Revision 1.5  1992/01/30  06:10:42  bst
# Adde 'lint' target.
#
# Revision 1.4  1992/01/20  03:54:45  bst
# Grouped object files together as $(OBJ), shortened rules
# Made objects dependent on ../Configuration.
#
# Revision 1.3  1992/01/18  04:07:33  bst
# Removed INSTALLROOT definition
#
# Revision 1.2  1992/01/17  04:18:15  bst
# Added installation of manual pages.
#
# Revision 1.1  1992/01/11  23:16:31  bst
# Initial revision
#
CC=gcc
CCFLAGS=-O
CFLAGS=$(CCFLAGS) -I. -I../include
LINTFLAGS=-I. -I../include -hbz -Cnetaudio
AR=ar
OBJS=NAlibint.o event.o naopen.o naclose.o info.o misc.o nadsp.o dspio.o xdr_free.o \
     sampleio.o xdrio.o error.o names.o naremote.o na_xdr.o NAproto.o pause_server.o
SRCS=NAlibint.c event.c naopen.c naclose.c info.c misc.c nadsp.c dspio.c xdr_free.c \
     sampleio.c xdrio.c error.c names.c naremote.c na_xdr.c NAproto.c pause_server.c

all : libnetaudio.a

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

$(OBJS): ../Configuration

install : all $(INSTALLROOT)/lib $(INSTALLROOT)/lib/libnetaudio.a \
		$(INSTALLROOT)/man/man3 \
		$(INSTALLROOT)/man/man3/netaudio.3 \
		$(INSTALLROOT)/man/man3/na_remote.3 \
		$(INSTALLROOT)/man/man3/na_info.3 \
		$(INSTALLROOT)/man/man3/na_dsp.3 \
		$(INSTALLROOT)/man/man3/na_event.3


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

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

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

$(INSTALLROOT)/man/man3/netaudio.3 : netaudio.3
	{ cp netaudio.3 $(INSTALLROOT)/man/man3/netaudio.3 2>/dev/null \
	;} || true

$(INSTALLROOT)/man/man3/na_event.3 : na_event.3
	{ cp na_event.3 $(INSTALLROOT)/man/man3/na_event.3 2>/dev/null \
	;} || true

$(INSTALLROOT)/man/man3/na_remote.3 : na_remote.3
	{ cp na_remote.3 $(INSTALLROOT)/man/man3/na_remote.3 2>/dev/null \
	;} || true

$(INSTALLROOT)/man/man3/na_info.3 : na_info.3
	{ cp na_info.3 $(INSTALLROOT)/man/man3/na_info.3 2>/dev/null \
	;} || true

$(INSTALLROOT)/man/man3/na_dsp.3 : na_dsp.3
	{ cp na_dsp.3 $(INSTALLROOT)/man/man3/na_dsp.3 2>/dev/null \
	;} || true

clean :
	rm -f $(OBJS) libnetaudio.a llib-lnetaudio.ln

lint : llib-lnetaudio.ln

llib-lnetaudio.ln: $(SRCS)
	lint $(LINTFLAGS) $(SRCS)
NAlibint.o: NAlibint.c NAlibint.h ../include/sysdefs.h \
 ../include/pmacro.h ../include/dat_types.h ../include/syscap.h \
 ../include/sysdecls.h ../include/debug.h NAproto.h \
 ../include/netaudio.h na_xdr.h
event.o: event.c NAlibint.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/debug.h NAproto.h ../include/netaudio.h na_xdr.h
naopen.o: naopen.c NAlibint.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/debug.h NAproto.h ../include/netaudio.h na_xdr.h \
 ../include/naversion.h
naclose.o: naclose.c NAlibint.h ../include/sysdefs.h \
 ../include/pmacro.h ../include/dat_types.h ../include/syscap.h \
 ../include/sysdecls.h ../include/debug.h NAproto.h \
 ../include/netaudio.h na_xdr.h
info.o: info.c NAlibint.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/debug.h NAproto.h ../include/netaudio.h na_xdr.h \
 ../include/siomode.h
misc.o: misc.c NAlibint.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/debug.h NAproto.h ../include/netaudio.h na_xdr.h \
 ../include/support.h
sampleio.o: sampleio.c NAlibint.h ../include/sysdefs.h \
 ../include/pmacro.h ../include/dat_types.h ../include/syscap.h \
 ../include/sysdecls.h ../include/debug.h NAproto.h \
 ../include/netaudio.h na_xdr.h ../include/support.h
xdrio.o: xdrio.c NAlibint.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/debug.h NAproto.h ../include/netaudio.h na_xdr.h
error.o: error.c NAlibint.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/debug.h NAproto.h ../include/netaudio.h na_xdr.h
names.o: names.c NAlibint.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/debug.h NAproto.h ../include/netaudio.h na_xdr.h
naremote.o: naremote.c NAlibint.h ../include/sysdefs.h \
 ../include/pmacro.h ../include/dat_types.h ../include/syscap.h \
 ../include/sysdecls.h ../include/debug.h NAproto.h \
 ../include/netaudio.h na_xdr.h
pause_server.o: pause_server.c NAlibint.h ../include/sysdefs.h \
 ../include/pmacro.h ../include/dat_types.h ../include/syscap.h \
 ../include/sysdecls.h ../include/debug.h NAproto.h \
 ../include/netaudio.h na_xdr.h
nadsp.o: nadsp.c ../include/pgm.h ../include/pmacro.h \
 ../include/dat_types.h NAlibint.h ../include/sysdefs.h \
 ../include/syscap.h ../include/sysdecls.h ../include/debug.h \
 NAproto.h ../include/netaudio.h na_xdr.h
dspio.o: dspio.c NAlibint.h ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h \
 ../include/debug.h NAproto.h ../include/netaudio.h na_xdr.h
xdr_free.o: xdr_free.c ../include/sysdefs.h ../include/pmacro.h \
 ../include/dat_types.h ../include/syscap.h ../include/sysdecls.h
na_xdr.o: na_xdr.c ../include/netaudio.h ../include/pmacro.h \
 ../include/dat_types.h
NAproto.o: NAproto.c NAproto.h ../include/dat_types.h \
 ../include/netaudio.h ../include/pmacro.h na_xdr.h
