#	@(#)Makefile	5.8 (Berkeley) 6/24/90

PROG=	ksh

SRCS=	arith.c args.c builtin.c cmd.c ctype.c defs.c edit.c echo.c error.c \
	expand.c fault.c history.c io.c jobs.c macro.c main.c msg.c name.c \
	print.c service.c string.c stak.c test.c word.c xec.c emacs.c vi.c
OBJ=	${SRCS:.c=.o}

DPADD=  ${LIBCOMPAT} ../shlib/libsh.a
LDADD=  ../shlib/libsh.a -lcompat
SUBDIR= suid_exec
NOMAN=

BINDIR?= /bin

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

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

$(PROG): ../sh_config.h

$(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

.include <bsd.prog.mk>
