MAKEFILE 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # Makefile for bison
  2. # Copyright (C) 1984, 1989 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 1, 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. # For sysV, you must uncomment the following lines
  20. #CFLAGS = -g -DUSG
  21. #LIBS = -lPW
  22. #and comment out the assignment of CFLAGS below.
  23. #Also, if getopt.c gives any trouble, delete it from OBJECTS.
  24. #so the system's getopt will be used.
  25. DESTDIR=
  26. # where the installed binary goes
  27. # BINDIR = $(DESTDIR)/usr/local/bin
  28. BINDIR = $(HOME)/CC/bin
  29. # where the parsers go
  30. # PARSERDIR = $(DESTDIR)/usr/local/lib
  31. PARSERDIR = $(HOME)/CC/lib
  32. # names of parser files
  33. PFILE = bison.simple
  34. PFILE1 = bison.hairy
  35. # It is unwise ever to compile a program without symbols.
  36. CFLAGS = -g
  37. PFILES = -DXPFILE=\"$(PARSERDIR)/$(PFILE)\" \
  38. -DXPFILE1=\"$(PARSERDIR)/$(PFILE1)\"
  39. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o \
  40. getargs.o gram.o lalr.o lex.o \
  41. main.o nullable.o output.o print.o reader.o reduce.o symtab.o \
  42. warshall.o version.o \
  43. getopt.o
  44. start: bison
  45. clean:
  46. rm -f *.o core bison
  47. install: bison
  48. install bison $(BINDIR)
  49. -cd $(PARSERDIR); rm -f $(PFILE) $(PFILE1)
  50. cp $(PFILE) $(PFILE1) $(PARSERDIR)
  51. bison: $(OBJECTS)
  52. $(CC) $(LDFLAGS) -o bison $(OBJECTS) $(LIBS)
  53. dist: bison-dist.tar bison-dist.tar.Z
  54. .PHONY: bison-dist.tar
  55. bison-dist.tar:
  56. -rm -rf bison-dist
  57. mkdir bison-dist
  58. ln COPYING ChangeLog Makefile REFERENCES bison.1 \
  59. bison.simple bison.hairy \
  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. bison-dist
  67. cp ../lib/getopt.c bison-dist
  68. tar chvf bison-dist.tar bison-dist
  69. bison-dist.tar.Z: bison-dist.tar
  70. compress < bison-dist.tar > bison-dist.tar.Z
  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 files.h new.h gram.h
  76. $(CC) -c $(CFLAGS) $(PFILES) files.c
  77. LR0.o: machine.h new.h gram.h state.h
  78. closure.o: machine.h new.h gram.h
  79. conflicts.o: machine.h new.h files.h gram.h state.h
  80. derives.o: new.h types.h gram.h
  81. getargs.o: files.h
  82. lalr.o: machine.h types.h state.h new.h gram.h
  83. lex.o: files.h symtab.h lex.h
  84. main.o: machine.h
  85. nullable.o: types.h gram.h new.h
  86. output.o: machine.h new.h files.h gram.h state.h
  87. print.o: machine.h new.h files.h gram.h state.h
  88. reader.o: files.h new.h symtab.h lex.h gram.h
  89. reduce.o: files.h new.h machine.h gram.h
  90. symtab.o: new.h symtab.h gram.h
  91. warshall.o: machine.h