1 # @(#)Makefile 8.4 (Berkeley) 5/5/95
6 SHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \
7 histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
8 mystring.c options.c output.c parser.c redir.c show.c \
10 GENSRCS= builtins.c init.c nodes.c syntax.c
11 GENHDRS= builtins.h nodes.h syntax.h token.h
12 SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} y.tab.h
14 # MLINKS for Shell built in commands for which there are no userland
15 # utilities of the same name are handled with the associated manpage,
16 # builtin.1 in share/man/man1/.
18 DPADD= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
19 LDADD= -ll -ledit -ltermcap
21 LFLAGS= -8 # 8-bit lex scanner for arithmetic
22 CFLAGS+=-DSHELL -I. -I${.CURDIR}
24 # CFLAGS+= -g -DDEBUG=2
28 .PATH: ${.CURDIR}/bltin \
29 ${.CURDIR}/../../bin/test
31 CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
33 CLEANFILES+= ${GENSRCS} ${GENHDRS}
35 build-tools: mkinit mknodes mksyntax
37 .ORDER: builtins.c builtins.h
38 builtins.c builtins.h: mkbuiltins builtins.def
39 cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
41 init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \
43 ./mkinit ${.ALLSRC:S/^mkinit$//}
45 # XXX this is just to stop the default .c rule being used, so that the
46 # intermediate object has a fixed name.
47 # XXX we have a default .c rule, but no default .o rule.
49 ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
54 .ORDER: nodes.c nodes.h
55 nodes.c nodes.h: mknodes nodetypes nodes.c.pat
56 ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
58 .ORDER: syntax.c syntax.h
59 syntax.c syntax.h: mksyntax
63 sh ${.CURDIR}/mktokens
65 .include <bsd.prog.mk>