#
# This MakeFile will build the AppleShare FST for GS/OS.
#
# It is assumed that all of the sources are in the same directory
# and that all objects will be placed there, too.
#
# The file AppleShare.FST will be generated as final output.
#
#
# Modification history:
#
# 15-Aug-88	MSD	Equates are now in a dump file.
#			Objects and listings in their own folders.
# 10-Nov-88	MSD	By default, no listings generated.
# 10-Jan-88	MSD	Added -i for :obj:equates.dump

#
# First, define all of the objects that need to be linked.
#
objects		=	:obj:header.o 
			:obj:volume.o 
			:obj:getdevnum.o 
			:obj:create.o 
			:obj:destroy.o 
			:obj:clearbackup.o 
			:obj:getinfo.o 
			:obj:setinfo.o 
			:obj:changepath.o 
			:obj:open.o 
			:obj:close.o 
			:obj:volmod.o 
			:obj:flush.o 
			:obj:mark.o 
			:obj:eof.o 
			:obj:read.o 
			:obj:write.o 
			:obj:getdir.o 
			:obj:specific.o 
			:obj:time.o 
			:obj:subs.o 
			:obj:FindPath.o 
			:obj:sendpacket.o 
			:obj:data.o

#
# Now define the default option for listings, etc.
#
# Note: to generate full listings, use the following Make
# command line:
# make -d "AsmOpts=-l -lo :list:" -d "LinkOpts=-l >:list:link.map"
#

AsmOpts		=
LinkOpts	=

#
# The FST depends on all of its object files....
#
AppleShare.FST		 	{objects}
	LinkIIGS -t $BD -at 0 -o AppleShare.FST {objects} {LinkOpts}

#
# The "FST" target is useful for building just the FST
# without running the DuplicateIIGS tool.
#
FST				{objects}
	LinkIIGS -t $BD -at 0 -o AppleShare.FST {objects} {LinkOpts}


#
# Almost all of the object files include the equates.dump
# file, so rebuild them all if the equates file changes.
#
# Currently, the only object file that does NOT depend on
# the equates file is data.o since equates imports some
# of the data fields from data.
#
{objects}			:obj:equates.dump


#
# Generic rule for assembling a file (turning xxx.aii into xxx.o)
#
:obj:				:src:
.o				.aii
	AsmIIGS -f -i :obj: -o {TargDir}{Default}.o {AsmOpts} {DepDir}{Default}.aii


#
# Rule for building the equates.dump file
#
:obj:equates.dump		:src:equates.aii
	AsmIIGS -f {AsmOpts} -o :obj:equates.o :src:equates.aii
	Delete -i :obj:equates.o
