Makefile revision 124751
1246827Sdes# @(#)Makefile 8.4 (Berkeley) 5/5/95 2246827Sdes# $FreeBSD: head/bin/sh/Makefile 124751 2004-01-20 13:13:40Z ru $ 3246827Sdes 4246827SdesPROG= sh 5246827SdesSHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \ 6249454Sdes histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ 7246827Sdes mystring.c options.c output.c parser.c redir.c show.c \ 8249457Sdes test.c trap.c var.c 9255386SdesGENSRCS= builtins.c init.c nodes.c syntax.c 10246827SdesGENHDRS= builtins.h nodes.h syntax.h token.h 11249457SdesSRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} y.tab.h 12246827Sdes 13249457Sdes# MLINKS for Shell built in commands for which there are no userland 14249457Sdes# utilities of the same name are handled with the associated manpage, 15269257Sdes# builtin.1 in share/man/man1/. 16269257Sdes 17249457SdesDPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} 18246827SdesLDADD+= -ll -ledit -ltermcap 19269257Sdes 20249454SdesLFLAGS= -8 # 8-bit lex scanner for arithmetic 21255402SdesCFLAGS+=-DSHELL -I. -I${.CURDIR} 22255402Sdes# for debug: 23255402Sdes# CFLAGS+= -g -DDEBUG=2 24246827SdesWARNS= 0 25246827SdesWFORMAT=0 26246827Sdes 27.PATH: ${.CURDIR}/bltin \ 28 ${.CURDIR}/../../bin/test 29 30CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \ 31 mksyntax mksyntax.o 32CLEANFILES+= ${GENSRCS} ${GENHDRS} 33 34build-tools: mkinit mknodes mksyntax 35 36.ORDER: builtins.c builtins.h 37builtins.c builtins.h: mkbuiltins builtins.def 38 cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR} 39 40init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \ 41 redir.c trap.c var.c 42 ./mkinit ${.ALLSRC:S/^mkinit$//} 43 44# XXX this is just to stop the default .c rule being used, so that the 45# intermediate object has a fixed name. 46# XXX we have a default .c rule, but no default .o rule. 47.o: 48 ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} 49mkinit: mkinit.o 50mknodes: mknodes.o 51mksyntax: mksyntax.o 52 53.ORDER: nodes.c nodes.h 54nodes.c nodes.h: mknodes nodetypes nodes.c.pat 55 ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat 56 57.ORDER: syntax.c syntax.h 58syntax.c syntax.h: mksyntax 59 ./mksyntax 60 61token.h: mktokens 62 sh ${.CURDIR}/mktokens 63 64.include <bsd.prog.mk> 65