Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Makefile for bison
  2. # where the installed binary goes
  3. BINDIR = /usr/local
  4. # where the parsers go
  5. PARSERDIR = /usr/local/lib
  6. # names of parser files
  7. PFILE = bison.simple
  8. PFILE1 = bison.hairy
  9. # It is unwise ever to compile a program without symbols.
  10. CFLAGS = -g
  11. PFILES = -DXPFILE=\"$(PARSERDIR)/$(PFILE)\" \
  12. -DXPFILE1=\"$(PARSERDIR)/$(PFILE1)\"
  13. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o \
  14. getargs.o gram.o lalr.o \
  15. lex.o main.o nullable.o output.o print.o reader.o symtab.o \
  16. warshall.o
  17. start: bison
  18. clean:
  19. rm -f *.o core
  20. install: bison
  21. install bison $(BINDIR)
  22. install -c $(PFILE) $(PFILE1) $(PARSERDIR)
  23. bison: $(OBJECTS)
  24. $(CC) -g -o bison $(OBJECTS)
  25. # This file is different to pass the parser file names
  26. # to the compiler.
  27. files.o: files.c files.h new.h gram.h
  28. $(CC) -c $(CFLAGS) $(PFILES) files.c
  29. LR0.o: machine.h new.h gram.h state.h
  30. closure.o: machine.h new.h gram.h
  31. conflicts.o: machine.h new.h files.h gram.h state.h
  32. derives.o: new.h types.h gram.h
  33. getargs.o: files.h
  34. lalr.o: machine.h types.h state.h new.h gram.h
  35. lex.o: files.h symtab.h lex.h
  36. main.o: machine.h
  37. nullable.o: types.h gram.h new.h
  38. output.o: machine.h new.h files.h gram.h state.h
  39. print.o: machine.h new.h files.h gram.h state.h
  40. reader.o: files.h new.h symtab.h lex.h gram.h
  41. symtab.o: new.h symtab.h gram.h
  42. warshall.o: machine.h