105 |
7u83 |
1 |
#
|
|
|
2 |
# Copyright (c) 1980 Regents of the University of California.
|
|
|
3 |
# All rights reserved. The Berkeley software License Agreement
|
|
|
4 |
# specifies the terms and conditions for redistribution.
|
|
|
5 |
#
|
|
|
6 |
# @(#)Makefile 7.13.1.3 (2.11BSD GTE) 1996/10/23
|
|
|
7 |
#
|
|
|
8 |
# Changes for newer systems by Gunnar Ritter, May 2000
|
|
|
9 |
#
|
|
|
10 |
VERSION=3.7
|
|
|
11 |
#
|
|
|
12 |
# NB: This makefile doesn't indicate any dependencies on header files.
|
|
|
13 |
#
|
|
|
14 |
# Ex is very large - this version will not fit on PDP-11's without overlay
|
|
|
15 |
# software. Things that can be turned off to save
|
|
|
16 |
# space include LISPCODE (-l flag, showmatch and lisp options), CHDIR (the
|
|
|
17 |
# undocumented chdir command.) VMUNIX makes ex considerably larger, raising
|
|
|
18 |
# many limits and improving speed and simplicity of maintenance. It is
|
|
|
19 |
# suitable only for a VAX or other large machine, and then probably only in
|
|
|
20 |
# a paged system.
|
|
|
21 |
#
|
|
|
22 |
# Don't define VFORK unless your system has the VFORK system call,
|
|
|
23 |
# which is like fork but the two processes have only one data space until the
|
|
|
24 |
# child execs. This speeds up ex by saving the memory copy.
|
|
|
25 |
#
|
|
|
26 |
# If your system expands tabs to 4 spaces you should -DTABS=4 below
|
|
|
27 |
#
|
|
|
28 |
BINDIR = bin
|
|
|
29 |
DESTDIR = /usr/local
|
|
|
30 |
DEBUGFLAGS= -DTRACE -g
|
118 |
7u83 |
31 |
NONDEBUGFLAGS= -O0
|
105 |
7u83 |
32 |
DEB= $(NONDEBUGFLAGS) # or $(DEBUGFLAGS) to to debug
|
|
|
33 |
# this should be correct for any modern Unix
|
121 |
7u83 |
34 |
OPTIONS=-DLISPCODE -DCHDIR -DFASTTAG -DUSG3TTY -DVMUNIX -DBIGMEM -D_BSD_EXTENSION -DTRACE -g -O0 -DADEBUG
|
105 |
7u83 |
35 |
# define to use ISO-8859-X character sets
|
|
|
36 |
#OPTIONS += -DISO
|
|
|
37 |
LDFLAGS=
|
113 |
7u83 |
38 |
TERMLIB = -ltermcap
|
116 |
7u83 |
39 |
#-ltermcap
|
105 |
7u83 |
40 |
|
|
|
41 |
# That's it.
|
|
|
42 |
|
115 |
7u83 |
43 |
CFLAGS= $(OPTIONS) $(DEB) -DUSG3TTY -DVMUNIX -Wno-return-type
|
105 |
7u83 |
44 |
INCLUDE=/usr/include
|
|
|
45 |
OBJS= ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o \
|
|
|
46 |
ex_data.o ex_extern.o ex_get.o ex_io.o ex_put.o ex_re.o \
|
|
|
47 |
ex_set.o ex_subr.o ex_tagio.o ex_temp.o ex_tty.o ex_unix.o \
|
|
|
48 |
ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voper.o \
|
118 |
7u83 |
49 |
ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o mach.o
|
107 |
7u83 |
50 |
|
105 |
7u83 |
51 |
HDRS= ex.h ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_tune.h ex_vars.h ex_vis.h
|
|
|
52 |
SRC1= ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c
|
|
|
53 |
SRC2= ex_data.c ex_get.c ex_io.c ex_put.c ex_re.c
|
|
|
54 |
SRC3= ex_set.c ex_subr.c ex_tagio.c ex_temp.c ex_tty.c ex_unix.c
|
|
|
55 |
SRC4= ex_v.c ex_vadj.c ex_vget.c ex_vmain.c ex_voper.c
|
|
|
56 |
SRC5= ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c
|
|
|
57 |
SRC6= printf.c expreserve.c exrecover.c
|
|
|
58 |
|
|
|
59 |
all: ex
|
|
|
60 |
|
|
|
61 |
ex: $(OBJS)
|
|
|
62 |
$(CC) -o ex $(LDFLAGS) $(OBJS) $(TERMLIB)
|
|
|
63 |
|
|
|
64 |
$(OBJS): $(HDRS)
|
|
|
65 |
|
|
|
66 |
ex_vars.h:
|
|
|
67 |
csh makeoptions $(CFLAGS)
|
|
|
68 |
|
|
|
69 |
clean:
|
|
|
70 |
cd termcap && make clean
|
|
|
71 |
# If we dont have ex we cant make it so don't rm ex_vars.h
|
|
|
72 |
-rm -f ex *.o x*.[cs] core errs trace
|
|
|
73 |
|
|
|
74 |
# install in standard place
|
|
|
75 |
install: ex
|
|
|
76 |
rm -f $(DESTDIR)/$(BINDIR)/ex
|
|
|
77 |
rm -f $(DESTDIR)/$(BINDIR)/edit
|
|
|
78 |
rm -f $(DESTDIR)/$(BINDIR)/vi
|
|
|
79 |
rm -f $(DESTDIR)/$(BINDIR)/view
|
|
|
80 |
install -s -m 1755 ex $(DESTDIR)/$(BINDIR)/ex
|
|
|
81 |
ln -s $(DESTDIR)/$(BINDIR)/ex $(DESTDIR)/$(BINDIR)/edit
|
|
|
82 |
ln -s $(DESTDIR)/$(BINDIR)/ex $(DESTDIR)/$(BINDIR)/vi
|
|
|
83 |
ln -s $(DESTDIR)/$(BINDIR)/ex $(DESTDIR)/$(BINDIR)/view
|
|
|
84 |
rm -f $(DESTDIR)/man/man1/vi.1
|
|
|
85 |
rm -f $(DESTDIR)/man/man1/ex.1
|
|
|
86 |
rm -f $(DESTDIR)/man/man1/edit.1
|
|
|
87 |
install -m 644 vi.1 $(DESTDIR)/man/man1/vi.1
|
|
|
88 |
install -m 644 ex.1 $(DESTDIR)/man/man1/ex.1
|
|
|
89 |
ln -s $(DESTDIR)/man/man1/ex.1 $(DESTDIR)/man/man1/edit.1
|