1*21719Sdist# 2*21719Sdist# Copyright (c) 1980 Regents of the University of California. 3*21719Sdist# All rights reserved. The Berkeley software License Agreement 4*21719Sdist# specifies the terms and conditions for redistribution. 5*21719Sdist# 6*21719Sdist# @(#)makefile.370 1.2 (Berkeley) 05/31/85 7*21719Sdist# 84300SmarkVERSION=3.7 94300Smark# 104300Smark# Ex skeletal makefile for USG Unix 4.0 on a 370. 114300Smark# 124300Smark# NB: This makefile doesn't indicate any dependencies on header files. 134300Smark# 144300Smark# Ex is very large - this version will not fit on PDP-11's without overlay 154300Smark# software. Things that can be turned off to save 164300Smark# space include LISPCODE (-l flag, showmatch and lisp options), UCVISUAL 174300Smark# (visual \ nonsense on upper case only terminals), CHDIR (the undocumented 184300Smark# chdir command.) CRYPT includes the code to edit encrypted files (the -x 194300Smark# option, like ed.) VMUNIX makes ex considerably larger, raising many limits 204300Smark# and improving speed and simplicity of maintenance. It is suitable only 214300Smark# for a VAX or other large machine, and then probably only in a paged system. 224300Smark# 234300Smark# Don't define VFORK unless your system has the VFORK system call, 244300Smark# which is like fork but the two processes have only one data space until the 254300Smark# child execs. This speeds up ex by saving the memory copy. 264300Smark# 274300Smark# If your system expands tabs to 4 spaces you should -DTABS=4 below 284300Smark# 294300SmarkBINDIR= /usr/lbin 304300SmarkNBINDIR=/usr/ucb/new 314300SmarkLIBDIR= /usr/lib 324300SmarkFOLD= ${BINDIR}/fold 334300SmarkCTAGS= ctags 344300SmarkXSTR= bin/xstr 354300SmarkDEBUGFLAGS= -DTRACE -g 364300SmarkNONDEBUGFLAGS= -O 374300SmarkDEB= ${NONDEBUGFLAGS} # or ${DEBUGFLAGS} to to debug 384300SmarkOPTIONS= -DCRYPT -DLISPCODE -DCHDIR -DUCVISUAL -DUSG3TTY -DSTDIO -DVMUNIX 394300SmarkCFLAGS= -I${INCLUDE} -DTABS=8 ${OPTIONS} ${DEB} 404300SmarkLDFLAGS= -n # or -i or -z 414300SmarkTERMLIB= termlib/termcap.a 424300SmarkMKSTR= bin/mkstr 434300SmarkCXREF= cxref 444300SmarkINCLUDE=include 454300SmarkPR= pr 464300SmarkOBJS= ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o \ 474300Smark ex_data.o ex_extern.o ex_get.o ex_io.o ex_put.o ex_re.o \ 484300Smark ex_set.o ex_subr.o ex_temp.o ex_tty.o ex_unix.o \ 494300Smark ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voper.o \ 504300Smark ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \ 514300Smark printf.o bcopy.o 524300SmarkHDRS= ex.h ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_tune.h ex_vars.h ex_vis.h 534300SmarkSRC1= ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c 544300SmarkSRC2= ex_data.c ex_get.c ex_io.c ex_put.c ex_re.c 554300SmarkSRC3= ex_set.c ex_subr.c ex_temp.c ex_tty.c ex_unix.c 564300SmarkSRC4= ex_v.c ex_vadj.c ex_vget.c ex_vmain.c ex_voper.c 574300SmarkSRC5= ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c 584300SmarkSRC6= printf.c bcopy.c expreserve.c exrecover.c 594300SmarkMISC= makefile READ_ME 604300SmarkVGRIND= csh /usr/ucb/vgrind 614300SmarkVHDR= "Ex Version ${VERSION}" 624300Smark 634300Smark.c.o: 644300Smark ${CC} ${CFLAGS} -c $*.c 654300Smark 664300Smarka.out: ${OBJS} 674300Smark ${CC} ${LDFLAGS} ${OBJS} ${TERMLIB} 684300Smark 694300Smarkall:: a.out exrecover expreserve 704300Smarkex.o : ex.c 714300Smark ${CC} ${CFLAGS} -b0,2 -c ex.c 724300Smark 734300Smarkex_cmds.o : ex_cmds.c 744300Smark ${CC} ${CFLAGS} -b2,3 -c ex_cmds.c 754300Smark 764300Smarkex_cmds2.o : ex_cmds2.c 774300Smark ${CC} ${CFLAGS} -b0,2 -c ex_cmds2.c 784300Smark 794300Smarkex_cmdsub.o : ex_cmdsub.c 804300Smark ${CC} ${CFLAGS} -b0,2 -c ex_cmdsub.c 814300Smark 824300Smarkex_io.o : ex_io.c 834300Smark ${CC} ${CFLAGS} -b0,5 -c ex_io.c 844300Smark 854300Smarkex_temp.o : ex_temp.c 864300Smark ${CC} ${CFLAGS} -b0,4 -c ex_temp.c 874300Smark 884300Smarkex_vmain.o : ex_vmain.c 894300Smark ${CC} ${CFLAGS} -b1,0 -c ex_vmain.c 904300Smark 914300Smarkex_voper.o : ex_voper.c 924300Smark ${CC} ${CFLAGS} -b1,0 -c ex_voper.c 934300Smark 944300Smark 954300Smarktags: /tmp 964300Smark ${CTAGS} -w ex.[hc] ex_*.[hc] 974300Smark 984300Smark${OBJS}: ex_vars.h 994300Smark 1004300Smark# ex_vars.h: 1014300Smark# csh makeoptions ${CFLAGS} 1024300Smark 1034300Smarkbcopy.o: bcopy.c 1044300Smark ${CC} -c ${CFLAGS} bcopy.c 1054300Smark 1064300Smarkexrecover: exrecover.o 1074300Smark ${CC} ${CFLAGS} exrecover.o ex_extern.o -o exrecover 1084300Smark 1094300Smarkexrecover.o: exrecover.c 1104300Smark ${CC} ${CFLAGS} -c -O exrecover.c 1114300Smark 1124300Smarkexpreserve: expreserve.o 1134300Smark ${CC} expreserve.o ex_extern.o -o expreserve 1144300Smark 1154300Smarkexpreserve.o: 1164300Smark ${CC} ${CFLAGS} -c -O expreserve.c 1174300Smark 1184300Smarkclean: 1194300Smark# If we dont have ex we cant make it so dont rm ex_vars.h 1204300Smark -rm -f a.out exrecover expreserve strings core errs trace 1214300Smark -rm -f *.o x*.[cs] 1224300Smark 1234300Smark# install a new version for testing in /usr/new 1244300Smarkninstall: a.out 1254300Smark -rm -f ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi ${DESTDIR}${NBINDIR}/view 1264300Smark cp a.out ${DESTDIR}${NBINDIR}/ex 1274300Smark# -cp ex${VERSION}strings ${LIBDIR}/ex${VERSION}strings 1284300Smark ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi 1294300Smark ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/view 1304300Smark chmod 1755 ${DESTDIR}${NBINDIR}/ex 1314300Smark 1324300Smark# install in standard place (/usr/ucb) 1334300Smarkinstall: a.out exrecover expreserve 1344300Smark -strip a.out 1354300Smark -rm -f ${DESTDIR}${BINDIR}/ex 1364300Smark -rm -f ${DESTDIR}${BINDIR}/vi 1374300Smark -rm -f ${DESTDIR}${BINDIR}/view 1384300Smark -rm -f ${DESTDIR}${BINDIR}/edit 1394300Smark cp a.out ${DESTDIR}${BINDIR}/ex 1404300Smark cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings 1414300Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit 1424300Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi 1434300Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/view 1444300Smark chmod 1755 ${DESTDIR}${BINDIR}/ex 1454300Smark cp exrecover ${DESTDIR}${LIBDIR}/ex${VERSION}recover 1464300Smark cp expreserve ${DESTDIR}${LIBDIR}/ex${VERSION}preserve 1474300Smark chmod 4755 ${DESTDIR}${LIBDIR}/ex${VERSION}recover ${DESTDIR}${LIBDIR}/ex${VERSION}preserve 1484300Smark# The following line normally fails. This is OK. 1494300Smark -mkdir ${DESTDIR}/usr/preserve 1504300Smark 1514300Smark# move from /usr/new to /usr/ucb 1524300Smarknewucb: a.out 1534300Smark -rm -f ${DESTDIR}${BINDIR}/ex 1544300Smark -rm -f ${DESTDIR}${BINDIR}/vi 1554300Smark -rm -f ${DESTDIR}${BINDIR}/edit 1564300Smark -rm -f ${DESTDIR}${BINDIR}/e 1574300Smark -rm -f ${DESTDIR}/usr/bin/ex 1584300Smark mv ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/ex 1594300Smark -rm -f ${DESTDIR}${NBINDIR}/vi 1604300Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit 1614300Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/e 1624300Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi 1634300Smark ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}/usr/bin/ex 1644300Smark chmod 1755 ${DESTDIR}${BINDIR}/ex 1654300Smark 1664300Smarklint: 1674300Smark lint ${CFLAGS} ex.c ex_?*.c 1684300Smark lint ${CFLAGS} -u exrecover.c 1694300Smark lint ${CFLAGS} expreserve.c 1704300Smark 1714300Smarkprint: 1724300Smark @${PR} READ* BUGS 1734300Smark @${PR} makefile* 1744300Smark @${PR} /etc/termcap 1754300Smark @(size -l a.out ; size *.o) | ${PR} -h sizes 1764300Smark @${PR} -h errno.h ${INCLUDE}/errno.h 1774300Smark @${PR} -h setjmp.h ${INCLUDE}/setjmp.h 1784300Smark @${PR} -h sgtty.h ${INCLUDE}/sgtty.h 1794300Smark @${PR} -h signal.h ${INCLUDE}/signal.h 1804300Smark @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h 1814300Smark @${PR} -h sys/types.h ${INCLUDE}/sys/types.h 1824300Smark @ls -ls | ${PR} 1834300Smark @${CXREF} *.c | ${PR} -h XREF 1844300Smark @${PR} *.h *.c 1854300Smarkvgrind: 1864300Smark tee index < /dev/null 1874300Smark ${VGRIND} -h ${VHDR} ${HDRS} 1884300Smark ${VGRIND} -h ${VHDR} ${SRC1} 1894300Smark ${VGRIND} -h ${VHDR} ${SRC2} 1904300Smark ${VGRIND} -h ${VHDR} ${SRC3} 1914300Smark ${VGRIND} -h ${VHDR} ${SRC4} 1924300Smark ${VGRIND} -h ${VHDR} ${SRC5} 1934300Smark ${VGRIND} -h ${VHDR} ${SRC6} 1944300Smark ${VGRIND} -n -h ${VHDR} ${MISC} 1954300Smark ${VGRIND} -i -h ${VHDR} index 196