1# @(#)Makefile 8.1 (Berkeley) 6/8/93 2# $Id: Makefile,v 1.6 1994/09/24 02:57:18 davidg Exp $ 3 4PROG= sh 5SRCS= alias.c builtins.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 nodes.c options.c parser.c printf.c redir.c show.c \ 8 signames.c syntax.c trap.c output.c var.c 9OBJS+= init.o arith.o arith_lex.o 10DPADD= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} 11LDADD= -ll -ledit -ltermcap 12LFLAGS= -8 # 8-bit lex scanner for arithmetic 13CFLAGS+=-DSHELL -I. -I${.CURDIR} 14.PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf 15CLEANFILES+=\ 16 builtins.c builtins.h init.c mkinit mknodes mksignames mksyntax \ 17 nodes.c nodes.h signames.c signames.h syntax.c syntax.h token.def \ 18 y.tab.h 19 20.depend parser.o: token.def 21token.def: mktokens 22 sh ${.CURDIR}/mktokens 23 24builtins.h builtins.c: ${.CURDIR}/mkbuiltins ${.CURDIR}/builtins 25 cd ${.CURDIR}; sh mkbuiltins 26 27init.c: mkinit ${SRCS} 28 ./mkinit '${CC} -c ${CFLAGS} ${LDFLAGS} init.c' ${.ALLSRC} 29 touch ${.TARGET} 30 31mkinit: ${.CURDIR}/mkinit.c 32 ${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mkinit.c -o $@ 33 34nodes.c nodes.h: mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat 35 ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat 36 37mknodes: ${.CURDIR}/mknodes.c 38 ${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mknodes.c -o $@ 39 40signames.c signames.h: mksignames 41 ./mksignames 42 43mksignames: ${.CURDIR}/mksignames.c 44 ${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mksignames.c -o $@ 45 46syntax.c syntax.h: mksyntax 47 ./mksyntax 48 49mksyntax: ${.CURDIR}/mksyntax.c ${.CURDIR}/parser.h 50 ${CC} ${CFLAGS} ${LDFLAGS} ${.CURDIR}/mksyntax.c -o $@ 51 52.include <bsd.prog.mk> 53