1 # $NetBSD: Makefile,v 1.24 1996/10/16 14:23:51 christos Exp $ 2 # @(#)Makefile 8.4 (Berkeley) 5/5/95 3 4 PROG= sh 5 SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \ 6 histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ 7 mystring.c options.c parser.c redir.c show.c trap.c output.c var.c 8 GENSRCS= arith.c arith_lex.c builtins.c init.c nodes.c syntax.c 9 SRCS= ${SHSRCS} ${GENSRCS} 10 11 LDADD+= -ll -ledit -ltermcap 12 DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} 13 14 LFLAGS= -8 # 8-bit lex scanner for arithmetic 15 16 CFLAGS+=-DSHELL -I. -I${.CURDIR} 17 18 .PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf 19 20 CLEANFILES+= builtins.h mkinit mknodes mksyntax \ 21 nodes.h syntax.h token.h y.tab.h 22 CLEANFILES+= ${GENSRCS} 23 24 beforedepend: token.h 25 26 token.h: mktokens 27 sh ${.CURDIR}/mktokens 28 29 builtins.h builtins.c: mkbuiltins builtins.def 30 cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR} 31 32 init.c: mkinit ${SHSRCS} 33 ./mkinit ${.ALLSRC:S/^mkinit$//} 34 35 nodes.c nodes.h: mknodes nodetypes nodes.c.pat 36 ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat 37 38 syntax.c syntax.h: mksyntax 39 ./mksyntax 40 41 parser.o: token.h 42 43 .include <bsd.prog.mk> 44 45 ${OBJS} : nodes.h syntax.h 46