2001-11-03 16:40:30 +03:00
|
|
|
# $NetBSD: Makefile,v 1.53 2001/11/03 13:40:30 lukem Exp $
|
1995-05-12 01:28:33 +04:00
|
|
|
# @(#)Makefile 8.4 (Berkeley) 5/5/95
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2001-04-18 21:35:36 +04:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
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 \
|
2000-04-10 03:27:03 +04:00
|
|
|
mystring.c options.c parser.c redir.c show.c trap.c output.c var.c \
|
|
|
|
test.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
|
|
|
|
2000-04-10 03:27:03 +04:00
|
|
|
.PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf ${.CURDIR}/../test
|
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") || \
|
2001-04-18 21:35:36 +04:00
|
|
|
(${MACHINE_CPU} == "arm")
|
1998-09-12 22:55:07 +04:00
|
|
|
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
|