home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / fchek284.zip / makefile.os2 < prev    next >
Makefile  |  1996-03-31  |  21KB  |  598 lines

  1. #=======================================================================
  2. # UNIX version of Makefile for Fortran program checker, Version 2.8.4
  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. #    OS2emx            IBM OS/2 2.x, w. gcc/emx and emx.dll
  59. #    OS2noemx        IBM OS/2 2.x, w. gcc/emx, doesn't need emx.dll
  60. #    SGI            Silicon Graphics IRIX 4.x and 5.x
  61. #    SGI-INSTALL        SGI special install for man page
  62. #    SOLARIS2.x        Sun Solaris 2.x
  63. #    SOLARIS2.x-gcc        Sun Solaris 2.x with GNU gcc
  64. #    SOLARIS2.x-apcc        Sun Solaris 2.x with Apogee apcc
  65. #    STARDENT        Stardent 15xx OS 2.2
  66. #    SUNOS5.x        Sun SunOS 5.x (same as Solaris 2.x)
  67. #    SUNOS5.x-gcc        Sun SunOS 5.x (same as Solaris 2.x) with
  68. #                GNU gcc
  69. #    SUNOS5.x-apcc        Sun SunOS 5.x (same as Solaris 2.x)
  70. #                with Apogee apcc
  71. #    SUNOS4.0        Sun SunOS 4.0
  72. #    SUNOS4.1        Sun SunOS 4.1
  73. #    ULTRIX-MIPS        DECstation ULTRIX 4.x
  74. #    UNIX            most UNIX systems
  75. #
  76. # For each of these machine-specific targets, you can modify what is
  77. # built by defining a value for TARGETS on the make command line
  78. # (default: ftnchek).
  79. #
  80. # If you use the VCG_SUPPORT option, the fcl2vcg script and documentation
  81. # should be installed using the target
  82. #    install-vcg        for all systems except SGI
  83. #    sgi-install-vcg        for SGI
  84. #
  85. #    Copyright (C) 1991 by Robert K. Moniot.
  86. #    This program is free software.  Permission is granted to
  87. #    modify it and/or redistribute it, retaining this notice.
  88. #    No guarantees accompany this software.
  89. #
  90. # Acknowledgements and thanks to Nelson H. F. Beebe of the University
  91. # of Utah for improvements to this Makefile.
  92. # [25-Apr-1994]
  93. #=======================================================================
  94.  
  95. # These definitions should be customized for your local conventions
  96. # if you want to do "make install" or "make uninstall"
  97. BINDIR          = /usr/local/bin
  98. LIBDIR        = /usr/local/lib/ftnchek
  99. MANDIR          = /usr/local/man
  100. #NROFF        = groff # if you have groff, but not nroff
  101. NROFF        = nroff
  102. #STRIP           = echo >/dev/null # if your system lacks strip
  103. STRIP           = strip
  104. # The following is only used for targets ftnchek.doc and ftnchek.hlp
  105. # which are not needed for unix platforms.  It removes control chars
  106. # and converts tabs to blanks.
  107. #COL        = /usr/5bin/col -bx    # For BSD-like systems
  108. COL        = col -bx        # For System V-like systems
  109.  
  110. # Editor tags file support
  111. CTAGS        = ctags
  112. CTAGSFLAGS    = -t
  113. ETAGS        = etags
  114.  
  115. # For "make check", we need new awk, either AT&T nawk or GNU gawk.
  116. # However, IBM RS/6000 AIX calls it awk.
  117. #NAWK        = awk
  118. #NAWK        = gawk
  119. NAWK        = nawk
  120.  
  121. # These system utilities should be standard on all UNIX systems
  122. # BINPATH is the path for the following binaries, in case
  123. # they are installed on a non-UNIX system like OS/2 from the
  124. # GNU {file,text,shell} utilities. For UNIX, BINPATH should be /bin/
  125. # (with the trailing slash!), on systems where all the commands are
  126. # in the path, it can be empty.
  127. #
  128. # BINPATH         = /bin/
  129. BINPATH         = 
  130. CHMOD        = $(BINPATH)chmod
  131. CP              = $(BINPATH)cp
  132. MKDIR        = $(BINPATH)mkdir
  133. MV              = $(BINPATH)mv
  134. RM              = $(BINPATH)rm -f
  135. RMDIR        = $(BINPATH)rmdir
  136. SED        = $(BINPATH)sed
  137. #
  138. # On OS/2, for some reason under GNU Make the SHELL must be commented out 
  139. # here. This may be specific to the tcsh and sh ports I use, however.
  140. # SHELL        =
  141. SHELL        = $(BINPATH)sh
  142. #
  143. TR        = /usr/ucb/tr
  144. FTNCHEK        = ./ftnchek
  145. MAN2PS        = ./man2ps
  146.  
  147. # YACC          =parser name, YSTEM=stem on tab.c, tab.h
  148. # for yacc as the parser
  149. YACC            = yacc
  150. YSTEM           = y
  151.  
  152. # for GNU bison as the parser
  153. #YACC           = bison
  154. #YSTEM          = fortran
  155.  
  156. # OPTIONS is used to define various characteristics.  Most commonly
  157. # needed ones are given below; uncomment whichever you like.
  158. # See ftnchek.h for others, with their defaults and explanations.
  159.  
  160. #  To use the defaults for everything uncomment this:
  161. OPTIONS         =
  162.  
  163. #  To make all table sizes 10x bigger than defaults uncomment this:
  164. # OPTIONS        = -DLARGE_MACHINE
  165.  
  166. #  To allow the -vcg option uncomment this:
  167. #OPTIONS    = -DVCG_SUPPORT
  168.  
  169. #  To prohibit underscores in variable names, inline comments
  170. #   starting with '!',  the DO ... ENDDO loop forms and INCLUDE statements:
  171. #OPTIONS        = -DSTRICT_SYNTAX
  172.  
  173. # CFLAGS is used to define the operating system and options
  174. # Other
  175. CFLAGS          = -DUNIX $(OPTIONS) -O -D_BSD
  176. LDFLAGS         = 
  177. YFLAGS          = -d
  178.  
  179.  
  180. # Object extension. By default this is .o, but can be set to .obj (or 
  181. # whatever). This is used for the symbolic target OS2noemx, and should
  182. # be useful for VMS, or non-gcc C compilers on OS/2. This works for
  183. # the UNIX targets as well.
  184.  
  185. OBJ             = .o
  186.  
  187. # Here is another way which relies on GNU make (often installed as gmake).
  188. # Maybe some other make utilities can handle that construct, too.
  189. # On some systems, make _is_ GNU make, on some it is gmake.
  190. # You may uncomment it in case you have GNU make:
  191. # ifeq ($(OBJ),)
  192. #   OBJ             = .o
  193. # endif
  194. # It checks whether an OBJ extension has been defined explicitly (by a
  195. # symbolic target or an entry above), in which case it doesn't change it.
  196. # If no OBJ extension has been defined it defaults to .o.
  197.  
  198. # implicit rule to allow for different extensions of object files (VAX,
  199. # OS/2 linking with link386.exe, etc.)
  200. %$(OBJ):
  201.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $*.c -o $@
  202.  
  203. # fortran.o first because of possible remake if tokdefs.h changes (see below)
  204. OBJS            = fortran$(OBJ) exprtype$(OBJ) forlex$(OBJ) ftnchek$(OBJ) \
  205.           pgsymtab$(OBJ) plsymtab$(OBJ) project$(OBJ) symtab$(OBJ)
  206.  
  207. SRCS            = exprtype.c forlex.c fortran.c ftnchek.c \
  208.           ftnchek.h intrins.h iokeywds.h keywords.h newarge.c \
  209.           newargh.c newcome.c newcomh.c pgsymtab.c plsymtab.c \
  210.           project.c shell_mung.c symtab.c symtab.h tokdefs.h \
  211.           y.tab.h
  212.  
  213. # executable file extension. Needed, e.g. when linking under OS/2 with
  214. # link386.exe, as done with the symbolic target 'OS2noemx'.
  215. # The symbolic target 'OS2emx' calls emxbind which explicitly makes an
  216. # executable file from the 'a.out' type result.
  217. # The default extension for EXE is empty, on OS/2 it is .exe, given in
  218. # the sybolic targets explicitly.
  219. EXE =
  220.  
  221. #=======================================================================
  222.  
  223. prog:    $(FTNCHEK)
  224.  
  225. all:    prog docs
  226.  
  227. check:
  228.     cd test; $(MAKE) NAWK="$(NAWK)" -i -s check
  229.  
  230. lint:
  231.     lint $(LINTFLAGS) $(OBJS:$(OBJ)=.c) -lm
  232.  
  233. # Remove intermediate files that are not required after the program is
  234. # built.
  235. clean mostlyclean:
  236.     -$(RM) *$(OBJ)
  237.     -$(RM) \#*
  238.     -$(RM) a.out
  239.     -$(RM) *~
  240.     -$(RM) core
  241.  
  242. # Remove almost everything that make can rebuild
  243. clobber realclean:    clean
  244.     -$(RM) fortran.c
  245.     -$(RM) ftnchek$(EXE)
  246.  
  247. # dcl2inc.doc is ascii text form of documentation.  It should not matter
  248. # whether dcl2inc.1 or dcl2inc.man is used here.
  249. dcl2inc.doc:    dcl2inc.man
  250.     $(NROFF) -man dcl2inc.man | $(COL) >dcl2inc.doc
  251.  
  252. dcl2inc.ps:    dcl2inc.man
  253.     $(MAN2PS) <dcl2inc.man >dcl2inc.ps
  254.  
  255. # fcl2vcg.doc is ascii text form of documentation.  It should not matter
  256. # whether fcl2vcg.1 or fcl2vcg.man is used here.
  257. fcl2vcg.doc:    fcl2vcg.man
  258.     $(NROFF) -man fcl2vcg.man | $(COL) >fcl2vcg.doc
  259.  
  260. fcl2vcg.ps:    fcl2vcg.man
  261.     $(MAN2PS) <fcl2vcg.man >fcl2vcg.ps
  262.  
  263. # Remove everything that make can rebuild, preparatory to making a
  264. # distribution version.  We intentionally do NOT remove .ps and .doc
  265. # files, because some UNIX systems lack nroff/troff/groff.
  266. distclean:    realclean
  267.     -$(RM) *.dcl
  268.     -$(RM) cscope.out
  269.     -$(RM) tags
  270.     -$(RM) TAGS
  271.     -$(RM) ftnchek.1
  272.  
  273. docs:    blurb.txt dcl2inc.doc dcl2inc.ps fcl2vcg.doc fcl2vcg.ps ftnchek.doc \
  274.     ftnchek.hlp ftnchek.ps
  275.  
  276. $(FTNCHEK): $(OBJS)
  277.     $(CC) $(CFLAGS) $(LDFLAGS) -o $(FTNCHEK)$(EXE) $(OBJS) -lm
  278.  
  279. # Documentation targets: If you make changes to the documentation,
  280. # you should edit only ftnchek.man and then re-make these targets.
  281. # If ftnchek.1 fails to make, ftnchek.man is usable directly except
  282. # that some troff-like processors may not give satisfactory results.
  283. #
  284. # Following sed script trims out the if-else machinery contained in
  285. # ftnchek.man to produce a clean nroff document.  The lines of the
  286. # script correspond to the following actions:
  287. #    1. remove text between lines of form ``.if \nh \{'' or .ie \nh \{''
  288. #       and lines of form ``\}'' (these are the help-related additions)
  289. #    2. remove lines of form ``.if !\nh \{''  (these preface man text)
  290. #       Also remove ``.if !\nb \{'' which are for blurb.
  291. #    3. remove lines of form ``.el \{''  (start of the else sections of
  292. #       the .if's of step 1)
  293. #    4. remove lines of form ``\}'' (closures of step 3 lines)
  294. #    5. remove lines of form ``.ie \nh text'' (one-liner help text)
  295. #    6. change lines of form ``.el \nh text'' to ``text'' (these are
  296. #       one-liner man text)
  297. #    7. change lines of form ``.if !\nh text'' to ``text'' (ditto)
  298. ftnchek.1:    ftnchek.man
  299.     $(SED) -e '/^\.i[fe] \\nh \\{/,/^\\}$$/d' \
  300.         -e '/^\.if !\\n[bh] \\{/d' \
  301.         -e '/^\.el \\{/d' \
  302.         -e '/^\\}/d' \
  303.         -e '/^\.i[fe] \\nh /d' \
  304.         -e 's/^\.el *\(.*\)$$/\1/' \
  305.         -e 's/^\.if !\\nh *\(.*\)$$/\1/' \
  306.          < ftnchek.man > ftnchek.1
  307.  
  308. # ftnchek.doc is ascii text form of documentation.  It should not matter
  309. # whether ftnchek.1 or ftnchek.man is used here.
  310. ftnchek.doc:    ftnchek.man
  311.     $(NROFF) -man ftnchek.man | $(COL) >ftnchek.doc
  312.  
  313. # ftnchek.ps is PostScript form of documentation.
  314. ftnchek.ps:    ftnchek.man
  315.     @make ftnchek.1
  316.     $(MAN2PS) <ftnchek.1 >ftnchek.ps
  317.  
  318. # blurb.txt is an ascii file for informational mailings.
  319. blurb.txt:    ftnchek.man
  320.     $(NROFF) -man -rb1 ftnchek.man | $(COL) >blurb.txt
  321.  
  322. # ftnchek.hlp is a VMS HELP library source document:
  323. # create ftnchek.hlb with $ LIBR/CREATE/HELP FTNCHEK.HLB FTNCHEK.HLP
  324. # The leading and trailing newlines in ftnchek.hlp should be removed.
  325. ftnchek.hlp:    ftnchek.man
  326.     $(SED) -e '1d' ftnchek.man | \
  327.     $(NROFF) -man -rh1 | $(COL) | \
  328.     $(SED) -e 's/^-\([a-zA-Z][a-zA-Z]*\)/\/\1/' \
  329.         -e 's/\([^a-zA-Z]\)-\([a-zA-Z][a-zA-Z]*\)/\1\/\2/g' \
  330.     >ftnchek.hlp
  331.  
  332. #
  333. # N.B. tokdefs.h is copy of y.tab.h used to avoid remaking stuff when
  334. # grammar changes but not tokens.
  335. # The following copies y.tab.h to tokdefs.h if changed, then aborts make,
  336. # since dependencies may have changed.
  337. fortran.c: fortran.y
  338.     $(YACC) $(YFLAGS) fortran.y
  339.     $(MV) $(YSTEM).tab.c fortran.c
  340.     @if cmp -s $(YSTEM).tab.h tokdefs.h ; then true ; else \
  341.         echo; echo tokdefs.h changed -- repeat make ; \
  342.         $(CP) $(YSTEM).tab.h tokdefs.h; \
  343.         false ; \
  344.     fi
  345.  
  346. # Install program and documentation on system
  347. install:    install-exe install-man
  348.  
  349. install-exe:    ftnchek
  350.     $(CP) ftnchek $(BINDIR)
  351.     -$(STRIP) $(BINDIR)/ftnchek
  352.     $(CHMOD) 755 $(BINDIR)/ftnchek
  353.     -$(MKDIR) $(LIBDIR)
  354.     $(CP) dcl2inc.awk $(LIBDIR)/dcl2inc.awk
  355.     $(CHMOD) 644 $(LIBDIR)/dcl2inc.awk
  356.     $(SED) -e 's@^LIBDIR=.*$$@LIBDIR=$(LIBDIR)@' -e 's/nawk/$(NAWK)/' \
  357.         <dcl2inc.sh >$(BINDIR)/dcl2inc
  358.     $(CHMOD) 755 $(BINDIR)/dcl2inc
  359.  
  360. # Install the fcl2vcg script and its documentation only if vcg is used
  361. install-vcg: install-vcg-exe install-vcg-man
  362.  
  363. install-vcg-exe:
  364.     $(CP) fcl2vcg.sh $(BINDIR)/fcl2vcg
  365.     $(CHMOD) 755 $(BINDIR)/fcl2vcg
  366.  
  367. install-vcg-man:
  368.     $(CP) fcl2vcg.man $(MANDIR)/man1/fcl2vcg.1
  369.     -$(RM) $(MANDIR)/cat1/fcl2vcg.1
  370.     $(CHMOD) 644 $(MANDIR)/man1/fcl2vcg.1
  371.  
  372. # Install man pages, taking care to remove old formatted ones, because
  373. # many man implentations fail to compare time stamps of raw and
  374. # formatted files, and will show out-of-date formatted files.
  375. install-man: ftnchek.1
  376.     $(CP) dcl2inc.man $(MANDIR)/man1/dcl2inc.1
  377.     -$(RM) $(MANDIR)/cat1/dcl2inc.1
  378.     $(CHMOD) 644 $(MANDIR)/man1/dcl2inc.1
  379.     $(CP) ftnchek.1 $(MANDIR)/man1/ftnchek.1
  380.     -$(RM) $(MANDIR)/cat1/ftnchek.1
  381.     $(CHMOD) 644 $(MANDIR)/man1/ftnchek.1
  382.  
  383. # Remove everything that the install target installed.
  384. uninstall:
  385.     -$(RM) $(BINDIR)/dcl2inc
  386.     -$(RM) $(BINDIR)/fcl2vcg
  387.     -$(RM) $(BINDIR)/ftnchek
  388.     -$(RM) $(LIBDIR)/dcl2inc.awk
  389.     -$(RM) $(MANDIR)/cat1/dcl2inc.1
  390.     -$(RM) $(MANDIR)/cat1/ftnchek.1
  391.     -$(RM) $(MANDIR)/ftnchek.z    # SGI
  392.     -$(RM) $(MANDIR)/man1/dcl2inc.1
  393.     -$(RM) $(MANDIR)/man1/fcl2vcg.1
  394.     -$(RM) $(MANDIR)/man1/ftnchek.1
  395.     -$(RMDIR) $(LIBDIR)
  396.  
  397. # WARNING: do NOT execute this target, unless you have nroff/troff or groff
  398. # to recreate the formatted documentation files.
  399. spotless:    distclean
  400.     $(RM) blurb.txt
  401.     $(RM) dcl2inc.doc
  402.     $(RM) dcl2inc.ps
  403.     $(RM) fcl2vcg.doc
  404.     $(RM) fcl2vcg.ps
  405.     $(RM) ftnchek.doc
  406.     $(RM) ftnchek.hlp
  407.     $(RM) ftnchek.ps
  408.  
  409. # ex and vi editor tags file
  410. tags:    $(SRCS)
  411.     $(CTAGS) $(CTAGSFLAGS) *.[ch]
  412.  
  413. # emacs editor tags file
  414. TAGS:    $(SRCS)
  415.     $(ETAGS) *.[ch]
  416.  
  417. #=======================================================================
  418. # Object file dependencies on include files
  419.  
  420. ftnchek$(OBJ):    ftnchek.h
  421.  
  422. exprtype$(OBJ):    ftnchek.h symtab.h tokdefs.h
  423.  
  424. forlex$(OBJ):    ftnchek.h keywords.h symtab.h tokdefs.h
  425.  
  426. fortran$(OBJ):    ftnchek.h symtab.h fortran.c
  427.  
  428. pgsymtab$(OBJ):    ftnchek.h symtab.h
  429.  
  430. plsymtab$(OBJ):    ftnchek.h symtab.h
  431.  
  432. project$(OBJ):    ftnchek.h symtab.h
  433.  
  434. symtab$(OBJ):    ftnchek.h iokeywds.h intrins.h symtab.h tokdefs.h
  435.  
  436. #=======================================================================
  437. # Machine specific targets to build ftnchek with suitable compile options.
  438. # Use 'MAKE_OPTIONS= "YACC=/usr/local/gnu/bin/bison" "YSTEM=fortran"'
  439. # to select GNU bison parser, if you have touched fortran.y.
  440.  
  441. TARGETS        = ftnchek
  442.  
  443. # On DEC Alpha systems, compilers default to fast non-IEEE-754-conformant
  444. # arithmetic that is incapable of handling denormalized numbers,
  445. # Infinity, and NaN.  ftnchek can die on at least test/complex.f if IEEE
  446. # 754 behavior is not restored with -ieee_with_inexact.  The -Olimit
  447. # value increases the optimizer table sizes.
  448. DEC-ALPHA:
  449.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O -D_BSD" \
  450.         "CC = c89 -ieee_with_inexact -Olimit 1000" \
  451.         "OBJ= .o" "EXE= " \
  452.         $(MAKE_OPTIONS) $(TARGETS)
  453.  
  454. # target for djgpp on IBM PC by Judah Milgram, U. Maryand College Park
  455. DJGPP:
  456.     $(MAKE) 'CFLAGS= $(OPTIONS) -DLARGE_MACHINE -O' \
  457.         'OBJ = .o' 'EXE = ' \
  458.     $(MAKE_OPTIONS) $(TARGETS)
  459.     coff2exe ftnchek
  460.     del ftnchek
  461.  
  462. GENERIC LINUX STARDENT UNIX:
  463.     $(MAKE)     "OBJ= .o" "EXE= " \
  464.         $(MAKE_OPTIONS) $(TARGETS)
  465.  
  466. # Add compiler flag to eliminate optimizer table overflow
  467. HP:
  468.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O -D_BSD +Obb700" \
  469.         "OBJ= .o" "EXE= " \
  470.         $(MAKE_OPTIONS) $(TARGETS)
  471.  
  472. IBM-RS6000:
  473.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) \
  474.         -DAIXC -DRAND_NO_ARG -O -D_BSD" \
  475.         "OBJ= .o" "EXE= " \
  476.         "CC = c89 -D_POSIX_SOURCE" $(MAKE_OPTIONS) \
  477.         $(TARGETS)
  478.  
  479. LINUX-486:
  480.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O -D_BSD -m486" \
  481.         "OBJ= .o" "EXE= " \
  482.         $(MAKE_OPTIONS) $(TARGETS)
  483.  
  484. # MIPS RC6280 (and other models) RISCos 2.1.1AC (and EP/IX)
  485. MIPS-MIPS:
  486.     $(MAKE) "CFLAGS= -DUNIX $(OPTIONS) -DLARGE_MACHINE -O -D_BSD -Olimit 1000 -systype bsd43" \
  487.         "OBJ= .o" "EXE= " \
  488.         $(MAKE_OPTIONS) $(TARGETS)
  489.  
  490. # Under some shells, the SHELL variable declared above must be commented
  491. # out for this to work properly with certain make ports to OS/2:
  492. # Target for IBM OS/2 2.x and later, using gcc / emx, by Stefan A. Deutscher
  493. # sad@utk.edu. The options to emxbind can all be ommited here, they are
  494. # for emx09b. The executable built here requires emx.dll (version 09b, 
  495. # emxfix03 or later) to be in the LIBPATH. This helps reduce the memory
  496. # footprint and is recommended in case other emx/gcc compiled programmes
  497. # are being used anyway.
  498.  
  499. OS2emx:
  500.     $(MAKE) 'CFLAGS= -DUNIX -DLARGE_MACHINE -O -s -D_BSD'\
  501.     'CC = gcc' 'LDFLAGS = -s' 'OBJ = .o' 'EXE = .exe' \
  502.     $(MAKE_OPTIONS) $(TARGETS)
  503.  
  504. #    echo $(FTNCHEK) created.  Building now $(FTNCHEK).exe:
  505. #    emxbind -bs -w $(FTNCHEK)
  506. #    rm $(FTNCHEK)
  507. #    echo $(FTNCHEK).exe created.
  508.  
  509. # Target for IBM OS/2 2.x and later, using gcc / emx, by Stefan A. Deutscher
  510. # sad@utk.edu. The options to emxbind can all be ommited here, they are
  511. # for emx09b. This target requires the IBM Linker link386.exe to be installed
  512. # in the system (selective install). The executable built here does not 
  513. # need any dynamic link libraries from the emx distribution and can run
  514. # as a standalone programme, hence it is moved here to ftnchekS.exe.
  515.  
  516. OS2noemx:
  517.     $(MAKE) 'CFLAGS= -DUNIX -DLARGE_MACHINE -O -s -Zomf -Zsys -D_BSD'\
  518.     'CC = gcc' 
  519.     'LDFLAGS = -s -Zstack 64 $(FTNCHEK).def' \
  520.     'OBJ = .obj' 'EXE = .exe' \
  521.     $(MAKE_OPTIONS) $(TARGETS)
  522.     mv $(FTNCHEK).exe $(FTNCHEK)S.exe
  523.  
  524. #    'LDFLAGS = -s -Zstack 256 $(FTNCHEK).def' \
  525.  
  526. # SGI target improved by Mark Hanning-Lee of JPL.  Use -O2 for full
  527. # optimization.  4.0.x users can even use -O3, but 5.2 complains about
  528. # using -O3 with the -c option.
  529. # Warning: do not split this quoted string across a line boundary; SGI
  530. # IRIX 4.0.x make incorrectly preserves the newline, causing
  531. # compilation commands to fail.  Irix 5.x make handles the newline OK.
  532.  
  533. SGIFLAGS="CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -DVMS_IO -DVMS_TAB -O2 -D_BSD" "OBJ= .o" "EXE= "
  534. SGI:
  535.     $(MAKE) $(SGIFLAGS) $(MAKE_OPTIONS) $(TARGETS)
  536.  
  537. # IRIX uses pre-formatted, packed man pages and nroff is not bundled with it.
  538. # Only execute this target if your IRIX has nroff.
  539. SGI-INSTALL: install-exe install-man-sgi
  540.  
  541. install-man-sgi:
  542.     $(NROFF) -man dcl2inc.man > dcl2inc.cat ; \
  543.     if pack dcl2inc.cat ; \
  544.     then \
  545.         $(MV) dcl2inc.cat.z $(MANDIR)/dcl2inc.z ; \
  546.         $(CHMOD) 644 $(MANDIR)/dcl2inc.z ; \
  547.     fi
  548.     $(NROFF) -man ftnchek.man > ftnchek.cat ; \
  549.     if pack ftnchek.cat ; \
  550.     then \
  551.         $(MV) ftnchek.cat.z $(MANDIR)/ftnchek.z ; \
  552.         $(CHMOD) 644 $(MANDIR)/ftnchek.z ; \
  553.     fi
  554.  
  555. sgi-install-vcg: install-vcg-exe install-vcg-man-sgi
  556.  
  557. install-vcg-man-sgi:
  558.     $(NROFF) -man fcl2vcg.man > fcl2vcg.cat ; \
  559.     if pack fcl2vcg.cat ; \
  560.     then \
  561.         $(MV) fcl2vcg.cat.z $(MANDIR)/fcl2vcg.z ; \
  562.         $(CHMOD) 644 $(MANDIR)/fcl2vcg.z ; \
  563.     fi
  564.  
  565. SOLARIS2.x SUNOS5.x:
  566.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -xO4 -D_BSD" \
  567.         "OBJ= .o" "EXE= " \
  568.         $(MAKE_OPTIONS) $(TARGETS)
  569.  
  570. SOLARIS2.x-gcc SUNOS5.x-gcc:
  571.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O2 -D_BSD" \
  572.         "OBJ= .o" "EXE= " \
  573.         $(MAKE_OPTIONS) CC=gcc $(TARGETS)
  574.  
  575. SOLARIS2.x-apcc SUNOS5.x-apcc:
  576.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O5 -D_BSD" \
  577.         "OBJ= .o" "EXE= " \
  578.         $(MAKE_OPTIONS) CC=apcc $(TARGETS)
  579.  
  580. SUNOS4.0:
  581.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O -D_BSD" \
  582.         "OBJ= .o" "EXE= " \
  583.         $(MAKE_OPTIONS) $(TARGETS)
  584.  
  585. # NB: ftnchek 2.8 fails with -O4 on SunOS 4.1.3, but -O3 is okay
  586. # The failure occurs from bad code generation for forlex.c with cc
  587. # version RELEASE SC1.0 1Mar1991 (from "showrev cc").
  588. SUNOS4.1:
  589.     $(MAKE) "CFLAGS= -DUNIX -DLARGE_MACHINE $(OPTIONS) -O3 -D_BSD" \
  590.         "OBJ= .o" "EXE= " \
  591.         $(MAKE_OPTIONS) $(TARGETS)
  592.  
  593. ULTRIX-MIPS:
  594.     $(MAKE) "CFLAGS= -DUNIX $(OPTIONS) -DLARGE_MACHINE -Olimit 2000 -O -D_BSD"\
  595.         "OBJ= .o" "EXE= " \
  596.         $(MAKE_OPTIONS) $(TARGETS)
  597.