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
30 INCDIR
= $(srcdir)/..
/include
33 #### host and target dependent Makefile fragments come in here.
37 CFLAGS
= -g
$(HDEFINES
) $(TDEFINES
) $(CSEARCH
) $(CSWITCHES
) # -DINTEL960VERSION
40 BFD_LIBS
= libbfd.o opncls.o bfd.o archive.o targets.o cache.o \
41 archures.o core.o section.o format.o syms.o reloc.o
43 BFD_BACKENDS
= oasys.o ieee.o srec.o \
44 aout64.o aout32.o demo64.o sunos.o newsos3.o bout.o \
45 icoff.o amdcoff.o m68kcoff.o i386coff.o m88k-bcs.o ecoff.o
47 OPTIONAL_BACKENDS
= trad-core.o
50 SYSDEP_H
=$(INCDIR
)/sysdep.h
52 # C source files that correspond to .o's.
53 CFILES
= libbfd.c opncls.c bfd.c archive.c targets.c cache.c archures.c \
54 i386coff.c aout64.c aout32.c sunos.c demo64.c icoff.c srec.c \
55 oasys.c ieee.c m68kcoff.c amdcoff.c \
56 format.c section.c core.c syms.c reloc.c \
57 m88k-bcs.c ecoff.c trad-core.c newsos3.c bout.c
59 STAGESTUFF
= $(TARGETLIB
) $(OFILES
)
63 # XDEPFILES comes from the host config; TDEPFILES from the target config.
64 OFILES
= $(BFD_LIBS
) $(BFD_BACKENDS
) $(XDEPFILES
) $(TDEPFILES
)
66 $(TARGETLIB
): $(OFILES
)
68 $(AR
) $(AR_FLAGS
) $(TARGETLIB
) $(OFILES
)
69 $(RANLIB
) $(TARGETLIB
)
73 - mv
-f
$(STAGESTUFF
) stage1
77 - mv
-f
$(STAGESTUFF
) stage2
81 - mv
-f
$(STAGESTUFF
) stage3
86 for i in
*.o
; do cmp
$$i $(against
)/$$i || exit
1 ; done
89 - (cd stage1
; mv
-f
$(STAGESTUFF
) ..
)
93 - (cd stage2
; mv
-f
$(STAGESTUFF
) ..
)
97 - (cd stage3
; mv
-f
$(STAGESTUFF
) ..
)
103 etags
$(INCDIR
)/*.h
$(srcdir)/*.h
$(srcdir)/*.c
106 rm -f
*.
[oa
] *~ core
*.E
*.p
*.ip
108 clobber realclean: clean
111 $(BFD_LIBS
) $(BFD_BACKENDS
) $(OPTIONAL_BACKENDS
): libbfd.h
$(BFD_H
)
114 #suppress 65 on bfd_map_over_sections
115 #suppress 66 on bfd_map_over_sections
116 #suppress 67 on bfd_map_over_sections
117 #suppress 68 on bfd_map_over_sections
118 #suppress 69 on bfd_map_over_sections
119 #suppress 70 on bfd_map_over_sections
120 #suppress 110 in bfd_map_over_sections
121 #suppress 112 in bfd_map_over_sections
123 #suppress 590 in swap_exec_header
124 #suppress 590 in _bfd_dummy_core_file_matches_executable_p
125 #suppress 590 in bfd_dont_truncate_arname
126 #suppress 590 on ignore
127 #suppress 590 on abfd
128 #setopt load_flags $(CFLAGS)
132 #-----------------------------------------------------------------------------
133 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
135 # 'VERSION' file must be present and contain a string of the form "x.y"
136 #-----------------------------------------------------------------------------
140 echo
"char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
143 # This target should be invoked before building a new release.
144 # 'VERSION' file must be present and contain a string of the form "x.y"
148 MAJ
=`sed 's/\..*//' VERSION` ; \
149 MIN
=`sed 's/.*\.//' VERSION` ; \
150 V
=$$MAJ.
`expr $$MIN + 1` ; \
152 echo
$$V >VERSION
; \
155 # Dummy target to force execution of dependent targets.
160 install -c libbfd.a
$(libdir)
161 $(RANLIB
) $(libdir)/libbfd.a
163 # Target to uncomment host-specific lines in this makefile. Such lines must
164 # have the following string beginning in column 1: #__<hostname>__#
165 # Original Makefile is backed up as 'Makefile.old'.
167 # Invoke with: make make HOST=xxx
170 -@if
test $(HOST
)x
= x
; then \
171 echo
'\aSpecify "make make HOST=???"'; \
174 grep
-s
"^#The next line was generated by 'make make'" Makefile
; \
175 if
test $$?
= 0 ; then \
176 echo
"\aMakefile has already been processed with 'make make'";\
179 mv
-f Makefile Makefile.old
; \
180 echo
"#The next line was generated by 'make make'" >Makefile
; \
181 echo
"HOST=$(HOST)" >>Makefile
; \
183 sed
"s/^#__$(HOST)__#//" < Makefile.old
>>Makefile
185 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure
187 .
/configure
+norecurse \
188 +destdir
=$(destdir
) \
189 `if [ "$(srcdir)" != "." ] ; then echo +subdirs; fi` \
190 $(host
) +target
=$(target
);)
196 # Stuff to make the documentation for bfd.
199 # rebuilds the documentation. Has to be done when the source is
200 # modified until I work out how to do this properly
203 # rebuilds the header files from the source
206 # rebuilds the bfd.dvi manual
209 # rebuilds the bfdinfo manual
212 .SUFFIXES
: .texi .o .c .h .p .ip
232 docs
: syms.texi bfd.texi cache.texi format.texi section.texi \
233 archive.texi core.texi libbfd.texi archures.texi reloc.texi \
234 opncls.texi targets.texi aoutx.texi coffcode.texi
237 PROTOS
= opncls.p archures.p libbfd.p section.p syms.p bfd.p \
238 archive.p reloc.p targets.p format.p coffcode.p core.p
240 IPROTOS
= libbfd.ip cache.ip
242 headers
: $(PROTOS
) $(IPROTOS
)
243 # Rebuild prototypes in bfd.h
244 mv
$(BFD_H
) $(BFD_H
).old
245 sed
-f
$(srcdir)/intobfd
$(BFD_H
).old
> $(BFD_H
)
247 mv
$(srcdir)/libbfd.h libbfd.h.old
248 sed
-f
$(srcdir)/tolibbfd libbfd.h.old
>$(srcdir)/libbfd.h
250 mv
$(srcdir)/libcoff.h libcoff.h.old
251 sed
-f
$(srcdir)/tolibcoff libcoff.h.old
>$(srcdir)/libcoff.h
255 makeinfo +no-validate bfd.texinfo
263 dvips
-f bfd.
dvi >bfd.texi.ps
265 quickdoc
: $(DSRC
) docs