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