NetBSD/bin/sh/Makefile
cgd f51f1b4c04 from Thomas Eberhardt <thomas@mathematik.uni-Bremen.de>:
Some reordering and modifications in the Makefiles for sh, dump,
    restore to get dependicies right.  The README in /usr/share/mk
    states that it's a Bad Thing(tm) to add something after
    .include <bsd.prog.mk>, but this seems the only way to get the
    dependencies right.
1993-11-14 15:35:34 +00:00

42 lines
1.3 KiB
Makefile

# $Id: Makefile,v 1.8 1993/11/14 15:35:34 cgd Exp $
PROG= sh
SRCS= builtins.c cd.c dirent.c echo.c error.c eval.c exec.c expand.c \
input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
mystring.c nodes.c options.c parser.c redir.c show.c \
syntax.c trap.c output.c var.c
OBJS+= init.o
CFLAGS+=-DSHELL -I. -I${.CURDIR}
.PATH: ${.CURDIR}/bltin
CLEANFILES+=\
builtins.c builtins.h init.c mkinit mknodes mksyntax \
nodes.c nodes.h syntax.c syntax.h token.def
.depend parser.o: token.def
token.def: mktokens
sh ${.CURDIR}/mktokens
builtins.h builtins.c: ${.CURDIR}/mkbuiltins ${.CURDIR}/builtins
cd ${.CURDIR}; sh mkbuiltins
init.c: mkinit ${SRCS}
./mkinit '${CC} -c ${CFLAGS} init.c' ${.ALLSRC}
touch ${.TARGET}
nodes.c nodes.h: mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
syntax.c syntax.h: mksyntax
./mksyntax
.include <bsd.prog.mk>
mkinit: ${LIBCRT0} ${.CURDIR}/mkinit.c ${LIBC} ${DPADD}
${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} ${.CURDIR}/mkinit.c -o $@ ${LDADD}
mknodes: ${LIBCRT0} ${.CURDIR}/mknodes.c ${LIBC} ${DPADD}
${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} ${.CURDIR}/mknodes.c -o $@ ${LDADD}
mksyntax: ${LIBCRT0} ${.CURDIR}/mksyntax.c ${.CURDIR}/parser.h ${LIBC} ${DPADD}
${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} ${.CURDIR}/mksyntax.c -o $@ ${LDADD}