#	@(#)Makefile	5.5 (Berkeley) 5/15/90

LIB=    sh

SRCS=	adjust.c assign.c assnum.c cannon.c chkid.c convert.c findnod.c \
	gettree.c growaray.c gsort.c linknod.c namscan.c optget.c rjust.c \
	strdata.c streval.c strmatch.c tilde.c unassign.c utos.c valup.c
OBJ=	${SRCS:.c=.o}

CFLAGS+= -I. -I.. -I${.CURDIR} -I${.CURDIR}/../include -DKSHELL

INS=	${.CURDIR}/../install

libsh.a:: ../sh_config.h

install:

$(OBJ):	../sh_config.h

../sh_config.h:
		$(INS)/config $(INS)> newconfig
		if	test -r ../sh_config.h && \
			cmp -s newconfig ../sh_config.h;\
		then	rm newconfig	 ;\
		else	mv newconfig ../sh_config.h;\
		fi

.stamp: lib${LIB}.a
	ranlib lib${LIB}.a
	touch .stamp

.include <bsd.lib.mk>

all:	.stamp
