# Makefile for cdda2wav, a sampling utility.
#
DEF_DEVICE=\"/dev/sr0\"		# set the default cdrom device

				# set the default sampling rate
DEF_UNDERSAMPLING=2		# 1, 2, 3, 4, 6,  7, 12, 14, 28 or 49
				# 44 22 14 11 7.4 6  3.7  3  1.5   0.9 KHz rate

DEF_BITS=16			# 16, 12 or 8 bits per sample

DEF_CHANNELS=1			# 1 = mono, 2 = stereo

DEF_TIME=16			# recording time in seconds

DEF_FILE=\"audio.wav\"		# default file name for wav sound file

SECTORS=1			# read chunks with SECTORS sectors at a time

DEFINES=-DCD_DEVICE=$(DEF_DEVICE) -DUNDERSAMPLING=$(DEF_UNDERSAMPLING) \
-DBITS_P_S=$(DEF_BITS) -DCHANNELS=$(DEF_CHANNELS) -DNSECTORS=$(SECTORS) \
-DDURATION=$(DEF_TIME) -DFILENAME=$(DEF_FILE) 

# End of Configuration ######################################################

CFLAGS=-Wall -O -s

cdda2wav: cdda2wav.c
	cc $(CFLAGS) $(DEFINES)	cdda2wav.c -o cdda2wav -lm

install: cdda2wav.1
	cp cdda2wav.1 /usr/local/man/man1

dist:
	tar cfvz cdda2wav.src.tar.gz README Makefile uti.h cdda2wav.1 \
	cdda2wav.doc cdda2wav.c scsi_ioctl.diff
