# flavor of UNIX in use
# type of CPU
# paths to libraries
# define(m4FORTLIBS, -lI77 -lF77)dnl
# 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

# master makefile for carl distribution

#all:	dirs m4INCLUDE/../whoami.h m4INCLUDE/config.m4 makefiles includes progs
all:	dirs /usr/include/carl/../whoami.h /usr/include/carl/config.m4 makefiles progs

/usr/include/carl/../whoami.h:	include/whoami.h
	cp include/whoami.h /usr/include/carl/..

/usr/include/carl/config.m4: include/carl/config.m4
	cp include/carl/config.m4 /usr/include/carl
	csh makemakefiles

# make all of the makefiles
makefiles:
	- if test /usr/include/carl != /usr/include/carl ; \
		then fixmakefiles /usr/include/carl/config.m4 ; \
	fi
	csh makemakefiles ;

dirs:
	- if test ! -d /carl/lib ; then mkdir /carl/lib ; fi
	- if test ! -d /carl/bin ; then mkdir /carl/bin ; fi
	- if test ! -d /usr/include/carl ; then mkdir /usr/include/carl ; fi

includes:
	cd include	; make ${MFLAGS}

libs:
	cd src/lib	; make ${MFLAGS}

progs:
	cd src		; make ${MFLAGS}

install:
	cd src		; make ${MFLAGS} install
	cd man		; make ${MFLAGS} install
	cd doc		; make ${MFLAGS} install

clean:	
	make -f Makefirst clean
