Change SYSV to USG to match current usage in source. Add USGr4 to list
[deliverable/binutils-gdb.git] / readline / Makefile.in
CommitLineData
bd5635a1
RP
1# #
2# Makefile for readline and history libraries. #
3# #
bcb14db5 4
bd5635a1 5
7da15eff 6srcdir = .
c21b1b26 7ddestdir = /usr/local
3558ead5 8idestdir = /usr/local
7187e60c
RP
9INSTALL_PROG = install -c
10INSTALL_FILE = $(INSTALL_PROG)
11
7da15eff
RP
12#### host and target dependent Makefile fragments come in here.
13##
14
bd5635a1
RP
15# Here is a rule for making .o files from .c files that doesn't force
16# the type of the machine (like -sun3) into the flags.
17.c.o:
18 $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) $(CPPFLAGS) $(READLINE_DEFINES) $<
19
20# Destination installation directory. The libraries are copied to DESTDIR
21# when you do a `make install', and the header files to INCDIR/readline/*.h.
c21b1b26
SC
22DESTDIR = $(ddestdir)/lib
23INCDIR = $(ddestdir)/include
bd5635a1
RP
24
25# Define TYPES as -DVOID_SIGHANDLER if your operating system uses
26# a return type of "void" for signal handlers.
27TYPES = -DVOID_SIGHANDLER
28
bd5635a1
RP
29# HP-UX compilation requires the BSD library.
30#LOCAL_LIBS = -lBSD
31
32# Xenix compilation requires -ldir -lx
33#LOCAL_LIBS = -ldir -lx
34
35# Comment out "-DVI_MODE" if you don't think that anyone will ever desire
36# the vi line editing mode and features.
37READLINE_DEFINES = $(TYPES) -DVI_MODE
38
c21b1b26
SC
39MINUS_G=-g
40DEBUG_FLAGS = $(MINUS_G)
bd5635a1 41LDFLAGS = $(DEBUG_FLAGS)
f30114ea 42CFLAGS = $(DEBUG_FLAGS) $(USG) -I.
bd5635a1
RP
43
44# A good alternative is gcc -traditional.
45#CC = gcc -traditional
46CC = cc
7da15eff 47RANLIB = /bin/ranlib
bd5635a1 48AR = ar
7da15eff 49AR_FLAGS = clq
bd5635a1
RP
50RM = rm
51CP = cp
52
7da15eff 53LOCAL_INCLUDES = -I$(srcdir)/../
bd5635a1
RP
54
55CSOURCES = readline.c history.c funmap.c keymaps.c vi_mode.c \
56 emacs_keymap.c vi_keymap.c
57
58HSOURCES = readline.h chardefs.h history.h keymaps.h
59SOURCES = $(CSOURCES) $(HSOURCES)
60
fff3e61f
RP
61DOCUMENTATION = readline.texi inc-read.texi \
62 history.texi inc-hist.texi
bd5635a1
RP
63
64SUPPORT = COPYING Makefile $(DOCUMENTATION) ChangeLog
65
66THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
67
68##########################################################################
69
502ef32a 70STAGESTUFF = *.o
7da15eff 71
e92ee469
RP
72all: libreadline.a
73
74all-info: history.info readline.info
fff3e61f
RP
75
76history.info: history.texi
c5bbc6ea 77 $(MAKEINFO) -o history.info $(srcdir)/history.texi
fff3e61f 78
c5bbc6ea
SG
79readline.info: readline.texi inc-read.texi
80 $(MAKEINFO) -o readline.info $(srcdir)/readline.texi
bd5635a1 81
494ea0b2 82libreadline.a: readline.o history.o funmap.o keymaps.o tilde.o vi_mode.o
bd5635a1 83 $(RM) -f libreadline.a
494ea0b2 84 $(AR) $(AR_FLAGS) libreadline.a readline.o history.o funmap.o keymaps.o tilde.o vi_mode.o
7da15eff 85 $(RANLIB) libreadline.a
bd5635a1
RP
86
87readline.o: readline.h chardefs.h keymaps.h history.h readline.c vi_mode.c
88history.o: history.c history.h
89funmap.o: readline.h
90keymaps.o: emacs_keymap.c vi_keymap.c keymaps.h chardefs.h keymaps.c
c5bbc6ea
SG
91tilde.o: ../glob/tilde.c
92 $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) $(CPPFLAGS) $(READLINE_DEFINES) ../glob/tilde.c
bd5635a1
RP
93
94libtest: libreadline.a libtest.c
95 $(CC) -o libtest $(CFLAGS) $(CPPFLAGS) -L. libtest.c -lreadline -ltermcap
96
494ea0b2 97readline: readline.c history.o keymaps.o funmap.o readline.h chardefs.h vi_mode.o
bd5635a1
RP
98 $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
99 $(LOCAL_INCLUDES) -DTEST -o readline readline.c funmap.o \
494ea0b2 100 keymaps.o history.o vi_mode.o -L. -ltermcap
bd5635a1
RP
101
102readline.tar: $(THINGS_TO_TAR)
103 tar -cf readline.tar $(THINGS_TO_TAR)
104
105readline.tar.Z: readline.tar
106 compress -f readline.tar
107
fff3e61f 108install: includes
3558ead5
SC
109 $(INSTALL_PROG) libreadline.a $(DESTDIR)/libreadline.an
110 -mv $(DESTDIR)/libreadline.an $(DESTDIR)/libreadline.a
fff3e61f 111 $(RANLIB) $(DESTDIR)/libreadline.a
e92ee469
RP
112
113install-info: all-info
fff3e61f
RP
114 for i in *.info* ; do \
115 echo Installing $$i... ; \
3558ead5 116 cp $$i $(idestdir)/info/$$i ; \
fff3e61f 117 done
bd5635a1
RP
118
119includes:
120 if [ ! -r $(INCDIR)/readline ]; then\
121 mkdir $(INCDIR)/readline;\
122 chmod a+r $(INCDIR)/readline;\
123 fi
bcb14db5
RP
124 $(INSTALL_FILE) $(srcdir)/readline.h $(INCDIR)/readline/
125 $(INSTALL_FILE) $(srcdir)/keymaps.h $(INCDIR)/readline/
126 $(INSTALL_FILE) $(srcdir)/chardefs.h $(INCDIR)/readline/
bd5635a1 127clean:
fff3e61f
RP
128 rm -f $(STAGESTUFF) *.a *.log *.cp *.tp *.vr *.fn
129 rm -f *.aux *.pg *.toc *.info*
bd5635a1
RP
130
131$(DESTDIR)/libreadline.a: libreadline.a
7da15eff
RP
132
133# Copy the object files from a particular stage into a subdirectory.
134stage1: force
135 -mkdir stage1
136 -mv $(STAGESTUFF) stage1
137
138stage2: force
139 -mkdir stage2
140 -mv $(STAGESTUFF) stage2
141
142stage3: force
143 -mkdir stage3
144 -mv $(STAGESTUFF) stage3
145
30ba1dfe
RP
146against=stage2
147
148comparison: force
149 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
150
7da15eff
RP
151de-stage1: force
152 - (cd stage1 ; mv -f * ..)
153 - rmdir stage1
154
155de-stage2: force
156 - (cd stage2 ; mv -f * ..)
157 - rmdir stage2
158
159de-stage3: force
160 - (cd stage3 ; mv -f * ..)
161 - rmdir stage3
162
163force:
164
165# with the gnu make, this is done automatically.
166
c21b1b26 167Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
bcb14db5 168 $(SHELL) ./config.status
This page took 0.043648 seconds and 4 git commands to generate.