# Generated automatically from Makefile.in by configure.
# Makefile for bison
# Copyright (C) 1988, 1989, 1991, 1993 Bob Corbett and Free Software Foundation, Inc.
# 
# This file is part of Bison, the GNU Compiler Compiler.
# 
# Bison is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# 
# Bison is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with Bison; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

#### Start of system configuration section. ####

prefix=/vsta
srcdir=.

CC=gcc

# Things you might add to DEFS:
# -DSTDC_HEADERS	If you have ANSI C headers and libraries.
# -DHAVE_STRING_H	If you don't have ANSI C headers but have string.h.
# -DHAVE_MEMORY_H	If you don't have ANSI C headers and have memory.h.
# -DHAVE_STRERROR	If you have strerror function.
DEFS =  -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRERROR=1 -DVSTA=1 -DVSTADOSFS=1
CFLAGS=-O $(DEFS)

# where the installed binary goes
bindir=$(prefix)/bin

# where the parsers go
datadir=$(prefix)/lib

#### End of system configuration section. ####

# names of parser files
PFILE=bison.simple
PFILE1=bison.hairy

PFILES=-DXPFILE=\"$(datadir)/$(PFILE)\" -DXPFILE1=\"$(datadir)/$(PFILE1)\"

OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o	\
	  getargs.o gram.o lalr.o lex.o					\
	  main.o nullable.o output.o print.o reader.o reduce.o symtab.o	\
	  warshall.o version.o						\
	  getopt.o getopt1.o $(ALLOCA)

all: bison bison.s1

# Copy bison.simple, inserting directory name into the #line commands.
bison.s1: bison.simple
	-rm -f bison.s1
	sed -e "/^\#line/ s|bison|$(datadir)/bison|" < $(srcdir)/$(PFILE) > bison.s1

clean:
	rm -f *.o core

clobber: clean
	rm -f bison bison.s1

# Most of these deps are in case using RCS.
install: all $(PFILE) $(PFILE1)
	strip bison
	cp bison $(bindir)
	cp bison.s1 $(datadir)/$(PFILE)
	cp $(PFILE1) $(datadir)

bison: $(OBJECTS)
	$(CC) $(CFLAGS) -o $@ $(OBJECTS)

# This file is different to pass the parser file names to the compiler.
files.o: files.c
	$(CC) -c $(PFILES) $(DEFS) $(CPPFLAGS) $(CFLAGS) \
	   $(srcdir)/files.c $(OUTPUT_OPTION)
