3 # Copyright (C) 1990, 1991 Cygnus Support
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.
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.
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. */
24 bindir = $(prefix)/bin
25 datadir = $(prefix)/lib
26 libdir = $(prefix)/lib
27 mandir = $(datadir)/man
28 man1dir = $(mandir)/man1
29 man2dir = $(mandir)/man2
30 man3dir = $(mandir)/man3
31 man4dir = $(mandir)/man4
32 man5dir = $(mandir)/man5
33 man6dir = $(mandir)/man6
34 man7dir = $(mandir)/man7
35 man8dir = $(mandir)/man8
36 man9dir = $(mandir)/man9
37 infodir = $(prefix)/info
38 includedir = $(prefix)/include
39 docdir = $(datadir)/doc
45 INSTALL_PROGRAM = $(INSTALL)
46 INSTALL_DATA = $(INSTALL)
54 #### Host, target, and site specific Makefile fragments come in here.
57 CFLAGS = $(H_CFLAGS) -I.. -I$(srcdir)/.. -I$(srcdir)/../../include
59 # main GDB source directory
61 DOCFILES = aoutx.texi archive.texi archures.texi \
62 bfd.texi cache.texi coffcode.texi \
63 core.texi format.texi libbfd.texi \
64 opncls.texi reloc.texi section.texi \
65 syms.texi targets.texi init.texi ctor.texi
67 PROTOS = archive.p archures.p bfd.p \
69 libbfd.p opncls.p reloc.p \
70 section.p syms.p targets.p \
71 format.p core.p init.p
73 IPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip ctor.ip coffcode.ip
75 # SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction
76 # between VPATH and suffix rules. If you use GNU Make, perhaps other Makes,
77 # you don't need these three:
78 SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c \
79 $(srcdir)/../archures.c $(srcdir)/../bfd.c \
80 $(srcdir)/../cache.c $(srcdir)/../coffcode.h \
81 $(srcdir)/../core.c $(srcdir)/../format.c \
82 $(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
83 $(srcdir)/../reloc.c $(srcdir)/../section.c \
84 $(srcdir)/../syms.c $(srcdir)/../targets.c \
87 SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
88 $(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../core.c \
89 $(srcdir)/../format.c $(srcdir)/../libbfd.c \
90 $(srcdir)/../opncls.c $(srcdir)/../reloc.c \
91 $(srcdir)/../section.c $(srcdir)/../syms.c \
92 $(srcdir)/../targets.c $(srcdir)/../init.c
94 SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
95 $(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
96 $(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
97 $(srcdir)/../init.c $(srcdir)/../ctor.c
99 STAGESTUFF = $(DOCFILES) *.info*
106 for i in *.info* ; do \
107 $(INSTALL_DATA) $$i $(infodir)/$$i ; \
110 docs: chew protos bfd.info bfd.dvi bfd.ps
114 protos: libbfd.h libcoff.h bfd.h
116 aoutx.texi: $(MKDOC) $(srcdir)/../aoutx.h
117 $(MKDOC) -d <$(srcdir)/../aoutx.h >aoutx.texi
119 archive.texi: $(MKDOC) $(srcdir)/../archive.c
120 $(MKDOC) -d <$(srcdir)/../archive.c >archive.texi
122 archures.texi: $(srcdir)/../archures.c
123 $(MKDOC) -d < $(srcdir)/../archures.c >archures.texi
125 bfd.texi: $(MKDOC) $(srcdir)/../bfd.c
126 $(MKDOC) -d < $(srcdir)/../bfd.c >bfd.texi
128 cache.texi: $(MKDOC) $(srcdir)/../cache.c
129 $(MKDOC) -d < $(srcdir)/../cache.c >cache.texi
131 coffcode.texi: $(MKDOC) $(srcdir)/../coffcode.h
132 $(MKDOC) -d <$(srcdir)/../coffcode.h >coffcode.texi
134 core.texi: $(MKDOC) $(srcdir)/../core.c
135 $(MKDOC) -d <$(srcdir)/../core.c >core.texi
137 format.texi: $(MKDOC) $(srcdir)/../format.c
138 $(MKDOC) -d <$(srcdir)/../format.c >format.texi
140 libbfd.texi: $(MKDOC) $(srcdir)/../libbfd.c
141 $(MKDOC) -d < $(srcdir)/../libbfd.c >libbfd.texi
143 opncls.texi: $(srcdir)/chew $(srcdir)/../opncls.c
144 $(MKDOC) -d <$(srcdir)/../opncls.c >opncls.texi
146 reloc.texi : $(MKDOC) $(srcdir)/../reloc.c
147 $(MKDOC) -d <$(srcdir)/../reloc.c >reloc.texi
149 section.texi: $(MKDOC) $(srcdir)/../section.c
150 $(MKDOC) -d <$(srcdir)/../section.c >section.texi
152 syms.texi : $(MKDOC) $(srcdir)/../syms.c
153 $(MKDOC) -d <$(srcdir)/../syms.c >syms.texi
155 targets.texi: $(MKDOC) $(srcdir)/../targets.c
156 $(MKDOC) -d <$(srcdir)/../targets.c >targets.texi
158 init.texi: $(MKDOC) $(srcdir)/../init.c
159 $(MKDOC) -d <$(srcdir)/../init.c >init.texi
161 ctor.texi: $(MKDOC) $(srcdir)/../ctor.c
162 $(MKDOC) -d <$(srcdir)/../ctor.c >ctor.texi
165 libbfd.h: $(srcdir)/../libbfd-in.h \
166 $(srcdir)/../init.c \
167 $(srcdir)/../libbfd.c \
168 $(srcdir)/../init.c \
169 $(srcdir)/../libbfd.c \
170 $(srcdir)/../cache.c \
171 $(srcdir)/../ctor.c \
172 $(srcdir)/../reloc.c \
173 $(srcdir)/../cpu-h8300.c \
174 $(srcdir)/../cpu-i960.c \
175 $(srcdir)/../archures.c \
177 cat $(srcdir)/../libbfd-in.h >libbfd.h
178 $(MKDOC) -i < $(srcdir)/../init.c >>libbfd.h
179 $(MKDOC) -i < $(srcdir)/../libbfd.c >>libbfd.h
180 $(MKDOC) -i < $(srcdir)/../init.c >>libbfd.h
181 $(MKDOC) -i < $(srcdir)/../libbfd.c >>libbfd.h
182 $(MKDOC) -i < $(srcdir)/../cache.c >>libbfd.h
183 $(MKDOC) -i < $(srcdir)/../ctor.c >>libbfd.h
184 $(MKDOC) -i < $(srcdir)/../reloc.c >>libbfd.h
185 $(MKDOC) -i < $(srcdir)/../cpu-h8300.c >>libbfd.h
186 $(MKDOC) -i < $(srcdir)/../cpu-i960.c >>libbfd.h
187 $(MKDOC) -i < $(srcdir)/../archures.c >>libbfd.h
189 libcoff.h: $(srcdir)/../libcoff-in.h \
190 $(srcdir)/../coffcode.h \
192 cat $(srcdir)/../libcoff-in.h >libcoff.h
193 $(MKDOC) -i < $(srcdir)/../coffcode.h >>libcoff.h
195 bfd.h: $(srcdir)/../bfd-in.h \
196 $(srcdir)/../init.c \
197 $(srcdir)/../opncls.c \
198 $(srcdir)/../libbfd.c \
199 $(srcdir)/../section.c \
200 $(srcdir)/../archures.c \
201 $(srcdir)/../reloc.c \
202 $(srcdir)/../syms.c \
203 $(srcdir)/../archive.c \
204 $(srcdir)/../core.c \
205 $(srcdir)/../targets.c \
206 $(srcdir)/../format.c \
208 cat $(srcdir)/../bfd-in.h >bfd.h
209 $(MKDOC) -g<$(srcdir)/../init.c >>bfd.h
210 $(MKDOC) -g<$(srcdir)/../opncls.c >>bfd.h
211 $(MKDOC) -g<$(srcdir)/../libbfd.c >>bfd.h
212 $(MKDOC) -g<$(srcdir)/../section.c >>bfd.h
213 $(MKDOC) -g<$(srcdir)/../archures.c >>bfd.h
214 $(MKDOC) -g<$(srcdir)/../reloc.c >>bfd.h
215 $(MKDOC) -g<$(srcdir)/../syms.c >>bfd.h
216 $(MKDOC) -g<$(srcdir)/../bfd.c >>bfd.h
217 $(MKDOC) -g<$(srcdir)/../archive.c >>bfd.h
218 $(MKDOC) -g<$(srcdir)/../core.c >>bfd.h
219 $(MKDOC) -g<$(srcdir)/../targets.c >>bfd.h
220 $(MKDOC) -g<$(srcdir)/../format.c >>bfd.h
221 echo "#endif" >>bfd.h
225 rm -f $(STAGESTUFF) *.p *.ip bfd.dvi bfd.ps *~* *# bfd.?? bfd.??? chew
227 bfd.info: $(DOCFILES) bfd.texinfo
228 $(MAKEINFO) -o bfd.info $(srcdir)/bfd.texinfo
230 bfd.dvi: $(DOCFILES) bfd.texinfo
231 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex bfd.texinfo
233 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex bfd.texinfo
238 quickdoc: $(DOCFILES) bfd.texinfo
239 TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex bfd.texinfo
243 - mv -f $(STAGESTUFF) stage1
247 - mv -f $(STAGESTUFF) stage2
251 - mv -f $(STAGESTUFF) stage3
256 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i || exit 1 ; done
259 - (cd stage1 ; mv -f $(STAGESTUFF) ..)
263 - (cd stage2 ; mv -f $(STAGESTUFF) ..)
267 - (cd stage3 ; mv -f $(STAGESTUFF) ..)
272 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
273 $(SHELL) ./config.status