1995-06-11 00:19:40 +04:00
|
|
|
# $NetBSD: Makefile,v 1.21 1995/06/10 20:19:40 mycroft Exp $
|
1995-05-12 01:28:33 +04:00
|
|
|
# @(#)Makefile 8.4 (Berkeley) 5/5/95
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
PROG= sh
|
1994-05-11 21:09:42 +04:00
|
|
|
SRCS= alias.c builtins.c cd.c echo.c error.c eval.c exec.c expand.c \
|
|
|
|
histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
|
1995-05-12 01:28:33 +04:00
|
|
|
mystring.c nodes.c options.c parser.c redir.c show.c syntax.c \
|
|
|
|
trap.c output.c var.c
|
1994-05-11 21:09:42 +04:00
|
|
|
OBJS+= init.o arith.o arith_lex.o
|
1994-05-13 03:55:56 +04:00
|
|
|
LDADD+= -ll -ledit -ltermcap
|
1995-06-11 00:19:40 +04:00
|
|
|
DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
|
1994-05-11 21:09:42 +04:00
|
|
|
LFLAGS= -8 # 8-bit lex scanner for arithmetic
|
1993-03-21 12:45:37 +03:00
|
|
|
CFLAGS+=-DSHELL -I. -I${.CURDIR}
|
1994-05-11 21:09:42 +04:00
|
|
|
.PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf
|
1993-03-21 12:45:37 +03:00
|
|
|
CLEANFILES+=\
|
1994-05-12 20:09:09 +04:00
|
|
|
builtins.c builtins.h init.c mkinit mknodes mksyntax \
|
1995-05-12 01:28:33 +04:00
|
|
|
nodes.c nodes.h printf.o syntax.c syntax.h token.def y.tab.h
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
.depend parser.o: token.def
|
|
|
|
token.def: mktokens
|
|
|
|
sh ${.CURDIR}/mktokens
|
|
|
|
|
1994-06-24 11:33:12 +04:00
|
|
|
builtins.h builtins.c: ${.CURDIR}/mkbuiltins ${.CURDIR}/builtins.def
|
1994-05-15 02:20:04 +04:00
|
|
|
cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
init.c: mkinit ${SRCS}
|
1994-06-02 13:10:58 +04:00
|
|
|
./mkinit '${CC} -c ${CFLAGS} init.c' ${.ALLSRC:S/^mkinit$//}
|
1994-05-11 21:09:42 +04:00
|
|
|
|
|
|
|
mkinit: ${.CURDIR}/mkinit.c
|
|
|
|
${CC} ${CFLAGS} ${.CURDIR}/mkinit.c -o $@
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
nodes.c nodes.h: mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
|
|
|
|
./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
|
|
|
|
|
1994-05-11 21:09:42 +04:00
|
|
|
mknodes: ${.CURDIR}/mknodes.c
|
|
|
|
${CC} ${CFLAGS} ${.CURDIR}/mknodes.c -o $@
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1994-05-11 21:09:42 +04:00
|
|
|
syntax.c syntax.h: mksyntax
|
|
|
|
./mksyntax
|
1993-11-14 18:35:34 +03:00
|
|
|
|
1994-05-11 21:09:42 +04:00
|
|
|
mksyntax: ${.CURDIR}/mksyntax.c ${.CURDIR}/parser.h
|
|
|
|
${CC} ${CFLAGS} ${.CURDIR}/mksyntax.c -o $@
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|