NetBSD/bin/sh/Makefile

94 lines
2.0 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.67 2003/09/14 12:11:10 jmmv Exp $
# @(#)Makefile 8.4 (Berkeley) 5/5/95
1993-03-21 12:45:37 +03:00
.include <bsd.own.mk>
YHEADER=1
1993-03-21 12:45:37 +03:00
PROG= sh
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 \
mystring.c options.c parser.c redir.c show.c trap.c output.c var.c \
test.c printf.c kill.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
SRCS= ${SHSRCS} ${GENSRCS}
1994-05-13 03:55:56 +04:00
LDADD+= -ll -ledit -ltermcap
1995-06-11 00:19:40 +04:00
DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
LFLAGS= -8 # 8-bit lex scanner for arithmetic
YFLAGS= -d
.ifdef CRUNCHEDPROG
LFLAGS+=-L
YFLAGS+=-l
.endif
CPPFLAGS+=-DSHELL -I. -I${.CURDIR}
#XXX: For testing only.
#CPPFLAGS+=-DDEBUG=1
#CFLAGS+=-funsigned-char
#TARGET_CHARFLAG?= -DTARGET_CHAR="unsigned char" -funsigned-char
2002-02-07 09:25:07 +03:00
.ifdef SMALLPROG
CPPFLAGS+=-DSMALL
.endif
.PATH: ${.CURDIR}/bltin ${NETBSDSRCDIR}/bin/test \
${NETBSDSRCDIR}/usr.bin/printf \
${NETBSDSRCDIR}/bin/kill
1993-03-21 12:45:37 +03:00
CLEANFILES+= mkinit mknodes mksyntax
CLEANFILES+= ${GENSRCS} y.tab.h
CLEANFILES+= trace
token.h: mktokens
2003-05-08 17:03:19 +04:00
${HOST_SH} ${.ALLSRC}
1993-03-21 12:45:37 +03:00
2003-05-15 14:13:36 +04:00
builtins.h: builtins.c
[ -f ${.TARGET} ]
builtins.c: mkbuiltins shell.h builtins.def
2003-05-08 17:03:19 +04:00
${HOST_SH} ${.ALLSRC} ${.OBJDIR}
2003-05-15 14:13:36 +04:00
[ -f builtins.h ]
touch builtins.h
1993-03-21 12:45:37 +03:00
init.c: mkinit ${SHSRCS}
./${.ALLSRC}
1994-05-11 21:09:42 +04:00
2003-05-15 14:13:36 +04:00
nodes.h: nodes.c
[ -f ${.TARGET} ]
nodes.c: mknodes nodetypes nodes.c.pat
./${.ALLSRC}
2003-05-15 14:13:36 +04:00
[ -f nodes.h ]
touch nodes.h
syntax.h: syntax.c
[ -f ${.TARGET} ]
1993-03-21 12:45:37 +03:00
2003-05-15 14:13:36 +04:00
syntax.c: mksyntax
./${.ALLSRC}
2003-05-15 14:13:36 +04:00
[ -f syntax.h ]
touch syntax.h
mkinit: mkinit.c
${HOST_LINK.c} -o mkinit ${.IMPSRC}
mknodes: mknodes.c
${HOST_LINK.c} -o mknodes ${.IMPSRC}
.if (${MACHINE_ARCH} == "powerpc") || \
(${MACHINE_CPU} == "arm")
TARGET_CHARFLAG?= -DTARGET_CHAR="unsigned char"
.else
TARGET_CHARFLAG?= -DTARGET_CHAR="signed char"
.endif
mksyntax: mksyntax.c
${HOST_LINK.c} ${TARGET_CHARFLAG} -o mksyntax ${.IMPSRC}
.include <bsd.prog.mk>
${OBJS}: builtins.h nodes.h syntax.h token.h