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