Makefile revision 1.39
11.39Schristos# $NetBSD: Makefile,v 1.39 2013/07/16 17:47:43 christos Exp $ 21.9Scgd# @(#)Makefile 8.1 (Berkeley) 5/31/93 31.6Smycroft# 41.1Scgd# C Shell with process control; VM/UNIX VAX Makefile 51.1Scgd# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria 61.1Scgd# 71.19Slukem# To profile, put -DPROF in DFLAGS and -pg in COPTS, and recompile. 81.1Scgd 91.20Slukem.include <bsd.own.mk> 101.39SchristosWARNS=6 111.20Slukem 121.1ScgdPROG= csh 131.6SmycroftDFLAGS=-DBUILTIN -DFILEC -DNLS -DSHORT_STRINGS 141.36Schristos# - Editor history not always aligned with shell history, 151.36Schristos# should implement internally 161.34Schristos# - Does not handle escaped prompts. 171.34Schristos# - Does not do completion 181.37Schristos.ifndef SMALLPROG 191.36SchristosDFLAGS+=-DEDIT 201.37Schristos.endif 211.15SchristosCPPFLAGS+=-I${.CURDIR} -I. ${DFLAGS} 221.1ScgdSRCS= alloc.c char.c const.c csh.c dir.c dol.c err.c exec.c exp.c file.c \ 231.6Smycroft func.c glob.c hist.c init.c lex.c misc.c parse.c printf.c proc.c \ 241.33Schristos sem.c set.c str.c time.c 251.20Slukem.PATH: ${NETBSDSRCDIR}/usr.bin/printf 261.1Scgd 271.1ScgdMLINKS= csh.1 limit.1 csh.1 alias.1 csh.1 bg.1 csh.1 dirs.1 csh.1 fg.1 \ 281.1Scgd csh.1 foreach.1 csh.1 history.1 csh.1 jobs.1 csh.1 popd.1 \ 291.1Scgd csh.1 pushd.1 csh.1 rehash.1 csh.1 repeat.1 csh.1 suspend.1 \ 301.1Scgd csh.1 stop.1 csh.1 source.1 311.1Scgd 321.23SlukemDPSRCS+= errnum.h const.h 331.23SlukemCLEANFILES+= errnum.h const.h 341.1Scgd 351.13Schristoserrnum.h: err.c 361.26Slukem ${_MKTARGET_CREATE} 371.24Slukem rm -f ${.TARGET} 381.24Slukem (\ 391.24Slukem echo '/* Do not edit this file, make creates it. */' ;\ 401.24Slukem echo '#ifndef _h_sh_errnum' ;\ 411.24Slukem echo '#define _h_sh_errnum' ;\ 421.24Slukem egrep 'ERR_' ${.ALLSRC} | egrep '^#define' ;\ 431.24Slukem echo '#endif /* _h_sh_errnum */' ;\ 441.24Slukem ) > ${.TARGET} 451.1Scgd 461.24Slukemconst.c: errnum.h 471.1Scgdconst.h: const.c 481.26Slukem ${_MKTARGET_CREATE} 491.24Slukem rm -f ${.TARGET} 501.24Slukem echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 511.15Schristos ${CC} -E ${CPPFLAGS} ${.ALLSRC} | egrep 'Char STR' | \ 521.29Sapb ${TOOL_SED} -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 531.13Schristos sort >> ${.TARGET} 541.1Scgd 551.7Scgd.if make(install) 561.16SmycroftSUBDIR+=USD.doc 571.7Scgd.endif 581.1Scgd 591.30Smrg# XXX Only GCC 4.1 problem 601.28Sgmcgarry.if defined(HAVE_GCC) && ${HAVE_GCC} == 4 && ${MACHINE_ARCH} == "vax" 611.27SmrgCOPTS.parse.c+= -O0 621.27Smrg.endif 631.32SjoergCOPTS.err.c = -Wno-format-nonliteral 641.31SchristosCOPTS.printf.c = -Wno-format-nonliteral 651.31SchristosCOPTS.proc.c = -Wno-format-nonliteral 661.33Schristos 671.36Schristos.if !empty(DFLAGS:M*EDIT) 681.38SheLDADD+=-ledit -lterminfo -lutil 691.35SchristosDPADD+=${LIBEDIT} ${LIBUTIL} 701.35Schristos.else 711.33SchristosLDADD+=-lutil 721.33SchristosDPADD+=${LIBUTIL} 731.34Schristos.endif 741.27Smrg 751.1Scgd.include <bsd.prog.mk> 761.16Smycroft.include <bsd.subdir.mk> 77