xref: /original-bsd/usr.bin/ex/Makefile (revision abb30312)
1#	@(#)Makefile	7.32.1.1 (Berkeley) 10/21/90
2
3# Things that can be turned off to save space:
4#	LISPCODE (-l flag, showmatch and lisp options)
5#	UCVISUAL (visual \ nonsense on upper case only terminals)
6#	CHDIR (the undocumented chdir command)
7#	VMUNIX makes ex considerably larger, raising many limits and
8#		improving speed and simplicity of maintenance.
9#
10# If your system expands tabs to 4 spaces you should -DTABS=4 below.
11#
12PROG=	ex
13SUBDIR=	ex3.7recover ex3.7preserve
14CFLAGS+=-I. -DTABS=8 -DLISPCODE -DCHDIR -DUCVISUAL -DVFORK -DVMUNIX \
15	-DFASTTAG -DUNIX_SBRK
16SRCS=	ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c ex_data.c ex_extern.c \
17	ex_get.c ex_io.c ex_put.c ex_re.c ex_set.c ex_subr.c ex_tagio.c \
18	ex_temp.c ex_tty.c ex_unix.c ex_v.c ex_vadj.c ex_vget.c ex_vmain.c \
19	ex_voper.c ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c \
20	printf.c
21BINMODE=1755
22DPADD=	strings.o ${LIBTERMCAP}
23LDADD=	strings.o -z -ltermcap
24MAN1=	ex.0 vi.0
25LINKS=	${BINDIR}/ex ${BINDIR}/vi ${BINDIR}/ex ${BINDIR}/view \
26	${BINDIR}/ex ${BINDIR}/edit
27
28# There's a boostrap problem here -- ex is necessary to build ex_vars.h.
29# The file ex_vars.h.init can be used to build a version of ex to start
30# with.
31CLEANFILES+=ex_vars.h strings xs.c xs.s x.c strings.o
32
33SHAREDSTRINGS=	sharedstrings
34
35ex_vars.h: ex_data.c
36	csh -f ${.CURDIR}/makeoptions ${.CURDIR}/ex_data.c ${CFLAGS:M-[ID]*}
37
38# xstr: hands off!
39strings.o: strings
40	xstr
41	${CC} -c -S xs.c
42	ed - < ${.CURDIR}/rofix xs.s
43	${AS} -o strings.o xs.s
44	rm xs.s
45
46.include <bsd.prog.mk>
47
48${OBJS} ${SUBDIR} .depend: ex_vars.h
49${OBJS}: strings
50strings:
51	touch strings
52