1 1.81 apb # $NetBSD: Makefile,v 1.81 2007/03/25 06:30:37 apb Exp $ 2 1.20 christos # @(#)Makefile 8.4 (Berkeley) 5/5/95 3 1.1 cgd 4 1.52 bjh21 .include <bsd.own.mk> 5 1.52 bjh21 6 1.81 apb WARNS=4 7 1.81 apb 8 1.47 christos YHEADER=1 9 1.1 cgd PROG= sh 10 1.24 christos SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \ 11 1.10 jtc histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ 12 1.50 christos mystring.c options.c parser.c redir.c show.c trap.c output.c var.c \ 13 1.78 christos test.c kill.c syntax.c 14 1.77 dsl GENSRCS=arith.c arith_lex.c builtins.c init.c nodes.c 15 1.76 dsl GENHDRS=arith.h builtins.h nodes.h token.h 16 1.29 mycroft SRCS= ${SHSRCS} ${GENSRCS} 17 1.24 christos 18 1.69 lukem DPSRCS+=${GENHDRS} 19 1.69 lukem 20 1.13 jtc LDADD+= -ll -ledit -ltermcap 21 1.21 mycroft DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} 22 1.24 christos 23 1.64 lukem LFLAGS= -8 # 8-bit lex scanner for arithmetic 24 1.41 tv YFLAGS= -d 25 1.64 lukem 26 1.75 dsl # The .depend file can get references to these temporary files 27 1.75 dsl .OPTIONAL: lex.yy.c y.tab.c 28 1.75 dsl 29 1.64 lukem .ifdef CRUNCHEDPROG 30 1.64 lukem LFLAGS+=-L 31 1.64 lukem YFLAGS+=-l 32 1.64 lukem .endif 33 1.24 christos 34 1.56 ross CPPFLAGS+=-DSHELL -I. -I${.CURDIR} 35 1.62 christos #XXX: For testing only. 36 1.63 dsl #CPPFLAGS+=-DDEBUG=1 37 1.62 christos #CFLAGS+=-funsigned-char 38 1.62 christos #TARGET_CHARFLAG?= -DTARGET_CHAR="unsigned char" -funsigned-char 39 1.54 lukem 40 1.54 lukem .ifdef SMALLPROG 41 1.54 lukem CPPFLAGS+=-DSMALL 42 1.78 christos .else 43 1.78 christos SRCS+=printf.c 44 1.54 lukem .endif 45 1.24 christos 46 1.61 christos .PATH: ${.CURDIR}/bltin ${NETBSDSRCDIR}/bin/test \ 47 1.61 christos ${NETBSDSRCDIR}/usr.bin/printf \ 48 1.61 christos ${NETBSDSRCDIR}/bin/kill 49 1.1 cgd 50 1.69 lukem CLEANFILES+= ${GENSRCS} ${GENHDRS} y.tab.h 51 1.67 jmmv CLEANFILES+= trace 52 1.24 christos 53 1.24 christos token.h: mktokens 54 1.72 lukem ${_MKTARGET_CREATE} 55 1.65 christos ${HOST_SH} ${.ALLSRC} 56 1.1 cgd 57 1.66 dsl builtins.h: builtins.c 58 1.72 lukem ${_MKTARGET_CREATE} 59 1.66 dsl 60 1.66 dsl builtins.c: mkbuiltins shell.h builtins.def 61 1.72 lukem ${_MKTARGET_CREATE} 62 1.65 christos ${HOST_SH} ${.ALLSRC} ${.OBJDIR} 63 1.66 dsl [ -f builtins.h ] 64 1.1 cgd 65 1.75 dsl init.c: mkinit.sh ${SHSRCS} 66 1.72 lukem ${_MKTARGET_CREATE} 67 1.75 dsl ${HOST_SH} ${.ALLSRC} 68 1.10 jtc 69 1.66 dsl nodes.h: nodes.c 70 1.66 dsl 71 1.74 dsl nodes.c: mknodes.sh nodetypes nodes.c.pat 72 1.72 lukem ${_MKTARGET_CREATE} 73 1.74 dsl ${HOST_SH} ${.ALLSRC} ${.OBJDIR} 74 1.66 dsl [ -f nodes.h ] 75 1.66 dsl 76 1.68 lukem .if ${USETOOLS} == "yes" 77 1.68 lukem COMPATOBJDIR!= cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR} 78 1.68 lukem NBCOMPATLIB= -L${COMPATOBJDIR} -lnbcompat 79 1.68 lukem .endif 80 1.68 lukem 81 1.43 cgd .include <bsd.prog.mk> 82