home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / fchk294s.zip / ftnchek-2.9.4 / makefile.os2.distribution < prev    next >
Makefile  |  1996-10-04  |  19KB  |  564 lines

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