Commit | Line | Data |
---|---|---|
ba695518 BJ |
1 | # |
2 | # Ex skeletal makefile for version 6 | |
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. -t1 compiles switches into instructions making larger | |
16 | # text, but saving data space. | |
17 | # | |
18 | # Ex wants stdio only to get the doprnt.o routine; if other stdio stuff | |
19 | # gets dragged in that is a mistake. | |
20 | # | |
21 | .c.o: | |
22 | ${MKSTR} - ex2.0strings x $*.c | |
23 | ${CC} -E ${CFLAGS} x$*.c | ${XSTR} -c - | |
24 | rm -f x$*.c | |
25 | ${CC} ${CFLAGS} -O -c x.c | |
26 | mv x.o $*.o | |
27 | BINDIR= /usr/ucb | |
28 | LIBDIR= /usr/lib | |
29 | FOLD= /usr/ucb/fold | |
30 | CTAGS= /usr/ucb/ctags | |
31 | AS= -as | |
32 | XSTR= /usr/ucb/xstr | |
33 | CFLAGS= -DTABS=8 -I/usr/include/retrofit -t0 -t1 -DV6 -DLISP -DCHDIR -DUCVISUAL | |
34 | MKSTR= /usr/ucb/mkstr | |
35 | CXREF= /usr/ucb/cxref | |
36 | INCLUDE=/usr/include/retrofit | |
37 | PR= pr | |
38 | OBJS= ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_data.o ex_get.o \ | |
39 | ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o ex_temp.o ex_tty.o \ | |
40 | ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voperate.o \ | |
41 | ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \ | |
42 | 11printf.o strings.o | |
43 | ||
44 | all: a.out expreserve exrecover | |
45 | ||
46 | a.out: ${OBJS} tags | |
47 | ${CC} -i ${OBJS} -ltermlib -lretro -lS | |
48 | ||
49 | tags: | |
50 | ${CTAGS} ex.c ex_*.c | |
51 | ||
52 | strings.o: strings | |
53 | ${XSTR} | |
54 | ${CC} -c xs.c | |
55 | mv xs.o strings.o | |
56 | ||
57 | exrecover: exrecover.o | |
58 | ${CC} -o exrecover exrecover.o -lretro -lS | |
59 | ||
60 | exrecover.o: | |
61 | ${CC} ${CFLAGS} -c -O exrecover.c | |
62 | ||
63 | expreserve: expreserve.o | |
64 | ${CC} -o expreserve expreserve.o -lretro -lS | |
65 | ||
66 | expreserve.o: | |
67 | ${CC} ${CFLAGS} -c expreserve.c | |
68 | ||
69 | clean: | |
70 | rm a.out exrecover expreserve ex2.0strings strings errs core trace | |
71 | -rm *.o x*.[cs] | |
72 | ||
73 | install: a.out installutil | |
74 | -chmod 755 ${BINDIR}/ex | |
75 | -${BINDIR}/ex </dev/null | |
76 | -rm -f ${BINDIR}/ex ${BINDIR}/edit /${BINDIR}/vi | |
77 | cp a.out ${BINDIR}/ex | |
78 | ln ${BINDIR}/ex ${BINDIR}/edit | |
79 | ln ${BINDIR}/ex ${BINDIR}/vi | |
80 | cp ex2.0strings ${LIBDIR}/ex2.0strings | |
81 | chmod 1755 ${BINDIR}/ex | |
82 | ||
83 | installutil: exrecover expreserve | |
84 | mkdir /usr/preserve | |
85 | cp exrecover ${LIBDIR}/ex2.0recover | |
86 | cp expreserve ${LIBDIR}/ex2.0preserve | |
87 | chown root ${LIBDIR}/ex2.0recover ${LIBDIR}/ex2.0preserve | |
88 | chmod 4755 ${LIBDIR}/ex2.0recover | |
89 | chmod 4755 ${LIBDIR}/ex2.0preserve | |
90 | ||
91 | lint: | |
92 | lint ex.c ex_?*.c | |
93 | lint -u exrecover.c | |
94 | lint expreserve.c | |
95 | ||
96 | print: | |
97 | @-rm x.c xs.c >/dev/null | |
98 | @${PR} READ* BUGS | |
99 | @${PR} make* | |
100 | @(size -l a.out ; size *.o) | ${PR} -h sizes | |
101 | @${PR} termcap | |
102 | @${PR} -h errno.h ${INCLUDE}/errno.h | |
103 | @${PR} -h pwd.h ${INCLUDE}/pwd.h | |
104 | @${PR} -h setjmp.h ${INCLUDE}/setjmp.h | |
105 | @${PR} -h sgtty.h ${INCLUDE}/sgtty.h | |
106 | @${PR} -h signal.h ${INCLUDE}/signal.h | |
107 | @${PR} -h sys/dir.h ${INCLUDE}/sys/dir.h | |
108 | @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h | |
109 | @${PR} -h sys/types.h ${INCLUDE}/sys/types.h | |
110 | @ls -ls | ${PR} | |
111 | @${CXREF} *.c | ${PR} -h XREF | |
112 | @${PR} *.h *.c |