1 # @(#)Makefile 8.4 (Berkeley) 5/5/95
8 SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
10 histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \
11 mystring.c options.c output.c parser.c printf.c redir.c show.c \
13 GENSRCS= builtins.c nodes.c syntax.c
14 GENHDRS= builtins.h nodes.h syntax.h token.h
15 SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
17 # MLINKS for Shell built in commands for which there are no userland
18 # utilities of the same name are handled with the associated manpage,
19 # builtin.1 in share/man/man1/.
23 CFLAGS+=-DSHELL -I. -I${.CURDIR}
25 # DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
29 .PATH: ${.CURDIR}/bltin \
32 ${.CURDIR}/../../usr.bin/printf
34 CLEANFILES+= mknodes mknodes.o \
36 CLEANFILES+= ${GENSRCS} ${GENHDRS}
38 build-tools: mknodes mksyntax
40 .ORDER: builtins.c builtins.h
41 builtins.c builtins.h: mkbuiltins builtins.def
42 sh ${.CURDIR}/mkbuiltins ${.CURDIR}
44 # XXX this is just to stop the default .c rule being used, so that the
45 # intermediate object has a fixed name.
46 # XXX we have a default .c rule, but no default .o rule.
48 ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
52 .ORDER: nodes.c nodes.h
53 nodes.c nodes.h: mknodes nodetypes nodes.c.pat
54 ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
56 .ORDER: syntax.c syntax.h
57 syntax.c syntax.h: mksyntax
61 sh ${.CURDIR}/mktokens
63 .if ${MK_TESTS} != "no"
67 .include <bsd.prog.mk>