Makefile revision 213811
1272343Sngie# @(#)Makefile 8.4 (Berkeley) 5/5/95 2272343Sngie# $FreeBSD: head/bin/sh/Makefile 213811 2010-10-13 22:18:03Z obrien $ 3272343Sngie 4272343SngiePROG= sh 5272343SngieINSTALLFLAGS= -S 6272343SngieSHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \ 7272343Sngie histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ 8272343Sngie mystring.c options.c output.c parser.c redir.c show.c \ 9272343Sngie test.c trap.c var.c 10272343SngieGENSRCS= builtins.c init.c nodes.c syntax.c 11272343SngieGENHDRS= builtins.h nodes.h syntax.h token.h 12272343SngieSRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} y.tab.h 13272343Sngie 14272343Sngie# MLINKS for Shell built in commands for which there are no userland 15272343Sngie# utilities of the same name are handled with the associated manpage, 16272343Sngie# builtin.1 in share/man/man1/. 17272343Sngie 18272343SngieDPADD= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} 19272343SngieLDADD= -ll -ledit -ltermcap 20272343Sngie 21272343SngieLFLAGS= -8 # 8-bit lex scanner for arithmetic 22272343SngieCFLAGS+=-DSHELL -I. -I${.CURDIR} 23272343Sngie# for debug: 24272343Sngie# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline 25272343SngieWARNS?= 2 26272343SngieWFORMAT=0 27272343Sngie 28272343Sngie.PATH: ${.CURDIR}/bltin \ 29272343Sngie ${.CURDIR}/../../bin/test 30272343Sngie 31272343SngieCLEANFILES+= mkinit mkinit.o mknodes mknodes.o \ 32272343Sngie mksyntax mksyntax.o 33272343SngieCLEANFILES+= ${GENSRCS} ${GENHDRS} 34272343Sngie 35272343Sngiebuild-tools: mkinit mknodes mksyntax 36272343Sngie 37272343Sngie.ORDER: builtins.c builtins.h 38272343Sngiebuiltins.c builtins.h: mkbuiltins builtins.def 39272343Sngie cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR} 40272343Sngie 41272343Sngieinit.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \ 42272343Sngie redir.c trap.c var.c 43272343Sngie ./mkinit ${.ALLSRC:S/^mkinit$//} 44272343Sngie 45272343Sngie# XXX this is just to stop the default .c rule being used, so that the 46272343Sngie# intermediate object has a fixed name. 47272343Sngie# XXX we have a default .c rule, but no default .o rule. 48272343Sngie.o: 49272343Sngie ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} 50272343Sngiemkinit: mkinit.o 51272343Sngiemknodes: mknodes.o 52272343Sngiemksyntax: mksyntax.o 53272343Sngie 54272343Sngie.ORDER: nodes.c nodes.h 55272343Sngienodes.c nodes.h: mknodes nodetypes nodes.c.pat 56272343Sngie ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat 57272343Sngie 58272343Sngie.ORDER: syntax.c syntax.h 59272343Sngiesyntax.c syntax.h: mksyntax 60272343Sngie ./mksyntax 61272343Sngie 62272343Sngietoken.h: mktokens 63272343Sngie sh ${.CURDIR}/mktokens 64272343Sngie 65272343Sngieregress: 66272343Sngie cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh 67272343Sngie 68272343Sngie.include <bsd.prog.mk> 69272343Sngie