Home | History | Annotate | Line # | Download | only in sh
Makefile revision 1.27
      1 #	$NetBSD: Makefile,v 1.27 1997/05/06 20:44:59 gwr 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 # echo.c
     24 .PATH.c: ${.CURDIR}/bltin
     25 # printf.c
     26 .PATH.c: ${.CURDIR}/../../usr.bin/printf
     27 
     28 CLEANFILES+= builtins.h mkinit mknodes mksyntax \
     29 	nodes.h syntax.h token.h y.tab.h
     30 CLEANFILES+= ${GENSRCS}
     31 
     32 beforedepend: token.h
     33 
     34 token.h: mktokens
     35 	sh ${.CURDIR}/mktokens
     36 
     37 builtins.h builtins.c: mkbuiltins builtins.def
     38 	cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
     39 
     40 init.c: mkinit ${SHSRCS}
     41 	./mkinit ${.ALLSRC:S/^mkinit$//}
     42 
     43 nodes.c nodes.h: mknodes nodetypes nodes.c.pat
     44 	./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
     45 
     46 syntax.c syntax.h: mksyntax
     47 	./mksyntax
     48 
     49 parser.o: token.h
     50 
     51 mkinit: mkinit.c
     52 	${HOST_COMPILE.c} ${.CURDIR}/mkinit.c
     53 	${HOST_LINK.c} -o ${.TARGET} mkinit.o
     54 
     55 mknodes: mknodes.c
     56 	${HOST_COMPILE.c} ${.CURDIR}/mknodes.c
     57 	${HOST_LINK.c} -o ${.TARGET} mknodes.o
     58 
     59 mksyntax: mksyntax.c
     60 	${HOST_COMPILE.c} ${.CURDIR}/mksyntax.c
     61 	${HOST_LINK.c} -o ${.TARGET} mksyntax.o
     62 
     63 .include <bsd.prog.mk>
     64 
     65 ${OBJS}: builtins.h nodes.h syntax.h
     66