|
|
1.1 root 1: VERSION=3.2
2: #
3: # Ex skeletal makefile for version 7
4: #
5: # NB: This makefile doesn't indicate any dependencies on header files.
6: #
7: # Ex is very large - it may not fit on PDP-11's depending on the operating
8: # system and the cflags you turn on. Things that can be turned off to save
9: # space include LISPCODE (-l flag, showmatch and lisp options), UCVISUAL
10: # (visual \ nonsense on upper case only terminals), CHDIR (the undocumented
11: # chdir command.)
12: #
13: # Don't define VFORK unless your system has the VFORK system call,
14: # which is like fork but the two processes have only one data space until the
15: # child execs. This speeds up ex by saving the memory copy.
16: # -DVMUNIX makes an ex which can edit very large files (eg the w2a dictionary)
17: # this allows 200000 lines and about 16M byte temp files.
18: #
19: # If your system expands tabs to 4 spaces you should -DTABS=4 below
20: #
21: # Ex is likely to overflow the symbol table in your C compiler.
22: # It can use -t0 which is (purportedly) a C compiler with a larger
23: # symbol table. The -t1 flag to the C compiler is for a C compiler
24: # which puts switch code in I space, increasing the text space size
25: # to the benefit of per-user data space. If you don't have this it
26: # doesn't matter much. Another method, which works on v7 pdp-11's,
27: # is to use pcc for ex_io.c instead of cc.
28: #
29: BINDIR= /usr/ucb
30: NBINDIR=/usr/new
31: LIBDIR= /usr/lib
32: FOLD= ${BINDIR}/fold
33: CTAGS= ${BINDIR}/ctags
34: XSTR= ${BINDIR}/xstr
35: DEBUGFLAGS= -DTRACE
36: NONDEBUGFLAGS= -O
37: CFLAGS= -DTABS=8 -DLISPCODE -DCHDIR -DUCVISUAL -DMACROS -DVFORK -DVMUNIX ${NONDEBUGFLAGS}
38: TERMLIB= -ltermlib
39: MKSTR= ${BINDIR}/mkstr
40: CXREF= ${BINDIR}/cxref
41: INCLUDE=/usr/include
42: PR= pr
43: OBJS= ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_data.o ex_get.o \
44: ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o ex_temp.o ex_tty.o \
45: ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voperate.o \
46: ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
47: printf.o strings.o
48:
49: all: a.out exrecover expreserve tags
50:
51: .c.o:
52: # ${MKSTR} - ex${VERSION}strings x $*.c
53: ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
54: # rm -f x$*.c
55: ${CC} ${CFLAGS} -c x.c
56: mv x.o $*.o
57:
58: a.out: ${OBJS}
59: cc -i ${OBJS} ${TERMLIB}
60:
61: tags:
62: ${CTAGS} -w *.h *.c
63:
64: ${OBJS}: ex_vars.h
65:
66: ex_vars.h:
67: csh makeoptions ${CFLAGS}
68:
69: strings.o: strings
70: ${XSTR}
71: ${CC} -c -S xs.c
72: ed - <:rofix xs.s
73: as -o strings.o xs.s
74: rm xs.s
75:
76: exrecover: exrecover.o
77: ${CC} ${CFLAGS} exrecover.o -o exrecover
78:
79: exrecover.o: exrecover.c
80: ${CC} ${CFLAGS} -c -O exrecover.c
81:
82: expreserve: expreserve.o
83: ${CC} expreserve.o -o expreserve
84:
85: expreserve.o:
86: ${CC} ${CFLAGS} -c -O expreserve.c
87:
88: clean:
89: # If we dont have ex we cant make it so dont rm ex_vars.h
90: -rm -f a.out exrecover expreserve ex${VERSION}strings strings core trace tags
91: -rm -f *.o x*.[cs]
92:
93: ninstall: a.out
94: -rm -f ${NBINDIR}/ex ${NBINDIR}/vi
95: cp a.out ${NBINDIR}/ex
96: # -cp ex${VERSION}strings ${LIBDIR}/ex${VERSION}strings
97: ln ${NBINDIR}/ex ${NBINDIR}/vi
98: chmod 1755 ${NBINDIR}/ex
99:
100: install: a.out exrecover expreserve
101: -rm -f ${DESTDIR}${BINDIR}/ex
102: -rm -f ${DESTDIR}${BINDIR}/vi
103: -rm -f ${DESTDIR}${BINDIR}/edit
104: -rm -f ${DESTDIR}${BINDIR}/e
105: -rm -f ${DESTDIR}/usr/bin/ex
106: cp a.out ${DESTDIR}${BINDIR}/ex
107: # cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings
108: ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit
109: ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/e
110: ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi
111: ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}/usr/bin/ex
112: chmod 1755 ${DESTDIR}${BINDIR}/ex
113: cp exrecover ${DESTDIR}${LIBDIR}/ex${VERSION}recover
114: cp expreserve ${DESTDIR}/${LIBDIR}/ex${VERSION}preserve
115: chmod 4755 ${DESTDIR}${LIBDIR}/ex${VERSION}recover ${DESTDIR}${LIBDIR}/ex${VERSION}preserve
116: mkdir ${DESTDIR}/usr/preserve
117:
118: lint:
119: lint ex.c ex_?*.c
120: lint -u exrecover.c
121: lint expreserve.c
122:
123: print:
124: @${PR} READ* BUGS
125: @${PR} makefile*
126: @${PR} /etc/termcap
127: @(size -l a.out ; size *.o) | ${PR} -h sizes
128: @${PR} -h errno.h ${INCLUDE}/errno.h
129: @${PR} -h setjmp.h ${INCLUDE}/setjmp.h
130: @${PR} -h sgtty.h ${INCLUDE}/sgtty.h
131: @${PR} -h signal.h ${INCLUDE}/signal.h
132: @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h
133: @${PR} -h sys/types.h ${INCLUDE}/sys/types.h
134: @ls -ls | ${PR}
135: @${CXREF} *.c | ${PR} -h XREF
136: @${PR} *.h *.c
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.