#
#	Makefile for the SAS/C v6.2 `C' compiler
#

#	To set the default number of context lines to something other than 2,
#	change the value of this line.

CONTEXT		= 2

#	To set the default right margin to something other than 0, change
#	the value of this line.

RMARGIN		= 0

#	To set the default left margin to something other than 0, change
#	the value of this line (note that game prompts are not indented, only
#	game output text).

LMARGIN		= 0

#	To set the default number of input lines to be stored in the history
#	buffer to something other than 20, change the value of this line.

HISTORY_LINES	= 20

#	There should be no need to change the following line.

DEFINES		= DEFINE=CONTEXT=$(CONTEXT) DEFINE=LMARGIN=$(LMARGIN) DEFINE=RMARGIN=$(RMARGIN) \
		  DEFINE=HISTORY_LINES=$(HISTORY_LINES) \
		  DEFINE=FNAME_LST="Story" DEFINE=FEXT_LST=".Dat",".Data" \
		  DEFINE=SAVE_EXT=".Save" DEFINE=SCRIPT_FILE="PRT:" \
		  DEFINE=NOSIGNALS DEFINE=ESC_CHAR="@"

#	Comment this line if you do not want the compiler to run the
#	optimizer phase.

OPTIMIZE	= OPTIMIZE OPTINLOCAL OPTTIME

#	Compiler and linker flags, there should be no need to change these lines.

CFLAGS		= STREQ STRMERGE NOSTKCHK $(OPTIMIZE) $(DEFINES) IGNORE=161
LFLAGS		= SMALLCODE SMALLDATA NODEBUG

#	Terminal interface modules.

TERM		= amiga.o amiga_clip.o amiga_console.o amiga_data.o amiga_game.o \
		  amiga_script.o amiga_sound.o

#	Interpreter and terminal interface modules.

OBJS		= file.o funcs.o infocom.o init.o input.o interp.o jump.o \
		  object.o options.o page.o print.o property.o support.o \
		  variable.o getopt.o $(TERM)

#	The runtime libraries to link with, there should be no need to change this line.

LIBS		= LIB:sc.lib LIB:amiga.lib

#	This is where the interpreter is built.

pinfo:		$(OBJS)
		SLINK FROM LIB:c.o $(OBJS) TO $@ LIBRARY $(LIBS) $(LFLAGS)

#	File dependencies.

file.o:		file.c infocom.h 
funcs.o:	funcs.c infocom.h 
infocom.o:	infocom.c infocom.h patchlevel.h 
init.o:		init.c infocom.h 
input.o:	input.c infocom.h 
interp.o:	interp.c infocom.h 
jump.o:		jump.c infocom.h 
object.o:	object.c infocom.h 
options.o:	options.c infocom.h 
page.o:		page.c infocom.h 
print.o:	print.c infocom.h 
property.o:	property.c infocom.h 
support.o:	support.c infocom.h patchlevel.h 
variable.o:	variable.c infocom.h 

amiga.o:	amiga.c amiga_global.h patchlevel.h infocom.h amiga_data.h amiga_protos.h 
amiga_data.o:	amiga_data.c amiga_global.h patchlevel.h infocom.h amiga_data.h amiga_protos.h
amiga_sound.o:	amiga_sound.c amiga_global.h patchlevel.h infocom.h amiga_data.h amiga_protos.h
amiga_console.o:	amiga_console.c amiga_global.h patchlevel.h infocom.h amiga_data.h amiga_protos.h
amiga_clip.o:	amiga_clip.c amiga_global.h patchlevel.h infocom.h amiga_data.h amiga_protos.h
amiga_script.o:	amiga_script.c amiga_global.h patchlevel.h infocom.h amiga_data.h amiga_protos.h
amiga_game.o:	amiga_game.c amiga_global.h patchlevel.h infocom.h amiga_data.h amiga_protos.h
