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