home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / fchek284.zip / makefile.unix.distrib < prev    next >
Makefile  |  1996-03-30  |  16KB  |  503 lines

  1. #=======================================================================
  2. # UNIX version of Makefile for Fortran program checker, Version 2.8.2beta
  3. #
  4. # Current target list:
  5. #    TAGS
  6. #    all            build ftnchek and its documentation files
  7. #    blurb.txt
  8. #    check            run validation test suite
  9. #    clean            remove unnecessary intermediate files
  10. #    clobber            make clean, and remove ftnchek executable
  11. #    dcl2inc.doc        ASCII form of documentation
  12. #    dcl2inc.ps        PostScript form of documentation
  13. #    distclean        remove everything that can be rebuilt
  14. #    docs            documentation files
  15. #    fcl2vcg.doc        ASCII form of documentation
  16. #    fcl2vcg.ps        PostScript form of documentation
  17. #    fortran.c        translate yacc code to C
  18. #    ftnchek            ftnchek executable program
  19. #    ftnchek.1        UNIX manual page document
  20. #    ftnchek.doc        ASCII form of documentation
  21. #    ftnchek.hlp        VAX/VMS HELP library source
  22. #    ftnchek.ps        PostScript form of documentation
  23. #    install            install ftnchek and dcl2inc and their man pages
  24. #    install-exe        install ftnchek and dcl2inc executables
  25. #    install-man        install only man pages
  26. #    install-man-sgi        install only man pages on SGI systems
  27. #    lint            run lint on source code
  28. #    mostlyclean        same as clean
  29. #    prog            same as ftnchek
  30. #    realclean        same as clobber
  31. #    spotless        make distclean, then remove formatted
  32. #                documentation (do NOT do this if you don't
  33. #                have groff or nroff/troff to recreate the
  34. #                documentation!)
  35. #    TAGS            emacs editor tags file
  36. #    tags            ex and vi editor tags file
  37. #    uninstall        undo an ftnchek installation
  38. #
  39. # Object file targets:
  40. #    ftnchek.o
  41. #    exprtype.o
  42. #    forlex.o
  43. #    fortran.o
  44. #    pgsymtab.o
  45. #    plsymtab.o
  46. #    project.o
  47. #    symtab.o
  48. #
  49. # Machine-specific convenience targets:
  50. #    DEC-ALPHA        DEC Alpha OSF/1 and OpenVMS
  51. #    DJGPP            IBM PC/DOS djgpp compiler
  52. #    GENERIC            most UNIX systems
  53. #    HP            HP 9000/7xx HP-UX 9.x
  54. #    IBM-RS6000        IBM RS/6000-xxx AIX 3.2
  55. #    LINUX            Linux on 386
  56. #    LINUX-486        Linux on 486 and up
  57. #    MIPS-MIPS        MIPS RC6280 RISCos 2.1.1
  58. #    SGI            Silicon Graphics IRIX 4.x and 5.x
  59. #    SGI-INSTALL        SGI special install for man page
  60. #    SOLARIS2.x        Sun Solaris 2.x
  61. #    SOLARIS2.x-gcc        Sun Solaris 2.x with GNU gcc
  62. #    SOLARIS2.x-apcc        Sun Solaris 2.x with Apogee apcc
  63. #    STARDENT        Stardent 15xx OS 2.2
  64. #    SUNOS5.x        Sun SunOS 5.x (same as Solaris 2.x)
  65. #    SUNOS5.x-gcc        Sun SunOS 5.x (same as Solaris 2.x) with
  66. #                GNU gcc
  67. #    SUNOS5.x-apcc        Sun SunOS 5.x (same as Solaris 2.x)
  68. #                with Apogee apcc
  69. #    SUNOS4.0        Sun SunOS 4.0
  70. #    SUNOS4.1        Sun SunOS 4.1
  71. #    ULTRIX-MIPS        DECstation ULTRIX 4.x
  72. #    UNIX            most UNIX systems
  73. #
  74. # For each of these machine-specific targets, you can modify what is
  75. # built by defining a value for TARGETS on the make command line
  76. # (default: ftnchek).
  77. #
  78. # If you use the VCG_SUPPORT option, the fcl2vcg script and documentation
  79. # should be installed using the target
  80. #    install-vcg        for all systems except SGI
  81. #    sgi-install-vcg        for SGI
  82. #
  83. #    Copyright (C) 1991 by Robert K. Moniot.
  84. #    This program is free software.  Permission is granted to
  85. #    modify it and/or redistribute it, retaining this notice.
  86. #    No guarantees accompany this software.
  87. #
  88. # Acknowledgements and thanks to Nelson H. F. Beebe of the University
  89. # of Utah for improvements to this Makefile.
  90. # [25-Apr-1994]
  91. #=======================================================================
  92.  
  93. # These definitions should be customized for your local conventions
  94. # if you want to do "make install" or "make uninstall"
  95. BINDIR          = /usr/local/bin
  96. LIBDIR        = /usr/local/lib/ftnchek
  97. MANDIR          = /usr/local/man
  98. #NROFF        = groff # if you have groff, but not nroff
  99. NROFF        = nroff
  100. #STRIP           = echo >/dev/null # if your system lacks strip
  101. STRIP           = strip
  102. # The following is only used for targets ftnchek.doc and ftnchek.hlp
  103. # which are not needed for unix platforms.  It removes control chars
  104. # and converts tabs to blanks.
  105. #COL        = /usr/5bin/col -bx    # For BSD-like systems
  106. COL        = col -bx        # For System V-like systems
  107.  
  108. # Editor tags file support
  109. CTAGS        = ctags
  110. CTAGSFLAGS    = -t
  111. ETAGS        = etags
  112.  
  113. # For "make check", we need new awk, either AT&T nawk or GNU gawk.
  114. # However, IBM RS/6000 AIX calls it awk.
  115. #NAWK        = awk
  116. #NAWK        = gawk
  117. NAWK        = nawk
  118.  
  119. # These system utilities should be standard on all UNIX systems
  120. CHMOD        = /bin/chmod
  121. CP              = /bin/cp
  122. MKDIR        = /bin/mkdir
  123. MV              = /bin/mv
  124. RM              = /bin/rm -f
  125. RMDIR        = /bin/rmdir
  126. SED        = /bin/sed
  127. SHELL        = /bin/sh
  128. TR        = /usr/ucb/tr
  129.  
  130. FTNCHEK        = ./ftnchek
  131. MAN2PS        = ./man2ps
  132.  
  133. # YACC          =parser name, YSTEM=stem on tab.c, tab.h
  134. # for yacc as the parser
  135. YACC            = yacc
  136. YSTEM           = y
  137.  
  138. # for GNU bison as the parser
  139. #YACC           = bison
  140. #YSTEM          = fortran
  141.  
  142. # OPTIONS is used to define various characteristics.  Most commonly
  143. # needed ones are given below; uncomment whichever you like.
  144. # See ftnchek.h for others, with their defaults and explanations.
  145.  
  146. #  To use the defaults for everything uncomment this:
  147. OPTIONS         =
  148.  
  149. #  To make all table sizes 10x bigger than defaults uncomment this:
  150. #OPTIONS        = -DLARGE_MACHINE
  151.  
  152. #  To allow the -vcg option uncomment this:
  153. #OPTIONS    = -DVCG_SUPPORT
  154.  
  155. #  To prohibit underscores in variable names, inline comments
  156. #   starting with '!',  the DO ... ENDDO loop forms and INCLUDE statements:
  157. #OPTIONS        = -DSTRICT_SYNTAX
  158.  
  159. # CFLAGS is used to define the operating system and options
  160. # Other
  161. CFLAGS          = -DUNIX $(OPTIONS) -O -D_BSD
  162. LDFLAGS         =
  163. YFLAGS          = -d
  164.  
  165. # fortran.o first because of possible remake if tokdefs.h changes (see below)
  166. OBJS            = fortran.o exprtype.o forlex.o ftnchek.o \
  167.           pgsymtab.o plsymtab.o project.o symtab.o
  168.  
  169. SRCS            = exprtype.c forlex.c fortran.c ftnchek.c \
  170.           ftnchek.h intrins.h iokeywds.h keywords.h newarge.c \
  171.           newargh.c newcome.c newcomh.c pgsymtab.c plsymtab.c \
  172.           project.c shell_mung.c symtab.c symtab.h tokdefs.h \
  173.           y.tab.h
  174.  
  175. #=======================================================================
  176.  
  177. prog:    ftnchek
  178.  
  179. all:    ftnchek docs
  180.  
  181. check:
  182.     cd test; $(MAKE) NAWK="$(NAWK)" -i -s check
  183.  
  184. lint:
  185.     lint $(LINTFLAGS) $(OBJS:.o=.c) -lm
  186.  
  187. # Remove intermediate files that are not required after the program is
  188. # built.
  189. clean mostlyclean:
  190.     -$(RM) *.o
  191.     -$(RM) \#*
  192.     -$(RM) a.out
  193.     -$(RM) *~
  194.     -$(RM) core
  195.  
  196. # Remove almost everything that make can rebuild
  197. clobber realclean:    clean
  198.     -$(RM) fortran.c
  199.     -$(RM) ftnchek
  200.  
  201. # dcl2inc.doc is ascii text form of documentation.  It should not matter
  202. # whether dcl2inc.1 or dcl2inc.man is used here.
  203. dcl2inc.doc:    dcl2inc.man
  204.     $(NROFF) -man dcl2inc.man | $(COL) >dcl2inc.doc
  205.  
  206. dcl2inc.ps:    dcl2inc.man
  207.     $(MAN2PS) <dcl2inc.man >dcl2inc.ps
  208.  
  209. # fcl2vcg.doc is ascii text form of documentation.  It should not matter
  210. # whether fcl2vcg.1 or fcl2vcg.man is used here.
  211. fcl2vcg.doc:    fcl2vcg.man
  212.     $(NROFF) -man fcl2vcg.man | $(COL) >fcl2vcg.doc
  213.  
  214. fcl2vcg.ps:    fcl2vcg.man
  215.     $(MAN2PS) <fcl2vcg.man >fcl2vcg.ps
  216.  
  217. # Remove everything that make can rebuild, preparatory to making a
  218. # distribution version.  We intentionally do NOT remove .ps and .doc
  219. # files, because some UNIX systems lack nroff/troff/groff.
  220. distclean:    realclean
  221.     -$(RM) *.dcl
  222.     -$(RM) cscope.out
  223.     -$(RM) tags
  224.     -$(RM) TAGS
  225.     -$(RM) ftnchek.1
  226.  
  227. docs:    blurb.txt dcl2inc.doc dcl2inc.ps fcl2vcg.doc fcl2vcg.ps ftnchek.doc \
  228.     ftnchek.hlp ftnchek.ps
  229.  
  230. ftnchek: $(OBJS)
  231.     $(CC) $(CFLAGS) $(LDFLAGS) -o ftnchek $(OBJS) -lm
  232.  
  233. # Documentation targets: If you make changes to the documentation,
  234. # you should edit only ftnchek.man and then re-make these targets.
  235. # If ftnchek.1 fails to make, ftnchek.man is usable directly except
  236. # that some troff-like processors may not give satisfactory results.
  237. #
  238. # Following sed script trims out the if-else machinery contained in
  239. # ftnchek.man to produce a clean nroff document.  The lines of the
  240. # script correspond to the following actions:
  241. #    1. remove text between lines of form ``.if \nh \{'' or .ie \nh \{''
  242. #       and lines of form ``\}'' (these are the help-related additions)
  243. #    2. remove lines of form ``.if !\nh \{''  (these preface man text)
  244. #       Also remove ``.if !\nb \{'' which are for blurb.
  245. #    3. remove lines of form ``.el \{''  (start of the else sections of
  246. #       the .if's of step 1)
  247. #    4. remove lines of form ``\}'' (closures of step 3 lines)
  248. #    5. remove lines of form ``.ie \nh text'' (one-liner help text)
  249. #    6. change lines of form ``.el \nh text'' to ``text'' (these are
  250. #       one-liner man text)
  251. #    7. change lines of form ``.if !\nh text'' to ``text'' (ditto)
  252. ftnchek.1:    ftnchek.man
  253.     $(SED) -e '/^\.i[fe] \\nh \\{/,/^\\}$$/d' \
  254.         -e '/^\.if !\\n[bh] \\{/d' \
  255.         -e '/^\.el \\{/d' \
  256.         -e '/^\\}/d' \
  257.         -e '/^\.i[fe] \\nh /d' \
  258.         -e 's/^\.el *\(.*\)$$/\1/' \
  259.         -e 's/^\.if !\\nh *\(.*\)$$/\1/' \
  260.          < ftnchek.man > ftnchek.1
  261.  
  262. # ftnchek.doc is ascii text form of documentation.  It should not matter
  263. # whether ftnchek.1 or ftnchek.man is used here.
  264. ftnchek.doc:    ftnchek.man
  265.     $(NROFF) -man ftnchek.man | $(COL) >ftnchek.doc
  266.  
  267. # ftnchek.ps is PostScript form of documentation.
  268. ftnchek.ps:    ftnchek.man
  269.     @make ftnchek.1
  270.     $(MAN2PS) <ftnchek.1 >ftnchek.ps
  271.  
  272. # blurb.txt is an ascii file for informational mailings.
  273. blurb.txt:    ftnchek.man
  274.     $(NROFF) -man -rb1 ftnchek.man | $(COL) >blurb.txt
  275.  
  276. # ftnchek.hlp is a VMS HELP library source document:
  277. # create ftnchek.hlb with $ LIBR/CREATE/HELP FTNCHEK.HLB FTNCHEK.HLP
  278. # The leading and trailing newlines in ftnchek.hlp should be removed.
  279. ftnchek.hlp:    ftnchek.man
  280.     $(SED) -e '1d' ftnchek.man | \
  281.     $(NROFF) -man -rh1 | $(COL) | \
  282.     $(SED) -e 's/^-\([a-zA-Z][a-zA-Z]*\)/\/\1/' \
  283.         -e 's/\([^a-zA-Z]\)-\([a-zA-Z][a-zA-Z]*\)/\1\/\2/g' \
  284.     >ftnchek.hlp
  285.  
  286. #
  287. # N.B. tokdefs.h is copy of y.tab.h used to avoid remaking stuff when
  288. # grammar changes but not tokens.
  289. # The following copies y.tab.h to tokdefs.h if changed, then aborts make,
  290. # since dependencies may have changed.
  291. fortran.c: fortran.y
  292.     $(YACC) $(YFLAGS) fortran.y
  293.     $(MV) $(YSTEM).tab.c fortran.c
  294.     @if cmp -s $(YSTEM).tab.h tokdefs.h ; then true ; else \
  295.         echo; echo tokdefs.h changed -- repeat make ; \
  296.         $(CP) $(YSTEM).tab.h tokdefs.h; \
  297.         false ; \
  298.     fi
  299.  
  300. # Install program and documentation on system
  301. install:    install-exe install-man
  302.  
  303. install-exe:    ftnchek
  304.     $(CP) ftnchek $(BINDIR)
  305.     -$(STRIP) $(BINDIR)/ftnchek
  306.     $(CHMOD) 755 $(BINDIR)/ftnchek
  307.     -$(MKDIR) $(LIBDIR)
  308.     $(CP) dcl2inc.awk $(LIBDIR)/dcl2inc.awk
  309.     $(CHMOD) 644 $(LIBDIR)/dcl2inc.awk
  310.     $(SED) -e 's@^LIBDIR=.*$$@LIBDIR=$(LIBDIR)@' -e 's/nawk/$(NAWK)/' \
  311.         <dcl2inc.sh >$(BINDIR)/dcl2inc
  312.     $(CHMOD) 755 $(BINDIR)/dcl2inc
  313.  
  314. # Install the fcl2vcg script and its documentation only if vcg is used
  315. install-vcg: install-vcg-exe install-vcg-man
  316.  
  317. install-vcg-exe:
  318.     $(CP) fcl2vcg.sh $(BINDIR)/fcl2vcg
  319.     $(CHMOD) 755 $(BINDIR)/fcl2vcg
  320.  
  321. install-vcg-man:
  322.     $(CP) fcl2vcg.man $(MANDIR)/man1/fcl2vcg.1
  323.     -$(RM) $(MANDIR)/cat1/fcl2vcg.1
  324.     $(CHMOD) 644 $(MANDIR)/man1/fcl2vcg.1
  325.  
  326. # Install man pages, taking care to remove old formatted ones, because
  327. # many man implentations fail to compare time stamps of raw and
  328. # formatted files, and will show out-of-date formatted files.
  329. install-man: ftnchek.1
  330.     $(CP) dcl2inc.man $(MANDIR)/man1/dcl2inc.1
  331.     -$(RM) $(MANDIR)/cat1/dcl2inc.1
  332.     $(CHMOD) 644 $(MANDIR)/man1/dcl2inc.1
  333.     $(CP) ftnchek.1 $(MANDIR)/man1/ftnchek.1
  334.     -$(RM) $(MANDIR)/cat1/ftnchek.1
  335.     $(CHMOD) 644 $(MANDIR)/man1/ftnchek.1
  336.  
  337. # Remove everything that the install target installed.
  338. uninstall:
  339.     -$(RM) $(BINDIR)/dcl2inc
  340.     -$(RM) $(BINDIR)/fcl2vcg
  341.     -$(RM) $(BINDIR)/ftnchek
  342.     -$(RM) $(LIBDIR)/dcl2inc.awk
  343.     -$(RM) $(MANDIR)/cat1/dcl2inc.1
  344.     -$(RM) $(MANDIR)/cat1/ftnchek.1
  345.     -$(RM) $(MANDIR)/ftnchek.z    # SGI
  346.     -$(RM) $(MANDIR)/man1/dcl2inc.1
  347.     -$(RM) $(MANDIR)/man1/fcl2vcg.1
  348.     -$(RM) $(MANDIR)/man1/ftnchek.1
  349.     -$(RMDIR) $(LIBDIR)
  350.  
  351. # WARNING: do NOT execute this target, unless you have nroff/troff or groff
  352. # to recreate the formatted documentation files.
  353. spotless:    distclean
  354.     $(RM) blurb.txt
  355.     $(RM) dcl2inc.doc
  356.     $(RM) dcl2inc.ps
  357.     $(RM) fcl2vcg.doc
  358.     $(RM) fcl2vcg.ps
  359.     $(RM) ftnchek.doc
  360.     $(RM) ftnchek.hlp
  361.     $(RM) ftnchek.ps
  362.  
  363. # ex and vi editor tags file
  364. tags:    $(SRCS)
  365.     $(CTAGS) $(CTAGSFLAGS) *.[ch]
  366.  
  367. # emacs editor tags file
  368. TAGS:    $(SRCS)
  369.     $(ETAGS) *.[ch]
  370.  
  371. #=======================================================================
  372. # Object file dependencies on include files
  373.  
  374. ftnchek.o:    ftnchek.h
  375.  
  376. exprtype.o:    ftnchek.h symtab.h tokdefs.h
  377.  
  378. forlex.o:    ftnchek.h keywords.h symtab.h tokdefs.h
  379.  
  380. fortran.o:    ftnchek.h symtab.h fortran.c
  381.  
  382. pgsymtab.o:    ftnchek.h symtab.h
  383.  
  384. plsymtab.o:    ftnchek.h symtab.h
  385.  
  386. project.o:    ftnchek.h symtab.h
  387.  
  388. symtab.o:    ftnchek.h iokeywds.h intrins.h symtab.h tokdefs.h
  389.  
  390. #=======================================================================
  391. # Machine specific targets to build ftnchek with suitable compile options.
  392. # Use 'MAKE_OPTIONS= "YACC=/usr/local/gnu/bin/bison" "YSTEM=fortran"'
  393. # to select GNU bison parser, if you have touched fortran.y.
  394.  
  395. TARGETS        = ftnchek
  396.  
  397. # On DEC Alpha systems, compilers default to fast non-IEEE-754-conformant
  398. # arithmetic that is incapable of handling denormalized numbers,
  399. # Infinity, and NaN.  ftnchek can die on at least test/complex.f if IEEE
  400. # 754 behavior is not restored with -ieee_with_inexact.  The -Olimit
  401. # value increases the optimizer table sizes.
  402. DEC-ALPHA:
  403.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O -D_BSD" \
  404.         "CC = c89 -ieee_with_inexact -Olimit 1000" $(MAKE_OPTIONS) \
  405.         $(TARGETS)
  406.  
  407. # target for djgpp on IBM PC by Judah Milgram, U. Maryand College Park
  408. DJGPP:
  409.     $(MAKE) 'CFLAGS= $(OPTIONS) -DLARGE_MACHINE -O' \
  410.     $(MAKE_OPTIONS) $(TARGETS)
  411.     coff2exe ftnchek
  412.     del ftnchek
  413.  
  414. GENERIC LINUX STARDENT UNIX:
  415.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O -D_BSD" \
  416.         $(MAKE_OPTIONS) $(TARGETS)
  417.  
  418. # Add compiler flag to eliminate optimizer table overflow
  419. HP:
  420.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O -D_BSD +Obb700" \
  421.         $(MAKE_OPTIONS) $(TARGETS)
  422.  
  423. IBM-RS6000:
  424.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) \
  425.         -DAIXC -DRAND_NO_ARG -O -D_BSD" \
  426.         "CC = c89 -D_POSIX_SOURCE" $(MAKE_OPTIONS) \
  427.         $(TARGETS)
  428.  
  429. LINUX-486:
  430.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O -D_BSD -m486" \
  431.         $(MAKE_OPTIONS) $(TARGETS)
  432.  
  433. # MIPS RC6280 (and other models) RISCos 2.1.1AC (and EP/IX)
  434. MIPS-MIPS:
  435.     $(MAKE) "CFLAGS= -DUNIX $(OPTIONS) -DLARGE_MACHINE -O -D_BSD -Olimit 1000 -systype bsd43" \
  436.         $(MAKE_OPTIONS) $(TARGETS)
  437.  
  438. # SGI target improved by Mark Hanning-Lee of JPL.  Use -O2 for full
  439. # optimization.  4.0.x users can even use -O3, but 5.2 complains about
  440. # using -O3 with the -c option.
  441. # Warning: do not split this quoted string across a line boundary; SGI
  442. # IRIX 4.0.x make incorrectly preserves the newline, causing
  443. # compilation commands to fail.  Irix 5.x make handles the newline OK.
  444.  
  445. SGIFLAGS="CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -DVMS_IO -DVMS_TAB -O2 -D_BSD"
  446. SGI:
  447.     $(MAKE) $(SGIFLAGS) $(MAKE_OPTIONS) $(TARGETS)
  448.  
  449. # IRIX uses pre-formatted, packed man pages and nroff is not bundled with it.
  450. # Only execute this target if your IRIX has nroff.
  451. SGI-INSTALL: install-exe install-man-sgi
  452.  
  453. install-man-sgi:
  454.     $(NROFF) -man dcl2inc.man > dcl2inc.cat ; \
  455.     if pack dcl2inc.cat ; \
  456.     then \
  457.         $(MV) dcl2inc.cat.z $(MANDIR)/dcl2inc.z ; \
  458.         $(CHMOD) 644 $(MANDIR)/dcl2inc.z ; \
  459.     fi
  460.     $(NROFF) -man ftnchek.man > ftnchek.cat ; \
  461.     if pack ftnchek.cat ; \
  462.     then \
  463.         $(MV) ftnchek.cat.z $(MANDIR)/ftnchek.z ; \
  464.         $(CHMOD) 644 $(MANDIR)/ftnchek.z ; \
  465.     fi
  466.  
  467. sgi-install-vcg: install-vcg-exe install-vcg-man-sgi
  468.  
  469. install-vcg-man-sgi:
  470.     $(NROFF) -man fcl2vcg.man > fcl2vcg.cat ; \
  471.     if pack fcl2vcg.cat ; \
  472.     then \
  473.         $(MV) fcl2vcg.cat.z $(MANDIR)/fcl2vcg.z ; \
  474.         $(CHMOD) 644 $(MANDIR)/fcl2vcg.z ; \
  475.     fi
  476.  
  477. SOLARIS2.x SUNOS5.x:
  478.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -xO4 -D_BSD" \
  479.         $(MAKE_OPTIONS) $(TARGETS)
  480.  
  481. SOLARIS2.x-gcc SUNOS5.x-gcc:
  482.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O2 -D_BSD" \
  483.         $(MAKE_OPTIONS) CC=gcc $(TARGETS)
  484.  
  485. SOLARIS2.x-apcc SUNOS5.x-apcc:
  486.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O5 -D_BSD" \
  487.         $(MAKE_OPTIONS) CC=apcc $(TARGETS)
  488.  
  489. SUNOS4.0:
  490.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O -D_BSD" \
  491.         $(MAKE_OPTIONS) $(TARGETS)
  492.  
  493. # NB: ftnchek 2.8 fails with -O4 on SunOS 4.1.3, but -O3 is okay
  494. # The failure occurs from bad code generation for forlex.c with cc
  495. # version RELEASE SC1.0 1Mar1991 (from "showrev cc").
  496. SUNOS4.1:
  497.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O3 -D_BSD" \
  498.         $(MAKE_OPTIONS) $(TARGETS)
  499.  
  500. ULTRIX-MIPS:
  501.     $(MAKE) "CFLAGS= -DUNIX $(OPTIONS) -DLARGE_MACHINE -Olimit 2000 -O -D_BSD"\
  502.         $(MAKE_OPTIONS) $(TARGETS)
  503.