Makefile revision 1.38
1# $NetBSD: Makefile,v 1.38 2013/01/25 19:07:14 he Exp $ 2# @(#)Makefile 8.1 (Berkeley) 5/31/93 3# 4# C Shell with process control; VM/UNIX VAX Makefile 5# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria 6# 7# To profile, put -DPROF in DFLAGS and -pg in COPTS, and recompile. 8 9.include <bsd.own.mk> 10 11PROG= csh 12DFLAGS=-DBUILTIN -DFILEC -DNLS -DSHORT_STRINGS 13# - Editor history not always aligned with shell history, 14# should implement internally 15# - Does not handle escaped prompts. 16# - Does not do completion 17.ifndef SMALLPROG 18DFLAGS+=-DEDIT 19.endif 20CPPFLAGS+=-I${.CURDIR} -I. ${DFLAGS} 21SRCS= alloc.c char.c const.c csh.c dir.c dol.c err.c exec.c exp.c file.c \ 22 func.c glob.c hist.c init.c lex.c misc.c parse.c printf.c proc.c \ 23 sem.c set.c str.c time.c 24.PATH: ${NETBSDSRCDIR}/usr.bin/printf 25 26MLINKS= csh.1 limit.1 csh.1 alias.1 csh.1 bg.1 csh.1 dirs.1 csh.1 fg.1 \ 27 csh.1 foreach.1 csh.1 history.1 csh.1 jobs.1 csh.1 popd.1 \ 28 csh.1 pushd.1 csh.1 rehash.1 csh.1 repeat.1 csh.1 suspend.1 \ 29 csh.1 stop.1 csh.1 source.1 30 31DPSRCS+= errnum.h const.h 32CLEANFILES+= errnum.h const.h 33 34errnum.h: err.c 35 ${_MKTARGET_CREATE} 36 rm -f ${.TARGET} 37 (\ 38 echo '/* Do not edit this file, make creates it. */' ;\ 39 echo '#ifndef _h_sh_errnum' ;\ 40 echo '#define _h_sh_errnum' ;\ 41 egrep 'ERR_' ${.ALLSRC} | egrep '^#define' ;\ 42 echo '#endif /* _h_sh_errnum */' ;\ 43 ) > ${.TARGET} 44 45const.c: errnum.h 46const.h: const.c 47 ${_MKTARGET_CREATE} 48 rm -f ${.TARGET} 49 echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 50 ${CC} -E ${CPPFLAGS} ${.ALLSRC} | egrep 'Char STR' | \ 51 ${TOOL_SED} -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 52 sort >> ${.TARGET} 53 54.if make(install) 55SUBDIR+=USD.doc 56.endif 57 58# XXX Only GCC 4.1 problem 59.if defined(HAVE_GCC) && ${HAVE_GCC} == 4 && ${MACHINE_ARCH} == "vax" 60COPTS.parse.c+= -O0 61.endif 62COPTS.err.c = -Wno-format-nonliteral 63COPTS.printf.c = -Wno-format-nonliteral 64COPTS.proc.c = -Wno-format-nonliteral 65 66.if !empty(DFLAGS:M*EDIT) 67LDADD+=-ledit -lterminfo -lutil 68DPADD+=${LIBEDIT} ${LIBUTIL} 69.else 70LDADD+=-lutil 71DPADD+=${LIBUTIL} 72.endif 73 74.include <bsd.prog.mk> 75.include <bsd.subdir.mk> 76