1994-06-24 11:47:57 +04:00
|
|
|
# $Id: Makefile,v 1.3 1994/06/24 07:47:57 jtc Exp $
|
1994-04-18 12:47:08 +04:00
|
|
|
|
|
|
|
PROG= sh
|
|
|
|
NOMAN=
|
1994-05-15 02:28:13 +04:00
|
|
|
SRCS= alias.c builtins.c cd.c echo.c error.c eval.c exec.c expand.c \
|
1994-04-18 12:47:08 +04:00
|
|
|
input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
|
|
|
|
mystring.c nodes.c options.c parser.c redir.c show.c \
|
1994-05-15 02:28:13 +04:00
|
|
|
syntax.c trap.c output.c var.c #histedit.c
|
|
|
|
OBJS+= init.o arith.o arith_lex.o
|
|
|
|
LDADD+= -ll #-ledit -ltermcap
|
|
|
|
DPADD+= ${LIBL} #${LIBEDIT} ${LIBTERMCAP}
|
|
|
|
LFLAGS= -8 # 8-bit lex scanner for arithmetic
|
1994-04-18 12:47:08 +04:00
|
|
|
SRCDIR= ${.CURDIR}/../../../../../bin/sh
|
1994-05-15 02:28:13 +04:00
|
|
|
CFLAGS+=-DSHELL -I. -I${SRCDIR} -DNO_HISTORY
|
1994-04-18 12:47:08 +04:00
|
|
|
|
|
|
|
BINDIR=/bin
|
|
|
|
|
|
|
|
.PATH: ${SRCDIR} ${SRCDIR}/bltin
|
|
|
|
|
|
|
|
CLEANFILES+=\
|
|
|
|
builtins.c builtins.h init.c mkinit mknodes mksyntax \
|
1994-05-15 02:28:13 +04:00
|
|
|
nodes.c nodes.h syntax.c syntax.h token.def y.tab.h
|
1994-04-18 12:47:08 +04:00
|
|
|
|
|
|
|
.depend parser.o: token.def
|
|
|
|
token.def: mktokens
|
|
|
|
sh ${SRCDIR}/mktokens
|
|
|
|
|
1994-06-24 11:47:57 +04:00
|
|
|
builtins.h builtins.c: ${SRCDIR}/mkbuiltins ${SRCDIR}/builtins.def
|
1994-05-15 02:28:13 +04:00
|
|
|
cd ${SRCDIR}; sh mkbuiltins -h ${.OBJDIR}
|
1994-04-18 12:47:08 +04:00
|
|
|
|
|
|
|
init.c: mkinit ${SRCS}
|
|
|
|
./mkinit '${CC} -c ${CFLAGS} init.c' ${.ALLSRC}
|
|
|
|
touch ${.TARGET}
|
|
|
|
|
|
|
|
mkinit: ${LIBCRT0} ${SRCDIR}/mkinit.c ${LIBC} ${DPADD}
|
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} ${SRCDIR}/mkinit.c -o $@ ${LDADD}
|
|
|
|
|
1994-05-15 02:28:13 +04:00
|
|
|
nodes.c nodes.h: mknodes ${SRCDIR}/nodetypes ${SRCDIR}/nodes.c.pat
|
|
|
|
./mknodes ${SRCDIR}/nodetypes ${SRCDIR}/nodes.c.pat
|
|
|
|
|
1994-04-18 12:47:08 +04:00
|
|
|
mknodes: ${LIBCRT0} ${SRCDIR}/mknodes.c ${LIBC} ${DPADD}
|
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} ${SRCDIR}/mknodes.c -o $@ ${LDADD}
|
|
|
|
|
1994-05-15 02:28:13 +04:00
|
|
|
syntax.c syntax.h: mksyntax
|
|
|
|
./mksyntax
|
|
|
|
|
1994-04-18 12:47:08 +04:00
|
|
|
mksyntax: ${LIBCRT0} ${SRCDIR}/mksyntax.c ${SRCDIR}/parser.h ${LIBC} ${DPADD}
|
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} ${SRCDIR}/mksyntax.c -o $@ ${LDADD}
|
1994-05-15 02:28:13 +04:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|