# $Copyright:	$
# Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
# Sequent Computer Systems, Inc.   All rights reserved.
#  
# This software is furnished under a license and may be used
# only in accordance with the terms of that license and with the
# inclusion of the above copyright notice.   This software may not
# be provided or otherwise made available to, or used by, any
# other person.  No title to or ownership of the software is
# hereby transferred.
#	Copyright (c) 1988 AT&T
#	  All Rights Reserved
#
#	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
#	The copyright notice above does not evidence any
#	actual or intended publication of such source code.
#
#ident	"$Header: Makefile 1.7 90/06/26 $ @(#)Makefile 1.0 "

ALL=	kbdcomp
ROOT=
BINDIR= $(ROOT)/usr/bin
INCDIR= ../inc
INCDIR2= ../../../uts/io/kbd
CFLAGS=       -O -I$(INCDIR) $(CCS)
INTERNATIONALLIB= -lgen
OFILES=	main.o gram.o lexan.o output.o reach.o sort.o sym.o tree.o

all:	clean $(ALL)

crossccs: ; rm -f $(INCDIR)/kbd.h 
	cp $(INCDIR2)/kbd.h $(INCDIR)
	$(MAKE) CCS=-DCCS=1 clean $(ALL) INTERNATIONALLIB=

.PRECIOUS:	gram.y

$(ALL):       $& $(OFILES)
	$(CC) -O $(OFILES) -o $(ALL) $(INTERNATIONALLIB) -s

gram.c:	gram.y $(INCDIR)/symtab.h 
	yacc -vd gram.y
	mv y.tab.c gram.c

install:	$(ALL)
	install -u bin -g bin -m 555 -f $(BINDIR) $(ALL)

clean:
	-/bin/rm -f *.o y.tab.h y.output gram.c

clobber:	clean
	-/bin/rm -f $(ALL)

#
# DEPENDENCIES
#

$(OFILES):	$(INCDIR)/symtab.h 

