Home | History | Annotate | Line # | Download | only in sh
Makefile revision 1.26
      1 #	$NetBSD: Makefile,v 1.26 1997/04/17 08:13:26 thorpej Exp $
      2 #	@(#)Makefile	8.4 (Berkeley) 5/5/95
      3 
      4 PROG=	sh
      5 SHSRCS=	alias.c cd.c echo.c error.c eval.c exec.c expand.c \
      6 	histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
      7 	mystring.c options.c parser.c redir.c show.c trap.c output.c var.c
      8 GENSRCS= arith.c arith_lex.c builtins.c init.c nodes.c syntax.c
      9 SRCS= ${SHSRCS} ${GENSRCS}
     10 
     11 LDADD+=	-ll -ledit -ltermcap
     12 DPADD+=	${LIBL} ${LIBEDIT} ${LIBTERMCAP}
     13 
     14 LFLAGS= -8	# 8-bit lex scanner for arithmetic
     15 
     16 CFLAGS+=-DSHELL -I. -I${.CURDIR}
     17 
     18 # XXX
     19 .if (${MACHINE_ARCH} == "powerpc")
     20 CFLAGS+= -w
     21 .endif
     22 
     23 .PATH:	${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf
     24 
     25 CLEANFILES+= builtins.h mkinit mknodes mksyntax \
     26 	nodes.h syntax.h token.h y.tab.h
     27 CLEANFILES+= ${GENSRCS}
     28 
     29 beforedepend: token.h
     30 
     31 token.h: mktokens
     32 	sh ${.CURDIR}/mktokens
     33 
     34 builtins.h builtins.c: mkbuiltins builtins.def
     35 	cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
     36 
     37 init.c: mkinit ${SHSRCS}
     38 	./mkinit ${.ALLSRC:S/^mkinit$//}
     39 
     40 nodes.c nodes.h: mknodes nodetypes nodes.c.pat
     41 	./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
     42 
     43 syntax.c syntax.h: mksyntax
     44 	./mksyntax
     45 
     46 parser.o: token.h
     47 
     48 mkinit: mkinit.c
     49 	${HOST_COMPILE.c} ${.CURDIR}/mkinit.c
     50 	${HOST_LINK.c} -o ${.TARGET} mkinit.o
     51 
     52 mknodes: mknodes.c
     53 	${HOST_COMPILE.c} ${.CURDIR}/mknodes.c
     54 	${HOST_LINK.c} -o ${.TARGET} mknodes.o
     55 
     56 mksyntax: mksyntax.c
     57 	${HOST_COMPILE.c} ${.CURDIR}/mksyntax.c
     58 	${HOST_LINK.c} -o ${.TARGET} mksyntax.o
     59 
     60 .include <bsd.prog.mk>
     61 
     62 ${OBJS}: builtins.h nodes.h syntax.h
     63