home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / maths / plplot / plplot_2 / sys / vms / makefile < prev    next >
Encoding:
Makefile  |  1992-05-20  |  10.1 KB  |  411 lines

  1. #----------------------------------------------------------------------#
  2. #
  3. # Makefile for PLPLOT under VMS.
  4. # Maurice LeBrun, IFS, University of Texas, Mar 1, 1991.
  5. #
  6. # Intended for use with Todd Aven's MAKE/VMS.
  7. #
  8. # The available output devices are controlled by the PLDEVICES variable,
  9. # a list of defines for the C preprocessor (affecting only dispatch.c).
  10. # When installing plplot you may wish to exclude devices not present
  11. # on your system in order to reduce screen clutter.  The default setting
  12. # is to include all supported devices.
  13. #
  14. # Problems/bugs:
  15. #
  16. # 1. There are no soft links in VMS, so we just copy all files to temporary
  17. #    directory instead.  If you edit them, please remember to update the
  18. #    master copy in the correct directory.
  19. #
  20. # 2. The dependencies on the header files have been omitted, for simplicity.
  21. #    If you change any of the header files, assume that the whole package 
  22. #    must be rebuilt.
  23. #
  24. # 3. The plot library has been broken into 3 parts, consisting of:
  25. #    main sources & drivers, C-stubs, Fortran-stubs.  This came about 
  26. #    because of problems with long command lines and the fact that you
  27. #    can't concatenate object files made by VaxC with those made by Vax
  28. #    Fortran.
  29. #
  30. # 4. The X window driver is not included, as I don't know what libraries
  31. #    to link with when building the executable, nor if these libraries are
  32. #    present on all vaxen.  If anyone wants to try their hand, feel free.
  33. #
  34. # Other notes:
  35. #
  36. # 1. The font locating code looks in the following places for the fonts:
  37. #
  38. #    current directory
  39. #    lib:
  40. #    sys$login:    (home directory)
  41. #    PLFONTDIR
  42. #
  43. #    It is recommended that you store the fonts in a local directory during
  44. #    installation.  When you have verified the package works as expected,
  45. #    simply move the fonts to the appropriate system directory given by
  46. #    PLFONTDIR and then all users will have access to the fonts (no
  47. #    recompilation necessary).  PLFONTDIR should be a site-independent
  48. #    directory specification, such as "sys$sysroot:[sysfont.plplot]".
  49. #
  50. # 2. Specify "debug" as the first target to set debugging flags, e.g.
  51. #    $ make debug <target>
  52. #
  53. #----------------------------------------------------------------------#
  54. # Directory structure.
  55. # See right before rule declaration for plot library specifications.
  56.  
  57. PLFONTDIR="sys$sysroot:[sysfont.plplot]"
  58.  
  59. PLDIR_DIR= [-]
  60. PLLIB_DIR= [-.LIB]
  61. PLFNT_DIR= LIB:
  62. PLTMP_DIR= [-.TMP]
  63.  
  64. SYS_LIBS= sys$library:vaxcrtl/lib
  65.  
  66. PLDEVICES = /define=(META, XTERM, XWIN, TEKT, DG300, TEKF, PS, LJII, \
  67.       HP7470, HP7580, IMP)
  68.  
  69. PLDEVICES = /define=(META, XTERM, TEKT, TEKF, PS)
  70.  
  71. #----------------------------------------------------------------------#
  72. # Compiler/linker macros.
  73. #
  74. # The 'fflags', 'cflags' and 'lflags' symbols are for debugging.  
  75. # VMS make lets us specify these easily from the command line as a separate
  76. # target ("debug"), but it must come first, e.g. $ make debug libs.
  77.  
  78. M4    = m4
  79. CC    = cc 'cflags'
  80. CFLAGS    = /define=(BRAINDEAD)
  81. FONTFLAG=
  82.  
  83. F77    = fortran 'fflags'
  84. FFLAGS    = 
  85. LD    = link 'lflags'
  86. LINK    = $(LD)
  87. LFLAGS = 
  88. CLFLAGS = 
  89. FLFLAGS = 
  90.  
  91. #----------------------------------------------------------------------#
  92. # Object file macros
  93. # Main sources.
  94.  
  95. OBJ =    \
  96.     base.obj, \
  97.     convert.obj, \
  98.     genlin.obj, \
  99.     move.obj, \
  100.     pladv.obj, \
  101.     plaxes.obj, \
  102.     plbeg.obj, \
  103.     plbin.obj, \
  104.     plbox.obj, \
  105.     plbox3.obj, \
  106.     plccal.obj, \
  107.     plcntr.obj, \
  108.     plcol.obj, \
  109.     plcont.obj, \
  110.     plconf.obj, \
  111.     pldtik.obj, \
  112.     plend.obj, \
  113.     plenv.obj, \
  114.     plerr.obj, \
  115.     plexit.obj, \
  116.     plfill.obj, \
  117.     plfont.obj, \
  118.     plform.obj, \
  119.     plgra.obj, \
  120.     plgrid3.obj, \
  121.     plgspa.obj, \
  122.     plhist.obj, \
  123.     pljoin.obj, \
  124.     pllab.obj, \
  125.     pllclp.obj, \
  126.     plline.obj, \
  127.     pllsty.obj, \
  128.     plmesh.obj, \
  129.     plmtex.obj, \
  130.     plnxtv.obj, \
  131.     plot3d.obj, \
  132.     plpat.obj, \
  133.     plpsty.obj, \
  134.     plptex.obj, \
  135.     plrot.obj, \
  136.     plsdef.obj, \
  137.     plside3.obj, \
  138.     plstar.obj, \
  139.     plstyl.obj, \
  140.     plsvpa.obj, \
  141.     plsym.obj, \
  142.     plt3zz.obj, \
  143.     pltick.obj, \
  144.     plvasp.obj, \
  145.     plvpas.obj, \
  146.     plvpor.obj, \
  147.     plvsta.obj, \
  148.     plw3d.obj, \
  149.     plwid.obj, \
  150.     plwind.obj, \
  151.     plxybx.obj, \
  152.     plzbx.obj, \
  153.     string.obj 
  154.  
  155. # Drivers
  156. # For VMS, use Unix drivers.
  157.  
  158. UNIX_OBJ = \
  159.     dg300.obj, \
  160.     dispatch.obj, \
  161.     hp7470.obj, \
  162.     hp7580.obj, \
  163.     impress.obj, \
  164.     ljii.obj, \
  165.     ps.obj, \
  166.     tek.obj, \
  167.     plmeta.obj, \
  168.     pdfutils.obj, \
  169.     xfig.obj, \
  170.     xterm.obj
  171.  
  172. # Support files for font generators.
  173.  
  174. FONT_OBJ = \
  175.     font01.obj, \
  176.     font02.obj, \
  177.     font03.obj, \
  178.     font04.obj, \
  179.     font05.obj, \
  180.     font06.obj, \
  181.     font07.obj, \
  182.     font08.obj, \
  183.     font09.obj, \
  184.     font10.obj, \
  185.     font11.obj
  186.  
  187. # C language stubs for linking Plplot to Fortran.
  188.  
  189. CSTUB_OBJ = \
  190.     long2str.obj, \
  191.     sc3d.obj, \
  192.     scconf.obj, \
  193.     scstubs.obj
  194.  
  195. # Fortran language stubs for linking Plplot to Fortran.
  196.  
  197. FSTUB_OBJ = \
  198.     islen.obj, \
  199.     sfstubs.obj, \
  200.     str2int.obj
  201.  
  202. #----------------------------------------------------------------------#
  203. # Plot library specifications.
  204.  
  205. PLLIB_MAIN=    $(PLLIB_DIR)libplplotf1.obj
  206. PLLIB_CSTUB=    $(PLLIB_DIR)libplplotf2.obj
  207. PLLIB_FSTUB=    $(PLLIB_DIR)libplplotf3.obj
  208.  
  209. TERM_OBJ=    $(UNIX_OBJ)
  210.  
  211. PLLIB_C=    $(PLLIB_MAIN)
  212.  
  213. PLLIB_ALL=    $(PLLIB_FSTUB), \
  214.         $(PLLIB_CSTUB), \
  215.         $(PLLIB_MAIN)
  216.  
  217. #----------------------------------------------------------------------#
  218. # Rules
  219. # Placed here to ensure all macros are defined.
  220.  
  221. *.obj:    *.c
  222.     write sys$output "  Compiling $*.c"
  223.     $(CC) $(CFLAGS) $*.c
  224.  
  225. *.obj:    *.f
  226.     write sys$output "  Compiling $*.f"
  227.     $(F77) $(FFLAGS) /object=$@  $*.f
  228.  
  229. # The .exe rule is for all example programs.
  230. # Just link with all the plot libraries to keep things simple.
  231.  
  232. *.exe: *.obj
  233.     write sys$output "  Linking $*.obj"
  234.     $(LINK) $(LFLAGS) /exe=$@ \
  235.         $*.obj, $(PLLIB_ALL), $(SYS_LIBS)
  236.  
  237. #----------------------------------------------------------------------#
  238. # Targets
  239. # The default is to make all the object libraries.
  240. # Abbreviations are used so that invocation from command line is short.
  241. # You can make everything (except demos) by typing 'make everything'
  242. # but you must create the links ('make links') beforehand.
  243.  
  244. default: libs
  245. everything: libs fonts plrender scan
  246.  
  247. libs:    libc libfs
  248. libc:    $(PLLIB_MAIN) $(PLLIB_CSTUB)
  249. libfs:    $(PLLIB_FSTUB)
  250.  
  251. #----------------------------------------------------------------------#
  252. # Plot libraries.
  253. #
  254. # Note -- don't actually use libraries, just concatenated object files.
  255. # Libraries cause lots of grief on some systems because often (reason
  256. # unknown) a structure that needs to be initialized is not (happens on 
  257. # A/IX, VMS).  Fortunately package is reasonably small, especially if
  258. # you compile with debugging off.
  259.  
  260. $(PLLIB_MAIN):    $(OBJ), $(TERM_OBJ)
  261.     write sys$output "Updating $(PLLIB_MAIN)"
  262.     copy    $(OBJ)        $(PLLIB_MAIN)
  263.     append    $(TERM_OBJ)    $(PLLIB_MAIN)
  264.     append    $(CSTUB_OBJ)    $(PLLIB_CSTUB)
  265.  
  266. $(PLLIB_FSTUB):    $(FSTUB_OBJ)
  267.     write sys$output "Updating $(PLLIB_FSTUB)"
  268.     copy    $(FSTUB_OBJ)    $(PLLIB_FSTUB)
  269.  
  270. #----------------------------------------------------------------------#
  271. # Font files.
  272. # Note 6 font files actually created.
  273. # sfont - standard font
  274. # xfont - extended fonts
  275.  
  276. fonts:    sfont xfont
  277.  
  278. sfont:    plstnd.fnt
  279. xfont:    plxtnd.fnt
  280.  
  281. plstnd.fnt: stndfont.obj, $(FONT_OBJ)
  282.     $(LINK) $(LFLAGS) \
  283.      /exe=stndfont.exe stndfont.obj, $(FONT_OBJ), $(SYS_LIBS)
  284.     run stndfont.exe
  285.     rename *.fnt,*.idx,*.lkp $(PLFNT_DIR)
  286.  
  287. plxtnd.fnt: xtndfont.obj, $(FONT_OBJ)
  288.     $(LINK) $(LFLAGS) \
  289.      /exe=xtndfont.exe xtndfont.obj, $(FONT_OBJ), $(SYS_LIBS)
  290.     run xtndfont.exe
  291.     rename *.fnt,*.idx,*.lkp $(PLFNT_DIR)
  292.  
  293. #----------------------------------------------------------------------#
  294. # Explicit rules
  295. #
  296. # plfontld.c is the only file which needs to know $(PLFONTDIR)
  297.  
  298. plfontld.obj: plfontld.c
  299.     $(CC) $(CFLAGS) $(FONTFLAG) plfontld.c
  300.  
  301. # dispatch.c is the only file which needs to know $(PLDEVICES)
  302.  
  303. dispatch.obj: dispatch.c
  304.     $(CC) $(CFLAGS) $(PLDEVICES) dispatch.c
  305.  
  306. #----------------------------------------------------------------------#
  307. # Utility programs.
  308.  
  309. scan:    scan.exe
  310. scan.exe:    scan.c
  311.     $(CC) $(CFLAGS) scan.c
  312.     $(LINK) /exe=scan.exe \
  313.         scan.obj, sys$library:vaxcrtl/lib
  314.  
  315. plrender: plrender.exe
  316. plrender.exe: plrender.obj, getopt.obj
  317.     $(LINK) /exe=plrender.exe \
  318.         plrender.obj, getopt.obj, $(PLLIB_C), sys$library:vaxcrtl/lib
  319.  
  320. #----------------------------------------------------------------------#
  321. # Example programs, in c.
  322.  
  323. cdemos:    x01c x02c x03c x04c x05c x06c x07c x08c x09c x10c x11c x12c x13c
  324.  
  325. x01c:    x01c.exe
  326. x02c:    x02c.exe
  327. x03c:    x03c.exe
  328. x04c:    x04c.exe
  329. x05c:    x05c.exe
  330. x06c:    x06c.exe
  331. x07c:    x07c.exe
  332. x08c:    x08c.exe
  333. x09c:    x09c.exe
  334. x10c:    x10c.exe
  335. x11c:    x11c.exe
  336. x12c:    x12c.exe
  337. x13c:    x13c.exe
  338.  
  339. x01c.exe: x01c.obj $(PLLIB_ALL)
  340. x02c.exe: x02c.obj $(PLLIB_ALL)
  341. x03c.exe: x03c.obj $(PLLIB_ALL)
  342. x04c.exe: x04c.obj $(PLLIB_ALL)
  343. x05c.exe: x05c.obj $(PLLIB_ALL)
  344. x06c.exe: x06c.obj $(PLLIB_ALL)
  345. x07c.exe: x07c.obj $(PLLIB_ALL)
  346. x08c.exe: x08c.obj $(PLLIB_ALL)
  347. x09c.exe: x09c.obj $(PLLIB_ALL)
  348. x10c.exe: x10c.obj $(PLLIB_ALL)
  349. x11c.exe: x11c.obj $(PLLIB_ALL)
  350. x12c.exe: x12c.obj $(PLLIB_ALL)
  351. x13c.exe: x13c.obj $(PLLIB_ALL)
  352.  
  353. #----------------------------------------------------------------------#
  354. # Example programs, in Fortran.
  355.  
  356. fdemos: x01f x02f x03f x04f x05f x06f x07f x08f x09f x10f x11f x12f x13f
  357.  
  358. x01f:    x01f.exe
  359. x02f:    x02f.exe
  360. x03f:    x03f.exe
  361. x04f:    x04f.exe
  362. x05f:    x05f.exe
  363. x06f:    x06f.exe
  364. x07f:    x07f.exe
  365. x08f:    x08f.exe
  366. x09f:    x09f.exe
  367. x10f:    x10f.exe
  368. x11f:    x11f.exe
  369. x12f:    x12f.exe
  370. x13f:    x13f.exe
  371.  
  372. x01f.exe: x01f.obj $(PLLIB_ALL)
  373. x02f.exe: x02f.obj $(PLLIB_ALL)
  374. x03f.exe: x03f.obj $(PLLIB_ALL)
  375. x04f.exe: x04f.obj $(PLLIB_ALL)
  376. x05f.exe: x05f.obj $(PLLIB_ALL)
  377. x06f.exe: x06f.obj $(PLLIB_ALL)
  378. x07f.exe: x07f.obj $(PLLIB_ALL)
  379. x08f.exe: x08f.obj $(PLLIB_ALL)
  380. x09f.exe: x09f.obj $(PLLIB_ALL)
  381. x10f.exe: x10f.obj $(PLLIB_ALL)
  382. x11f.exe: x11f.obj $(PLLIB_ALL)
  383. x12f.exe: x12f.obj $(PLLIB_ALL)
  384. x13f.exe: x13f.obj $(PLLIB_ALL)
  385.  
  386. #----------------------------------------------------------------------#
  387. # First time only, should be executed from $(PLTMP_DIR)
  388.  
  389. links:
  390.     copy \
  391.         [-.src]*.c, \
  392.         [-.src.stubc]*.c, \
  393.         [-.src.stubf]*.f, \
  394.         [-.utils]*.c, \
  395.         [-.fonts]*.c, \
  396.         [-.include]*.h, \
  397.         [-.drivers]*.c, \
  398.         [-.examples.C]*.c, \
  399.         [-.examples.f77]*.f \
  400.         $(PLTMP_DIR)
  401.  
  402. #----------------------------------------------------------------------#
  403. # Compiler and linker flags for debug option.
  404. # These are done via DCL symbols to allow them to be changed easily from
  405. # the make command line.  Specify "debug" as a target before others.
  406.  
  407. debug:
  408.     fflags := /debug/noopt
  409.     cflags := /debug/noopt
  410.     lflags := /debug
  411.