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