Commit | Line | Data |
---|---|---|
4997c2c6 BJ |
1 | # |
2 | # Ex skeletal makefile for version 7 | |
3 | # | |
4 | # NB: This makefile doesn't indicate any dependencies on header files. | |
5 | # | |
6 | # Compiles in both the LISP code and (the undocumented) chdir | |
7 | # command within the editor; take these out of CFLAGS to make some | |
8 | # breathing room in the text space if necessary. If you take out -DLISP | |
9 | # you should move ex_vars.nolisp to ex_vars.h | |
10 | # | |
11 | # If your system expands tabs to 4 spaces you should -DTABS=4 below | |
12 | # | |
13 | # Ex is likely to overflow the symbol table in your C compiler, so | |
14 | # it uses -t0 which is (purportedly) a C compiler with a larger | |
15 | # symbol table. The -t1 flag to the C compiler is for a C compiler | |
16 | # which puts switch code in I space, increasing the text space size | |
17 | # to the benefit of per-user data space. If you don't have this it | |
18 | # doesn't matter much. | |
19 | # | |
20 | # Ex wants stdio only to get the doprnt.o routine; if other stdio stuff | |
21 | # gets dragged in that is a mistake. | |
22 | # | |
23 | .c.o: | |
24 | ${MKSTR} - ex2.0strings x $*.c | |
25 | ${CC} -E ${CFLAGS} x$*.c | ${XSTR} -c - | |
26 | rm -f x$*.c | |
27 | ${CC} ${CFLAGS} -c x.c | |
28 | mv x.o $*.o | |
29 | BINDIR= /usr/ucb | |
30 | LIBDIR= /usr/lib | |
31 | FOLD= /usr/ucb/fold | |
32 | CTAGS= /usr/ucb/ctags | |
33 | XSTR= /usr/ucb/xstr | |
34 | CFLAGS= -O -DTABS=8 -DLISP -DCHDIR -DUCVISUAL | |
35 | MKSTR= /usr/ucb/mkstr | |
36 | CXREF= /usr/ucb/cxref | |
37 | INCLUDE=/usr/include | |
38 | PR= pr | |
39 | OBJS= ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_data.o ex_get.o \ | |
40 | ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o ex_temp.o ex_tty.o \ | |
41 | ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voperate.o \ | |
42 | ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \ | |
43 | printf.o strings.o | |
44 | ||
45 | a.out: ${OBJS} tags | |
46 | cc -i ${OBJS} -ltermlib | |
47 | ||
48 | tags: | |
49 | ${CTAGS} ex.c ex_*.c | |
50 | ||
51 | ${OBJS}: ex_vars.h | |
52 | ||
53 | ex_vars.h: | |
54 | csh makeoptions ${CFLAGS} | |
55 | ||
56 | strings.o: strings | |
57 | ${XSTR} | |
58 | ${CC} -c -S xs.c | |
59 | -echo only on a VAX can we 'ed - <:rofix xs.s' | |
60 | as -o strings.o xs.s | |
61 | rm xs.s | |
62 | ||
63 | exrecover: exrecover.o | |
64 | ${CC} -o exrecover exrecover.o | |
65 | ||
66 | exrecover.o: | |
67 | ${CC} -c -O exrecover.c | |
68 | ||
69 | expreserve: expreserve.o | |
70 | ${CC} -o expreserve expreserve.o | |
71 | ||
72 | expreserve.o: | |
73 | ${CC} -c -O expreserve.c | |
74 | ||
75 | clean: | |
76 | -rm a.out exrecover expreserve ex2.0strings strings core trace tags | |
77 | -echo if we dont have ex we cant make it so dont rm ex_vars.h | |
78 | -rm -f *.o x*.[cs] | |
79 | ||
80 | install: a.out | |
81 | -chmod 711 ${BINDIR}/ex | |
82 | -${BINDIR}/ex </dev/null | |
83 | -rm ${BINDIR}/ex ${BINDIR}/e /usr/bin/ex ${BINDIR}/edit ${BINDIR}/vi | |
84 | cp a.out ${BINDIR}/ex | |
85 | cp ex2.0strings ${LIBDIR}/ex2.0strings | |
86 | cp ex2.0strings /lib/ex2.0strings | |
87 | ln ${BINDIR}/ex ${BINDIR}/edit | |
88 | ln ${BINDIR}/ex ${BINDIR}/e | |
89 | ln ${BINDIR}/ex /usr/bin/ex | |
90 | ln ${BINDIR}/ex ${BINDIR}/vi | |
91 | chmod 1711 ${BINDIR}/ex | |
92 | ||
93 | installutil: exrecover expreserve | |
94 | mkdir /usr/preserve | |
95 | cp exrecover ${LIBDIR}/ex2.0recover | |
96 | cp expreserve ${LIBDIR}/ex2.0preserve | |
97 | chmod 4755 ${LIBDIR}/ex2.0recover ${LIBDIR}/ex2.0preserve | |
98 | ||
99 | lint: | |
100 | lint ex.c ex_?*.c | |
101 | lint -u exrecover.c | |
102 | lint expreserve.c | |
103 | ||
104 | print: | |
105 | @${PR} READ* BUGS | |
106 | @${PR} makefile* | |
107 | @${PR} /etc/termcap | |
108 | @(size -l a.out ; size *.o) | ${PR} -h sizes | |
109 | @${PR} -h errno.h ${INCLUDE}/errno.h | |
110 | @${PR} -h setjmp.h ${INCLUDE}/setjmp.h | |
111 | @${PR} -h sgtty.h ${INCLUDE}/sgtty.h | |
112 | @${PR} -h signal.h ${INCLUDE}/signal.h | |
113 | @${PR} -h stat.h ${INCLUDE}/stat.h | |
114 | @${PR} -h types.h ${INCLUDE}/types.h | |
115 | @ls -ls | ${PR} | |
116 | @${CXREF} *.c | ${PR} -h XREF | |
117 | @${PR} *.h *.c |