home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK2.toast / Development Kits / USBDDK_v1.0.1_updated / Examples / PrinterClassDriver / PrinterClassDriver.make < prev    next >
Encoding:
Text File  |  1998-09-29  |  4.5 KB  |  173 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        PrinterClassDriver.make
  3. #
  4. #    Contains:    USB Printer Class Driver makefile
  5. #
  6. #    Version:    1.0d4
  7. #
  8. #    Copyright:    © 1997-1998 by Apple Computer, Inc., all rights reserved.
  9. #
  10. #
  11.  
  12. #   File:       PrinterClassDriver.make
  13. #   Target:     PrinterClassDriver
  14. #   Sources:    PrinterClassDriver.c
  15. #   Created:    Thursday, December 4, 1997 01:42:02 PM
  16.  
  17.  
  18. MAKEFILE     = PrinterClassDriver.make
  19. •MondoBuild• = {MAKEFILE}  # Make blank to avoid rebuilds when makefile is modified
  20.  
  21.         
  22. #
  23. #    include paths
  24. #
  25. Includes     = -i {USBInterfacesInternal},{USBInterfacesExternal}
  26.  
  27. #
  28. #    symbol options
  29. #
  30. Sym•PPC      =  -sym on
  31. Sym•68K      =  -sym on
  32.  
  33. #
  34. #    object directories
  35. #
  36. ObjDir•PPC   = {USBObjects}
  37. ObjDir•68K   = {USBObjects}
  38.  
  39. PrintDriverTarget    = {USBTargets}Drivers:USBPrintDriver
  40.         
  41. #
  42. #    compiler options
  43. #
  44. #PPCCOptions  = {Includes} {Sym•PPC}  {NeptuneCOptions}  -d DEBUG=1 -align mac68k
  45. #COptions     = {Includes} {Sym•68K} -d DEBUG=1 -b
  46. PPCCOptions  = {Includes} {Sym•PPC}  {NeptuneCOptions}  -align mac68k
  47. COptions     = {Includes} {Sym•68K} -b
  48.  
  49.         
  50. #
  51. #    PPC and 68K objects
  52. #
  53. Objects•PPC  =                                                ∂
  54.         "{ObjDir•PPC}PrinterClassDriver.c.x"        ∂
  55.         "{ObjDir•PPC}PrintDriverShell.c.x"            ∂
  56.         "{ObjDir•PPC}TradDriverLoaderLib.c.x"        ∂
  57.         "{ObjDir•PPC}MissingLibraryRoutines.c.x"
  58. Objects•68K  =                                                ∂
  59.         "{ObjDir•68K}DrvrGlue.a.o"                     ∂
  60.         "{ObjDir•68K}USBPrint.c.o"
  61.  
  62.  
  63. PrinterClassDriver ƒƒ {PrintDriverTarget}
  64.  
  65.  
  66. "{USBReleaseExtensions}USBPrintDriver" ƒ  "{PrintDriverTarget}" 
  67.         duplicate -y "{PrintDriverTarget}"  {Targ}
  68.  
  69. {PrintDriverTarget}    ƒƒ    ∂
  70.                         "{USBInterfacesInternal}PackageVersion.h"    ∂
  71.                         "PrinterClassVersion.h"                            ∂
  72.                         "PrinterClassDriver.r"                            ∂
  73.                         {•MondoBuild•}
  74.     Rez                                                                        ∂
  75.         -i "{USBInterfacesInternal}"                                    ∂
  76.         -i "{RIncludes}"                                                    ∂
  77.         "{RIncludes}Types.r"                                                ∂
  78.         "PrinterClassDriver.r"                                            ∂
  79.         -a                                                                        ∂
  80.         -o {Targ}
  81.         
  82. #
  83. #    legacy DRVR is compiled with 68K compiler
  84. #        and added into the USBPrintDriver file
  85. #
  86. {PrintDriverTarget} ƒƒ ∂
  87.                             {•MondoBuild•}                                 ∂
  88.                             {Objects•68K}
  89.     Link -o {Targ} -d {Sym•68K}                                        ∂
  90.         {Objects•68K}                                                        ∂
  91.         -sg USBPrintDriver                                                ∂
  92.         -rt 'DRVR=12'                 -sym on                                ∂
  93.         -ra USBPrintDriver=resSysHeap,resLocked
  94.  
  95.  
  96. #
  97. #    printer class driver is compiled with PPC compiler
  98. #        and added into the USBPrintDriver file
  99. #
  100. {PrintDriverTarget} ƒƒ                                                     ∂
  101.                 {•MondoBuild•}                                             ∂
  102.                 {Objects•PPC}                                                ∂
  103.                 "{USBInterfacesInternal}USBClassDriver.exp"
  104.     PPCLink                                                                     ∂
  105.      -map "{USBMapDir}USBPrinterDriver.map    "                        ∂
  106.          -init CFMInitialization                                            ∂
  107.         -t 'ndrv'                                                            ∂
  108.         -c 'usbd' -d                                                        ∂
  109.         -o {PrintDriverTarget} {Sym•PPC}                                ∂
  110.         {Objects•PPC}                                                         ∂
  111.         -xm sharedlibrary                                                    ∂
  112.         -share context                                                        ∂
  113.         -@export "{USBInterfacesInternal}USBClassDriver.exp"    ∂
  114.         "{USBLibraries}USBServicesLib"                                 ∂
  115.         "{SharedLibraries}DriverServicesLib"                         ∂
  116.         "{SharedLibraries}NameRegistryLib"                            ∂
  117.         "{SharedLibraries}StdCLib"                                        ∂
  118.         "{SharedLibraries}InterfaceLib"                                 ∂
  119.         "{SharedLibraries}DriverLoaderLib"                            ∂
  120.         "{PPCLibraries}PPCCRuntime.o"
  121.  
  122.  
  123. #
  124. #    printer class driver
  125. #
  126. "{ObjDir•PPC}PrinterClassDriver.c.x" ƒ {•MondoBuild•} PrinterClassDriver.c     ∂
  127.                                         "{USBInterfacesExternal}USB.h"                ∂
  128.                                    PrinterClassDriver.h
  129.     {PPCC} PrinterClassDriver.c -o {Targ} {PPCCOptions}
  130.  
  131. #
  132. #    auxillary routines to load the DRVR into the unit table
  133. #
  134. "{ObjDir•PPC}TradDriverLoaderLib.c.x" ƒ {•MondoBuild•} TradDriverLoaderLib.c         ∂
  135.                                    TradDriverLoaderLib.h
  136.     {PPCC} TradDriverLoaderLib.c -o {Targ} {PPCCOptions}
  137.  
  138. "{ObjDir•PPC}MissingLibraryRoutines.c.x" ƒ {•MondoBuild•} MissingLibraryRoutines.c
  139.     {PPCC} MissingLibraryRoutines.c -o {Targ} {PPCCOptions}
  140.  
  141.  
  142. #
  143. #    printer class driver USB interfaces
  144. #
  145. "{ObjDir•PPC}PrintDriverShell.c.x" ƒ {•MondoBuild•} PrintDriverShell.c     ∂
  146.                                         "{USBInterfacesInternal}PackageVersion.h"    ∂
  147.                                          "{USBInterfacesExternal}USB.h"                ∂
  148.                                  PrinterClassDriver.h
  149.     {PPCC} PrintDriverShell.c -o {Targ} {PPCCOptions}
  150.  
  151. #
  152. #    legacy DRVR system interface 68K asm
  153. #
  154. "{ObjDir•68K}DrvrGlue.a.o" ƒ {•MondoBuild•} DrvrGlue.a
  155.     {Asm} DrvrGlue.a -o {Targ} {AOptions}
  156.  
  157. #
  158. #    legacy DRVR implementation
  159. #
  160. "{ObjDir•68K}USBPrint.c.o" ƒ {•MondoBuild•} USBPrint.c PrinterClassDriver.h
  161.     {C} USBPrint.c -o {Targ} {COptions}
  162.  
  163.  
  164. #
  165. #    clean all the binaries before building
  166. #
  167. Clean ƒƒ
  168.     Delete -i {Objects•PPC}
  169.     Delete -i {Objects•68K}
  170.     Delete -i {PrintDriverTarget} 
  171.  
  172. # eof
  173.