home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / g / gs252src.zip / GS252 / VMS-GCC.MAK < prev    next >
Text File  |  1992-09-17  |  6KB  |  266 lines

  1. $ !    Copyright (C) 1989, 1992 Aladdin Enterprises.  All rights reserved.
  2. $ !    Distributed by Free Software Foundation, Inc.
  3. $ !
  4. $ ! This file is part of Ghostscript.
  5. $ !
  6. $ ! Ghostscript is distributed in the hope that it will be useful, but
  7. $ ! WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. $ ! to anyone for the consequences of using it or for whether it serves any
  9. $ ! particular purpose or works at all, unless he says so in writing.  Refer
  10. $ ! to the Ghostscript General Public License for full details.
  11. $ !
  12. $ ! Everyone is granted permission to copy, modify and redistribute
  13. $ ! Ghostscript, but only under the conditions described in the Ghostscript
  14. $ ! General Public License.  A copy of this license is supposed to have been
  15. $ ! given to you along with Ghostscript so you can know your rights and
  16. $ ! responsibilities.  It should be in a file named COPYING.  Among other
  17. $ ! things, the copyright notice and this notice must be preserved on all
  18. $ ! copies.
  19. $ !
  20. $ !
  21. $ ! "makefile" for Ghostscript, VMS / GNU C / DECwindows (X11) configuration.
  22. $ !
  23. $ !
  24. $ ! Execute this command file while in the GhostScript directory!
  25. $ !
  26. $ !
  27. $ ! To build a debugging configuration, issue the command:
  28. $ !
  29. $ !          $ @VMS-CC.MAK DEBUG
  30. $ !
  31. $ ! Do not  abbreviate "DEBUG".  To specify an alternate directory for
  32. $ ! GS_LIB_DEFAULT, issue the command:
  33. $ !
  34. $ !          $ @VMS-CC.MAK directory
  35. $ !
  36. $ ! with "directory" a fully qualified directory name.  "directory" cannot
  37. $ ! be DEBUG (otherwise it will be confused with the DEBUG switch).  Both
  38. $ ! the DEBUG switch and a directory name may be specified on the same
  39. $ ! command line and in either order.
  40. $ !
  41. $ CDEF = ""
  42. $ LDEF = ""
  43. $ !
  44. $ GS_INIT = "GS_INIT.PS"
  45. $ GS_LIB_DEFAULT = F$ENVIRONMENT("DEFAULT")
  46. $ IF P1 .NES. "" .AND. P1 .NES. "DEBUG" THEN GS_LIB_DEFAULT = P1
  47. $ IF P2 .NES. "" .AND. P2 .NES. "DEBUG" THEN GS_LIB_DEFAULT = P2
  48. $ !
  49. $ IF P1 .NES. "DEBUG" .AND. P2 .NES. "DEBUG" THEN GOTO NODEBUG
  50. $ CDEF = "/DEFINE=(""DEBUG"")/NOOPTIMIZE/DEBUG"
  51. $ LDEF = "/DEBUG"
  52. $ !
  53. $ NODEBUG:
  54. $ !
  55. $ ! Is GNU C about and defined?
  56. $ !
  57. $ IF F$TRNLNM("GNU_CC") .NES. "" THEN GOTO GNU_CC_OKAY
  58. $ WRITE SYS$OUTPUT "GNU_CC logical is undefined.  You must execute the command"
  59. $ WRITE SYS$OUTPUT "file GCC_INSTALL.COM in the GNU CC directory before using"
  60. $ WRITE SYS$OUTPUT "this command file."
  61. $ EXIT
  62. $ !
  63. $ !
  64. $ GNU_CC_OKAY:
  65. $ SET COMMAND GNU_CC:[000000]GCC.CLD
  66. $ !
  67. $ !
  68. $ ! Compile genarch.c and then run it to create the arch.h header file
  69. $ !
  70. $ GCC/NOLIST/OBJECT=GENARCH.OBJ GENARCH.C
  71. $ LINK/NOMAP/EXE=GENARCH.EXE GENARCH,GNU_CC:[000000]GCCLIB/LIB,SYS$INPUT/OPT
  72. SYS$SHARE:VAXCRTL/SHARE
  73. $ GENARCH = "$" + F$ENVIRONMENT("DEFAULT") + "GENARCH.EXE"
  74. $ GENARCH ARCH.H
  75. $ DELETE GENARCH.EXE.*,GENARCH.OBJ.*
  76. $ PURGE ARCH.H
  77. $ !
  78. $ !
  79. $ ! Create a minimal gconfig.h.  To add devices, look in DEVS.MAK to find
  80. $ ! the files that comprise the driver, and add them to the compilation
  81. $ ! and linking lists below.  Then add a line below the CREATE of the form
  82. $ !    device_(gs_the-device-name_device)
  83. $ ! e.g.
  84. $ !    device_(gs_bj10e_device)
  85. $ ! To incorporate compiled fonts, add the line
  86. $ !    oper_(ccfonts_op_defs)
  87. $ ! Also add the name ICCFONT and the names of the compiled fonts
  88. $ ! to the compilation and linking lists.
  89. $ !
  90. $ !
  91. $ CREATE GCONFIG.H
  92. device_(gs_x11_device)
  93. $ !
  94. $ !
  95. $ Create gconfigf.h similarly.  This is only used for compiled fonts.
  96. $ For each compiled font XYZ, add a line of the form
  97. $ !    font_("0.font_XYZ",gsf_XYZ,zf_XYZ)
  98. $ !
  99. $ !
  100. $ CREATE GCONFIGF.H
  101. $ !
  102. $ ! Create an empty object library
  103. $ !
  104. $ LIBRARY/CREATE GS.OLB
  105. $ !
  106. $ !
  107. $ ! Create a list of modules to compile and store in the object library
  108. $ !
  109. $ CREATE MODULES.LIS
  110. GDEVMEM1
  111. GDEVMEM2
  112. GDEVMEM3
  113. GP_VMS
  114. GSCHAR
  115. GSCHAR0
  116. GSCIE
  117. GSCOLOR
  118. GSCOLOR2
  119. GSCOORD
  120. GSDEVICE
  121. GSDPS1
  122. GSFILE
  123. GSFONT
  124. GSIMAGE
  125. GSIMAGE2
  126. GSIMPATH
  127. GSLINE
  128. GSMATRIX
  129. GSMISC
  130. GSPAINT
  131. GSPATH
  132. GSPATH2
  133. GSSTATE
  134. GSTDEV
  135. GSTYPE1
  136. GSUTIL
  137. GXCACHE
  138. GXCLIST
  139. GXCOLOR
  140. GXCPATH
  141. GXDITHER
  142. GXDRAW
  143. GXFILL
  144. GXHINT1
  145. GXHT
  146. GXPATH
  147. GXPATH2
  148. GXPCOPY
  149. GXSTROKE
  150. IALLOC
  151. IBNUM
  152. IBSCAN
  153. ICCFONT
  154. IDEBUG
  155. IDICT
  156. IDPARAM
  157. IINIT
  158. INAME
  159. INTERP
  160. ISAVE
  161. ISCAN
  162. IUTIL
  163. SCFD
  164. SCFE
  165. SFILTER
  166. SFILTER2
  167. SLZWD
  168. SLZWE
  169. STREAM
  170. ZARITH
  171. ZARRAY
  172. ZBSEQ
  173. ZCHAR
  174. ZCIE
  175. ZCOLOR
  176. ZCOLOR2
  177. ZCONTROL
  178. ZDEVICE
  179. ZDICT
  180. ZDPS1
  181. ZFILE
  182. ZFILEIO
  183. ZFILTER
  184. ZFILTER2
  185. ZFONT
  186. ZFONT0
  187. ZFONT1
  188. ZFONT2
  189. ZGENERIC
  190. ZGSTATE
  191. ZHT
  192. ZIMAGE2
  193. ZMATH
  194. ZMATRIX
  195. ZMISC
  196. ZPACKED
  197. ZPAINT
  198. ZPATH
  199. ZPATH2
  200. ZPROPS
  201. ZRELBIT
  202. ZSTACK
  203. ZSTRING
  204. ZTYPE
  205. ZUPATH
  206. ZVMEM
  207. $ !
  208. $ !
  209. $ ! NOW COMPILE AWAY!
  210. $ !
  211. $ OPEN/READ MODULE_LIST MODULES.LIS
  212. $ !
  213. $ COMPILE_LOOP:
  214. $ READ/END=END_COMPILE MODULE_LIST MODULE
  215. $ GCC'CDEF/NOLIST/OBJECT='MODULE'.OBJ 'MODULE'.C
  216. $ LIBRARY/INSERT GS.OLB 'MODULE'.OBJ
  217. $ DELETE 'MODULE'.OBJ.*
  218. $ GOTO COMPILE_LOOP
  219. $ !
  220. $ END_COMPILE:
  221. $ CLOSE MODULE_LIST
  222. $ DELETE MODULES.LIS.*
  223. $ !
  224. $ !
  225. $ ! Is the DECwindows environment about?  Must be installed in order to
  226. $ ! build the executable program gs.exe.
  227. $ !
  228. $ IF F$SEARCH("SYS$SHARE:DECW$XLIBSHR.EXE") .NES. "" THEN GOTO CHECK2
  229. $ WRITE SYS$OUTPUT "DECwindows user environment not installed;"
  230. $ WRITE SYS$OUTPUT "unable to build executable programs."
  231. $ GOTO DONE
  232. $ !
  233. $ CHECK2:
  234. $ IF F$TRNLNM("DECW$INCLUDE") .NES. "" THEN GOTO BUILD_EXES
  235. $ WRITE SYS$OUTPUT "You must invoke @DECW$STARTUP before using this"
  236. $ WRITE SYS$OUTPUT "command procedure to build the executable programs."
  237. $ GOTO DONE
  238. $ !
  239. $ !
  240. $ BUILD_EXES:
  241. $ !
  242. $ LIBDEF = """GS_LIB_DEFAULT=""""" + ''GS_LIB_DEFAULT' + """"""""
  243. $ INIDEF = """GS_INIT=""""" + ''GS_INIT' + """"""""
  244. $ GCC'CDEF/NOLIST/DEFINE=('LIBDEF','INIDEF')/OBJECT=GCONFIG.OBJ GCONFIG.C
  245. $ GCC'CDEF/NOLIST/INCLUDE_DIRECTORY='F$TRNLNM("SYS$COMMON") -
  246.     /OBJECT=GDEVXINI.OBJ GDEVXINI.C
  247. $ GCC'CDEF/NOLIST/INCLUDE_DIRECTORY='F$TRNLNM("SYS$COMMON")/OBJECT=GDEVX.OBJ -
  248.     GDEVX.C
  249. $ GCC'CDEF/NOLIST/OBJECT=GSMAIN.OBJ GSMAIN.C
  250. $ !
  251. $ GCC'CDEF/NOLIST/OBJECT=GS.OBJ GS.C
  252. $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,GDEVX,GDEVXINI,GCONFIG,-
  253.   GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GDEVMEM3,GXCLIST,-
  254.   ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCOLOR2,ZCONTROL,ZDEVICE,ZDPS1,-
  255.   ZDICT,ZFILE,ZFILEIO,ZFILTER,ZFILTER2,ZFONT,ZFONT0,ZFONT1,ZFONT2,-
  256.   ZGENERIC,ZGSTATE,ZHT,ZIMAGE2,ZMATH,ZMATRIX,ZMISC,-
  257.   ZPACKED,ZPAINT,ZPATH,ZPATH2,-
  258.   ZPROPS,ZRELBIT,ZSTACK,ZSTRING,ZTYPE,ZUPATH,ZVMEM),SYS$INPUT/OPT
  259. SYS$SHARE:DECW$DWTLIBSHR/SHARE,SYS$SHARE:DECW$XLIBSHR.EXE/SHARE
  260. $ !
  261. $ DELETE GDEVX.OBJ.*,GDEVXINI.OBJ.*,GSMAIN.OBJ.*,GS.OBJ.*,-
  262.          GCONFIG.OBJ.*
  263. $ !
  264. $ DONE:
  265. $ ! ALL DONE
  266.