1 # Makefile template for Configure for the BFD library.
2 # Copyright (C) 1990-1991 Free Software Foundation, Inc.
3 # Written by Cygnus Support.
5 # This file is part of BFD, the Binary File Descriptor library.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 libdir = $(destdir
)/lib
26 docdir
= $(srcdir)/doc
31 INCDIR
= $(srcdir)/..
/include
36 #### host and target dependent Makefile fragments come in here.
40 CFLAGS
= -g
$(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) # -DINTEL960VERSION
43 BFD_LIBS
= libbfd.o opncls.o bfd.o archive.o targets.o cache.o \
44 archures.o core.o section.o format.o syms.o reloc.o
46 BFD_BACKENDS
= oasys.o ieee.o srec.o \
47 aout64.o aout32.o demo64.o sunos.o newsos3.o bout.o \
48 icoff.o amdcoff.o m68kcoff.o i386coff.o m88k-bcs.o ecoff.o
50 OPTIONAL_BACKENDS
= trad-core.o
53 SYSDEP_H
=$(INCDIR
)/sysdep.h
55 # C source files that correspond to .o's.
56 CFILES
= libbfd.c opncls.c bfd.c archive.c targets.c cache.c archures.c \
57 i386coff.c aout64.c aout32.c sunos.c demo64.c icoff.c srec.c \
58 oasys.c ieee.c m68kcoff.c amdcoff.c \
59 format.c section.c core.c syms.c reloc.c \
60 m88k-bcs.c ecoff.c trad-core.c newsos3.c bout.c
62 STAGESTUFF
= $(TARGETLIB
) $(OFILES
)
66 # XDEPFILES comes from the host config; TDEPFILES from the target config.
67 OFILES
= $(BFD_LIBS
) $(BFD_BACKENDS
) $(XDEPFILES
) $(TDEPFILES
)
69 $(TARGETLIB
): $(OFILES
)
71 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
)
72 $(RANLIB
) $(TARGETLIB
)
76 - mv
-f
$(STAGESTUFF
) stage1
80 - mv
-f
$(STAGESTUFF
) stage2
84 - mv
-f
$(STAGESTUFF
) stage3
89 for i in
*.o
; do cmp
$$i $(against
)/$$i || exit
1 ; done
92 - (cd stage1
; mv
-f
$(STAGESTUFF
) ..
)
96 - (cd stage2
; mv
-f
$(STAGESTUFF
) ..
)
100 - (cd stage3
; mv
-f
$(STAGESTUFF
) ..
)
106 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
109 rm -f
*.
[oa
] *~ core
*.E
*.p
*.ip
111 clobber realclean: clean
114 $(BFD_LIBS
) $(BFD_BACKENDS
) $(OPTIONAL_BACKENDS
): libbfd.h
$(BFD_H
)
117 #suppress 65 on bfd_map_over_sections
118 #suppress 66 on bfd_map_over_sections
119 #suppress 67 on bfd_map_over_sections
120 #suppress 68 on bfd_map_over_sections
121 #suppress 69 on bfd_map_over_sections
122 #suppress 70 on bfd_map_over_sections
123 #suppress 110 in bfd_map_over_sections
124 #suppress 112 in bfd_map_over_sections
126 #suppress 590 in swap_exec_header
127 #suppress 590 in _bfd_dummy_core_file_matches_executable_p
128 #suppress 590 in bfd_dont_truncate_arname
129 #suppress 590 on ignore
130 #suppress 590 on abfd
131 #setopt load_flags $(CFLAGS)
135 #-----------------------------------------------------------------------------
136 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
138 # 'VERSION' file must be present and contain a string of the form "x.y"
139 #-----------------------------------------------------------------------------
143 echo
"char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
146 # This target should be invoked before building a new release.
147 # 'VERSION' file must be present and contain a string of the form "x.y"
151 MAJ
=`sed 's/\..*//' VERSION` ; \
152 MIN
=`sed 's/.*\.//' VERSION` ; \
153 V
=$$MAJ.
`expr $$MIN + 1` ; \
155 echo
$$V >VERSION
; \
158 # Dummy target to force execution of dependent targets.
163 install -c libbfd.a
$(libdir)
164 $(RANLIB
) $(libdir)/libbfd.a
166 # Target to uncomment host-specific lines in this makefile. Such lines must
167 # have the following string beginning in column 1: #__<hostname>__#
168 # Original Makefile is backed up as 'Makefile.old'.
170 # Invoke with: make make HOST=xxx
173 -@if
test $(HOST
)x
= x
; then \
174 echo
'\aSpecify "make make HOST=???"'; \
177 grep
-s
"^#The next line was generated by 'make make'" Makefile
; \
178 if
test $$?
= 0 ; then \
179 echo
"\aMakefile has already been processed with 'make make'";\
182 mv
-f Makefile Makefile.old
; \
183 echo
"#The next line was generated by 'make make'" >Makefile
; \
184 echo
"HOST=$(HOST)" >>Makefile
; \
186 sed
"s/^#__$(HOST)__#//" < Makefile.old
>>Makefile
188 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure
190 .
/configure
+norecurse \
191 +destdir
=$(destdir
) \
192 `if [ "$(srcdir)" != "." ] ; then echo +subdirs; fi` \
193 $(host
) +target
=$(target
);)
201 cp
$(srcdir)/bfd-in.h
$(docdir
)
202 cp
$(srcdir)/libbfd-in.h
$(docdir
)
203 cp
$(srcdir)/libcoff-in.h
$(docdir
)
204 (cd
$(docdir
); $(MAKE
) protos
)
205 # Rebuild prototypes in bfd.h
206 cp
$(docdir
)/bfd.h
$(BFD_H
)
207 cp
$(docdir
)/libbfd.h
$(srcdir)/libbfd.h
208 cp
$(docdir
)/libcoff.h
$(srcdir)/libcoff.h
211 ( cd
$(docdir
); $(MAKE
) bfd.
info)
214 (cd
$(docdir
); $(MAKE
) bfd.
dvi)
217 (cd
$(docdir
); $(MAKE
) bfd.ps
)
219 # What appears below is generated by a hacked mkdep using gcc -MM.
221 # DO NOT DELETE THIS LINE -- mkdep uses it.
222 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
224 libbfd.o
: libbfd.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h
225 opncls.o
: opncls.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h
226 bfd.o
: bfd.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h
227 archive.o
: archive.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h \
228 ..
/include/ar.h ..
/include/ranlib.h
229 targets.o
: targets.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h
230 cache.o
: cache.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h
231 archures.o
: archures.c ..
/include/bfd.h ..
/include/obstack.h
232 i386coff.o
: i386coff.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h \
233 ..
/include/i386coff.h ..
/include/internalcoff.h libcoff.h coffcode.h
235 aout32.o
: aout32.c aoutx.h ..
/include/bfd.h ..
/include/ansidecl.h \
236 ..
/include/obstack.h libaout.h libbfd.h ..
/include/aout64.h \
237 ..
/include/stab.gnu.h ..
/include/stab.def ..
/include/ar.h
238 sunos.o
: sunos.c aoutf1.h ..
/include/bfd.h ..
/include/obstack.h \
239 libaout.h libbfd.h ..
/include/aout64.h ..
/include/stab.gnu.h \
240 ..
/include/stab.def ..
/include/ar.h
242 icoff.o
: icoff.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h \
243 ..
/include/intel-coff.h ..
/include/internalcoff.h libcoff.h coffcode.h
244 srec.o
: srec.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h
245 oasys.o
: oasys.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h \
246 ..
/include/oasys.h liboasys.h
247 ieee.o
: ieee.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h \
248 ..
/include/ieee.h libieee.h
249 m68kcoff.o
: m68kcoff.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h \
250 ..
/include/m68kcoff.h ..
/include/internalcoff.h libcoff.h coffcode.h
251 amdcoff.o
: amdcoff.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h \
252 ..
/include/amdcoff.h ..
/include/internalcoff.h libcoff.h coffcode.h
253 format.o
: format.c ..
/include/sysdep.h ..
/include/bfd.h \
254 ..
/include/obstack.h libbfd.h
255 section.o
: section.c ..
/include/sysdep.h ..
/include/bfd.h \
256 ..
/include/obstack.h libbfd.h
257 core.o
: core.c ..
/include/sysdep.h ..
/include/bfd.h \
258 ..
/include/obstack.h libbfd.h
259 syms.o
: syms.c ..
/include/sysdep.h ..
/include/bfd.h \
260 ..
/include/obstack.h libbfd.h
261 reloc.o
: reloc.c ..
/include/sysdep.h ..
/include/bfd.h \
262 ..
/include/obstack.h libbfd.h
263 m88k-bcs.o
: m88k-bcs.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h \
264 ..
/include/m88k-bcs.h ..
/include/internalcoff.h libcoff.h coffcode.h
265 ecoff.o
: ecoff.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h \
266 ..
/include/ecoff.h ..
/include/internalcoff.h libcoff.h trad-core.h \
268 trad-core.o
: trad-core.c ..
/include/bfd.h ..
/include/obstack.h \
270 newsos3.o
: newsos3.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h \
271 ..
/include/aout64.h ..
/include/stab.gnu.h ..
/include/stab.def \
272 ..
/include/ar.h libaout.h
273 bout.o
: bout.c ..
/include/bfd.h ..
/include/obstack.h libbfd.h \
274 ..
/include/bout.h ..
/include/stab.gnu.h ..
/include/stab.def libaout.h
276 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY