1 1.67 jmmv # $NetBSD: Makefile,v 1.67 2003/09/14 12:11:10 jmmv 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.47 christos YHEADER=1 7 1.1 cgd PROG= sh 8 1.24 christos SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \ 9 1.10 jtc histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ 10 1.50 christos mystring.c options.c parser.c redir.c show.c trap.c output.c var.c \ 11 1.61 christos test.c printf.c kill.c 12 1.48 tron GENSRCS=arith.c arith.h arith_lex.c builtins.c builtins.h init.c nodes.c \ 13 1.48 tron nodes.h syntax.c syntax.h token.h 14 1.29 mycroft SRCS= ${SHSRCS} ${GENSRCS} 15 1.24 christos 16 1.13 jtc LDADD+= -ll -ledit -ltermcap 17 1.21 mycroft DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} 18 1.24 christos 19 1.64 lukem LFLAGS= -8 # 8-bit lex scanner for arithmetic 20 1.41 tv YFLAGS= -d 21 1.64 lukem 22 1.64 lukem .ifdef CRUNCHEDPROG 23 1.64 lukem LFLAGS+=-L 24 1.64 lukem YFLAGS+=-l 25 1.64 lukem .endif 26 1.24 christos 27 1.56 ross CPPFLAGS+=-DSHELL -I. -I${.CURDIR} 28 1.62 christos #XXX: For testing only. 29 1.63 dsl #CPPFLAGS+=-DDEBUG=1 30 1.62 christos #CFLAGS+=-funsigned-char 31 1.62 christos #TARGET_CHARFLAG?= -DTARGET_CHAR="unsigned char" -funsigned-char 32 1.54 lukem 33 1.54 lukem .ifdef SMALLPROG 34 1.54 lukem CPPFLAGS+=-DSMALL 35 1.54 lukem .endif 36 1.24 christos 37 1.61 christos .PATH: ${.CURDIR}/bltin ${NETBSDSRCDIR}/bin/test \ 38 1.61 christos ${NETBSDSRCDIR}/usr.bin/printf \ 39 1.61 christos ${NETBSDSRCDIR}/bin/kill 40 1.1 cgd 41 1.29 mycroft CLEANFILES+= mkinit mknodes mksyntax 42 1.29 mycroft CLEANFILES+= ${GENSRCS} y.tab.h 43 1.67 jmmv CLEANFILES+= trace 44 1.24 christos 45 1.24 christos token.h: mktokens 46 1.65 christos ${HOST_SH} ${.ALLSRC} 47 1.1 cgd 48 1.66 dsl builtins.h: builtins.c 49 1.66 dsl [ -f ${.TARGET} ] 50 1.66 dsl 51 1.66 dsl builtins.c: mkbuiltins shell.h builtins.def 52 1.65 christos ${HOST_SH} ${.ALLSRC} ${.OBJDIR} 53 1.66 dsl [ -f builtins.h ] 54 1.66 dsl touch builtins.h 55 1.1 cgd 56 1.24 christos init.c: mkinit ${SHSRCS} 57 1.39 mrg ./${.ALLSRC} 58 1.10 jtc 59 1.66 dsl nodes.h: nodes.c 60 1.66 dsl [ -f ${.TARGET} ] 61 1.66 dsl 62 1.66 dsl nodes.c: mknodes nodetypes nodes.c.pat 63 1.40 veego ./${.ALLSRC} 64 1.66 dsl [ -f nodes.h ] 65 1.66 dsl touch nodes.h 66 1.66 dsl 67 1.66 dsl syntax.h: syntax.c 68 1.66 dsl [ -f ${.TARGET} ] 69 1.1 cgd 70 1.66 dsl syntax.c: mksyntax 71 1.40 veego ./${.ALLSRC} 72 1.66 dsl [ -f syntax.h ] 73 1.66 dsl touch syntax.h 74 1.44 wrstuden 75 1.44 wrstuden mkinit: mkinit.c 76 1.46 ross ${HOST_LINK.c} -o mkinit ${.IMPSRC} 77 1.44 wrstuden 78 1.44 wrstuden mknodes: mknodes.c 79 1.46 ross ${HOST_LINK.c} -o mknodes ${.IMPSRC} 80 1.44 wrstuden 81 1.44 wrstuden .if (${MACHINE_ARCH} == "powerpc") || \ 82 1.52 bjh21 (${MACHINE_CPU} == "arm") 83 1.62 christos TARGET_CHARFLAG?= -DTARGET_CHAR="unsigned char" 84 1.44 wrstuden .else 85 1.62 christos TARGET_CHARFLAG?= -DTARGET_CHAR="signed char" 86 1.44 wrstuden .endif 87 1.44 wrstuden 88 1.44 wrstuden mksyntax: mksyntax.c 89 1.46 ross ${HOST_LINK.c} ${TARGET_CHARFLAG} -o mksyntax ${.IMPSRC} 90 1.10 jtc 91 1.43 cgd .include <bsd.prog.mk> 92 1.43 cgd 93 1.42 lukem ${OBJS}: builtins.h nodes.h syntax.h token.h 94