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