#############################################################################
#
# Makefile for building the Format examples with Metrowerks MPW compilers
#
#############################################################################

AppCreator = 'ZTst'

PPC ÄÄ BignumPPC DatePPC IntegerPPC RealPPC TimePPC UTimePPC

68K ÄÄ Bignum68K Date68K Integer68K Real68K Time68K UTime68K

Clean ÄÄ
	:::Bin:ZafClean
	Delete -i BignumPPC DatePPC IntegerPPC RealPPC TimePPC UTimePPC
	Delete -i Bignum68K Date68K Integer68K Real68K Time68K UTime68K

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"

BignumObjectsPPC = ¶
		bignum.cpp.x ¶
		bnumwn.cpp.x

BignumObjects68K = ¶
		bignum.cpp.o ¶
		bnumwn.cpp.o

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

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

DateObjectsPPC = ¶
		date.cpp.x ¶
		datewn.cpp.x

DateObjects68K = ¶
		date.cpp.o ¶
		datewn.cpp.o

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

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

IntegerObjectsPPC = ¶
		integer.cpp.x ¶
		intwn.cpp.x

IntegerObjects68K = ¶
		integer.cpp.o ¶
		intwn.cpp.o

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

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

RealObjectsPPC = ¶
		real.cpp.x ¶
		realwn.cpp.x

RealObjects68K = ¶
		real.cpp.o ¶
		realwn.cpp.o

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

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

TimeObjectsPPC = ¶
		time.cpp.x ¶
		timewn.cpp.x

TimeObjects68K = ¶
		time.cpp.o ¶
		timewn.cpp.o

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

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

UTimeObjectsPPC = ¶
		utime.cpp.x ¶
		utimewn.cpp.x

UTimeObjects68K = ¶
		utime.cpp.o ¶
		utimewn.cpp.o

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

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