MAKEFILE.TOS 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # Makefile for bison
  2. # Copyright (C) 1984, 1989, 1991 Bob Corbett and Free Software Foundation, Inc.
  3. #
  4. # This file is part of Bison, the GNU Compiler Compiler.
  5. #
  6. # Bison is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. #
  11. # Bison is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with Bison; see the file COPYING. If not, write to
  18. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19. CC = cgcc
  20. INSTALL =
  21. INSTALL_PROGRAM = $(INSTALL)
  22. INSTALL_DATA = $(INSTALL)
  23. # Things you might add to DEFS:
  24. # -DSTDC_HEADERS If you have ANSI C headers and libraries.
  25. # -DUSG If you have System V/ANSI C string and
  26. # memory functions and headers.
  27. DEFS = -DSTDC_HEADERS
  28. CDEBUG = -O2 -fomit-frame-pointer -fstrength-reduce
  29. CFLAGS = $(CDEBUG) $(DEFS)
  30. LDFLAGS =
  31. LIBS =
  32. # names of parser files
  33. PFILE = bison.sim
  34. PFILE1 = bison.hai
  35. PFILES = -DXPFILE=\"$(PFILE)\" \
  36. -DXPFILE1=\"$(PFILE1)\"
  37. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o \
  38. getargs.o gram.o lalr.o lex.o \
  39. main.o nullable.o output.o print.o reader.o reduce.o symtab.o \
  40. warshall.o version.o \
  41. getopt.o getopt1.o
  42. all: bison
  43. clean:
  44. rm -f *.o core bison
  45. install: bison
  46. $(INSTALL) bison $(BINDIR)
  47. # Copy bison.simple, inserting directory name into the #line commands.
  48. cp $(PFILE1) $(PARSERDIR)
  49. $(INSTALL) bison.1 $(MANDIR)/bison.$(MANEXT)
  50. chmod a+r $(PARSERDIR)/$(PFILE) $(PARSERDIR)/$(PFILE1)
  51. chmod a+r $(MANDIR)/bison.$(MANEXT)
  52. bison: $(OBJECTS)
  53. $(CC) $(LDFLAGS) -o bison $(OBJECTS) $(LIBS)
  54. dist:
  55. echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q < version.c` > .fname
  56. -rm -rf `cat .fname`
  57. mkdir `cat .fname`
  58. ln COPYING ChangeLog Makefile REFERENCES bison.1 \
  59. bison.simple bison.hairy mergedir.awk \
  60. LR0.c allocate.c closure.c conflicts.c derives.c \
  61. files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  62. output.c print.c reader.c reduce.c symtab.c version.c \
  63. warshall.c files.h gram.h lex.h machine.h new.h state.h \
  64. symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  65. vmshlp.mar README bison.texinfo bison.info* \
  66. `cat .fname`
  67. cp -p ../lib/getopt.[ch] ../lib/getopt1.c `cat .fname`
  68. tar chZf `cat .fname`.tar.Z `cat .fname`
  69. -rm -rf `cat .fname` .fname
  70. .PHONY: dist
  71. TAGS: *.c *.h
  72. etags *.c *.h
  73. # This file is different to pass the parser file names
  74. # to the compiler.
  75. files.o: files.c
  76. $(CC) -c $(CFLAGS) $(PFILES) files.c $(OUTPUT_OPTION)
  77. LR0.o: system.h machine.h new.h gram.h state.h
  78. closure.o: system.h machine.h new.h gram.h
  79. conflicts.o: system.h machine.h new.h files.h gram.h state.h
  80. derives.o: system.h new.h types.h gram.h
  81. files.o: system.h files.h new.h gram.h
  82. getargs.o: system.h files.h
  83. lalr.o: system.h machine.h types.h state.h new.h gram.h
  84. lex.o: system.h files.h symtab.h lex.h
  85. main.o: system.h machine.h
  86. nullable.o: system.h types.h gram.h new.h
  87. output.o: system.h machine.h new.h files.h gram.h state.h
  88. print.o: system.h machine.h new.h files.h gram.h state.h
  89. reader.o: system.h files.h new.h symtab.h lex.h gram.h
  90. reduce.o: system.h machine.h files.h new.h gram.h
  91. symtab.o: system.h new.h symtab.h gram.h
  92. warshall.o: system.h machine.h
  93. # Prevent GNU make v3 from overflowing arg limit on SysV.
  94. .NOEXPORT: