blob: c5ac183cf0cc2da4ff7fbce86c1e2dcdcf044a79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
## -*- text -*- ####################################################
# #
# Makefile for the GNU Readline and History Libraries. #
# #
####################################################################
srcdir = @srcdir@
VPATH = .:@srcdir@
topdir = @top_srcdir@
BUILD_DIR = @BUILD_DIR@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
CC = @CC@
RANLIB = @RANLIB@
AR = @AR@
RM = rm -f
CP = cp
MV = mv
# See the file STANDALONE for the -D defines that readline understands
CFLAGS = @CFLAGS@
LOCAL_CFLAGS = @LOCAL_CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
DEFS = @DEFS@
INCLUDES = -I. -I$(BUILD_DIR) -I$(topdir) -I$(topdir)/lib
CCFLAGS = $(DEFS) $(APP_CFLAGS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
# Here is a rule for making .o files from .c files that doesn't force
# the type of the machine (like -sun3) into the flags.
.c.o:
$(CC) -c $(CCFLAGS) $<
# The name of the main library target.
LIBRARY_NAME = libreadline.a
# The C code source files for this library.
CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
$(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \
$(srcdir)/complete.c $(srcdir)/bind.c $(srcdir)/isearch.c \
$(srcdir)/display.c $(srcdir)/signals.c $(srcdir)/emacs_keymap.c \
$(srcdir)/vi_keymap.c $(srcdir)/util.c $(srcdir)/kill.c \
$(srcdir)/undo.c $(srcdir)/macro.c $(srcdir)/input.c \
$(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c \
$(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \
$(srcdir)/histfile.c $(srcdir)/nls.c \
$(srcdir)/tilde.c \
# The header files for this library.
HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
posixstat.h tilde.h rlconf.h tcap.h
HISTOBJ = history.o histexpand.o histfile.o histsearch.o
TILDEOBJ= tilde.o
OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
rltty.o complete.o bind.o isearch.o display.o signals.o \
util.o kill.o undo.o macro.o input.o callback.o terminal.o \
nls.o xmalloc.o \
$(HISTOBJ) $(TILDEOBJ)
# The texinfo files which document this library.
DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
DOCOBJECT = doc/readline.dvi
DOCSUPPORT = doc/Makefile
DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
SUPPORT = Makefile ChangeLog $(DOCSUPPORT) examples/[-a-z.]*
SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h
##########################################################################
all: libreadline.a libhistory.a
libreadline.a: $(OBJECTS)
$(RM) -f $@
$(AR) cr $@ $(OBJECTS)
-test -n "$(RANLIB)" && $(RANLIB) $@
libhistory.a: $(HISTOBJ) xmalloc.o
$(RM) -f $@
$(AR) cr $@ $(HISTOBJ) xmalloc.o
-test -n "$(RANLIB)" && $(RANLIB) $@
documentation: force
test -d doc || mkdir doc
-( cd doc && $(MAKE) $(MFLAGS) )
force:
# The rule for 'includes' is written funny so that the if statement
# always returns TRUE unless there really was an error installing the
# include files.
install: installdirs libreadline.a
for file in $(INSTALLED_HEADERS) ; do \
$(INSTALL_DATA) $(srcdir)/$$file $(includedir)/readline ; \
done
-${MV} $(libdir)/libreadline.a $(libdir)/libreadline.old
${INSTALL_DATA} libreadline.a $(libdir)/libreadline.a
-test -n "$(RANLIB)" && $(RANLIB) -t $(bindir)/libreadline.a
installdirs: $(topdir)/support/mkdirs
$(SHELL) $(topdir)/support/mkdirs $(includedir) \
$(includedir)/readline $(libdir) $(infodir) $(man3dir)
uninstall:
cd $(includedir)/readline && ${RM} -f ${INSTALLED_HEADERS}
cd $(libdir) && ${RM} -f libreadline.a libreadline.old
tags: force
etags $(CSOURCES) $(HSOURCES)
TAGS: force
ctags -x $(CSOURCES) $(HSOURCES) > $@
readline: readline.h rldefs.h chardefs.h
readline: $(OBJECTS)
$(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
$(LOCAL_INCLUDES) -DTEST -o readline readline.c vi_mode.o funmap.o \
keymaps.o -ltermcap
clean: force
$(RM) $(OBJECTS) *.a
-( cd doc && $(MAKE) $(MFLAGS) $@ )
distclean realclean maintainer-clean: clean
-( cd doc && $(MAKE) $(MFLAGS) $@ )
$(RM) Makefile
mostlyclean: clean
-( cd doc && $(MAKE) $(MFLAGS) $@ )
# Dependencies
readline.o: readline.c readline.h rldefs.h rlconf.h chardefs.h tcap.h
readline.o: keymaps.h history.h
vi_mode.o: rldefs.h rlconf.h readline.h history.h
funmap.o: funmap.c readline.h rlconf.h
keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c keymaps.h chardefs.h rlconf.h
history.o: history.h histlib.h
histexpand.o: history.h histlib.h
histsearch.o: history.h histlib.h
histfile.o: history.h histlib.h
isearch.o: readline.h history.h
search.o: readline.h history.h
display.o: readline.h history.h rldefs.h rlconf.h tcap.h
complete.o: readline.h rldefs.h rlconf.h posixdir.h posixstat.h
rltty.o: rldefs.h rlconf.h readline.h rltty.h
bind.o: rldefs.h rlconf.h readline.h history.h
signals.o: rldefs.h rlconf.h readline.h history.h
parens.o: readline.h
kill.o: rldefs.h rlconf.h readline.h history.h
macro.o: rldefs.h rlconf.h readline.h history.h
undo.o: rldefs.h rlconf.h readline.h history.h
input.o: rldefs.h rlconf.h readline.h history.h
callback.o: rlconf.h rldefs.h readline.h
terminal.o: rlconf.h rldefs.h readline.h tcap.h history.h
bind.o: $(BUILD_DIR)/config.h
callback.o: $(BUILD_DIR)/config.h
complete.o: $(BUILD_DIR)/config.h
display.o: $(BUILD_DIR)/config.h
funmap.o: $(BUILD_DIR)/config.h
histexpand.o: $(BUILD_DIR)/config.h
histfile.o: $(BUILD_DIR)/config.h
history.o: $(BUILD_DIR)/config.h
histsearch.o: $(BUILD_DIR)/config.h
input.o: $(BUILD_DIR)/config.h
isearch.o: $(BUILD_DIR)/config.h
keymaps.o: $(BUILD_DIR)/config.h
kill.o: $(BUILD_DIR)/config.h
macro.o: $(BUILD_DIR)/config.h
parens.o: $(BUILD_DIR)/config.h
readline.o: $(BUILD_DIR)/config.h
rltty.o: $(BUILD_DIR)/config.h
search.o: $(BUILD_DIR)/config.h
signals.o: $(BUILD_DIR)/config.h
tilde.o: $(BUILD_DIR)/config.h
undo.o: $(BUILD_DIR)/config.h
util.o: $(BUILD_DIR)/config.h
vi_mode.o: $(BUILD_DIR)/config.h
xmalloc.o: $(BUILD_DIR)/config.h
|