Fri Dec 6 23:23:14 1991 K. Richard Pixley (rich at rtl.cygnus.com)
[deliverable/binutils-gdb.git] / readline / Makefile.in
1 #
2 # Makefile
3 # Copyright (C) 1990, 1991 Cygnus Support
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 #
23
24 srcdir = .
25
26 prefix = /usr/local
27
28 bindir = $(prefix)/bin
29 datadir = $(prefix)/lib
30 libdir = $(prefix)/lib
31 mandir = $(datadir)/man
32 man1dir = $(mandir)/man1
33 man2dir = $(mandir)/man2
34 man3dir = $(mandir)/man3
35 man4dir = $(mandir)/man4
36 man5dir = $(mandir)/man5
37 man6dir = $(mandir)/man6
38 man7dir = $(mandir)/man7
39 man8dir = $(mandir)/man8
40 man9dir = $(mandir)/man9
41 infodir = $(prefix)/info
42 includedir = $(prefix)/include
43 docdir = $(datadir)/doc
44
45 SHELL = /bin/sh
46
47 INSTALL = install -c
48 INSTALL_PROGRAM = $(INSTALL)
49 INSTALL_DATA = $(INSTALL)
50
51 AR = ar
52 AR_FLAGS = qv
53 BISON = bison
54 MAKEINFO = makeinfo
55 RANLIB = ranlib
56
57 #### Host, target, and site specific Makefile fragments come in here.
58 ###
59
60 # Define TYPES as -DVOID_SIGHANDLER if your operating system uses
61 # a return type of "void" for signal handlers.
62 TYPES = -DVOID_SIGHANDLER
63
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.
72 READLINE_DEFINES = $(TYPES) -DVI_MODE
73
74 MINUS_G=-g
75 DEBUG_FLAGS = $(MINUS_G)
76 LDFLAGS = $(DEBUG_FLAGS)
77 CFLAGS = $(H_CFLAGS) $(DEBUG_FLAGS) $(USG) -I. $(LOCAL_INCLUDES) $(CPPFLAGS) $(READLINE_DEFINES)
78
79 # A good alternative is gcc -traditional.
80 #CC = gcc -traditional
81 RM = rm
82 CP = cp
83
84 LOCAL_INCLUDES = -I$(srcdir)/../
85
86 CSOURCES = readline.c history.c funmap.c keymaps.c vi_mode.c \
87 emacs_keymap.c vi_keymap.c
88
89 HSOURCES = readline.h chardefs.h history.h keymaps.h
90 SOURCES = $(CSOURCES) $(HSOURCES)
91
92 DOCUMENTATION = readline.texi inc-read.texi \
93 history.texi inc-hist.texi
94
95 SUPPORT = COPYING Makefile $(DOCUMENTATION) ChangeLog
96
97 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
98
99 ##########################################################################
100
101 STAGESTUFF = *.o
102
103 all: libreadline.a
104
105 info:
106 echo FIXME
107 echo FIXME
108 echo FIXME
109
110 clean-info: force
111 -rm -f *.info*
112
113 history.info: history.texi
114 $(MAKEINFO) -o history.info $(srcdir)/history.texi
115
116 readline.info: readline.texi inc-read.texi
117 $(MAKEINFO) -o readline.info $(srcdir)/readline.texi
118
119 libreadline.a: readline.o history.o funmap.o keymaps.o tilde.o vi_mode.o
120 $(RM) -f libreadline.a
121 $(AR) $(AR_FLAGS) libreadline.a readline.o history.o funmap.o keymaps.o tilde.o vi_mode.o
122 $(RANLIB) libreadline.a
123
124 readline.o: readline.h chardefs.h keymaps.h history.h readline.c vi_mode.c
125 history.o: history.c history.h
126 funmap.o: readline.h
127 keymaps.o: emacs_keymap.c vi_keymap.c keymaps.h chardefs.h keymaps.c
128
129 tilde.o: $(srcdir)/../glob/tilde.c
130 $(CC) -c $(CFLAGS) $(srcdir)/../glob/tilde.c
131
132 libtest: libreadline.a libtest.c
133 $(CC) -o libtest $(CFLAGS) $(CPPFLAGS) -L. libtest.c -lreadline -ltermcap
134
135 readline: readline.c history.o keymaps.o funmap.o readline.h chardefs.h vi_mode.o
136 $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
137 $(LOCAL_INCLUDES) -DTEST -o readline readline.c funmap.o \
138 keymaps.o history.o vi_mode.o -L. -ltermcap
139
140 readline.tar: $(THINGS_TO_TAR)
141 tar -cf readline.tar $(THINGS_TO_TAR)
142
143 readline.tar.Z: readline.tar
144 compress -f readline.tar
145
146 install:
147 $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
148 $(RANLIB) $(libdir)/libreadline.a
149 [ -d $(includedir)/readline ] || mkdir $(includedir)/readline
150 $(INSTALL_DATA) readline.h $(includedir)/readline/readline.h
151 $(INSTALL_DATA) keymaps.h $(includedir)/readline/keymaps.h
152 $(INSTALL_DATA) chardefs.h $(includedir)/readline/chardefs.h
153
154 install-info: info
155 for i in *.info* ; do \
156 $(INSTALL_DATA) $$i $(infodir)/$$i ; \
157 done
158
159 includes:
160 if [ ! -r $(INCDIR)/readline ]; then\
161 mkdir $(INCDIR)/readline;\
162 chmod a+r $(INCDIR)/readline;\
163 fi
164 $(INSTALL_FILE) $(srcdir)/readline.h $(INCDIR)/readline/
165 $(INSTALL_FILE) $(srcdir)/keymaps.h $(INCDIR)/readline/
166 $(INSTALL_FILE) $(srcdir)/chardefs.h $(INCDIR)/readline/
167 clean:
168 rm -f $(STAGESTUFF) *.a *.log *.cp *.tp *.vr *.fn
169 rm -f *.aux *.pg *.toc
170
171 $(DESTDIR)/libreadline.a: libreadline.a
172
173 # Copy the object files from a particular stage into a subdirectory.
174 stage1: force
175 -mkdir stage1
176 -mv $(STAGESTUFF) stage1
177
178 stage2: force
179 -mkdir stage2
180 -mv $(STAGESTUFF) stage2
181
182 stage3: force
183 -mkdir stage3
184 -mv $(STAGESTUFF) stage3
185
186 against=stage2
187
188 comparison: force
189 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
190
191 de-stage1: force
192 -(cd stage1 ; mv -f * ..)
193 -rmdir stage1
194
195 de-stage2: force
196 -(cd stage2 ; mv -f * ..)
197 -rmdir stage2
198
199 de-stage3: force
200 -(cd stage3 ; mv -f * ..)
201 -rmdir stage3
202
203 force:
204
205 # with the gnu make, this is done automatically.
206
207 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
208 $(SHELL) ./config.status
This page took 0.035325 seconds and 5 git commands to generate.