#	File MakeFile -  Make instructions for C examples.
#
#	Copyright Apple Computer, Inc. 1986-1990
#	All rights reserved.
#
#	This makefile builds:
#		The sample C tool:				Count
#		The sample desk accessory:		Memory
#		The sample performance tool:	TestPerf
#
# 	You can define {SymOptions} as "-sym on" or "-sym off" for use with SADE
# 	We also recommend requiring prototypes for all functions
COptions = -r {SymOptions}

Count			ƒƒ	Count.r
	Rez Count.r -o Count -append
Count			ƒƒ	Count.c.o FStubs.c.o
	Link {SymOptions} -w -c 'MPS ' -t MPST Count.c.o FStubs.c.o ∂
		-sn STDIO=Main ∂
		-sn INTENV=Main ∂
		-sn %A5Init=Main ∂
		"{Libraries}"Stubs.o ∂
		"{CLibraries}"StdCLib.o ∂
		"{Libraries}"Interface.o ∂
		"{Libraries}"Runtime.o ∂
		"{Libraries}"ToolLibs.o ∂
		-o Count


Memory			ƒƒ	Memory.c.o DAEntry.a.o 
	Link {SymOptions} -w -da -rt DRVR=12 ∂
		-m DAEntry -sg Memory				# DAEntry is located in DAEntry.a.o ∂
		DAEntry.a.o							# This must preceed DRVRRuntime.o ∂
		"{Libraries}"DRVRRuntime.o			# This must preceed Runtime.o ∂
		Memory.c.o ∂
		"{Libraries}"Runtime.o ∂
		"{Libraries}"Interface.o ∂
		-o Memory -c DMOV -t DFIL
		
Memory			ƒƒ	Memory.r
	Rez -rd -c DMOV -t DFIL Memory.r -a -o Memory

Memory.NOASM		ƒ	Memory.DRVW Memory.r
	Rez -rd -c DMOV -t DFIL -d NOASM_BUILD Memory.r -o Memory.NOASM
	Duplicate -y Memory.NOASM Memory

Memory.DRVW 	ƒ	Memory.c.o
	Link -w -rt DRVW=0 ∂
		-sg Memory ∂
		"{Libraries}"DRVRRuntime.o ∂
		Memory.c.o ∂
		"{Libraries}"Runtime.o ∂
		"{Libraries}"Interface.o ∂
		-o Memory.DRVW -c "????" -t "????"


TestPerf	ƒ	TestPerf.c.o
	Link -d # suppress duplicate warnings ∂
		-o TestPerf -t MPST -c 'MPS ' ∂
		-l -la > TestPerf.map # produce link map file ∂
		TestPerf.c.o "{Libraries}"PerformLib.o ∂
		"{Libraries}"Interface.o ∂
		"{Libraries}"Runtime.o ∂
		"{CLibraries}"StdCLib.o
