#############################################################################
#
# Makefile for building the Derive example with Metrowerks MPW compilers
#
#############################################################################

AppCreator = 'ZTst'

PPC ÄÄ DerivePPC

68K ÄÄ Derive68K

Clean ÄÄ
	:::Bin:ZafClean
	Delete -i DerivePPC
	Delete -i Derive68K

ZafIncludes = :::Include:
Includes = -i : -i- -i {ZafIncludes},{MWCIncludes}
ZafLibraries = :::Library:Metrowerks:
Sym = #-sym full

PPCCPlus = MWCPPC
PPCCPlusOptions = {Includes} -bool on -Cpp_exceptions off -dialect cplus ¶
		-nomapcr -opt off -rostr -RTTI on {Sym} -prefix 'Z_Win_PPC++'
PPCLinkOptions = -c {AppCreator} {Sym} -dead initcode -o {Targ} ¶
		-sizemax 2048 -sizemin 2048 -t 'APPL' ¶
		-sizeflags suspendevents,canbackground,multifinderaware,childdiedevents,32bitclean,highlevelevents,remoteevents
PPCLinkLibraries = -weakimport "{SharedLibraries}DragLib" ¶
		-weakimport "{SharedLibraries}GXPrintingLib" ¶
		-weakimport "{SharedLibraries}QuickDrawGXLib" ¶
		"{SharedLibraries}InterfaceLib" ¶
		"{SharedLibraries}MathLib" ¶
		"{MWPPCLibraries}MSL C.PPC.Lib" ¶
		"{MWPPCLibraries}MSL C++.PPC.Lib" ¶
		"{MWPPCLibraries}MSL RuntimePPC.Lib" ¶
		"{MWPPCLibraries}MSL SIOUX.PPC.Lib" ¶
		"{ZafLibraries}ZafMacPPC.lib" ¶
		"{ZafLibraries}ZafMacPPCp.lib"

CPlus = MWC68K
CPlusOptions = {Includes} -b -bool on -Cpp_exceptions off -dialect cplus ¶
		-model far -nomapcr -opt off -RTTI on {Sym} -prefix 'Z_Win_68K++'
68KLinkOptions = -c {AppCreator} {Sym} -dead initcode -model far -o {Targ} ¶
		-sizemax 2048 -sizemin 2048 -t 'APPL' ¶
		-sizeflags suspendevents,canbackground,multifinderaware,childdiedevents,32bitclean,highlevelevents,remoteevents
68KLinkLibraries = "{MW68KLibraries}MacOS.lib" ¶
		"{MW68KLibraries}MathLib68K Fa(4i_8d).Lib" ¶
		"{MW68KLibraries}MSL C.68K Fa(4i_8d).Lib" ¶
		"{MW68KLibraries}MSL C++.68K Fa(4i_8d).Lib" ¶
		"{MW68KLibraries}MSL Runtime68K.Lib" ¶
		"{MW68KLibraries}MSL SIOUX.68K.Lib" ¶
		"{ZafLibraries}ZafMac68K.lib" ¶
		"{ZafLibraries}ZafMac68Kp.lib"

DeriveObjectsPPC = ¶
		derive.cpp.x ¶
		p_derive.cpp.x

DeriveObjects68K = ¶
		derive.cpp.o ¶
		p_derive.cpp.o

DerivePPC ÄÄ {DeriveObjectsPPC}
	Duplicate -y "{ZafLibraries}ZafMac.rsrc" {Targ}
	MWLinkPPC ¶
		{PPCLinkOptions} ¶
		{PPCLinkLibraries} ¶
		{DeriveObjectsPPC}

Derive68K ÄÄ {DeriveObjects68K}
	Duplicate -y "{ZafLibraries}ZafMac.rsrc" {Targ}
	MWLink68K ¶
		{68KLinkOptions} ¶
		{68KLinkLibraries} ¶
		{DeriveObjects68K}
