# Makefile for bison # # Where temp files go TEMPDIR = . # # # These are for the use of SM - if you install bison for general use # you'd probably want to change them back. You'll have to change the SM # Makefile to find bison, of course. # PARSERDIR = ./bison BINDIR = $(PARSERDIR) # names of parser files PFILE = bison.simple PFILE1 = bison.hairy CC = bcc DEBUG = -v -N OPTIMIZE = -r- CFLAGS = $(DEBUG) $(OPTIMIZE) -w- .c.obj : $(CC) -c $(CFLAGS) {$*.c } LDFLAGS = $(DEBUG) PFILES = -DXPFILE=\"$(PARSERDIR)/$(PFILE)\" \ -DXPFILE1=\"$(PARSERDIR)/$(PFILE1)\" \ -DTDIR=\"$(TEMPDIR)\" OBJECTS = lr0.obj allocate.obj closure.obj conflicts.obj derives.obj files.obj\ getargs.obj gram.obj lalr.obj lex.obj main.obj nullable.obj output.obj\ print.obj reader.obj symtab.obj warshall.obj utils.obj start : bison.exe bison : bison.exe empty : - del bison.exe clean : - del *.obj bison.exe : $(OBJECTS) $(CC) $(CFLAGS) -ebison $(OBJECTS) # This file is different to pass the parser file names # to the compiler. files.obj : files.c files.h new.h gram.h $(CC) -c $(CFLAGS) $(PFILES) files.c symtab.obj : new.h symtab.h gram.h ../options.h $(CC) -c $(CFLAGS) $(PFILES) symtab.c lr0.obj : machine.h new.h gram.h state.h closure.obj : machine.h new.h gram.h conflicts.obj : machine.h new.h files.h gram.h state.h ../options.h derives.obj : new.h types.h gram.h getargs.obj : files.h lalr.obj : machine.h types.h state.h new.h gram.h lex.obj : files.h symtab.h lex.h main.obj : machine.h nullable.obj : types.h gram.h new.h output.obj : machine.h new.h files.h gram.h state.h print.obj : machine.h new.h files.h gram.h state.h reader.obj : files.h new.h symtab.h lex.h gram.h utils.obj bj : ../options.h warshall.obj : machine.h