date and time created 81/10/31 18:54:31 by mark
[unix-history] / usr / src / usr.bin / ex / OTHER / makefile.70
CommitLineData
3c7b865a 1VERSION=3.7
fe10330d 2#
02e87b04 3# Ex skeletal makefile for version 7, USGS Overlay 11/70 system
fe10330d
MH
4#
5# NB: This makefile doesn't indicate any dependencies on header files.
6#
7c4625ef
MH
7# Ex is very large - this version will not fit on PDP-11's without overlay
8# software. Things that can be turned off to save
44232d5b
MH
9# space include LISPCODE (-l flag, showmatch and lisp options), UCVISUAL
10# (visual \ nonsense on upper case only terminals), CHDIR (the undocumented
02e87b04 11# chdir command.) CRYPT includes code to handle the -x option to allow
b70e79cf
MH
12# encrypted files. Defining CRYPT drags in most of stdio (from the call
13# to getpass) and makes vi about 4k text and 4k data bigger).
14# VMUNIX makes ex considerably larger, raising many limits
7c4625ef
MH
15# and improving speed and simplicity of maintenance. It is suitable only
16# for a VAX or other large machine, and then probably only in a paged system.
44232d5b
MH
17#
18# Don't define VFORK unless your system has the VFORK system call,
19# which is like fork but the two processes have only one data space until the
20# child execs. This speeds up ex by saving the memory copy.
fe10330d
MH
21#
22# If your system expands tabs to 4 spaces you should -DTABS=4 below
23#
02e87b04
BJ
24BINDIR= /usr/ucb/bin
25NBINDIR=/usr/new/bin
2ee4bedb 26LIBDIR= /usr/ucb/lib
44232d5b
MH
27FOLD= ${BINDIR}/fold
28CTAGS= ${BINDIR}/ctags
29XSTR= ${BINDIR}/xstr
c0ef3b2d 30CC= cc -V
2ee4bedb 31AS= ovas
02e87b04
BJ
32LD= ovld
33DEBUGFLAGS= -DTRACE
7cc1f963 34NONDEBUGFLAGS= -O
7c4625ef 35DEB= ${NONDEBUGFLAGS} # or ${DEBUGFLAGS} to to debug
02e87b04
BJ
36CFLAGS= -DTABS=8 -DLISPCODE -DCHDIR -DUCVISUAL ${DEB}
37TERMLIB= -lovtermlib
44232d5b
MH
38MKSTR= ${BINDIR}/mkstr
39CXREF= ${BINDIR}/cxref
bcca8e59 40# PRINTF= printf.o; PRINTFS=printf.c
02e87b04 41PRINTF= ovprintf.o ovdoprnt.o
bcca8e59 42PRINTFS=ovprintf.c ovdoprnt.s
02e87b04
BJ
43FMT= -i # 11/45, 70
44# FMT= -n # 11/23, 34, 40
fe10330d
MH
45INCLUDE=/usr/include
46PR= pr
bcca8e59 47GET= sccs get
7c4625ef
MH
48OBJS= ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o \
49 ex_data.o ex_get.o ex_io.o ex_put.o ex_re.o \
50 ex_set.o ex_subr.o ex_temp.o ex_tty.o ex_unix.o \
bcca8e59 51 ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voper.o \
fe10330d 52 ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
591aa0a6 53 ${PRINTF} bcopy.o ex_extern.o strings.o
bcca8e59
BJ
54SRCS= ex.h ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_tune.h ex_vars.h ex_vis.h\
55 ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c \
56 ex_data.c ex_get.c ex_io.c ex_put.c ex_re.c \
57 ex_set.c ex_subr.c ex_temp.c ex_tty.c ex_unix.c \
58 ex_v.c ex_vadj.c ex_vget.c ex_vmain.c ex_voper.c \
59 ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c \
213077f5 60 ${PRINTFS} bcopy.c
44232d5b
MH
61
62.c.o:
02e87b04
BJ
63 ${MKSTR} - ex${VERSION}strings x $*.c
64 ${CC} -E ${CFLAGS} x$*.c | ${XSTR} -c -
65 rm -f x$*.c
44232d5b
MH
66 ${CC} ${CFLAGS} -c x.c
67 mv x.o $*.o
fe10330d 68
02e87b04
BJ
69# 11/23, 34, 40 and other non split I/D machines
70# each of the 5 overlays must stay less than 16K.
71# a.out: ${OBJS}
72# ${LD} -X /lib/crt0.o ${FMT}\
73# -Z ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_re.o \
bcca8e59 74# -Z ex_vadj.o ex_vmain.o ex_voper.o ex_vwind.o ex_vops3.o\
02e87b04
BJ
75# -Z ex_v.o ex_vget.o ex_vops.o ex_vops2.o ex_vput.o\
76# -Z ex_get.o ex_io.o ex_temp.o ex_tty.o ex_unix.o ex_addr.o ex.o ex_set.o \
77# -L ex_put.o ex_subr.o ${PRINTF} strings.o \
591aa0a6 78# ex_data.o ex_extern.o ${TERMLIB} -lovc
02e87b04 79
44232d5b 80a.out: ${OBJS}
02e87b04 81 ${LD} -X /lib/crt0.o ${FMT}\
bcca8e59 82 -Z ex_voper.o ex_vget.o ex_vops.o ex_vops2.o ex_vops3.o \
2ee4bedb 83 -Z ex_set.o ex_re.o ex_io.o ex_tty.o ex_unix.o ex.o\
02e87b04 84 -L ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_get.o ex_temp.o\
2ee4bedb 85 ex_v.o ex_vadj.o ex_vmain.o ex_vwind.o\
02e87b04 86 ex_vput.o ex_put.o ex_subr.o ${PRINTF} strings.o \
591aa0a6 87 ex_data.o ex_extern.o ${TERMLIB} -lovc
fe10330d 88
b209c97c
BJ
89all: a.out exrecover expreserve
90
7c4625ef
MH
91tags: /tmp
92 ${CTAGS} -w ex.[hc] ex_*.[hc]
44232d5b 93
bcca8e59
BJ
94# ex_vars.h:
95# csh makeoptions ${CFLAGS}
7c4625ef 96
fe10330d
MH
97strings.o: strings
98 ${XSTR}
44232d5b 99 ${CC} -c -S xs.c
3c7b865a 100# ed - <rofix xs.s
2ee4bedb 101 ${AS} -o strings.o xs.s
44232d5b 102 rm xs.s
fe10330d
MH
103
104exrecover: exrecover.o
591aa0a6 105 ${CC} ${CFLAGS} exrecover.o ex_extern.o -o exrecover
fe10330d 106
44232d5b 107exrecover.o: exrecover.c
fe10330d
MH
108 ${CC} ${CFLAGS} -c -O exrecover.c
109
44232d5b 110expreserve: expreserve.o
591aa0a6 111 ${CC} expreserve.o ex_extern.o -o expreserve
fe10330d
MH
112
113expreserve.o:
44232d5b 114 ${CC} ${CFLAGS} -c -O expreserve.c
fe10330d 115
8bcf1431 116clean:
44232d5b 117# If we dont have ex we cant make it so dont rm ex_vars.h
7c4625ef 118 -rm -f a.out exrecover expreserve strings core errs trace
44232d5b 119 -rm -f *.o x*.[cs]
fe10330d 120
7c4625ef 121# install a new version for testing in /usr/new
44232d5b 122ninstall: a.out
7c4625ef
MH
123 -rm -f ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi ${DESTDIR}${NBINDIR}/view
124 cp a.out ${DESTDIR}${NBINDIR}/ex
44232d5b 125# -cp ex${VERSION}strings ${LIBDIR}/ex${VERSION}strings
7c4625ef 126 ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi
d266c416 127 ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/view
7c4625ef 128 chmod 1755 ${DESTDIR}${NBINDIR}/ex
fe10330d 129
7c4625ef 130# install in standard place (/usr/ucb)
44232d5b
MH
131install: a.out exrecover expreserve
132 -rm -f ${DESTDIR}${BINDIR}/ex
133 -rm -f ${DESTDIR}${BINDIR}/vi
d266c416 134 -rm -f ${DESTDIR}${BINDIR}/view
44232d5b
MH
135 -rm -f ${DESTDIR}${BINDIR}/edit
136 -rm -f ${DESTDIR}${BINDIR}/e
137 -rm -f ${DESTDIR}/usr/bin/ex
138 cp a.out ${DESTDIR}${BINDIR}/ex
139# cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings
140 ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit
141 ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/e
142 ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi
d266c416 143 ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/view
44232d5b
MH
144 ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}/usr/bin/ex
145 chmod 1755 ${DESTDIR}${BINDIR}/ex
146 cp exrecover ${DESTDIR}${LIBDIR}/ex${VERSION}recover
7c4625ef 147 cp expreserve ${DESTDIR}${LIBDIR}/ex${VERSION}preserve
44232d5b 148 chmod 4755 ${DESTDIR}${LIBDIR}/ex${VERSION}recover ${DESTDIR}${LIBDIR}/ex${VERSION}preserve
7c4625ef 149# The following line normally fails. This is OK.
44232d5b 150 mkdir ${DESTDIR}/usr/preserve
fe10330d 151
7c4625ef
MH
152# move from /usr/new to /usr/ucb
153newucb: a.out
154 -rm -f ${DESTDIR}${BINDIR}/ex
155 -rm -f ${DESTDIR}${BINDIR}/vi
156 -rm -f ${DESTDIR}${BINDIR}/edit
157 -rm -f ${DESTDIR}${BINDIR}/e
158 -rm -f ${DESTDIR}/usr/bin/ex
159 mv ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/ex
160 -rm -f ${DESTDIR}${NBINDIR}/vi
161 ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit
162 ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/e
163 ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi
164 ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}/usr/bin/ex
165 chmod 1755 ${DESTDIR}${BINDIR}/ex
166
fe10330d 167lint:
7c4625ef
MH
168 lint ${CFLAGS} ex.c ex_?*.c
169 lint ${CFLAGS} -u exrecover.c
170 lint ${CFLAGS} expreserve.c
fe10330d
MH
171
172print:
fe10330d 173 @${PR} READ* BUGS
44232d5b
MH
174 @${PR} makefile*
175 @${PR} /etc/termcap
fe10330d 176 @(size -l a.out ; size *.o) | ${PR} -h sizes
fe10330d 177 @${PR} -h errno.h ${INCLUDE}/errno.h
fe10330d
MH
178 @${PR} -h setjmp.h ${INCLUDE}/setjmp.h
179 @${PR} -h sgtty.h ${INCLUDE}/sgtty.h
180 @${PR} -h signal.h ${INCLUDE}/signal.h
fe10330d
MH
181 @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h
182 @${PR} -h sys/types.h ${INCLUDE}/sys/types.h
183 @ls -ls | ${PR}
184 @${CXREF} *.c | ${PR} -h XREF
185 @${PR} *.h *.c