#
#	Heap.make	- Makefile for Heap
#
#	Copyright © 1989, Claris Corporation.
#
#	This is a sub-makefile, called recursively when ::AppleWorks.make is
#	executed.
#
#	All modules (including Driver, Scrap, Pict, SS, DB, etc.)
#	should have similar makefiles in their respective folders.
#
#	This makefile rebuilds the module object files as necessary and creates a
#	file containing the necessary steps to link the module with the rest of 
#	AppleWorksGS.  ::AppleWorks.make combines the link files from the modules
#	into a script which it executes to create an executable.

#--------------------------------------------------------------------------------
#	Variables

AsmIIGSOptions	=	-i {HeapIncDir},{AWGS}Driver,{AWGS}Macros	¶
					-d ErrorCheck=0,Verbose=0,VerboseErrors=0,Debug=0,Profile=0	¶
					-d DriverSupport=1,HeapIO=3,Squeezing=1,GrowBlocks=1	¶
					-d VariableDSegSize=1,VariableISegSize=0,UseLastResort=0	¶
					-d ZeroInit=1,ReadV70=1

Segment			=	HEAP

Module			=	Heap
ModuleDir		=	{AWGS}{Module}:

HeapSrcDir 		=	{AWGS}Heap:Src:
HeapIncDir 		=	{AWGS}Heap:
HeapObjDir 		=	{AWGS}Heap:Obj:

Linkfile		=	{ModuleDir}{Module}.link
Makefile		=	{ModuleDir}{Module}.make

HeapIncludes	=	{HeapIncDir}Heap.equ 		¶
					{HeapSrcDir}HeapPrivate.equ	¶
					{HeapSrcDir}Heap.mac		¶
					{HeapIncDir}Heap.aii.i

GlobalMacros	=	{AWGS}Macros:Macros.Dump	¶
					{AWGS}Macros:m16.profile

Objs			=	{HeapObjs}

HeapObjs		=	{HeapObjDir}Heap.aii.o		¶
					{HeapObjDir}Block.aii.o		¶
	#				{HeapObjDir}X_Heap.aii.o	# temporary glue routines

#--------------------------------------------------------------------------------
#	Main target

{Linkfile}	ÄÄ	{Objs} {Makefile}
	@echo	"# Creating {LinkFile} ¶É"
	@echo	"	-lseg¶{Kind¶}		{Segment}	{Objs}	¶¶" >  {Targ}


#	Global heap dependencies

{HeapObjs}		Ä	{HeapIncludes} {GlobalMacros} {Makefile}

clean	Ä
	@confirm "Delete {Module} objs and linkfile?"
	@if {status} == 0 then
		delete	{Linkfile} {Objs}
	@end

#--------------------------------------------------------------------------------
#	Default rules

.aii.o	Ä	.aii
	AsmIIGS {DepDir}{Default}.aii -o {TargDir}{Default}.aii.o {AsmIIGSOptions}

{HeapObjDir}	Ä	{HeapSrcDir}




