1999-07-09 07:05:49 +04:00
|
|
|
# $NetBSD: Makefile,v 1.49 1999/07/09 03:05:49 christos Exp $
|
1995-05-12 01:28:33 +04:00
|
|
|
# @(#)Makefile 8.4 (Berkeley) 5/5/95
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1999-07-09 07:05:49 +04:00
|
|
|
WARNS=2
|
1999-02-05 10:52:51 +03:00
|
|
|
YHEADER=1
|
1993-03-21 12:45:37 +03:00
|
|
|
PROG= sh
|
1996-10-16 18:23:51 +04:00
|
|
|
SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \
|
1994-05-11 21:09:42 +04:00
|
|
|
histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
|
1996-10-16 18:23:51 +04:00
|
|
|
mystring.c options.c parser.c redir.c show.c trap.c output.c var.c
|
1999-02-06 01:19:47 +03:00
|
|
|
GENSRCS=arith.c arith.h arith_lex.c builtins.c builtins.h init.c nodes.c \
|
|
|
|
nodes.h syntax.c syntax.h token.h
|
1997-05-09 11:50:03 +04:00
|
|
|
SRCS= ${SHSRCS} ${GENSRCS}
|
1996-10-16 18:23:51 +04:00
|
|
|
|
1994-05-13 03:55:56 +04:00
|
|
|
LDADD+= -ll -ledit -ltermcap
|
1995-06-11 00:19:40 +04:00
|
|
|
DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
|
1996-10-16 18:23:51 +04:00
|
|
|
|
1994-05-11 21:09:42 +04:00
|
|
|
LFLAGS= -8 # 8-bit lex scanner for arithmetic
|
1998-04-09 04:32:31 +04:00
|
|
|
YFLAGS= -d
|
1996-10-16 18:23:51 +04:00
|
|
|
|
1997-10-10 23:47:50 +04:00
|
|
|
CPPFLAGS+=-DSHELL -I. -I${.CURDIR}
|
1996-10-16 18:23:51 +04:00
|
|
|
|
1997-05-09 01:11:01 +04:00
|
|
|
.PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1997-05-09 11:50:03 +04:00
|
|
|
CLEANFILES+= mkinit mknodes mksyntax
|
|
|
|
CLEANFILES+= ${GENSRCS} y.tab.h
|
1996-10-16 18:23:51 +04:00
|
|
|
|
|
|
|
token.h: mktokens
|
1998-03-29 13:27:40 +04:00
|
|
|
sh ${.ALLSRC}
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1998-03-29 13:27:40 +04:00
|
|
|
builtins.c builtins.h: mkbuiltins shell.h builtins.def
|
|
|
|
sh ${.ALLSRC} ${.OBJDIR}
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1996-10-16 18:23:51 +04:00
|
|
|
init.c: mkinit ${SHSRCS}
|
1998-03-30 14:07:16 +04:00
|
|
|
./${.ALLSRC}
|
1994-05-11 21:09:42 +04:00
|
|
|
|
1996-10-16 18:23:51 +04:00
|
|
|
nodes.c nodes.h: mknodes nodetypes nodes.c.pat
|
1998-03-30 16:06:48 +04:00
|
|
|
./${.ALLSRC}
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1994-05-11 21:09:42 +04:00
|
|
|
syntax.c syntax.h: mksyntax
|
1998-03-30 16:06:48 +04:00
|
|
|
./${.ALLSRC}
|
1993-11-14 18:35:34 +03:00
|
|
|
|
1998-09-12 22:55:07 +04:00
|
|
|
mkinit: mkinit.c
|
1998-10-08 04:29:38 +04:00
|
|
|
${HOST_LINK.c} -o mkinit ${.IMPSRC}
|
1998-09-12 22:55:07 +04:00
|
|
|
|
|
|
|
mknodes: mknodes.c
|
1998-10-08 04:29:38 +04:00
|
|
|
${HOST_LINK.c} -o mknodes ${.IMPSRC}
|
1998-09-12 22:55:07 +04:00
|
|
|
|
|
|
|
.if (${MACHINE_ARCH} == "powerpc") || \
|
|
|
|
(${MACHINE_ARCH} == "arm32")
|
|
|
|
TARGET_CHARFLAG= -DTARGET_CHAR="u_int8_t"
|
|
|
|
.else
|
|
|
|
TARGET_CHARFLAG= -DTARGET_CHAR="int8_t"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
mksyntax: mksyntax.c
|
1998-10-08 04:29:38 +04:00
|
|
|
${HOST_LINK.c} ${TARGET_CHARFLAG} -o mksyntax ${.IMPSRC}
|
1998-09-12 22:55:07 +04:00
|
|
|
|
1998-04-13 16:06:48 +04:00
|
|
|
.include <bsd.prog.mk>
|
1998-04-19 09:22:08 +04:00
|
|
|
|
|
|
|
${OBJS}: builtins.h nodes.h syntax.h token.h
|