Make bge(4) aware ETHER_INPUT_CHAIN and ETHER_INPUT2
[dragonfly.git] / bin / sh / Makefile
bloba27b7ff497b210b503e8357f49d8eb2300763e30
1 # @(#)Makefile 8.4 (Berkeley) 5/5/95
2 # $FreeBSD: src/bin/sh/Makefile,v 1.30.2.1 2001/12/15 10:05:18 knu Exp $
3 # $DragonFly: src/bin/sh/Makefile,v 1.7 2006/09/28 22:29:44 pavalos Exp $
5 WARNS?= 5 # Not yet
7 PROG= sh
8 SHSRCS= alias.c arith.y arith_lex.l 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 output.c parser.c printf.c redir.c show.c \
11 test.c trap.c var.c
12 GENSRCS= builtins.c init.c nodes.c syntax.c
13 GENHDRS= builtins.h nodes.h syntax.h token.h y.tab.h
14 SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} y.tab.h
16 # MLINKS for Shell built in commands for which there are no userland
17 # utilities of the same name are handled with the associated manpage,
18 # builtin.1 in share/man/man1/.
20 DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
21 LDADD+= -ll -ledit -ltermcap
23 LFLAGS= -8 # 8-bit lex scanner for arithmetic
24 CFLAGS+=-DSHELL -I. -I${.CURDIR}
25 # for debug:
26 # CFLAGS+= -g -DDEBUG=2
28 .if defined(BOOTSTRAPPING)
29 CFLAGS+= -DNO_HISTORY
30 .endif
32 .PATH: ${.CURDIR}/bltin \
33 ${.CURDIR}/../../usr.bin/printf \
34 ${.CURDIR}/../../bin/test
36 CLEANFILES+= mkinit.nx mkinit.no mknodes.nx mknodes.no \
37 mksyntax.nx mksyntax.no
38 CLEANFILES+= ${GENSRCS} ${GENHDRS}
40 build-tools: mkinit.nx mknodes.nx mksyntax.nx
42 .ORDER: builtins.c builtins.h
43 builtins.c builtins.h: mkbuiltins builtins.def
44 cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
46 init.c: mkinit.nx alias.c eval.c exec.c input.c jobs.c options.c parser.c \
47 redir.c trap.c var.c
48 ./mkinit.nx ${.ALLSRC:S/^mkinit.nx$//}
50 # XXX this is just to stop the default .c rule being used, so that the
51 # intermediate object has a fixed name.
52 # XXX we have a default .c rule, but no default .o rule.
53 .o:
54 ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
55 mkinit.nx: mkinit.no
56 mknodes.nx: mknodes.no
57 mksyntax.nx: mksyntax.no
59 .ORDER: nodes.c nodes.h
60 nodes.c nodes.h: mknodes.nx nodetypes nodes.c.pat
61 ./mknodes.nx ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
63 .ORDER: syntax.c syntax.h
64 syntax.c syntax.h: mksyntax.nx
65 ./mksyntax.nx
67 token.h: mktokens
68 sh ${.CURDIR}/mktokens
70 .include <bsd.prog.mk>