Makefile revision 218466
1219820Sjeff# @(#)Makefile 8.4 (Berkeley) 5/5/95 2219820Sjeff# $FreeBSD: head/bin/sh/Makefile 218466 2011-02-08 23:18:06Z jilles $ 3219820Sjeff 4219820SjeffPROG= sh 5219820SjeffINSTALLFLAGS= -S 6219820SjeffSHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \ 7219820Sjeff exec.c expand.c \ 8219820Sjeff histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \ 9219820Sjeff mystring.c options.c output.c parser.c printf.c redir.c show.c \ 10219820Sjeff test.c trap.c var.c 11219820SjeffGENSRCS= builtins.c init.c nodes.c syntax.c 12219820SjeffGENHDRS= builtins.h nodes.h syntax.h token.h 13219820SjeffSRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} 14219820Sjeff 15219820Sjeff# MLINKS for Shell built in commands for which there are no userland 16219820Sjeff# utilities of the same name are handled with the associated manpage, 17219820Sjeff# builtin.1 in share/man/man1/. 18219820Sjeff 19219820SjeffDPADD= ${LIBEDIT} ${LIBTERMCAP} 20219820SjeffLDADD= -ledit -ltermcap 21219820Sjeff 22219820SjeffCFLAGS+=-DSHELL -I. -I${.CURDIR} 23219820Sjeff# for debug: 24219820Sjeff# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline 25219820SjeffWARNS?= 2 26219820SjeffWFORMAT=0 27219820Sjeff 28219820Sjeff.PATH: ${.CURDIR}/bltin \ 29219820Sjeff ${.CURDIR}/../kill \ 30219820Sjeff ${.CURDIR}/../test \ 31219820Sjeff ${.CURDIR}/../../usr.bin/printf 32219820Sjeff 33219820SjeffCLEANFILES+= mkinit mkinit.o mknodes mknodes.o \ 34219820Sjeff mksyntax mksyntax.o 35219820SjeffCLEANFILES+= ${GENSRCS} ${GENHDRS} 36219820Sjeff 37219820Sjeffbuild-tools: mkinit mknodes mksyntax 38219820Sjeff 39219820Sjeff.ORDER: builtins.c builtins.h 40219820Sjeffbuiltins.c builtins.h: mkbuiltins builtins.def 41219820Sjeff cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR} 42219820Sjeff 43219820Sjeffinit.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \ 44219820Sjeff redir.c trap.c var.c 45219820Sjeff ./mkinit ${.ALLSRC:S/^mkinit$//} 46219820Sjeff 47219820Sjeff# XXX this is just to stop the default .c rule being used, so that the 48219820Sjeff# intermediate object has a fixed name. 49219820Sjeff# XXX we have a default .c rule, but no default .o rule. 50219820Sjeff.o: 51219820Sjeff ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} 52219820Sjeffmkinit: mkinit.o 53219820Sjeffmknodes: mknodes.o 54219820Sjeffmksyntax: mksyntax.o 55219820Sjeff 56219820Sjeff.ORDER: nodes.c nodes.h 57219820Sjeffnodes.c nodes.h: mknodes nodetypes nodes.c.pat 58219820Sjeff ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat 59219820Sjeff 60219820Sjeff.ORDER: syntax.c syntax.h 61219820Sjeffsyntax.c syntax.h: mksyntax 62219820Sjeff ./mksyntax 63219820Sjeff 64219820Sjefftoken.h: mktokens 65219820Sjeff sh ${.CURDIR}/mktokens 66219820Sjeff 67219820Sjeffregress: 68219820Sjeff cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh 69219820Sjeff 70219820Sjeff.include <bsd.prog.mk> 71219820Sjeff