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