# 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

PROG =		help

# where help program will live
DESTDIR 	=	//usr/local/lib/carl//bin
# name it will assume on target system
PROGNAME =	help
# where help files will reside on target system
HELPDIR =	//usr/local/lib/carl//lib/help
# where help files originate on CARL system
AT_CARL =	/usr/local/lib/help
# where distributed help files reside on CARL system
HELP_DIST = 	/mnt/carl/src/help/helpfiles
# root directory of program sources
SRCDIR =	/usr/local/src/carl/src

HELPDIRS =	cmusic compose csound filters graphics lib \
		siganal siggens sigproc

CFLAGS =	-O -DHELP_DIR=\"${HELPDIR}\" \
		-Dhelppath=\"${DESTDIR}/${PROG}\"

${PROG}:	${PROG}.o ${OBJS}
		${CC} ${PROG}.o ${OBJS} ${LIBS} -o ${PROG}

install:	${PROG} install_helpfiles fix_source_listings
		cp ${PROG} ${DESTDIR}/${PROGNAME}

install_helpfiles:	
	-if test ! -d ${HELPDIR} ; \
	then \
		mkdir ${HELPDIR} ; \
		cd helpfiles ; \
		tar cf - . | ( cd ${HELPDIR} ; tar xf - ) ; \
	fi

fix_source_listings:
	rm -f ${HELPDIR}/sources/*
	csh mkhelpsrc ${SRCDIR} ${HELPDIR}/sources

pub:
	-if test ! -d ${HELP_DIST} ; \
	then \
		mkdir ${HELP_DIST} ; \
	fi
	cd ${AT_CARL} ; cp beginner help programs find_sources ${HELP_DIST}
	for DIR in "${HELPDIRS}" ; \
	do \
		cd ${AT_CARL} ; \
		tar cf - $${DIR} | ( cd ${HELP_DIST} ; tar xf - ) ; \
	done

clean:
	rm -f *.o ${PROG}
