* hppa.h: Add lci and syncdma instructions.
[deliverable/binutils-gdb.git] / readline / Makefile.in
CommitLineData
92bb90af
RP
1#
2# Makefile
b65a4fe5 3# Copyright (C) 1990, 1991, 1992 Free Software Foundation
92bb90af
RP
4#
5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
18#
19
20#
21# Makefile for readline and history libraries.
22#
bcb14db5 23
7da15eff 24srcdir = .
7187e60c 25
92bb90af
RP
26prefix = /usr/local
27
b65a4fe5
JK
28exec_prefix = $(prefix)
29bindir = $(exec_prefix)/bin
30libdir = $(exec_prefix)/lib
31
92bb90af 32datadir = $(prefix)/lib
b65a4fe5 33mandir = $(prefix)/man
92bb90af
RP
34man1dir = $(mandir)/man1
35man2dir = $(mandir)/man2
36man3dir = $(mandir)/man3
37man4dir = $(mandir)/man4
38man5dir = $(mandir)/man5
39man6dir = $(mandir)/man6
40man7dir = $(mandir)/man7
41man8dir = $(mandir)/man8
42man9dir = $(mandir)/man9
43infodir = $(prefix)/info
44includedir = $(prefix)/include
45docdir = $(datadir)/doc
46
47SHELL = /bin/sh
48
49INSTALL = install -c
50INSTALL_PROGRAM = $(INSTALL)
51INSTALL_DATA = $(INSTALL)
7da15eff 52
92bb90af
RP
53AR = ar
54AR_FLAGS = qv
b65a4fe5 55CFLAGS = -g
92bb90af
RP
56BISON = bison
57MAKEINFO = makeinfo
58RANLIB = ranlib
59
bd5635a1
RP
60# Define TYPES as -DVOID_SIGHANDLER if your operating system uses
61# a return type of "void" for signal handlers.
62TYPES = -DVOID_SIGHANDLER
63
bd5635a1
RP
64# HP-UX compilation requires the BSD library.
65#LOCAL_LIBS = -lBSD
66
67# Xenix compilation requires -ldir -lx
68#LOCAL_LIBS = -ldir -lx
69
70# Comment out "-DVI_MODE" if you don't think that anyone will ever desire
71# the vi line editing mode and features.
72READLINE_DEFINES = $(TYPES) -DVI_MODE
73
c21b1b26 74DEBUG_FLAGS = $(MINUS_G)
bd5635a1 75LDFLAGS = $(DEBUG_FLAGS)
bd5635a1
RP
76
77# A good alternative is gcc -traditional.
78#CC = gcc -traditional
bd5635a1
RP
79RM = rm
80CP = cp
81
7da15eff 82LOCAL_INCLUDES = -I$(srcdir)/../
bd5635a1 83
5e98bbab
PB
84# The name of the main library target.
85LIBRARY_NAME = libreadline.a
86
87# The C code source files for this library.
88CSOURCES = readline.c funmap.c keymaps.c vi_mode.c parens.c \
89 rltty.c complete.c bind.c isearch.c display.c signals.c \
90 emacs_keymap.c vi_keymap.c history.c tilde.c xmalloc.c
91
92# The header files for this library.
93HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h \
94 posixstat.h tilde.h
95
96OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
97 rltty.o complete.o bind.o isearch.o display.o signals.o \
98 history.o tilde.o xmalloc.o
bd5635a1 99
bd5635a1
RP
100SOURCES = $(CSOURCES) $(HSOURCES)
101
fff3e61f
RP
102DOCUMENTATION = readline.texi inc-read.texi \
103 history.texi inc-hist.texi
bd5635a1
RP
104
105SUPPORT = COPYING Makefile $(DOCUMENTATION) ChangeLog
106
107THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
108
5e98bbab
PB
109FLAGS_TO_PASS = \
110 "prefix=$(prefix)" \
111 "exec_prefix=$(exec_prefix)" \
112 "against=$(against)" \
113 "MAKEINFO=$(MAKEINFO)" \
114 "INSTALL=$(INSTALL)" \
115 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
116 "INSTALL_DATA=$(INSTALL_DATA)"
117
118SUBDIRS = doc
119
b65a4fe5
JK
120#### Host, target, and site specific Makefile fragments come in here.
121###
122
123.c.o:
124 $(CC) -c $(CFLAGS) $(H_CFLAGS) $(DEBUG_FLAGS) $(USG) -I. $(LOCAL_INCLUDES) $(CPPFLAGS) $(READLINE_DEFINES) $<
bd5635a1 125
502ef32a 126STAGESTUFF = *.o
7da15eff 127
e92ee469
RP
128all: libreadline.a
129
b65a4fe5
JK
130check:
131installcheck:
92bb90af 132
4955aa53 133info dvi install-info clean-info clean-dvi: force
5e98bbab
PB
134 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
135
136subdir_do: force
137 @for i in $(DODIRS); do \
138 if [ -f ./$$i/Makefile ] ; then \
139 if (cd ./$$i; \
140 $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
141 else exit 1 ; fi ; \
142 else true ; fi ; \
143 done
fff3e61f 144
5e98bbab 145libreadline.a: $(OBJECTS)
02e20edf 146 $(RM) -f libreadline.a
5e98bbab 147 $(AR) $(AR_FLAGS) libreadline.a $(OBJECTS)
02e20edf 148 $(RANLIB) libreadline.a
bd5635a1
RP
149
150readline.o: readline.h chardefs.h keymaps.h history.h readline.c vi_mode.c
151history.o: history.c history.h
152funmap.o: readline.h
153keymaps.o: emacs_keymap.c vi_keymap.c keymaps.h chardefs.h keymaps.c
f42f505b 154search.o: search.c
02e20edf
JG
155
156tilde.o: $(srcdir)/../glob/tilde.c
b65a4fe5 157 $(CC) -c $(CFLAGS) $(H_CFLAGS) $(DEBUG_FLAGS) $(USG) -I. $(LOCAL_INCLUDES) $(CPPFLAGS) $(READLINE_DEFINES) $(srcdir)/../glob/tilde.c
bd5635a1
RP
158
159libtest: libreadline.a libtest.c
b65a4fe5 160 $(CC) -o libtest $(CFLAGS) $(H_CFLAGS) $(DEBUG_FLAGS) $(USG) -I. $(LOCAL_INCLUDES) $(CPPFLAGS) $(READLINE_DEFINES) -L. libtest.c -lreadline -ltermcap
bd5635a1 161
494ea0b2 162readline: readline.c history.o keymaps.o funmap.o readline.h chardefs.h vi_mode.o
bd5635a1
RP
163 $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
164 $(LOCAL_INCLUDES) -DTEST -o readline readline.c funmap.o \
494ea0b2 165 keymaps.o history.o vi_mode.o -L. -ltermcap
bd5635a1
RP
166
167readline.tar: $(THINGS_TO_TAR)
168 tar -cf readline.tar $(THINGS_TO_TAR)
169
170readline.tar.Z: readline.tar
171 compress -f readline.tar
172
92bb90af
RP
173install:
174 $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
175 $(RANLIB) $(libdir)/libreadline.a
b65a4fe5
JK
176 $(INSTALL_DATA) $(srcdir)/readline.h $(includedir)/readline/readline.h
177 $(INSTALL_DATA) $(srcdir)/keymaps.h $(includedir)/readline/keymaps.h
178 $(INSTALL_DATA) $(srcdir)/chardefs.h $(includedir)/readline/chardefs.h
e92ee469 179
bd5635a1 180includes:
b65a4fe5
JK
181 $(INSTALL_FILE) $(srcdir)/readline.h $(includedir)/readline/readline.h
182 $(INSTALL_FILE) $(srcdir)/keymaps.h $(includedir)/readline/keymaps.h
183 $(INSTALL_FILE) $(srcdir)/chardefs.h $(includedir)/readline/chardefs.h
184
84c8bac2
JK
185local-clean:
186 rm -f $(STAGESTUFF) *.a *.log *.cp *.tp *.vr *.fn
187 rm -f *.aux *.pg *.toc
bd5635a1 188
84c8bac2
JK
189mostlyclean: local-clean
190 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
191
192clean: local-clean
193 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
194
1b3f3940 195distclean: local-clean
84c8bac2 196 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
1b3f3940 197 rm -f Makefile config.status sysdep.h
84c8bac2 198
1b3f3940 199realclean: local-clean
84c8bac2 200 @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
1b3f3940 201 rm -f Makefile config.status sysdep.h
84c8bac2 202
bd5635a1 203$(DESTDIR)/libreadline.a: libreadline.a
7da15eff
RP
204
205# Copy the object files from a particular stage into a subdirectory.
206stage1: force
207 -mkdir stage1
208 -mv $(STAGESTUFF) stage1
209
210stage2: force
211 -mkdir stage2
212 -mv $(STAGESTUFF) stage2
213
214stage3: force
215 -mkdir stage3
216 -mv $(STAGESTUFF) stage3
217
30ba1dfe
RP
218against=stage2
219
220comparison: force
221 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
222
7da15eff 223de-stage1: force
92bb90af
RP
224 -(cd stage1 ; mv -f * ..)
225 -rmdir stage1
7da15eff
RP
226
227de-stage2: force
92bb90af
RP
228 -(cd stage2 ; mv -f * ..)
229 -rmdir stage2
7da15eff
RP
230
231de-stage3: force
92bb90af
RP
232 -(cd stage3 ; mv -f * ..)
233 -rmdir stage3
7da15eff
RP
234
235force:
236
237# with the gnu make, this is done automatically.
238
c21b1b26 239Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
bcb14db5 240 $(SHELL) ./config.status
This page took 0.165134 seconds and 4 git commands to generate.