#
#	Scrap.make	- Makefile for Scrap
#
#	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 this 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	=

Segment	=	SCRAP
Segment2	=	WPIO
Segment3	=	TOASCII
Segment4	=	TOWPSCRAP
Segment5	=	IMPORTAWDB
Segment6	=	TODBSCRAP
Segment7	=	IMPORTAWWP
Segment8	=	IMPORTMSGS
Segment9	=	TOPICT
Segment10	=	TOSTATTEXT
Segment11	=	IMPORTAWSS
Segment12	=	TOSSSCRAP
Segment13	=	IMPORTPICT

Module	=	Scrap
ModuleDir	=	{AWGS}{Module}:

SrcDir 	=	{ModuleDir}Src:
IncDir 	=	{ModuleDir}
ObjDir 	=	{ModuleDir}Obj:

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

GlobalIncludes	=	{AWGS}Macros:Macros.dump	¶
	{AWGS}Driver:Driver.equ	¶
	{IncDir}Scrap.equ 

Objs	=	{ObjDir}shell.aii.o	¶
	{ObjDir}scrapeqs.aii.o	¶
	{ObjDir}clip.aii.o	¶
	{ObjDir}stuff.aii.o	¶
	{ObjDir}swscrap.aii.o	¶
	{ObjDir}wpscrap.aii.o	¶
	{ObjDir}ssscrap.aii.o	¶
	{ObjDir}dbscrap.aii.o	¶
	{ObjDir}pict.aii.o	¶
	{ObjDir}ascii.aii.o	¶
	{ObjDir}dbscdata.aii.o	¶
	{ObjDir}ssscdata.aii.o	¶
	{ObjDir}grscrap.aii.o	¶
	{ObjDir}ssstring.aii.o	¶
	{ObjDir}fscanner.aii.o	¶
	{ObjDir}wpscrap2.aii.o	¶
	{ObjDir}imptxt.aii.o	¶
	{ObjDir}plscrap2.aii.o	¶
	{ObjDir}drawpl.aii.o	¶
	{ObjDir}short.aii.o

Objs2	=	{ObjDir}wpdisk.aii.o

Objs3	=	{ObjDir}ascii2.aii.o

Objs4	=	{ObjDir}wpscrap3.aii.o

Objs5	=	{ObjDir}dbaworks.aii.o

Objs6	=	{ObjDir}dbscrap2.aii.o

Objs7	=	{ObjDir}wpaworks.aii.o

Objs8	=	{ObjDir}msgswp.aii.o

Objs9	=	{ObjDir}pict2.aii.o

Objs10	=	{ObjDir}plscrap.aii.o

Objs11	=	{ObjDir}ssaworks.aii.o

Objs12	=	{ObjDir}ssscrap2.aii.o

Objs13	=	{ObjDir}sworkslp.aii.o


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

{Linkfile}	ÄÄ	{Objs}	¶
		{Objs2}	¶
		{Objs3}	¶
		{Objs4}	¶
		{Objs5}	¶
		{Objs6}	¶
		{Objs7}	¶
		{Objs8}	¶
		{Objs9}	¶
		{Objs10}	¶
		{Objs11}	¶
		{Objs12}	¶
		{Objs13}	¶
		{Makefile}
	@echo	"Creating {LinkFile} ¶É"
	@echo	"	-lseg {Segment} {Objs}	¶¶" >  {Targ}
	@echo	"	-lseg:dynamic {Segment2} {Objs2} ¶¶" >> {Targ}
	@echo	"	-lseg:dynamic {Segment3} {Objs3} ¶¶" >> {Targ}
	@echo	"	-lseg:dynamic {Segment4} {Objs4} ¶¶" >> {Targ}
	@echo	"	-lseg:dynamic {Segment5} {Objs5} ¶¶" >> {Targ}
	@echo	"	-lseg:dynamic {Segment6} {Objs6} ¶¶" >> {Targ}
	@echo	"	-lseg:dynamic {Segment7} {Objs7} ¶¶" >> {Targ}
	@echo	"	-lseg:dynamic {Segment8} {Objs8} ¶¶" >> {Targ}
	@echo	"	-lseg:dynamic {Segment9} {Objs9} ¶¶" >> {Targ}
	@echo	"	-lseg:dynamic {Segment10} {Objs10} ¶¶" >> {Targ}
	@echo	"	-lseg:dynamic {Segment11} {Objs11} ¶¶" >> {Targ}
	@echo	"	-lseg:dynamic {Segment12} {Objs12} ¶¶" >> {Targ}
	@echo	"	-lseg:dynamic {Segment13} {Objs13} ¶¶" >> {Targ}


#	Global Scrap dependencies

{Objs}	¶
{Objs2}	¶
{Objs3}	¶
{Objs4}	¶
{Objs5}	¶
{Objs6}	¶
{Objs7}	¶
{Objs8}	¶
{Objs9}	¶
{Objs10}	¶
{Objs11}	¶
{Objs12}	¶
{Objs13}	Ä	{GlobalIncludes}

#	Clean out Objs

clean	Ä
	@confirm "Delete {Module} objs and linkfile?"
	@if {status} == 0 then
	rm	{Linkfile} {Objs} {Objs2} {Objs3} {Objs4} {Objs5} {Objs6} {Objs7} {Objs8} {Objs9} {Objs10} {Objs11} {Objs12} {Objs13}
	@end

#--------------------------------------------------------------------------------
#	Special Cases

{ObjDir}clip.aii.o	¶
{ObjDir}dbaworks.aii.o	¶
{ObjDir}dbscdata.aii.o	¶
{ObjDir}dbscrap.aii.o	¶
{ObjDir}dbscrap2.aii.o	¶
{ObjDir}pict2.aii.o	¶
{ObjDir}plscrap.aii.o 	Ä	{IncDir}dbsc.equ


{ObjDir}dbscrap.aii.o	¶
{ObjDir}plscrap.aii.o	¶
{ObjDir}short.aii.o	¶
{ObjDir}ssscdata.aii.o	¶
{ObjDir}ssaworks.aii.o	¶
{ObjDir}ssscrap.aii.o	¶
{ObjDir}ssscrap2.aii.o	¶
{ObjDir}ssstring.aii.o	¶
{ObjDir}ascii2.aii.o	Ä	{IncDir}sssc.equ

{ObjDir}shell.aii.o	Ä	{Makefile}


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

.aii.o	Ä	.aii
	AsmIIGS {DepDir}{Default}.aii -o {TargDir}{Default}.aii.o {AsmIIGSOptions} -i {AWGS}Macros,{AWGS}Driver,{AWGS}Scrap

{ObjDir}	Ä	{SrcDir}

