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

AppCreator = 'ZTst'

PPC ÄÄ DialogWinPPC MessageWinPPC MDIWinPPC ScrollWinPPC WindowPPC

68K ÄÄ DialogWin68K MessageWin68K MDIWin68K ScrollWin68K Window68K

Clean ÄÄ
	:::Bin:ZafClean
	Delete -i DialogWinPPC MessageWinPPC MDIWinPPC ScrollWinPPC WindowPPC
	Delete -i DialogWin68K MessageWin68K MDIWin68K ScrollWin68K Window68K

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"

DialogWinObjectsPPC = ¶
		dlgwin.cpp.x

DialogWinObjects68K = ¶
		dlgwin.cpp.o

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

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

MessageWinObjectsPPC = ¶
		msgwin.cpp.x

MessageWinObjects68K = ¶
		msgwin.cpp.o

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

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

MDIWinObjectsPPC = ¶
		mdiwin.cpp.x

MDIWinObjects68K = ¶
		mdiwin.cpp.o

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

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

ScrollWinObjectsPPC = ¶
		sclwin.cpp.x

ScrollWinObjects68K = ¶
		sclwin.cpp.o

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

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

WindowObjectsPPC = ¶
		window.cpp.x

WindowObjects68K = ¶
		window.cpp.o

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

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