home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / FTNCHK32.ZIP / makefile < prev    next >
Makefile  |  1993-02-16  |  3KB  |  104 lines

  1. # Unix version of Makefile for Fortran program checker
  2. #
  3. # Add machine-specific targets IBM-RS6000, GENERIC,
  4. # STARDENT, SUNOS4.0, SUNOS4.1, ULTRIX-MIPS
  5.  
  6. #    Copyright (C) 1991 by Robert K. Moniot.
  7. #    This program is free software.  Permission is granted to
  8. #    modify it and/or redistribute it, retaining this notice.
  9. #    No guarantees accompany this software.
  10.  
  11. # Acknowledgements and thanks to Nelson H.F. Beebe of University of Utah
  12. # for improvements to this makefile.
  13.  
  14. # These definitions should be customized for your local conventions
  15. # if you want to do "make install" or "make uninstall"
  16. BINDIR    =    /usr/local/bin
  17. CP    =    /bin/cp
  18. MANDIR    =    /usr/local/man
  19.  
  20. # OPTIONS is used to define various characteristics.  Most commonly
  21. # needed ones are given below; uncomment whichever you like.
  22. # See ftnchek.h for others, with their defaults and explanations.
  23.  
  24. #  To use the defaults for everything uncomment this:
  25. OPTIONS=
  26.  
  27. #  To make all table sizes 10x bigger than defaults uncomment this:
  28. #OPTIONS= -DLARGE_MACHINE
  29.  
  30. #  To prohibit underscores in variable names, inline comments
  31. #   starting with '!',  the DO ... ENDDO loop forms and INCLUDE statements:
  32. #OPTIONS= -DSTRICT_SYNTAX
  33.  
  34.  
  35. # CFLAGS is used to define the operating system and options
  36. # Other
  37. CFLAGS= -DUNIX $(OPTIONS) -O -D_BSD
  38.  
  39. YFLAGS= -d
  40.  
  41. OBJS= ftnchek.o forlex.o fortran.o \
  42.     prsymtab.o symtab.o symtab2.o
  43.  
  44.  
  45. ftnchek: $(OBJS)
  46.     $(CC) -o ftnchek $(OBJS) -lm
  47.  
  48. install:    ftnchek
  49.     $(CP) ftnchek $(BINDIR)
  50.     - strip $(BINDIR)/ftnchek
  51.     chmod 755 $(BINDIR)/ftnchek
  52.     $(CP) ftnchek.man $(MANDIR)/man1/ftnchek.1
  53.     chmod 744 $(MANDIR)/man1/ftnchek.1
  54.  
  55. uninstall:
  56.     $(RM) $(BINDIR)/ftnchek
  57.     $(RM) $(MANDIR)/man1/ftnchek.1
  58.  
  59. # N.B. tokdefs.h is copy of y.tab.h used to avoid remaking stuff when
  60. # grammar changes but not tokens.
  61.  
  62. ftnchek.o: ftnchek.h
  63.  
  64. forlex.o: ftnchek.h tokdefs.h symtab.h
  65.  
  66. fortran.o: ftnchek.h symtab.h fortran.c
  67.  
  68. prsymtab.o: ftnchek.h symtab.h
  69.  
  70. symtab.o: ftnchek.h iokeywds.h intrins.h symtab.h tokdefs.h
  71.  
  72. symtab2.o: ftnchek.h symtab.h tokdefs.h
  73.  
  74. check:
  75.     lint $(LINTFLAGS) ftnchek.c forlex.c \
  76.         fortran.c prsymtab.c symtab.c symtab2.c -lm
  77.  
  78. RM = /bin/rm -f
  79. clean:
  80.     $(RM) \#* *~ core *.o
  81.  
  82. clobber:    clean
  83.     $(RM) ftnchek
  84.  
  85. #=======================================================================
  86. # Machine specific targets to build ftnchek with suitable compile
  87. # options.
  88.  
  89. IBM-RS6000:
  90.     make "CC = c89 -D_POSIX_SOURCE" "CFLAGS= -DUNIX $(OPTIONS) -O -D_BSD"
  91.  
  92. GENERIC STARDENT UNIX:
  93.     make "CFLAGS= -DUNIX $(OPTIONS) -O -D_BSD"
  94.  
  95. SUNOS4.0:
  96.     make "CFLAGS= -DUNIX $(OPTIONS) -O -D_BSD"
  97.  
  98. SUNOS4.1:
  99.     make "CFLAGS= -DUNIX $(OPTIONS) -O4 -D_BSD"
  100.  
  101. ULTRIX-MIPS:
  102.     make "CFLAGS= -DUNIX $(OPTIONS) -Olimit 2000 -O -D_BSD"
  103.  
  104.