# Makefile for input drivers for the SCI interpreter.

# Do not use builtins (default) dependencies or actions -- everything
# is explicitly declared here.
.SUFFIXES
# Execute commands directly, without invoking command.com.  
.NOSHELL

 # Standard flags for C, as, and link.
cFlags = -c -DLINT_ARGS -W3 -Gs -Zp -AS -Fo$@
asFlags = -a"-ml -s -t -z -w2"
lFlags = /NOI /CO /MAP




############ HOW TO BUILD A DRIVER  ############

.o.drv:
	link $<;
	exe2bin $* $@
     
     
     
     
############ METHODS FOR BUILDING OBJECT FILES  ############

.c.o:
#
#	Get included files either from the network or a local directory,
#	depending on whether the network is there.
#
	@%setenv include=../
#
#	Set any debugging-related options
#
	%if %member($<, $(debug))
		@%set dOpt = -Zi -Od
	%else
		@%set dOpt = -Oalt -Gs
	%endif
#
#	Set any library-related options
#
	%if %member($<, $(utils))
		@%set lOpt = 
	%else
		@%set lOpt = -Zl
	%endif
#
#	Now do the link with all flags in place.
#
	cl $(cFlags) $(dOpt) $(lOpt) $<
	
	
.s.o:
#
#	Get included files either from the network or a local directory,
#	depending on whether the network is there.
#
	@%setenv include=../
#
#	Assemble for debugging if file is member of debug list.
#
	%if %member($<, $(debug))
		as $(asFlags) -d $<
	%else
		as $(asFlags) $<
	%endif

