1994-05-26 08:18:55 +02:00
|
|
|
# @(#)Makefile 8.1 (Berkeley) 6/8/93
|
1996-06-24 06:26:21 +02:00
|
|
|
# $Id: Makefile,v 1.11 1996/06/02 17:06:39 phk Exp $
|
1994-05-26 08:18:55 +02:00
|
|
|
|
|
|
|
PROG= sh
|
1996-06-02 19:06:40 +02:00
|
|
|
SRCS= alias.c builtins.c cd.c echo.c error.c eval.c exec.c expand.c \
|
1994-05-26 08:18:55 +02:00
|
|
|
histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
|
|
|
|
mystring.c nodes.c options.c parser.c printf.c redir.c show.c \
|
|
|
|
signames.c syntax.c trap.c output.c var.c
|
1996-06-02 19:06:40 +02:00
|
|
|
OBJS+= init.o arith.o arith_lex.o
|
1994-10-02 02:36:03 +01:00
|
|
|
DPADD= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
|
|
|
|
LDADD= -ll -ledit -ltermcap
|
1994-05-26 08:18:55 +02:00
|
|
|
LFLAGS= -8 # 8-bit lex scanner for arithmetic
|
|
|
|
CFLAGS+=-DSHELL -I. -I${.CURDIR}
|
1995-08-27 22:26:44 +02:00
|
|
|
# for debugging:
|
|
|
|
#CFLAGS+=-g -DDEBUG=2
|
1994-05-26 08:18:55 +02:00
|
|
|
.PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf
|
|
|
|
CLEANFILES+=\
|
|
|
|
builtins.c builtins.h init.c mkinit mknodes mksignames mksyntax \
|
|
|
|
nodes.c nodes.h signames.c signames.h syntax.c syntax.h token.def \
|
1996-06-02 19:06:40 +02:00
|
|
|
y.tab.h
|
1994-05-26 08:18:55 +02:00
|
|
|
|
|
|
|
.depend parser.o: token.def
|
|
|
|
token.def: mktokens
|
|
|
|
sh ${.CURDIR}/mktokens
|
|
|
|
|
1996-02-03 14:27:55 +01:00
|
|
|
${.CURDIR}/builtins:
|
|
|
|
# just override the default rule
|
|
|
|
|
1994-05-26 08:18:55 +02:00
|
|
|
builtins.h builtins.c: ${.CURDIR}/mkbuiltins ${.CURDIR}/builtins
|
1996-06-24 06:26:21 +02:00
|
|
|
cd ${.CURDIR} && env OBJDIR=${.OBJDIR} sh mkbuiltins
|
1994-05-26 08:18:55 +02:00
|
|
|
|
|
|
|
init.c: mkinit ${SRCS}
|
1994-05-30 15:59:50 +02:00
|
|
|
./mkinit '${CC} -c ${CFLAGS} ${LDFLAGS} init.c' ${.ALLSRC}
|
1994-08-21 12:44:51 +02:00
|
|
|
touch ${.TARGET}
|
1994-05-26 08:18:55 +02:00
|
|
|
|
|
|
|
mkinit: ${.CURDIR}/mkinit.c
|
1994-05-29 14:43:06 +02:00
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mkinit.c -o $@
|
1994-05-26 08:18:55 +02:00
|
|
|
|
|
|
|
nodes.c nodes.h: mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
|
|
|
|
./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
|
|
|
|
|
|
|
|
mknodes: ${.CURDIR}/mknodes.c
|
1994-05-29 14:43:06 +02:00
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mknodes.c -o $@
|
1994-05-26 08:18:55 +02:00
|
|
|
|
|
|
|
signames.c signames.h: mksignames
|
|
|
|
./mksignames
|
|
|
|
|
|
|
|
mksignames: ${.CURDIR}/mksignames.c
|
1994-05-29 14:43:06 +02:00
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mksignames.c -o $@
|
1994-05-26 08:18:55 +02:00
|
|
|
|
|
|
|
syntax.c syntax.h: mksyntax
|
|
|
|
./mksyntax
|
|
|
|
|
|
|
|
mksyntax: ${.CURDIR}/mksyntax.c ${.CURDIR}/parser.h
|
1994-05-29 14:43:06 +02:00
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mksyntax.c -o $@
|
1994-05-26 08:18:55 +02:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|