1 # $NetBSD: Makefile,v 1.41 1998/04/09 00:32:31 tv 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 builtins.h init.c nodes.c nodes.h \ 9 syntax.c syntax.h token.h 10 SRCS= ${SHSRCS} ${GENSRCS} 11 12 LDADD+= -ll -ledit -ltermcap 13 DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} 14 15 LFLAGS= -8 # 8-bit lex scanner for arithmetic 16 YFLAGS= -d 17 18 CPPFLAGS+=-DSHELL -I. -I${.CURDIR} 19 20 # XXX 21 .if (${MACHINE_ARCH} == "powerpc") 22 CFLAGS+= -w 23 .endif 24 25 .PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf 26 27 CLEANFILES+= mkinit mknodes mksyntax 28 CLEANFILES+= mkinit.o mknodes.o mksyntax.o 29 CLEANFILES+= ${GENSRCS} y.tab.h 30 31 token.h: mktokens 32 sh ${.ALLSRC} 33 34 builtins.c builtins.h: mkbuiltins shell.h builtins.def 35 sh ${.ALLSRC} ${.OBJDIR} 36 37 init.c: mkinit ${SHSRCS} 38 ./${.ALLSRC} 39 40 nodes.c nodes.h: mknodes nodetypes nodes.c.pat 41 ./${.ALLSRC} 42 43 syntax.c syntax.h: mksyntax 44 ./${.ALLSRC} 45 46 .include <bsd.prog.mk> 47 48 ${OBJS}: builtins.h nodes.h syntax.h token.h 49