# config.m4	1.4	(CMIL)	9/19/88	17:17:26

# flavor of UNIX in use
# type of CPU
# paths to libraries
# SDY define(m4CARLLIBPATH, m4LIBDIR/libcarl.a m4LIBDIR/libieee.a)dnl
# SDY define(m4CARLLIBS, m4LIBDIR/libcarl.a m4LIBDIR/libieee.a)dnl
# save for now SDY define(m4SFLIBS, m4LIBDIR/libsf.a)dnl
# Fortran libraries must be given in the following order for SUN3.x
# final resting place for installed software
# directory for include files
# where help files will live
# directory for tutorials 
# location of sources at CARL
# path to manual pages
# path to sys include directory
# path to vaxuba include directory
# dac/adc converters to use: one of ds (DSC200), ai (Digisound-16)
# sound filesystem to use: may be either csound or bicsf

DESTDIR	=	//usr/local/lib/carl//bin
SRCDIR	=	/usr/local/src/carl/src
PROG	=	csound

all:	m4 /usr/local/lib/carl//lib/libsf.a ${PROG}

#
# SDY no dumpfs, lsf, play, record, restorsf, sfck, for now
#
DIRS= libsf burpsf catsf cdsf closesf cpsf chmodsf chownsf grepsf \
	holdsf keepsf locksf mixsnd mix4 mksfdir mountsf mvsf opensf \
	purgesf pwsf reapsf retrosf rmsf scratchsf \
	sdc sfdt sfnorm sndcmp sndhist sndin sndout umountsf\
	unlocksf visf	wave	

m4:
	for i in ${DIRS}; do \
		(cd $$i; m4 Makefile.m4 > Makefile); \
	done

/usr/local/lib/carl//lib/libsf.a:
	cd libsf	; make && make install


${PROG}:
	for i in ${DIRS}; do \
		(cd $$i; make); \
	done


install:
	for i in ${DIRS}; do \
		(cd $$i; make install); \
	done

clean:
	for i in ${DIRS}; do \
		(cd $$i; make clean); \
	done

strip:
	for i in ${DIRS}; do \
		(cd ${DESTDIR}; strip $$i); \
	done

# pub:
#	rm -rf ${SRCDIR}/${PROG}
#	mkdir ${SRCDIR}/${PROG}
#	tar cf - . | (cd ${SRCDIR}/${PROG} ; tar xf -)
#	cp ../Wishlist ${SRCDIR}/${PROG}
#	find ${SRCDIR}/${PROG} -name '*.o' -a -exec rm -f {} \;
