1*21722Sdist# 2*21722Sdist# Copyright (c) 1980 Regents of the University of California. 3*21722Sdist# All rights reserved. The Berkeley software License Agreement 4*21722Sdist# specifies the terms and conditions for redistribution. 5*21722Sdist# 6*21722Sdist# @(#)makefile.u3 1.3 (Berkeley) 05/31/85 7*21722Sdist# 84301SmarkVERSION=3.7 94301Smark# 104301Smark# Ex skeletal makefile for USG Unix 4.0 on a VAX. 114301Smark# 124301Smark# NB: This makefile doesn't indicate any dependencies on header files. 134301Smark# 144301Smark# Ex is very large - this version will not fit on PDP-11's without overlay 154301Smark# software. Things that can be turned off to save 164301Smark# space include LISPCODE (-l flag, showmatch and lisp options), UCVISUAL 174301Smark# (visual \ nonsense on upper case only terminals), CHDIR (the undocumented 184301Smark# chdir command.) CRYPT includes the code to edit encrypted files (the -x 194301Smark# option, like ed.) VMUNIX makes ex considerably larger, raising many limits 204301Smark# and improving speed and simplicity of maintenance. It is suitable only 214301Smark# for a VAX or other large machine, and then probably only in a paged system. 224301Smark# 234301Smark# Don't define VFORK unless your system has the VFORK system call, 244301Smark# which is like fork but the two processes have only one data space until the 254301Smark# child execs. This speeds up ex by saving the memory copy. 264301Smark# 274301Smark# If your system expands tabs to 4 spaces you should -DTABS=4 below 284301Smark# 294301SmarkBINDIR= /usr/bin 304301SmarkNBINDIR=/usr/ucb/new 314301SmarkLIBDIR= /usr/lib 324301SmarkFOLD= ${BINDIR}/fold 334301SmarkCTAGS= ctags 344301SmarkXSTR= /usr/ucb/bin/xstr 354301SmarkDEBUGFLAGS= -DTRACE -g 364301SmarkNONDEBUGFLAGS= -O 374301SmarkDEB= ${NONDEBUGFLAGS} # or ${DEBUGFLAGS} to to debug 384301SmarkOPTIONS= -DCRYPT -DLISPCODE -DCHDIR -DUCVISUAL -DUSG3TTY -DSTDIO 394301SmarkCFLAGS= -I/usr/ucb/include -DTABS=8 ${OPTIONS} ${DEB} 404301SmarkLDFLAGS= -n # or -i or -z 414301SmarkTERMLIB= -ltermcap 424301SmarkMKSTR= /usr/ucb/bin/mkstr 434301SmarkCXREF= cxref 444301SmarkINCLUDE=/usr/include 454301SmarkPR= pr 464301SmarkOBJS= ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o \ 474301Smark ex_data.o ex_extern.o ex_get.o ex_io.o ex_put.o ex_re.o \ 484301Smark ex_set.o ex_subr.o ex_temp.o ex_tty.o ex_unix.o \ 494301Smark ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voper.o \ 504301Smark ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \ 514301Smark printf.o bcopy.o strings.o 524301SmarkHDRS= ex.h ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_tune.h ex_vars.h ex_vis.h 534301SmarkSRC1= ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c 544301SmarkSRC2= ex_data.c ex_get.c ex_io.c ex_put.c ex_re.c 554301SmarkSRC3= ex_set.c ex_subr.c ex_temp.c ex_tty.c ex_unix.c 564301SmarkSRC4= ex_v.c ex_vadj.c ex_vget.c ex_vmain.c ex_voper.c 574301SmarkSRC5= ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c 584301SmarkSRC6= printf.c bcopy.c expreserve.c exrecover.c 594301SmarkMISC= makefile READ_ME rofix 604301SmarkVGRIND= csh /usr/ucb/vgrind 614301SmarkVHDR= "Ex Version ${VERSION}" 624301Smark 634301Smark.c.o: 644301Smark# ifdef VMUNIX 654301Smark# ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - 664301Smark# else 674301Smark ${MKSTR} - ex${VERSION}strings x $*.c 684301Smark ${CC} -E ${CFLAGS} x$*.c | ${XSTR} -c - 694301Smark rm -f x$*.c 704301Smark# endif 714301Smark ${CC} ${CFLAGS} -c x.c 724301Smark mv x.o $*.o 734301Smark 744301Smarka.out: ${OBJS} 754301Smark ${CC} ${LDFLAGS} ${OBJS} ${TERMLIB} 764301Smark 774301Smarkall:: a.out exrecover expreserve 784301Smark 794301Smarktags: /tmp 804301Smark ${CTAGS} -w ex.[hc] ex_*.[hc] 814301Smark 824301Smark${OBJS}: ex_vars.h 834301Smark 844301Smark# ex_vars.h: 854301Smark# csh makeoptions ${CFLAGS} 864301Smark 874301Smarkbcopy.o: bcopy.c 884301Smark ${CC} -c ${CFLAGS} bcopy.c 894301Smark 904301Smark# xstr: hands off! 914301Smarkstrings.o: strings 924301Smark ${XSTR} 934301Smark ${CC} -c -S xs.c 944301Smark ed - <rofix xs.s 954301Smark ${AS} -o strings.o xs.s 964301Smark rm xs.s 974301Smark 984301Smarkexrecover: exrecover.o 994301Smark ${CC} ${CFLAGS} exrecover.o ex_extern.o -o exrecover 1004301Smark 1014301Smarkexrecover.o: exrecover.c 1024301Smark ${CC} ${CFLAGS} -c -O exrecover.c 1034301Smark 1044301Smarkexpreserve: expreserve.o 1054523Smark ${CC} expreserve.o -o expreserve 1064301Smark 1074301Smarkexpreserve.o: 1084301Smark ${CC} ${CFLAGS} -c -O expreserve.c 1094301Smark 1104301Smarkclean: 1114301Smark# If we dont have ex we cant make it so dont rm ex_vars.h 1124301Smark -rm -f a.out exrecover expreserve strings core errs trace 1134301Smark -rm -f *.o x*.[cs] 1144301Smark 1154301Smark# install a new version for testing in /usr/new 1164301Smarkninstall: a.out 1174301Smark -rm -f ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi ${DESTDIR}${NBINDIR}/view 1184301Smark cp a.out ${DESTDIR}${NBINDIR}/ex 1194301Smark# -cp ex${VERSION}strings ${LIBDIR}/ex${VERSION}strings 1204301Smark ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi 1214301Smark ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/view 1224301Smark chmod 1755 ${DESTDIR}${NBINDIR}/ex 1234301Smark 1244301Smark# install in standard place (/usr/ucb) 1254301Smarkinstall: a.out exrecover expreserve 1264301Smark -strip a.out 1274301Smark -rm -f ${DESTDIR}${BINDIR}/ex 1284301Smark -rm -f ${DESTDIR}${BINDIR}/vi 1294301Smark -rm -f ${DESTDIR}${BINDIR}/view 1304301Smark -rm -f ${DESTDIR}${BINDIR}/edit 1314301Smark cp a.out ${DESTDIR}${BINDIR}/ex 1324301Smark cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings 1334301Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit 1344301Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi 1354301Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/view 1364301Smark chmod 1755 ${DESTDIR}${BINDIR}/ex 1374301Smark cp exrecover ${DESTDIR}${LIBDIR}/ex${VERSION}recover 1384301Smark cp expreserve ${DESTDIR}${LIBDIR}/ex${VERSION}preserve 1394301Smark chmod 4755 ${DESTDIR}${LIBDIR}/ex${VERSION}recover ${DESTDIR}${LIBDIR}/ex${VERSION}preserve 1404301Smark# The following line normally fails. This is OK. 1414301Smark -mkdir ${DESTDIR}/usr/preserve 1424301Smark 1434301Smark# move from /usr/new to /usr/ucb 1444301Smarknewucb: a.out 1454301Smark -rm -f ${DESTDIR}${BINDIR}/ex 1464301Smark -rm -f ${DESTDIR}${BINDIR}/vi 1474301Smark -rm -f ${DESTDIR}${BINDIR}/edit 1484301Smark -rm -f ${DESTDIR}${BINDIR}/e 1494301Smark -rm -f ${DESTDIR}/usr/bin/ex 1504301Smark mv ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/ex 1514301Smark -rm -f ${DESTDIR}${NBINDIR}/vi 1524301Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit 1534301Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/e 1544301Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi 1554301Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}/usr/bin/ex 1564301Smark chmod 1755 ${DESTDIR}${BINDIR}/ex 1574301Smark 1584301Smarklint: 1594301Smark lint ${CFLAGS} ex.c ex_?*.c 1604301Smark lint ${CFLAGS} -u exrecover.c 1614301Smark lint ${CFLAGS} expreserve.c 1624301Smark 1634301Smarkprint: 1644301Smark @${PR} READ* BUGS 1654301Smark @${PR} makefile* 1664301Smark @${PR} /etc/termcap 1674301Smark @(size -l a.out ; size *.o) | ${PR} -h sizes 1684301Smark @${PR} -h errno.h ${INCLUDE}/errno.h 1694301Smark @${PR} -h setjmp.h ${INCLUDE}/setjmp.h 1704301Smark @${PR} -h sgtty.h ${INCLUDE}/sgtty.h 1714301Smark @${PR} -h signal.h ${INCLUDE}/signal.h 1724301Smark @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h 1734301Smark @${PR} -h sys/types.h ${INCLUDE}/sys/types.h 1744301Smark @ls -ls | ${PR} 1754301Smark @${CXREF} *.c | ${PR} -h XREF 1764301Smark @${PR} *.h *.c 1774301Smarkvgrind: 1784301Smark tee index < /dev/null 1794301Smark ${VGRIND} -h ${VHDR} ${HDRS} 1804301Smark ${VGRIND} -h ${VHDR} ${SRC1} 1814301Smark ${VGRIND} -h ${VHDR} ${SRC2} 1824301Smark ${VGRIND} -h ${VHDR} ${SRC3} 1834301Smark ${VGRIND} -h ${VHDR} ${SRC4} 1844301Smark ${VGRIND} -h ${VHDR} ${SRC5} 1854301Smark ${VGRIND} -h ${VHDR} ${SRC6} 1864301Smark ${VGRIND} -n -h ${VHDR} ${MISC} 1874301Smark ${VGRIND} -i -h ${VHDR} index 188