Makefile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Makefile for bison
  2. CC = gcc
  3. DESTDIR=
  4. # where the installed binary goes
  5. BINDIR = $(DESTDIR)/usr/local
  6. # where the parsers go
  7. PARSERDIR = $(DESTDIR)/usr/local/lib
  8. # names of parser files (renamed to avoid probles with an installed bison)
  9. PFILE = bison1.simple
  10. PFILE1 = bison1.hairy
  11. # It is unwise ever to compile a program without symbols.
  12. #CFLAGS = -g -Wall
  13. CFLAGS = -g
  14. # PFILES = -DXPFILE=\"$(PARSERDIR)/$(PFILE)\" \
  15. # -DXPFILE1=\"$(PARSERDIR)/$(PFILE1)\"
  16. PFILES = -DXPFILE=\"$(PFILE)\" \
  17. -DXPFILE1=\"$(PFILE1)\"
  18. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o \
  19. getargs.o gram.o lalr.o \
  20. lex.o main.o nullable.o output.o print.o reader.o symtab.o \
  21. warshall.o
  22. start: bison
  23. clean:
  24. rm -f a.out *.o core bison1
  25. # orig install turned off for now
  26. #install: bison
  27. # install bison $(BINDIR)
  28. # cp $(PFILE) $(PFILE1) $(PARSERDIR)
  29. install: bison
  30. echo "make install turned off"
  31. bison: $(OBJECTS)
  32. $(CC) $(LDFLAGS) -o bison1 $(OBJECTS)
  33. dist: bison-dist.tar bison-dist.tar.Z
  34. bison-dist.tar:
  35. tar cvf bison-dist.tar \
  36. COPYING Makefile REFERENCES bison.1 bison.simple bison.hairy \
  37. LR0.c allocate.c closure.c conflicts.c \
  38. derives.c files.c getargs.c gram.c lalr.c lex.c main.c \
  39. nullable.c output.c print.c reader.c symtab.c warshall.c \
  40. files.h gram.h lex.h machine.h new.h state.h symtab.h types.h \
  41. bison.cld build.com vmsgetargs.c vmshlp.mar
  42. bison-dist.tar.Z: bison-dist.tar
  43. compress < bison-dist.tar > bison-dist.tar.Z
  44. # This file is different to pass the parser file names
  45. # to the compiler.
  46. files.o: files.c files.h new.h gram.h
  47. $(CC) -c $(CFLAGS) $(PFILES) files.c
  48. LR0.o: machine.h new.h gram.h state.h
  49. closure.o: machine.h new.h gram.h
  50. conflicts.o: machine.h new.h files.h gram.h state.h
  51. derives.o: new.h types.h gram.h
  52. getargs.o: files.h
  53. lalr.o: machine.h types.h state.h new.h gram.h
  54. lex.o: files.h symtab.h lex.h
  55. main.o: machine.h
  56. nullable.o: types.h gram.h new.h
  57. output.o: machine.h new.h files.h gram.h state.h
  58. print.o: machine.h new.h files.h gram.h state.h
  59. reader.o: files.h new.h symtab.h lex.h gram.h
  60. symtab.o: new.h symtab.h gram.h
  61. warshall.o: machine.h