1 # @(#)Makefile 8.4 (Berkeley) 5/5/95
6 SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
8 histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \
9 mystring.c options.c output.c parser.c printf.c redir.c show.c \
11 GENSRCS= builtins.c init.c nodes.c syntax.c
12 GENHDRS= builtins.h nodes.h syntax.h token.h
13 SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
15 # MLINKS for Shell built in commands for which there are no userland
16 # utilities of the same name are handled with the associated manpage,
17 # builtin.1 in share/man/man1/.
19 DPADD= ${LIBEDIT} ${LIBTERMCAP}
20 LDADD= -ledit -ltermcap
22 CFLAGS+=-DSHELL -I. -I${.CURDIR}
24 # DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
28 .PATH: ${.CURDIR}/bltin \
31 ${.CURDIR}/../../usr.bin/printf
33 CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
35 CLEANFILES+= ${GENSRCS} ${GENHDRS}
37 build-tools: mkinit mknodes mksyntax
39 .ORDER: builtins.c builtins.h
40 builtins.c builtins.h: mkbuiltins builtins.def
41 cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
43 init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \
45 ./mkinit ${.ALLSRC:S/^mkinit$//}
47 # XXX this is just to stop the default .c rule being used, so that the
48 # intermediate object has a fixed name.
49 # XXX we have a default .c rule, but no default .o rule.
51 ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
56 .ORDER: nodes.c nodes.h
57 nodes.c nodes.h: mknodes nodetypes nodes.c.pat
58 ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
60 .ORDER: syntax.c syntax.h
61 syntax.c syntax.h: mksyntax
65 sh ${.CURDIR}/mktokens
68 cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh
70 .include <bsd.prog.mk>