xref: /original-bsd/bin/csh/Makefile (revision 02e832b2)
1#	@(#)Makefile	5.29 (Berkeley) 09/02/92
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}
13.if ${MACHINE} == "hp300"
14CFLAGS+=-fcombine-regs -fstrength-reduce
15.endif
16SRCS=	alloc.c char.c const.c csh.c dir.c dol.c err.c exec.c exp.c file.c \
17	func.c glob.c hist.c init.c lex.c misc.c parse.c printf.c proc.c \
18	sem.c set.c str.c time.c
19.PATH:	${.CURDIR}/../../usr.bin/printf
20
21MAN1=	csh.0
22MLINKS=	csh.1 limit.1 csh.1 alias.1 csh.1 bg.1 csh.1 dirs.1 csh.1 fg.1 \
23	csh.1 foreach.1 csh.1 history.1 csh.1 jobs.1 csh.1 popd.1 \
24	csh.1 pushd.1 csh.1 rehash.1 csh.1 repeat.1 csh.1 suspend.1 \
25	csh.1 stop.1 csh.1 source.1
26CLEANFILES+=err.h const.h
27
28OBJS+=
29const.h: err.h
30
31err.h: err.c
32	@rm -f $@
33	@echo '/* Do not edit this file, make creates it. */' > $@
34	@echo '#ifndef _h_sh_err' >> $@
35	@echo '#define _h_sh_err' >> $@
36	egrep 'ERR_' ${.CURDIR}/$*.c | egrep '^#define' >> $@
37	@echo '#endif /* _h_sh_err */' >> $@
38
39const.h: const.c
40	@rm -f $@
41	@echo '/* Do not edit this file, make creates it. */' > $@
42	${CC} -E ${CFLAGS} ${.CURDIR}/$*.c | egrep 'Char STR' | \
43	    sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
44	    sort >> $@
45
46.depend: const.h err.h
47
48.include <bsd.prog.mk>
49