#	BSDI $Id: Makefile,v 1.4 1994/05/29 16:57:40 md Exp $

# GCC2 C++ compiler.
.include "../Makefile.symlinks"

PROG=	cc1plus
BINDIR=	${LIBEXECDIR}
YACC=	bison
YFLAGS=	-d -y
.include "../Makefile.common"
SRCS+=	cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c cp-edsel.c \
	cp-errfn.c cp-error.c cp-except.c cp-expr.c cp-gc.c cp-init.c \
	cp-lex.c cp-method.c cp-parse.c cp-pt.c cp-ptree.c cp-search.c \
	cp-spew.c cp-tree.c cp-type2.c cp-typeck.c cp-xref.c
CFLAGS+=-Dbsd4_4
NOMAN=	noman
CLEANFILES+=cp-parse.c cp-parse.h

.if ${MACHINE} == "rt"
CFLAGS+=-DUSE_COLLECT2
.endif

# Some screwy stuff gcc is expecting to have done!
cp-parse.c cp-parse.h: cp-parse.y
	@echo expect 27 shift/reduce conflicts and 14 reduce/reduce conflicts
	$(YACC) -d -o cp-parse.c ${.IMPSRC}
	grep '^#define[   ]*YYEMPTY' cp-parse.c >>cp-parse.h

.depend cp-parse.h: cp-parse.c

.include <bsd.prog.mk>
