# # oldmake makefile generated by mamold # #
# oldmake ... null='' sharp='$(null)#' newline='$(null)
# '
newline=;
LEX=lex
CC=gcc
MAKE=nmake
LD=ld
CPP=$(CC) -E
YACC=yacc
PR=pr
CCFLAGS=-O
YACCFLAGS=-d
F77=f77
ARFLAGS=cr
LPR=lpr
AR=ar
TAR=tar
AS=as
CPIO=cpio

all : naplay

naplay : main.o cmdline.o execute.o transfer.o cubits.o \
		../libnetaudio/libnetaudio.a ../libsupport/libsupport.a
	$(CC) $(CCFLAGS) $(LDFLAGS) -o naplay main.o cmdline.o execute.o \
	transfer.o cubits.o ../libnetaudio/libnetaudio.a ../libsupport/libsupport.a \
	$(ESPS_LIBS) -lm $(EXTRALIBS)

main.o : main.c playrec.h params.h ../include/debug.h \
		../include/defaults.h ../include/sampfile.h \
		../include/sysdefs.h ../include/netaudio.h
	$(CC) $(CCFLAGS) -I. -I../include  -c main.c

cmdline.o : cmdline.c playrec.h params.h ../include/debug.h \
		../include/defaults.h ../include/sampfile.h \
		../include/sysdefs.h ../include/netaudio.h
	$(CC) $(CCFLAGS) -I. -I../include  -c cmdline.c

execute.o : execute.c ../include/support.h ../include/siomode.h \
		../include/netaudio.h playrec.h params.h \
		../include/debug.h ../include/defaults.h \
		../include/sampfile.h ../include/sysdefs.h
	$(CC) $(CCFLAGS) -I. -I../include  -c execute.c

transfer.o : transfer.c ../include/support.h playrec.h params.h \
		../include/debug.h ../include/defaults.h \
		../include/sampfile.h ../include/sysdefs.h \
		../include/netaudio.h
	$(CC) $(CCFLAGS) -I. -I../include  -c transfer.c

cubits.o : cubits.c playrec.h params.h ../include/debug.h \
		../include/defaults.h ../include/sampfile.h \
		../include/sysdefs.h ../include/netaudio.h
	$(CC) $(CCFLAGS) -I. -I../include  -c cubits.c

install : all $(INSTALLROOT)/bin $(INSTALLROOT)/bin/naplay \
		$(INSTALLROOT)/man/man1 $(INSTALLROOT)/man/man1/naplay.1

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

$(INSTALLROOT)/bin/naplay : naplay
	{ cp naplay $(INSTALLROOT)/bin/naplay 2>/dev/null  		    		    ;} \
	|| true

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

$(INSTALLROOT)/man/man1/naplay.1 : naplay.1
	{ cp naplay.1 $(INSTALLROOT)/man/man1/naplay.1 2>/dev/null  		  \
	;} || true

clean :
	rm -f main.o cmdline.o execute.o transfer.o cubits.o  naplay
main.o cmdline.o execute.o transfer.o cubits.o: ../Configuration
