]>
Commit | Line | Data |
---|---|---|
3c8a3c56 | 1 | # Makefile template for Configure for the BFD library. |
a26878d1 | 2 | # Copyright (C) 1990, 1991 Free Software Foundation, Inc. |
3c8a3c56 JG |
3 | # Written by Cygnus Support. |
4 | # | |
5 | # This file is part of BFD, the Binary File Descriptor library. | |
6 | # | |
7 | # This program is free software; you can redistribute it and/or modify | |
99a42820 | 8 | # it under the terms of the GNU General Public License as published by |
3c8a3c56 JG |
9 | # the Free Software Foundation; either version 2 of the License, or |
10 | # (at your option) any later version. | |
11 | # | |
12 | # This program is distributed in the hope that it will be useful, | |
99a42820 RP |
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. | |
3c8a3c56 | 16 | # |
99a42820 | 17 | # You should have received a copy of the GNU General Public License |
3c8a3c56 JG |
18 | # along with this program; if not, write to the Free Software |
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
99a42820 RP |
20 | |
21 | # $Id$ | |
22 | ||
23 | srcdir = . | |
6f715d66 SC |
24 | destdir = /usr/local |
25 | libdir = $(destdir)/lib | |
12e7087f | 26 | docdir = $(srcdir)/doc |
99a42820 RP |
27 | |
28 | RANLIB = ranlib | |
1b494bfa RP |
29 | AR = ar |
30 | AR_FLAGS = clq | |
d6a554ae | 31 | INCDIR = $(srcdir)/../include |
99a42820 | 32 | CSEARCH = -I$(INCDIR) |
a5c6b4b3 | 33 | DEP = mkdep |
12e7087f JG |
34 | |
35 | ||
99a42820 | 36 | #### host and target dependent Makefile fragments come in here. |
99a42820 RP |
37 | ### |
38 | ||
5176a6bc RP |
39 | TARGETLIB = libbfd.a |
40 | CFLAGS = -g $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) # -DINTEL960VERSION | |
99a42820 RP |
41 | |
42 | ||
726cc6ef | 43 | BFD_LIBS = libbfd.o opncls.o bfd.o archive.o targets.o cache.o \ |
6f715d66 | 44 | archures.o core.o section.o format.o syms.o reloc.o |
99a42820 | 45 | |
3c8a3c56 JG |
46 | BFD_BACKENDS = oasys.o ieee.o srec.o \ |
47 | aout64.o aout32.o demo64.o sunos.o newsos3.o bout.o \ | |
c6e7b0ed JG |
48 | icoff.o amdcoff.o m68kcoff.o i386coff.o m88k-bcs.o ecoff.o |
49 | ||
50 | OPTIONAL_BACKENDS = trad-core.o | |
99a42820 RP |
51 | |
52 | BFD_H=$(INCDIR)/bfd.h | |
53 | SYSDEP_H=$(INCDIR)/sysdep.h | |
54 | ||
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 \ | |
6f715d66 | 57 | i386coff.c aout64.c aout32.c sunos.c demo64.c icoff.c srec.c \ |
3c8a3c56 JG |
58 | oasys.c ieee.c m68kcoff.c amdcoff.c \ |
59 | format.c section.c core.c syms.c reloc.c \ | |
87059abb | 60 | m88k-bcs.c ecoff.c trad-core.c newsos3.c bout.c |
99a42820 | 61 | |
5176a6bc RP |
62 | STAGESTUFF = $(TARGETLIB) $(OFILES) |
63 | ||
64 | all: $(TARGETLIB) | |
65 | ||
c0e5039e JG |
66 | # XDEPFILES comes from the host config; TDEPFILES from the target config. |
67 | OFILES = $(BFD_LIBS) $(BFD_BACKENDS) $(XDEPFILES) $(TDEPFILES) | |
5176a6bc RP |
68 | |
69 | $(TARGETLIB): $(OFILES) | |
70 | rm -f $(TARGETLIB) | |
1b494bfa RP |
71 | $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES) |
72 | $(RANLIB) $(TARGETLIB) | |
5176a6bc RP |
73 | |
74 | stage1: force | |
75 | - mkdir stage1 | |
76 | - mv -f $(STAGESTUFF) stage1 | |
77 | ||
78 | stage2: force | |
79 | - mkdir stage2 | |
80 | - mv -f $(STAGESTUFF) stage2 | |
81 | ||
82 | stage3: force | |
83 | - mkdir stage3 | |
84 | - mv -f $(STAGESTUFF) stage3 | |
85 | ||
a01bf1fb RP |
86 | against=stage2 |
87 | ||
88 | comparison: force | |
89 | for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done | |
90 | ||
5176a6bc RP |
91 | de-stage1: force |
92 | - (cd stage1 ; mv -f $(STAGESTUFF) ..) | |
93 | - rmdir stage1 | |
99a42820 | 94 | |
5176a6bc RP |
95 | de-stage2: force |
96 | - (cd stage2 ; mv -f $(STAGESTUFF) ..) | |
97 | - rmdir stage2 | |
99a42820 | 98 | |
5176a6bc RP |
99 | de-stage3: force |
100 | - (cd stage3 ; mv -f $(STAGESTUFF) ..) | |
101 | - rmdir stage3 | |
99a42820 RP |
102 | |
103 | tags etags: TAGS | |
104 | ||
5176a6bc | 105 | TAGS: force |
453063fe | 106 | etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c |
99a42820 RP |
107 | |
108 | clean: | |
3a26c0cd | 109 | rm -f *.[oa] *~ core *.E *.p *.ip |
99a42820 RP |
110 | |
111 | clobber realclean: clean | |
112 | rm -f libbfd.a TAGS | |
113 | ||
c6e7b0ed | 114 | $(BFD_LIBS) $(BFD_BACKENDS) $(OPTIONAL_BACKENDS): libbfd.h $(BFD_H) |
99a42820 RP |
115 | |
116 | saber: | |
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 | |
125 | #suppress 530 | |
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) | |
132 | #load $(CFILES) | |
a5c6b4b3 | 133 | |
99a42820 RP |
134 | |
135 | #----------------------------------------------------------------------------- | |
136 | # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT | |
137 | # | |
138 | # 'VERSION' file must be present and contain a string of the form "x.y" | |
139 | #----------------------------------------------------------------------------- | |
140 | ||
141 | ver960.c: FORCE | |
142 | rm -f ver960.c | |
143 | echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c | |
144 | ||
145 | ||
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" | |
148 | # | |
149 | roll: | |
150 | @V=`cat VERSION` ; \ | |
151 | MAJ=`sed 's/\..*//' VERSION` ; \ | |
152 | MIN=`sed 's/.*\.//' VERSION` ; \ | |
153 | V=$$MAJ.`expr $$MIN + 1` ; \ | |
154 | rm -f VERSION ; \ | |
155 | echo $$V >VERSION ; \ | |
156 | echo Version $$V | |
157 | ||
158 | # Dummy target to force execution of dependent targets. | |
159 | # | |
5176a6bc | 160 | force: |
99a42820 | 161 | |
99a42820 | 162 | install: |
6f715d66 SC |
163 | install -c libbfd.a $(libdir) |
164 | $(RANLIB) $(libdir)/libbfd.a | |
99a42820 RP |
165 | |
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'. | |
169 | # | |
170 | # Invoke with: make make HOST=xxx | |
171 | # | |
172 | make: | |
173 | -@if test $(HOST)x = x ; then \ | |
174 | echo '\aSpecify "make make HOST=???"'; \ | |
175 | exit 1; \ | |
176 | fi ; \ | |
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'";\ | |
180 | exit 1; \ | |
181 | fi ; \ | |
182 | mv -f Makefile Makefile.old; \ | |
183 | echo "#The next line was generated by 'make make'" >Makefile ; \ | |
184 | echo "HOST=$(HOST)" >>Makefile ; \ | |
185 | echo >>Makefile ; \ | |
186 | sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile | |
187 | ||
a26878d1 RP |
188 | Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(host_makefile_frag) $(target_makefile_frag) |
189 | $(SHELL) ./config.status | |
a5c6b4b3 SC |
190 | |
191 | dep: $(CFILES) | |
192 | mkdep $(CFLAGS) $? | |
6f715d66 SC |
193 | |
194 | ||
6f715d66 | 195 | |
12e7087f JG |
196 | headers: |
197 | cp $(srcdir)/bfd-in.h $(docdir) | |
198 | cp $(srcdir)/libbfd-in.h $(docdir) | |
199 | cp $(srcdir)/libcoff-in.h $(docdir) | |
b5493bc4 | 200 | (cd $(docdir); $(MAKE) protos) |
6f715d66 | 201 | # Rebuild prototypes in bfd.h |
12e7087f JG |
202 | cp $(docdir)/bfd.h $(BFD_H) |
203 | cp $(docdir)/libbfd.h $(srcdir)/libbfd.h | |
204 | cp $(docdir)/libcoff.h $(srcdir)/libcoff.h | |
205 | ||
206 | bfd.info: | |
b5493bc4 | 207 | ( cd $(docdir); $(MAKE) bfd.info) |
12e7087f JG |
208 | |
209 | bfd.dvi: | |
b5493bc4 | 210 | (cd $(docdir); $(MAKE) bfd.dvi) |
12e7087f JG |
211 | |
212 | bfd.ps: | |
b5493bc4 | 213 | (cd $(docdir); $(MAKE) bfd.ps) |
12e7087f JG |
214 | |
215 | # What appears below is generated by a hacked mkdep using gcc -MM. | |
216 | ||
217 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
218 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
219 | ||
a26878d1 RP |
220 | libbfd.o : libbfd.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h |
221 | opncls.o : opncls.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h | |
222 | bfd.o : bfd.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h | |
223 | archive.o : archive.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ | |
224 | $(INCDIR)/ar.h $(INCDIR)/ranlib.h | |
225 | targets.o : targets.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h | |
226 | cache.o : cache.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h | |
227 | archures.o : archures.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h | |
228 | i386coff.o : i386coff.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ | |
229 | $(INCDIR)/i386coff.h $(INCDIR)/internalcoff.h libcoff.h coffcode.h | |
12e7087f | 230 | aout64.o : aout64.c |
a26878d1 RP |
231 | aout32.o : aout32.c aoutx.h $(INCDIR)/bfd.h $(INCDIR)/ansidecl.h \ |
232 | $(INCDIR)/obstack.h libaout.h libbfd.h $(INCDIR)/aout64.h \ | |
233 | $(INCDIR)/stab.gnu.h $(INCDIR)/stab.def $(INCDIR)/ar.h | |
234 | sunos.o : sunos.c aoutf1.h $(INCDIR)/bfd.h $(INCDIR)/obstack.h \ | |
235 | libaout.h libbfd.h $(INCDIR)/aout64.h $(INCDIR)/stab.gnu.h \ | |
236 | $(INCDIR)/stab.def $(INCDIR)/ar.h | |
12e7087f | 237 | demo64.o : demo64.c |
a26878d1 RP |
238 | icoff.o : icoff.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ |
239 | $(INCDIR)/intel-coff.h $(INCDIR)/internalcoff.h libcoff.h coffcode.h | |
240 | srec.o : srec.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h | |
241 | oasys.o : oasys.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ | |
242 | $(INCDIR)/oasys.h liboasys.h | |
243 | ieee.o : ieee.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ | |
244 | $(INCDIR)/ieee.h libieee.h | |
245 | m68kcoff.o : m68kcoff.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ | |
246 | $(INCDIR)/m68kcoff.h $(INCDIR)/internalcoff.h libcoff.h coffcode.h | |
247 | amdcoff.o : amdcoff.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ | |
248 | $(INCDIR)/amdcoff.h $(INCDIR)/internalcoff.h libcoff.h coffcode.h | |
249 | format.o : format.c $(INCDIR)/sysdep.h $(INCDIR)/bfd.h \ | |
250 | $(INCDIR)/obstack.h libbfd.h | |
251 | section.o : section.c $(INCDIR)/sysdep.h $(INCDIR)/bfd.h \ | |
252 | $(INCDIR)/obstack.h libbfd.h | |
253 | core.o : core.c $(INCDIR)/sysdep.h $(INCDIR)/bfd.h \ | |
254 | $(INCDIR)/obstack.h libbfd.h | |
255 | syms.o : syms.c $(INCDIR)/sysdep.h $(INCDIR)/bfd.h \ | |
256 | $(INCDIR)/obstack.h libbfd.h | |
257 | reloc.o : reloc.c $(INCDIR)/sysdep.h $(INCDIR)/bfd.h \ | |
258 | $(INCDIR)/obstack.h libbfd.h | |
259 | m88k-bcs.o : m88k-bcs.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ | |
260 | $(INCDIR)/m88k-bcs.h $(INCDIR)/internalcoff.h libcoff.h coffcode.h | |
261 | ecoff.o : ecoff.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ | |
262 | $(INCDIR)/ecoff.h $(INCDIR)/internalcoff.h libcoff.h trad-core.h \ | |
12e7087f | 263 | coffcode.h |
a26878d1 | 264 | trad-core.o : trad-core.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h \ |
12e7087f | 265 | libbfd.h libaout.h |
a26878d1 RP |
266 | newsos3.o : newsos3.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ |
267 | $(INCDIR)/aout64.h $(INCDIR)/stab.gnu.h $(INCDIR)/stab.def \ | |
268 | $(INCDIR)/ar.h libaout.h | |
269 | bout.o : bout.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ | |
270 | $(INCDIR)/bout.h $(INCDIR)/stab.gnu.h $(INCDIR)/stab.def libaout.h | |
12e7087f JG |
271 | |
272 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY | |
a26878d1 | 273 |