1 # $NetBSD: Makefile,v 1.52 2001/04/18 17:35:36 bjh21 Exp $ 2 # @(#)Makefile 8.4 (Berkeley) 5/5/95 3 4 .include <bsd.own.mk> 5 6 WARNS=2 7 YHEADER=1 8 PROG= sh 9 SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \ 10 histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ 11 mystring.c options.c parser.c redir.c show.c trap.c output.c var.c \ 12 test.c 13 GENSRCS=arith.c arith.h arith_lex.c builtins.c builtins.h init.c nodes.c \ 14 nodes.h syntax.c syntax.h token.h 15 SRCS= ${SHSRCS} ${GENSRCS} 16 17 LDADD+= -ll -ledit -ltermcap 18 DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} 19 20 LFLAGS= -8 # 8-bit lex scanner for arithmetic 21 YFLAGS= -d 22 23 CPPFLAGS+=-DSHELL -I. -I${.CURDIR} 24 25 .PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf ${.CURDIR}/../test 26 27 CLEANFILES+= mkinit mknodes mksyntax 28 CLEANFILES+= ${GENSRCS} y.tab.h 29 30 token.h: mktokens 31 sh ${.ALLSRC} 32 33 builtins.c builtins.h: mkbuiltins shell.h builtins.def 34 sh ${.ALLSRC} ${.OBJDIR} 35 36 init.c: mkinit ${SHSRCS} 37 ./${.ALLSRC} 38 39 nodes.c nodes.h: mknodes nodetypes nodes.c.pat 40 ./${.ALLSRC} 41 42 syntax.c syntax.h: mksyntax 43 ./${.ALLSRC} 44 45 mkinit: mkinit.c 46 ${HOST_LINK.c} -o mkinit ${.IMPSRC} 47 48 mknodes: mknodes.c 49 ${HOST_LINK.c} -o mknodes ${.IMPSRC} 50 51 .if (${MACHINE_ARCH} == "powerpc") || \ 52 (${MACHINE_CPU} == "arm") 53 TARGET_CHARFLAG= -DTARGET_CHAR="u_int8_t" 54 .else 55 TARGET_CHARFLAG= -DTARGET_CHAR="int8_t" 56 .endif 57 58 mksyntax: mksyntax.c 59 ${HOST_LINK.c} ${TARGET_CHARFLAG} -o mksyntax ${.IMPSRC} 60 61 .include <bsd.prog.mk> 62 63 ${OBJS}: builtins.h nodes.h syntax.h token.h 64