# ============================================================================== # # Infinity Windoid 2.6 # # Makefile for MPW # # ------------------------------------------------------------------------------ # This is a 'fat' makefile, as it were. It can be used to make three # different versions of the Infinity Windoid WDEF that can be built in # the following ways: # # 1. buildprogram "Infinity Windoid 2.6" # - includes only 68K code, but is compatible with PowerPC Macs # by running in emulation mode. # # 2. buildprogram "Infinity Windoid/PPC" # - includes only PowerPC code, so it is incompatible with (and # will in fact crash) 68K Macs. # # 3. buildprogram "Infinity Windoid/Fat" # - includes both 68K and PowerPC code, in a fat binary that will # run native on either type of Mac. # # Note: The /PPC and /FAT versions require the Apple PowerPC development # environment to build. # ------------------------------------------------------------------------------ # © 1991-94 Troy Gaul, Infinity Systems. All Rights Reserved. # ------------------------------------------------------------------------------ # File: Makefile # Target: Infinity Windoid 2.6 # Sources: InfinityWindoid.c # WindoidUtil.c # ============================================================================== Output = Infinity Windoid 2.6 PPCOut = Infinity Windoid/PPC FatOut = Infinity Windoid/Fat OutRsrc = InfinityWDEF.rsrc # intermediate file for Fat build # ============================================================================== # Types and IDs # ------------------------------------------------------------------------------ Type = rsrc Creator = RSED ResType = WDEF ResID = 128 # ============================================================================== # Directories # ------------------------------------------------------------------------------ ObjDir = :obj: {ObjDir} Ä : # directory dependency # ============================================================================== # PowerPC Options/Libs # ------------------------------------------------------------------------------ PPCCOptions = -w conformance -appleext on PPCPefLibs = -l InterfaceLib.xcoff=InterfaceLib ¶ -l StdCLib.xcoff=StdCLib ¶ -l MathLib.xcoff=MathLib PPCLinkLibs = "{PPCLibraries}"InterfaceLib.xcoff ¶ "{PPCLibraries}"StdCLib.xcoff ¶ "{PPCLibraries}"StdCRuntime.o ¶ "{PPCLibraries}"PPCCRuntime.o # ------------------------------------------------------------------------------ # If you're using the Universal Headers and you have them in some place # other than the normal 'CIncludes' folder, you might need to change (or # comment out) this line: #PPCCIncludes= {CIncludes} # ============================================================================== # PowerPC Compilation # ------------------------------------------------------------------------------ "{ObjDir}"InfinityWindoid.o Ä Makefile ¶ InfinityWindoid.c WindoidDefines.h ¶ WindoidTypes.h WindoidUtil.h PPCC {PPCCOptions} InfinityWindoid.c -o "{ObjDir}"InfinityWindoid.o # ------------------------------------------------------------------------------ "{ObjDir}"WindoidUtil.o Ä Makefile ¶ WindoidUtil.c WindoidDefines.h ¶ WindoidTypes.h WindoidUtil.h PPCC {PPCCOptions} WindoidUtil.c -o "{ObjDir}"WindoidUtil.o # ============================================================================== # PowerPC Object Files # ------------------------------------------------------------------------------ PPCObjects = "{ObjDir}"InfinityWindoid.o ¶ "{ObjDir}"WindoidUtil.o # ============================================================================== # 68K Options # ------------------------------------------------------------------------------ COptions = # -r # warnings ¶ -b # PC-relative strings ¶ -mbg off # off, full ¶ -opt full # off, (empty)=normal, full, size, speed¶ -o "{ObjDir}" ¶ -i "{PPCCIncludes}" # for Universal Headers, if they're used # ============================================================================== # 68K Compilation # ------------------------------------------------------------------------------ "{ObjDir}"InfinityWindoid.c.o Ä Makefile ¶ InfinityWindoid.c WindoidDefines.h ¶ WindoidTypes.h WindoidUtil.h C {COptions} InfinityWindoid.c # ------------------------------------------------------------------------------ "{ObjDir}"WindoidUtil.c.o Ä Makefile ¶ WindoidUtil.c WindoidDefines.h ¶ WindoidTypes.h WindoidUtil.h C {COptions} WindoidUtil.c # ============================================================================== # 68K Object Files # ------------------------------------------------------------------------------ Objects = "{ObjDir}"InfinityWindoid.c.o ¶ "{ObjDir}"WindoidUtil.c.o # ============================================================================== # Linking # ------------------------------------------------------------------------------ LinkOpts = -m MAIN ¶ -sg "{Output}" # ------------------------------------------------------------------------------ # 68K-only version "{Output}" ÄÄ Makefile {Objects} Link -t {Type} -c {Creator} -rt {ResType}={ResID} ¶ {Objects} {LinkOpts} ¶ -o {Targ} # ------------------------------------------------------------------------------ # Fat version - 68K (put into intermediate file) "{OutRsrc}" ÄÄ Makefile {Objects} Link -t rsrc -c RSED -rt oCod={ResID} ¶ {Objects} {LinkOpts} ¶ -o {Targ} # ------------------------------------------------------------------------------ # Fat & PowerPC-only versions - PowerPC "{OutRsrc}" ÄÄ Makefile {PPCObjects} PPCLink -warn -main main ¶ {PPCObjects} {PPCLinkLibs} ¶ -o "{ObjDir}"InfinityWDEF.xcoff makepef -b "{ObjDir}"InfinityWDEF.xcoff -o InfinityWDEF.pef {PPCPefLibs} echo "read ¶'pCod¶' (128) ¶"InfinityWDEF.pef¶";" | rez -a -o "{OutRsrc}" # ------------------------------------------------------------------------------ # PowerPC-only Version # Note: this will still cause the 68K version to get compiled, but # that version of the code won't be included in the final file "{PPCOut}" Ä Makefile {OutRsrc} rez InfinityWDEF.r -a -o {Targ} -d POWER_PC_ONLY setfile -t {Type} -c {Creator} {Targ} # Delete "{OutRsrc}" # you might want to delete the intermediate file # ------------------------------------------------------------------------------ # Fat version # Put the versions together in a fat binary WDEF "{FatOut}" Ä Makefile {OutRsrc} rez InfinityWDEF.r -a -o {Targ} setfile -t {Type} -c {Creator} {Targ} # Delete "{OutRsrc}" # you might want to delete the intermediate file # ------------------------------------------------------------------------------