home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / f2c-93.04.28-src.tgz / tar.out / fsf / f2c / src / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  4KB  |  139 lines

  1. #    Makefile for f2c, a Fortran 77 to C converter
  2.  
  3. #### Start of system configuration section. ####
  4.  
  5. VPATH = @srcdir@
  6. srcdir = @srcdir@
  7.  
  8. # Common prefix for machine-independent installed files.
  9. prefix = /ade
  10. # Common prefix for machine-dependent installed files.
  11. exec_prefix = $(prefix)
  12.  
  13. # Directory to install executables in.
  14. bindir = $(exec_prefix)/bin
  15. # Directory to install libraries in.
  16. libdir = $(exec_prefix)/lib
  17. # Directory to install the Info files in.
  18. infodir = $(prefix)/info
  19. # Directory to install the guide files in.
  20. guidedir = $(prefix)/guide
  21. # Directory to install the man page in.
  22. mandir = $(prefix)/man/man$(manext)
  23. # Number to put on the man page filename.
  24. manext = 1
  25.  
  26. # Program to install executables.
  27. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  28. # Program to install data like man pages.
  29. INSTALL_DATA = @INSTALL_DATA@
  30. # Generic install program.
  31. INSTALL = @INSTALL@
  32.  
  33. CC = @CC@
  34. DEFS = @DEFS@
  35. CFLAGS = @CFLAGS@
  36.  
  37. LDFLAGS = @LDFLAGS@
  38. LIBS = @LIBS@
  39.  
  40. YACC = @YACC@
  41.  
  42. SHELL = /bin/sh
  43.  
  44. #### End of system configuration section. ####
  45.  
  46. # "-I." is needed to find generated files in the build directory.
  47. .c.o:
  48.         $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $< $(OUTPUT_OPTION)
  49.  
  50. OBJECTS =    main.o init.o gram.o lex.o proc.o equiv.o data.o format.o \
  51.         expr.o exec.o intr.o io.o misc.o error.o mem.o names.o \
  52.         output.o p1output.o pread.o put.o putpcc.o vax.o formatdata.o \
  53.         parse_args.o niceprintf.o cds.o sysdep.o version.o
  54.  
  55. all:        f2c
  56.  
  57. f2c:        $(OBJECTS)
  58.         $(CC) $(LDFLAGS) $(OBJECTS) -o f2c
  59.  
  60. gram.c:        gram.head gram.dcl gram.expr gram.exec gram.io defs.h tokdefs.h
  61.         ( sed <tokdefs.h "s/#define/%token/" ;\
  62.         cat $(srcdir)/gram.head $(srcdir)/gram.dcl $(srcdir)/gram.expr $(srcdir)/gram.exec $(srcdir)/gram.io ) >gram.in
  63.         $(YACC) $(YFLAGS) gram.in
  64.         echo "(expect 4 shift/reduce)"
  65.         sed 's/^# line.*/\/* & *\//' y.tab.c >gram.c
  66.         rm -f gram.in y.tab.c
  67.  
  68. $(OBJECTS):    defs.h ftypes.h defines.h machdefs.h sysdep.h
  69.  
  70. tokdefs.h:    tokens
  71.         grep -n . <$(srcdir)/tokens | sed "s/\([^:]*\):\(.*\)/#define \2 \1/" >tokdefs.h
  72.  
  73. install:    f2c
  74.         $(INSTALL_PROGRAM) f2c $(bindir)/f2c
  75.  
  76. cds.o:        sysdep.h
  77. exec.o:        p1defs.h names.h
  78. expr.o:        output.h niceprintf.h names.h
  79. format.o:    p1defs.h format.h output.h niceprintf.h names.h iob.h
  80. formatdata.o:    format.h output.h niceprintf.h names.h
  81. gram.o:        p1defs.h
  82. init.o:        output.h niceprintf.h iob.h
  83. intr.o:        names.h
  84. io.o:        names.h iob.h
  85. lex.o :        tokdefs.h p1defs.h
  86. main.o:        parse.h usignal.h
  87. mem.o:        iob.h
  88. names.o:    iob.h names.h output.h niceprintf.h
  89. niceprintf.o:    defs.h names.h output.h niceprintf.h
  90. output.o:    output.h niceprintf.h names.h
  91. p1output.o:    p1defs.h output.h niceprintf.h names.h
  92. parse_args.o:    parse.h
  93. proc.o:        tokdefs.h names.h niceprintf.h output.h p1defs.h
  94. put.o:        names.h pccdefs.h p1defs.h
  95. putpcc.o:    names.h
  96. vax.o:        defs.h output.h pccdefs.h
  97. output.h:    niceprintf.h
  98. put.o:        pccdefs.h
  99. putpcc.o:    pccdefs.h
  100.  
  101. f2c.t:        f2c.1t
  102.         troff -man $(srcdir)/f2c.1t >f2c.t
  103.  
  104. f2c.1:        f2c.1t
  105.         nroff -man $(srcdir)/f2c.1t | col -b | uniq >f2c.1
  106.  
  107. clean:
  108.         rm -f gram.c *.o f2c tokdefs.h f2c.t
  109.  
  110. b =        Notice README cds.c data.c defines.h defs.h equiv.c error.c \
  111.         exec.c expr.c f2c.1 f2c.1t f2c.h format.c format.h \
  112.         formatdata.c ftypes.h gram.dcl gram.exec gram.expr gram.head \
  113.         gram.io init.c intr.c io.c iob.h lex.c machdefs.h main.c \
  114.         makefile malloc.c mem.c memset.c misc.c names.c names.h \
  115.         niceprintf.c niceprintf.h output.c output.h p1defs.h \
  116.         p1output.c parse.h parse_args.c pccdefs.h pread.c proc.c put.c \
  117.         putpcc.c sysdep.c sysdep.h tokens usignal.h vax.c version.c \
  118.         xsum.c
  119.  
  120. bundle:
  121.         bundle $b xsum0.out >/tmp/f2c.bundle
  122.  
  123. xsum:        xsum.c
  124.         $(CC) -o xsum $(srcdir)/xsum.c
  125.  
  126. #Check validity of transmitted source...
  127.  
  128. xsum.out:    xsum
  129.         ./xsum $b >xsum1.out
  130.         -cmp xsum0.out xsum1.out && mv xsum1.out xsum.out
  131.  
  132. #On non-Unix systems that end lines with carriage-return/newline pairs,
  133. #use "make xsumr.out" rather than "make xsum.out".  The -r flag ignores
  134. #carriage-return characters.
  135.  
  136. xsumr.out:    xsum
  137.         ./xsum -r $b >xsum1.out
  138.         cmp xsum0.out xsum1.out && mv xsum1.out xsumr.out
  139.