home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / Libraries / !MakeDLib next >
Encoding:
Text File  |  1993-07-15  |  4.1 KB  |  95 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 DragASpr
  50. if <Sys$ReturnCode> = 0 Then DLibMake Event
  51. if <Sys$ReturnCode> = 0 Then DLibMake File
  52. if <Sys$ReturnCode> = 0 Then DLibMake Filter
  53. if <Sys$ReturnCode> = 0 Then DLibMake Font
  54. if <Sys$ReturnCode> = 0 Then DLibMake GFX
  55. if <Sys$ReturnCode> = 0 Then DLibMake Handler
  56. if <Sys$ReturnCode> = 0 Then DLibMake Icon
  57. if <Sys$ReturnCode> = 0 Then DLibMake Kbd
  58. if <Sys$ReturnCode> = 0 Then DLibMake LinkList
  59. if <Sys$ReturnCode> = 0 Then DLibMake Menu
  60. if <Sys$ReturnCode> = 0 Then DLibMake Mem
  61. if <Sys$ReturnCode> = 0 Then DLibMake Misc
  62. if <Sys$ReturnCode> = 0 Then DLibMake Msgs
  63. if <Sys$ReturnCode> = 0 Then DLibMake PDriver
  64. if <Sys$ReturnCode> = 0 Then DLibMake PopUp
  65. if <Sys$ReturnCode> = 0 Then DLibMake Resource
  66. if <Sys$ReturnCode> = 0 Then DLibMake Sound
  67. if <Sys$ReturnCode> = 0 Then DLibMake Sprite
  68. if <Sys$ReturnCode> = 0 Then DLibMake Template
  69. if <Sys$ReturnCode> = 0 Then DLibMake TextFile
  70. if <Sys$ReturnCode> = 0 Then DLibMake WimpSWIs
  71. if <Sys$ReturnCode> = 0 Then DLibMake Window
  72.  
  73. Unset Alias$DLibMake
  74.  
  75. | Finally, make the DeskLib library
  76. | Note that LibFile is now invoked with "-v" to use a 'via' file listing
  77. | all of the object files. This is because the list got too long to
  78. | put into a single command line, and it also makes management easier.
  79.  
  80. Dir <LibMake$Dir>
  81. Echo
  82. if <Sys$ReturnCode> = 0 Then Echo Making DeskLib Library...
  83.  
  84. if <Sys$ReturnCode> = 0 Then LibFile -c -o <DeskLib$Dir>.o.DeskLib -v !Objects
  85.  
  86. Echo
  87. Echo
  88. if <Sys$ReturnCode> = 0 Then Echo =======================================
  89. if <Sys$ReturnCode> = 0 Then Echo DeskLib library make complete ->gasp!<-
  90. if <Sys$ReturnCode> = 0 Then Echo =======================================
  91.  
  92. if <Sys$ReturnCode> <> 0 Then Echo *******************************************
  93. if <Sys$ReturnCode> <> 0 Then Echo DeskLib library make failed due to error(s)
  94. if <Sys$ReturnCode> <> 0 Then Echo *******************************************
  95.