Makefile revision 213738
11638Srgrimes# @(#)Makefile 8.4 (Berkeley) 5/5/95 250476Speter# $FreeBSD: head/bin/sh/Makefile 213738 2010-10-12 18:20:38Z obrien $ 31638Srgrimes 4299163SngiePROG= sh 5299163SngieINSTALLFLAGS= -S 6298107SgjbSHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \ 7298107Sgjb histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ 8187916Sgabor mystring.c options.c output.c parser.c redir.c show.c \ 989361Sru test.c trap.c var.c 1089361SruGENSRCS= builtins.c init.c nodes.c syntax.c 11161709SdangerGENHDRS= builtins.h nodes.h syntax.h token.h 1289361SruSRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} y.tab.h 1389361Sru 1495227Sgshapiro# MLINKS for Shell built in commands for which there are no userland 15107143Sgordon# utilities of the same name are handled with the associated manpage, 16118132Ssimon# builtin.1 in share/man/man1/. 17273218Semaste 1870575SbenDPADD= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} 19283957SjmgLDADD= -ll -ledit -ltermcap 20283956Sjmg 21283956SjmgLFLAGS= -8 # 8-bit lex scanner for arithmetic 22124747SruCFLAGS+=-DSHELL -I. -I${.CURDIR} 23124747Sru# for debug: 24124747Sru# CFLAGS+= -g -DDEBUG=2 25124747SruWARNS?= 2 26124747SruWFORMAT=0 27345600Sngie 28124747Sru.PATH: ${.CURDIR}/bltin \ 29124747Sru ${.CURDIR}/../../bin/test 30299162Sngie 31299163SngieCLEANFILES+= mkinit mkinit.o mknodes mknodes.o \ 32299162Sngie mksyntax mksyntax.o 33299162SngieCLEANFILES+= ${GENSRCS} ${GENHDRS} 34124747Sru 35124747Srubuild-tools: mkinit mknodes mksyntax 36124747Sru 37299162Sngie.ORDER: builtins.c builtins.h 3857992Ssheldonhbuiltins.c builtins.h: mkbuiltins builtins.def 39330998Semaste cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR} 40273218Semaste 41273235Semasteinit.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \ 42273218Semaste redir.c trap.c var.c 431638Srgrimes ./mkinit ${.ALLSRC:S/^mkinit$//} 44 45# XXX this is just to stop the default .c rule being used, so that the 46# intermediate object has a fixed name. 47# XXX we have a default .c rule, but no default .o rule. 48.o: 49 ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} 50mkinit: mkinit.o 51mknodes: mknodes.o 52mksyntax: mksyntax.o 53 54.ORDER: nodes.c nodes.h 55nodes.c nodes.h: mknodes nodetypes nodes.c.pat 56 ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat 57 58.ORDER: syntax.c syntax.h 59syntax.c syntax.h: mksyntax 60 ./mksyntax 61 62token.h: mktokens 63 sh ${.CURDIR}/mktokens 64 65regress: 66 cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh 67 68.include <bsd.prog.mk> 69