1994-05-11 21:09:42 +04:00
|
|
|
# @(#)Makefile 8.1 (Berkeley) 6/8/93
|
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 \
|
1994-05-11 21:14:22 +04:00
|
|
|
mystring.c nodes.c options.c parser.c redir.c show.c \
|
1994-05-12 20:09:09 +04:00
|
|
|
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
|
|
|
|
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 \
|
|
|
|
nodes.c nodes.h syntax.c syntax.h token.def \
|
1994-05-11 21:09:42 +04:00
|
|
|
y.tab.h
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
.depend parser.o: token.def
|
|
|
|
token.def: mktokens
|
|
|
|
sh ${.CURDIR}/mktokens
|
|
|
|
|
|
|
|
builtins.h builtins.c: ${.CURDIR}/mkbuiltins ${.CURDIR}/builtins
|
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>
|