!
! Makefile for make version 3.
!
# defclp
# define c_opts /nolist
!
! Make a link map, if called for.
!
# ifdef MAP
	# define linkopts /map/full/cross
# else
	# define linkopts /nomap
# endif
!
! Set the debug flags, if necessary.
!
# ifdef DEBUG
	# define linkopts ^linkopts /debug
	# define c_opts ^c_opts /debug /nooptimize
# endif
!
! Disable traceback for the installed version.
!
# ifdef INSTALL
	# define linkopts ^linkopts /notrace
# endif

# define LIB	makelib.olb
# define MAKE$TIMER
# define MAKE$FILE_STATS
!
! Fancy constructions.
!
# cons .c (.olb)
	cc ^c_opts ^MAKE$SOURCE
	- library ^LIB ^MAKE$SOURCE
	- delete ^MAKE$SOURCE.obj;*
# end
# cons .c .obj
	cc ^c_opts ^MAKE$SOURCE
# end

!
! Now check all of the source code files.
!
make.obj:		make
^LIB(chdir):		make
^LIB(cons):		ltype
^LIB(ccons):
^LIB(charutl):
^LIB(checkdef):
^LIB(comline):
^LIB(dcl):
^LIB(defclp):
^LIB(dirty):
^LIB(docond):		fdate
^LIB(execute):
^LIB(fdate):		fdate	make
^LIB(file):		make
^LIB(filetype):
^LIB(findcons):		make
^LIB(gettarget):
^LIB(iferr):
^LIB(libtarget):
^LIB(linetype):		ltype
^LIB(log):
^LIB(mexit):
^LIB(subproc):		make
^LIB(processl):		ltype
^LIB(refsym):
^LIB(search):		make
^LIB(setdebug):
^LIB(sharp):		make
^LIB(shexec):
^LIB(shmake):		make	fdate
^LIB(shskip):
^LIB(skiptoels):	make
^LIB(stab):
^LIB(timer):		make
^LIB(whoarewe):
!
! Do the link, if required.
!
# cons .obj .exe
	link ^linkopts make,^LIB/lib/incl=IFERR,[-.lib]utility/lib/incl=(JPIDEF),\
		sys$library:vaxcrtl/lib
# end
# wait
make.exe:	^LIB(chdir)	^LIB(cons)	^LIB(ccons)	^LIB(charutl) \
		^LIB(comline)	^LIB(dcl)	^LIB(dirty)	^LIB(docond)  \
		^LIB(execute)	^LIB(fdate)	^LIB(file)	^LIB(filetype)\
		^LIB(findcons)	^LIB(gettarget)	^LIB(libtarget)	^LIB(linetype)\
		^LIB(mexit)	^LIB(processl)	^LIB(refsym)	^LIB(sharp)   \
		^LIB(skiptoels) ^LIB(stab)	^LIB(search)	^LIB(checkdef)\
		^LIB(timer)	^LIB(defclp)	^LIB(subproc)	^LIB(log)     \
		^LIB(whoarewe)	^LIB(iferr)	^LIB(shmake)	^LIB(shexec)  \
		^LIB(shskip)
# ifdef INSTALL
	$ rename cmd:make.exe cmd:make.sav
	$ copy make.exe cmd:
	$ purge cmd:
# else
	# message ------------------- No installation -----------------
# endif
# dump file_stats
