1 ## Process this file with automake to generate Makefile.in
3 AUTOMAKE_OPTIONS = cygnus
5 DOCFILES = aoutx.texi archive.texi archures.texi \
6 bfdt.texi cache.texi coffcode.texi \
7 core.texi elf.texi elfcode.texi format.texi libbfd.texi \
8 opncls.texi reloc.texi section.texi \
9 syms.texi targets.texi init.texi hash.texi linker.texi
11 PROTOS = archive.p archures.p bfd.p \
13 libbfd.p opncls.p reloc.p \
14 section.p syms.p targets.p \
15 format.p core.p init.p
17 IPROTOS = cache.ip libbfd.ip reloc.ip init.ip archures.ip coffcode.ip
19 # SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction
20 # between VPATH and suffix rules. If you use GNU Make, perhaps other Makes,
21 # you don't need these three:
22 SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c \
23 $(srcdir)/../archures.c $(srcdir)/../bfd.c \
24 $(srcdir)/../cache.c $(srcdir)/../coffcode.h \
25 $(srcdir)/../corefile.c $(srcdir)/../elf.c \
26 $(srcdir)/../elfcode.h $(srcdir)/../format.c \
27 $(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
28 $(srcdir)/../reloc.c $(srcdir)/../section.c \
29 $(srcdir)/../syms.c $(srcdir)/../targets.c \
30 $(srcdir)/../hash.c $(srcdir)/../linker.c
32 SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
33 $(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
34 $(srcdir)/../format.c $(srcdir)/../libbfd.c \
35 $(srcdir)/../opncls.c $(srcdir)/../reloc.c \
36 $(srcdir)/../section.c $(srcdir)/../syms.c \
37 $(srcdir)/../targets.c $(srcdir)/../init.c
39 SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
40 $(srcdir)/../reloc.c $(srcdir)/../cpu-h8300.c \
41 $(srcdir)/../cpu-i960.c $(srcdir)/../archures.c \
44 TEXIDIR = $(srcdir)/../../texinfo/fsf
46 info_TEXINFOS = bfd.texinfo
48 MKDOC = chew$(EXEEXT_FOR_BUILD)
51 $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
54 $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
56 protos: libbfd.h libcoff.h bfd.h
58 bfd.info bfd.dvi: $(DOCFILES) bfdsumm.texi bfd.texinfo
60 # We can't replace these rules with an implicit rule, because
61 # makes without VPATH support couldn't find the .h files in `..'.
63 # We use s-XXX targets so that we can distribute the info files,
64 # and permit people to rebuild them, without requiring the makeinfo
65 # program. If somebody tries to rebuild info, but none of the .texi
66 # files have changed, then this Makefile will build chew, and will
67 # build all of the stamp files, but will not actually have to rebuild
70 s-aoutx: $(MKDOC) $(srcdir)/../aoutx.h $(srcdir)/doc.str
71 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../aoutx.h >aoutx.tmp
72 $(srcdir)/../../move-if-change aoutx.tmp aoutx.texi
76 s-archive: $(MKDOC) $(srcdir)/../archive.c $(srcdir)/doc.str
77 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../archive.c >archive.tmp
78 $(srcdir)/../../move-if-change archive.tmp archive.texi
80 archive.texi: s-archive
82 s-archures: $(MKDOC) $(srcdir)/../archures.c $(srcdir)/doc.str
83 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../archures.c >archures.tmp
84 $(srcdir)/../../move-if-change archures.tmp archures.texi
86 archures.texi: s-archures
88 # We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
89 # bfd.texinfo on an 8.3 filesystem.
90 s-bfd: $(MKDOC) $(srcdir)/../bfd.c $(srcdir)/doc.str
91 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../bfd.c >bfd.tmp
92 $(srcdir)/../../move-if-change bfd.tmp bfdt.texi
96 s-cache: $(MKDOC) $(srcdir)/../cache.c $(srcdir)/doc.str
97 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../cache.c >cache.tmp
98 $(srcdir)/../../move-if-change cache.tmp cache.texi
102 s-coffcode: $(MKDOC) $(srcdir)/../coffcode.h $(srcdir)/doc.str
103 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../coffcode.h >coffcode.tmp
104 $(srcdir)/../../move-if-change coffcode.tmp coffcode.texi
106 coffcode.texi: s-coffcode
108 s-core: $(MKDOC) $(srcdir)/../corefile.c $(srcdir)/doc.str
109 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../corefile.c >core.tmp
110 $(srcdir)/../../move-if-change core.tmp core.texi
114 s-elf: $(MKDOC) $(srcdir)/../elf.c $(srcdir)/doc.str
115 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elf.c >elf.tmp
116 $(srcdir)/../../move-if-change elf.tmp elf.texi
120 s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
121 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../elfcode.h >elfcode.tmp
122 $(srcdir)/../../move-if-change elfcode.tmp elfcode.texi
124 elfcode.texi: s-elfcode
126 s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
127 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
128 $(srcdir)/../../move-if-change format.tmp format.texi
130 format.texi: s-format
132 s-libbfd: $(MKDOC) $(srcdir)/../libbfd.c $(srcdir)/doc.str
133 ./$(MKDOC) -f $(srcdir)/doc.str < $(srcdir)/../libbfd.c >libbfd.tmp
134 $(srcdir)/../../move-if-change libbfd.tmp libbfd.texi
136 libbfd.texi: s-libbfd
138 s-opncls: $(MKDOC) $(srcdir)/../opncls.c $(srcdir)/doc.str
139 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../opncls.c >opncls.tmp
140 $(srcdir)/../../move-if-change opncls.tmp opncls.texi
142 opncls.texi: s-opncls
144 s-reloc: $(MKDOC) $(srcdir)/../reloc.c $(srcdir)/doc.str
145 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../reloc.c >reloc.tmp
146 $(srcdir)/../../move-if-change reloc.tmp reloc.texi
150 s-section: $(MKDOC) $(srcdir)/../section.c $(srcdir)/doc.str
151 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../section.c >section.tmp
152 $(srcdir)/../../move-if-change section.tmp section.texi
154 section.texi: s-section
156 s-syms: $(MKDOC) $(srcdir)/../syms.c $(srcdir)/doc.str
157 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../syms.c >syms.tmp
158 $(srcdir)/../../move-if-change syms.tmp syms.texi
162 s-targets: $(MKDOC) $(srcdir)/../targets.c $(srcdir)/doc.str
163 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../targets.c >targets.tmp
164 $(srcdir)/../../move-if-change targets.tmp targets.texi
166 targets.texi: s-targets
168 s-init: $(MKDOC) $(srcdir)/../init.c $(srcdir)/doc.str
169 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../init.c >init.tmp
170 $(srcdir)/../../move-if-change init.tmp init.texi
174 s-hash: $(MKDOC) $(srcdir)/../hash.c $(srcdir)/doc.str
175 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../hash.c >hash.tmp
176 $(srcdir)/../../move-if-change hash.tmp hash.texi
180 s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
181 ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../linker.c >linker.tmp
182 $(srcdir)/../../move-if-change linker.tmp linker.texi
184 linker.texi: s-linker
186 LIBBFD_H_DEP = $(srcdir)/../libbfd-in.h \
187 $(srcdir)/../init.c \
188 $(srcdir)/../libbfd.c \
189 $(srcdir)/../cache.c \
190 $(srcdir)/../reloc.c \
191 $(srcdir)/../archures.c \
193 $(srcdir)/header.sed \
194 $(srcdir)/proto.str \
197 libbfd.h: $(LIBBFD_H_DEP)
198 echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
199 for file in $(LIBBFD_H_DEP); do \
201 *-in.h) cat $$file >> $@ ;; \
202 */header.sed) break ;; \
203 *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
207 LIBCOFF_H_DEP = $(srcdir)/../libcoff-in.h \
208 $(srcdir)/../coffcode.h \
209 $(srcdir)/header.sed \
210 $(srcdir)/proto.str \
213 libcoff.h: $(LIBCOFF_H_DEP)
214 echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@
215 for file in $(LIBCOFF_H_DEP); do \
217 *-in.h) cat $$file >> $@ ;; \
218 */header.sed) break ;; \
219 *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
223 BFD_H_DEP = $(srcdir)/../bfd-in.h \
224 $(srcdir)/../init.c \
225 $(srcdir)/../opncls.c \
226 $(srcdir)/../libbfd.c \
227 $(srcdir)/../section.c \
228 $(srcdir)/../archures.c \
229 $(srcdir)/../reloc.c \
230 $(srcdir)/../syms.c \
232 $(srcdir)/../archive.c \
233 $(srcdir)/../corefile.c \
234 $(srcdir)/../targets.c \
235 $(srcdir)/../format.c \
236 $(srcdir)/header.sed \
237 $(srcdir)/proto.str \
241 echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
242 for file in $(BFD_H_DEP); do \
244 *-in.h) cat $$file >> $@ ;; \
245 */header.sed) break ;; \
246 *) ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
249 echo "#ifdef __cplusplus" >> $@
254 noinst_TEXINFOS = bfdint.texi
256 MOSTLYCLEANFILES = $(MKDOC) *.o
258 CLEANFILES = s-* *.p *.ip
260 DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
262 MAINTAINERCLEANFILES = $(DOCFILES)