home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / desklib / Libraries / !MakeDLib next >
Encoding:
Text File  |  1994-05-29  |  4.6 KB  |  106 lines

  1. | This Obey file will make absolutely everything needed to produce the
  2. | main library file "!DeskLib.DeskLib"
  3. | It (appears to) run fine on my 2 Meg machine in only 640k of memory.
  4. | [It now also runs really happily on my 4Meg A5000 in 2Megs of memory ;-]
  5. |
  6. | Note that it changes the current directory (CSD)
  7.  
  8. Set LibMake$Dir <Obey$Dir>
  9.  
  10. if "<DeskLib$Dir>" = "" then Error 0 !DeskLib application has not been seen by the filer
  11.  
  12. WimpSlot -min 640k -max 2048k
  13.  
  14. | NOTE: Each makefile below will create a small library file (e.g. CoordLib)
  15. | which contains JUST the code for the subdirectory.
  16. | I have left this in so that you can just use the small libs if it is more
  17. | convenient, and also the small library files serve as a means for Make
  18. | to know that everything is up to date.
  19. |
  20. | However, once the code has been made, these small libraries can be deleted
  21. | Once DeskLib is made, the whole subdirectory can be deleted if you no
  22. | longer want to keep the .c and .o files.
  23. | (All you need to include DeskLib functions in your own code are the main .h
  24. | files and the DeskLib Library file)
  25.  
  26. | The following line sets up an alias for the command 'DLibMake' used below.
  27. | This makes it much easier for you to generically alter the way in which
  28. | sublibraries are compiled, and akso makes this file and the text produced by
  29. | the compilation process much shorter and neater
  30. |
  31. | Note that you can also change the command-line parameters, such as
  32. | predefining:
  33. |   x_cflags = extra c flags to pass to the c compiler (eg x_cflags="-ffah")
  34. |   x_aflags = extra flags to pass to the assembler (eg x_aflags="-Throwback")
  35. |   do       = the command to execute to generate the final sublibrary, eg:
  36. |                do="LibFile -c -o $@ @.o.*"
  37. |                do="Create $@ 1"
  38.  
  39. | The script now also checks the return code from each make operation, so it
  40. | exits cleanly if you hit escape or if any errors occur during the make
  41.  
  42. Set Alias$DLibMake Echo|MEcho --- Making %%*0 Sublibrary ---|MDir <LibMake$Dir>.%%*0|M amu x_cflags="-Ff" x_aflags="" do="Create $@ 1"|M
  43.  
  44. Echo Making Sub-Libraries...
  45. Set Sys$ReturnCode 0
  46. if <Sys$ReturnCode> = 0 Then DLibMake ColourTran
  47. if <Sys$ReturnCode> = 0 Then DLibMake Coord
  48. if <Sys$ReturnCode> = 0 Then DLibMake Dialog
  49. if <Sys$ReturnCode> = 0 Then DLibMake Drag
  50. if <Sys$ReturnCode> = 0 Then DLibMake DragASpr
  51. if <Sys$ReturnCode> = 0 Then DLibMake Event
  52. if <Sys$ReturnCode> = 0 Then DLibMake File
  53. if <Sys$ReturnCode> = 0 Then DLibMake Filter
  54. if <Sys$ReturnCode> = 0 Then DLibMake Font
  55. if <Sys$ReturnCode> = 0 Then DLibMake GFX
  56. if <Sys$ReturnCode> = 0 Then DLibMake Handler
  57. if <Sys$ReturnCode> = 0 Then DLibMake Hourglass
  58. if <Sys$ReturnCode> = 0 Then DLibMake Icon
  59. if <Sys$ReturnCode> = 0 Then DLibMake Kbd
  60. if <Sys$ReturnCode> = 0 Then DLibMake KernelSWIs
  61. if <Sys$ReturnCode> = 0 Then DLibMake LinkList
  62. if <Sys$ReturnCode> = 0 Then DLibMake Menu
  63. if <Sys$ReturnCode> = 0 Then DLibMake Mem
  64. if <Sys$ReturnCode> = 0 Then DLibMake Misc
  65. if <Sys$ReturnCode> = 0 Then DLibMake Module
  66. if <Sys$ReturnCode> = 0 Then DLibMake Msgs
  67. if <Sys$ReturnCode> = 0 Then DLibMake Pane
  68. if <Sys$ReturnCode> = 0 Then DLibMake PDriver
  69. if <Sys$ReturnCode> = 0 Then DLibMake PopUp
  70. if <Sys$ReturnCode> = 0 Then DLibMake Resource
  71. if <Sys$ReturnCode> = 0 Then DLibMake Save
  72. if <Sys$ReturnCode> = 0 Then DLibMake Serial
  73. if <Sys$ReturnCode> = 0 Then DLibMake Slider
  74. if <Sys$ReturnCode> = 0 Then DLibMake Sound
  75. if <Sys$ReturnCode> = 0 Then DLibMake Sprite
  76. if <Sys$ReturnCode> = 0 Then DLibMake Str
  77. if <Sys$ReturnCode> = 0 Then DLibMake Template
  78. if <Sys$ReturnCode> = 0 Then DLibMake TextFile
  79. if <Sys$ReturnCode> = 0 Then DLibMake Time
  80. if <Sys$ReturnCode> = 0 Then DLibMake WAssert
  81. if <Sys$ReturnCode> = 0 Then DLibMake WimpSWIs
  82. if <Sys$ReturnCode> = 0 Then DLibMake Window
  83.  
  84. Unset Alias$DLibMake
  85.  
  86. | Finally, make the DeskLib library
  87. | Note that LibFile is now invoked with "-v" to use a 'via' file listing
  88. | all of the object files. This is because the list got too long to
  89. | put into a single command line, and it also makes management easier.
  90.  
  91. Dir <LibMake$Dir>
  92. Echo
  93. if <Sys$ReturnCode> = 0 Then Echo Making DeskLib Library...
  94.  
  95. if <Sys$ReturnCode> = 0 Then LibFile -c -o <DeskLib$Dir>.o.DeskLib -v !Objects
  96.  
  97. Echo
  98. Echo
  99. if <Sys$ReturnCode> = 0 Then Echo =======================================
  100. if <Sys$ReturnCode> = 0 Then Echo DeskLib library make complete ->gasp!<-
  101. if <Sys$ReturnCode> = 0 Then Echo =======================================
  102.  
  103. if <Sys$ReturnCode> <> 0 Then Echo *******************************************
  104. if <Sys$ReturnCode> <> 0 Then Echo DeskLib library make failed due to error(s)
  105. if <Sys$ReturnCode> <> 0 Then Echo *******************************************
  106.