1# $OpenBSD: Makefile,v 1.9 2008/01/11 20:16:02 jmc Exp $ 2# 3# C Shell with process control; VM/UNIX VAX Makefile 4# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria 5# 6# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile. 7 8PROG= csh 9DFLAGS=-DBUILTIN -DFILEC -DNLS -DSHORT_STRINGS 10#CFLAGS+=-g 11#CFLAGS+=-Wall 12CFLAGS+=-I${.CURDIR} -I. ${DFLAGS} 13SRCS= alloc.c char.c const.c csh.c dir.c dol.c error.c exec.c exp.c file.c \ 14 func.c glob.c hist.c init.c lex.c misc.c parse.c proc.c \ 15 sem.c set.c str.c time.c 16 17CLEANFILES+=error.h const.h 18 19.if (${MACHINE_ARCH} == "vax") 20alloc.o: 21 ${CC} ${CFLAGS} ${CPPFLAGS} -O0 -c $< 22.endif 23 24const.h: error.h 25 26error.h: error.c 27 @rm -f $@ 28 @echo '/* Do not edit this file, make creates it. */' > $@ 29 @echo '#ifndef _h_sh_err' >> $@ 30 @echo '#define _h_sh_err' >> $@ 31 egrep 'ERR_' ${.CURDIR}/$*.c | egrep '^#define' >> $@ 32 @echo '#endif /* _h_sh_err */' >> $@ 33 34const.h: const.c 35 @rm -f $@ 36 @echo '/* Do not edit this file, make creates it. */' > $@ 37 ${CC} -E ${CFLAGS} ${.CURDIR}/$*.c | egrep 'Char STR' | \ 38 sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 39 sort >> $@ 40 41.depend alloc.o: const.h error.h 42 43.if make(install) 44SUBDIR+= USD.doc 45.endif 46 47.include <bsd.prog.mk> 48