Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | ## Process this file with automake to generate Makefile.in |
2 | ||
556274f9 | 3 | AUTOMAKE_OPTIONS = dejagnu no-dist foreign |
79887925 | 4 | ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd |
252b5132 | 5 | |
c45021f2 | 6 | SUBDIRS = doc po |
252b5132 RH |
7 | |
8 | tooldir = $(exec_prefix)/$(target_alias) | |
9 | ||
10 | ## These aren't set by automake, because they appear in | |
11 | ## bfd/acinclude.m4, which is included by binutils/acinclude.m4, and | |
12 | ## thus is not seen by automake. | |
13 | CC_FOR_BUILD = @CC_FOR_BUILD@ | |
14 | EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ | |
15 | ||
7a7b06ef | 16 | YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi` |
252b5132 | 17 | YFLAGS = -d |
7a7b06ef | 18 | LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` |
252b5132 | 19 | |
a15af8e2 RW |
20 | # Automake 1.10+ disables lex and yacc output file regeneration if |
21 | # maintainer mode is disabled. Avoid this. | |
22 | am__skiplex = | |
23 | am__skipyacc = | |
24 | ||
a2d91340 | 25 | WARN_CFLAGS = @WARN_CFLAGS@ |
9e9b66a9 | 26 | NO_WERROR = @NO_WERROR@ |
a2d91340 | 27 | AM_CFLAGS = $(WARN_CFLAGS) |
5ba684e2 | 28 | LIBICONV = @LIBICONV@ |
a2d91340 | 29 | |
252b5132 RH |
30 | # these two are almost the same program |
31 | AR_PROG=ar | |
32 | RANLIB_PROG=ranlib | |
33 | ||
34 | # objcopy and strip should be the same program | |
35 | OBJCOPY_PROG=objcopy | |
36 | STRIP_PROG=strip-new | |
37 | ||
38 | STRINGS_PROG=strings | |
39 | ||
40 | READELF_PROG=readelf | |
41 | ||
30fd33bb L |
42 | ELFEDIT_PROG=elfedit |
43 | ||
252b5132 RH |
44 | # These should all be the same program too. |
45 | SIZE_PROG=size | |
46 | NM_PROG=nm-new | |
47 | OBJDUMP_PROG=objdump | |
48 | ||
49 | # This is the demangler, as a standalone program. | |
50 | # Note: This one is used as the installed name too, unlike the above. | |
8a965946 | 51 | DEMANGLER_PROG=cxxfilt |
252b5132 RH |
52 | |
53 | ADDR2LINE_PROG=addr2line | |
54 | ||
55 | NLMCONV_PROG=nlmconv | |
56 | DLLTOOL_PROG=dlltool | |
57 | WINDRES_PROG=windres | |
692ed3e7 | 58 | WINDMC_PROG=windmc |
252b5132 RH |
59 | DLLWRAP_PROG=dllwrap |
60 | ||
8b42747f | 61 | SRCONV_PROG=srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT) |
252b5132 | 62 | |
30fd33bb | 63 | bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ @BUILD_WINDMC@ $(ADDR2LINE_PROG) $(READELF_PROG) $(ELFEDIT_PROG) @BUILD_DLLWRAP@ @BUILD_INSTALL_MISC@ |
252b5132 | 64 | |
8a965946 ILT |
65 | ## We need a special rule to install the programs which are built with |
66 | ## -new, and to rename cxxfilt to c++filt. | |
b125d98b AM |
67 | RENAMED_PROGS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG) |
68 | noinst_PROGRAMS = $(RENAMED_PROGS) @BUILD_MISC@ | |
252b5132 | 69 | |
692ed3e7 | 70 | EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(WINDMC_PROG) $(DLLWRAP_PROG) |
252b5132 | 71 | |
eb1e0e80 | 72 | # Stuff that goes in tooldir/ if appropriate. |
79e341d9 | 73 | TOOL_PROGS = nm-new strip-new ar ranlib dlltool objdump objcopy |
252b5132 RH |
74 | |
75 | BASEDIR = $(srcdir)/.. | |
76 | BFDDIR = $(BASEDIR)/bfd | |
77 | INCDIR = $(BASEDIR)/include | |
78 | ||
14ec8efd | 79 | AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \ |
eb1e0e80 | 80 | @HDEFINES@ \ |
20e95c23 | 81 | @INCINTL@ \ |
32118081 | 82 | -DLOCALEDIR="\"$(datadir)/locale\"" \ |
eb1e0e80 | 83 | -Dbin_dummy_emulation=$(EMULATION_VECTOR) |
252b5132 | 84 | |
a6637ec0 | 85 | HFILES = \ |
ed180cc5 | 86 | arsup.h binemul.h bucomm.h budbg.h \ |
3284fe0c | 87 | coffgrok.h debug.h dlltool.h dwarf.h elfcomm.h nlmconv.h \ |
f2bea866 | 88 | sysdep.h unwind-ia64.h windres.h winduni.h windint.h \ |
692ed3e7 | 89 | windmc.h |
252b5132 | 90 | |
692ed3e7 | 91 | GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h mcparse.h |
556274f9 | 92 | BUILT_SOURCES = $(GENERATED_HFILES) |
252b5132 | 93 | |
a6637ec0 | 94 | CFILES = \ |
ed180cc5 | 95 | addr2line.c ar.c arsup.c bin2c.c binemul.c bucomm.c \ |
19e6b90e L |
96 | coffdump.c coffgrok.c cxxfilt.c \ |
97 | dwarf.c debug.c dlltool.c dllwrap.c \ | |
3284fe0c | 98 | elfcomm.c emul_aix.c emul_vanilla.c filemode.c \ |
a6637ec0 AM |
99 | ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c \ |
100 | nlmconv.c nm.c not-ranlib.c not-strip.c \ | |
101 | objcopy.c objdump.c prdbg.c \ | |
4a594fce | 102 | rclex.c rdcoff.c rddbg.c readelf.c rename.c \ |
a6637ec0 | 103 | resbin.c rescoff.c resrc.c resres.c \ |
f2bea866 | 104 | size.c srconv.c stabs.c strings.c sysdump.c \ |
30fd33bb | 105 | unwind-ia64.c elfedit.c version.c \ |
692ed3e7 NC |
106 | windres.c winduni.c wrstabs.c \ |
107 | windmc.c mclex.c | |
252b5132 RH |
108 | |
109 | GENERATED_CFILES = \ | |
bb279dc0 | 110 | arparse.c arlex.c sysroff.c sysinfo.c syslex.c \ |
692ed3e7 | 111 | defparse.c deflex.c nlmheader.c rcparse.c mcparse.c |
252b5132 RH |
112 | |
113 | DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c | |
114 | WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c | |
115 | ||
116 | # Code shared by all the binutils. | |
117 | BULIBS = bucomm.c version.c filemode.c | |
118 | ||
3284fe0c L |
119 | # Code shared by the ELF related programs. |
120 | ELFLIBS = elfcomm.c | |
121 | ||
252b5132 RH |
122 | BFDLIB = ../bfd/libbfd.la |
123 | ||
124 | OPCODES = ../opcodes/libopcodes.la | |
125 | ||
126 | LIBIBERTY = ../libiberty/libiberty.a | |
127 | ||
128 | POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES) | |
129 | po/POTFILES.in: @MAINT@ Makefile | |
323ee3f4 | 130 | for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \ |
252b5132 RH |
131 | && mv tmp $(srcdir)/po/POTFILES.in |
132 | ||
c3298874 BE |
133 | EXPECT = expect |
134 | RUNTEST = runtest | |
252b5132 RH |
135 | |
136 | CC_FOR_TARGET = ` \ | |
137 | if [ -f $$r/../gcc/xgcc ] ; then \ | |
138 | if [ -f $$r/../newlib/Makefile ] ; then \ | |
139 | echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \ | |
140 | else \ | |
141 | echo $$r/../gcc/xgcc -B$$r/../gcc/; \ | |
142 | fi; \ | |
143 | else \ | |
144 | if [ "@host@" = "@target@" ] ; then \ | |
145 | echo $(CC); \ | |
146 | else \ | |
147 | echo gcc | sed '$(transform)'; \ | |
148 | fi; \ | |
149 | fi` | |
150 | ||
151 | check-DEJAGNU: site.exp | |
152 | srcdir=`cd $(srcdir) && pwd`; export srcdir; \ | |
153 | r=`pwd`; export r; \ | |
154 | EXPECT=$(EXPECT); export EXPECT; \ | |
252b5132 RH |
155 | runtest=$(RUNTEST); \ |
156 | if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ | |
16474668 NC |
157 | CC_FOR_TARGET="$(CC_FOR_TARGET)" CFLAGS_FOR_TARGET="$(CFLAGS)" \ |
158 | $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \ | |
159 | $(RUNTESTFLAGS); \ | |
252b5132 RH |
160 | else echo "WARNING: could not find \`runtest'" 1>&2; :;\ |
161 | fi | |
162 | ||
14ec8efd | 163 | installcheck-local: |
252b5132 RH |
164 | /bin/sh $(srcdir)/sanity.sh $(bindir) |
165 | ||
20e95c23 DJ |
166 | # There's no global DEPENDENCIES. So, we must explicitly list everything |
167 | # which depends on libintl, since we don't know whether LIBINTL_DEP will be | |
168 | # non-empty until configure time. Ugh! | |
8b42747f AM |
169 | size_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) |
170 | objdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) $(OPCODES) | |
171 | nm_new_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) | |
22a84b55 | 172 | ar_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) |
8b42747f AM |
173 | strings_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) |
174 | strip_new_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) | |
22a84b55 | 175 | ranlib_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) |
8b42747f AM |
176 | cxxfilt_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) |
177 | objcopy_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) | |
178 | nlmconv_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) | |
179 | srconv_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) | |
180 | sysdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) | |
181 | coffdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) | |
22a84b55 | 182 | dlltool_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) |
cd6a2ed0 NC |
183 | windres_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) |
184 | windmc_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) | |
8b42747f AM |
185 | addr2line_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) |
186 | readelf_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) | |
30fd33bb | 187 | elfedit_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) |
8b42747f | 188 | dllwrap_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) |
20e95c23 DJ |
189 | |
190 | LDADD = $(BFDLIB) $(LIBIBERTY) $(LIBINTL) | |
252b5132 RH |
191 | |
192 | size_SOURCES = size.c $(BULIBS) | |
193 | ||
194 | objcopy_SOURCES = objcopy.c not-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS) | |
195 | ||
196 | strings_SOURCES = strings.c $(BULIBS) | |
197 | ||
3284fe0c | 198 | readelf_SOURCES = readelf.c version.c unwind-ia64.c dwarf.c $(ELFLIBS) |
20e95c23 | 199 | readelf_LDADD = $(LIBINTL) $(LIBIBERTY) |
252b5132 | 200 | |
3284fe0c | 201 | elfedit_SOURCES = elfedit.c version.c $(ELFLIBS) |
30fd33bb L |
202 | elfedit_LDADD = $(LIBINTL) $(LIBIBERTY) |
203 | ||
252b5132 RH |
204 | strip_new_SOURCES = objcopy.c is-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS) |
205 | ||
ed180cc5 | 206 | nm_new_SOURCES = nm.c $(BULIBS) |
252b5132 | 207 | |
3284fe0c | 208 | objdump_SOURCES = objdump.c dwarf.c prdbg.c $(DEBUG_SRCS) $(BULIBS) $(ELFLIBS) |
20e95c23 | 209 | objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL) |
252b5132 | 210 | |
52a6ecd2 | 211 | objdump.@OBJEXT@:objdump.c |
556274f9 RW |
212 | if am__fastdepCC |
213 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(OBJDUMP_DEFS) $(srcdir)/objdump.c | |
214 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
215 | else | |
216 | if AMDEP | |
217 | source='objdump.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
218 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
219 | endif | |
8b1e6df3 | 220 | $(COMPILE) -c $(OBJDUMP_DEFS) $(srcdir)/objdump.c |
556274f9 | 221 | endif |
8b1e6df3 | 222 | |
bb279dc0 | 223 | cxxfilt_SOURCES = cxxfilt.c $(BULIBS) |
252b5132 | 224 | |
eb1e0e80 NC |
225 | ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c rename.c binemul.c \ |
226 | emul_$(EMULATION).c $(BULIBS) | |
556274f9 | 227 | EXTRA_ar_SOURCES = $(CFILES) |
20e95c23 | 228 | ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) |
252b5132 | 229 | |
eb1e0e80 NC |
230 | ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c rename.c \ |
231 | binemul.c emul_$(EMULATION).c $(BULIBS) | |
20e95c23 | 232 | ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) |
252b5132 | 233 | |
ed180cc5 | 234 | addr2line_SOURCES = addr2line.c $(BULIBS) |
252b5132 | 235 | |
41b49281 | 236 | # The following is commented out for the conversion to automake. |
252b5132 RH |
237 | # This rule creates a single binary that switches between ar and ranlib |
238 | # by looking at argv[0]. Use this kludge to save some disk space. | |
239 | # However, you have to install things by hand. | |
240 | # (That is after 'make install', replace the installed ranlib by a link to ar.) | |
241 | # Alternatively, you can install ranlib.sh as ranlib. | |
242 | # ar_with_ranlib: $(ADDL_DEPS) ar.o maybe-ranlib.o | |
243 | # $(HLDENV) $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(EXTRALIBS) | |
244 | # -rm -f $(RANLIB_PROG) | |
245 | # -ln $(AR_PROG) $(RANLIB_PROG) | |
246 | # | |
247 | # objcopy and strip in one binary that uses argv[0] to decide its action. | |
248 | # | |
249 | #objcopy_with_strip: $(ADDL_DEPS) objcopy.o maybe-strip.o | |
250 | # $(HLDENV) $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o maybe-strip.o $(ADDL_LIBS) $(EXTRALIBS) | |
251 | # -rm -f $(STRIP_PROG) | |
252 | # -ln $(OBJCOPY_PROG) $(STRIP_PROG) | |
253 | ||
8b42747f | 254 | sysroff.c: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info |
252b5132 RH |
255 | ./sysinfo$(EXEEXT_FOR_BUILD) -c <$(srcdir)/sysroff.info >sysroff.c |
256 | ./sysinfo$(EXEEXT_FOR_BUILD) -i <$(srcdir)/sysroff.info >>sysroff.c | |
257 | ./sysinfo$(EXEEXT_FOR_BUILD) -g <$(srcdir)/sysroff.info >>sysroff.c | |
258 | ||
259 | sysroff.h: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info | |
260 | ./sysinfo$(EXEEXT_FOR_BUILD) -d <$(srcdir)/sysroff.info >sysroff.h | |
261 | ||
52a6ecd2 NC |
262 | sysinfo$(EXEEXT_FOR_BUILD): sysinfo.@OBJEXT@ syslex.@OBJEXT@ |
263 | $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.@OBJEXT@ syslex.@OBJEXT@ | |
252b5132 | 264 | |
52a6ecd2 | 265 | syslex.@OBJEXT@: syslex.c sysinfo.h config.h |
252b5132 | 266 | if [ -r syslex.c ]; then \ |
6ee4cb2d | 267 | $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) syslex.c ; \ |
252b5132 | 268 | else \ |
6ee4cb2d | 269 | $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex.c ;\ |
252b5132 RH |
270 | fi |
271 | ||
52a6ecd2 | 272 | sysinfo.@OBJEXT@: sysinfo.c |
252b5132 | 273 | if [ -r sysinfo.c ]; then \ |
6ee4cb2d | 274 | $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \ |
252b5132 | 275 | else \ |
6ee4cb2d | 276 | $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \ |
252b5132 RH |
277 | fi |
278 | ||
9b585a95 AM |
279 | bin2c$(EXEEXT_FOR_BUILD): bin2c.c |
280 | $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c | |
1d97d67f | 281 | |
669a9a2a AM |
282 | embedspu: embedspu.sh |
283 | sed "s@^program_transform_name=@program_transform_name=$(program_transform_name)@" < $< > $@ | |
284 | chmod a+x $@ | |
285 | ||
41b49281 | 286 | # We need these for parallel make. |
41b49281 AM |
287 | sysinfo.h: sysinfo.c |
288 | ||
ceae3e33 | 289 | # Disable -Werror, if it has been enabled, since old versions of bison/ |
8b42747f | 290 | # yacc will produce working code which contain compile time warnings. |
52a6ecd2 | 291 | arparse.@OBJEXT@: arparse.c |
556274f9 | 292 | if am__fastdepCC |
7bb7d81f | 293 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f arparse.c || echo $(srcdir)/`arparse.c $(NO_WERROR) |
556274f9 RW |
294 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
295 | else | |
296 | if AMDEP | |
297 | source='arparse.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
298 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
299 | endif | |
7bb7d81f | 300 | $(COMPILE) -c `test -f arparse.c || echo $(srcdir)/`arparse.c $(NO_WERROR) |
556274f9 RW |
301 | endif |
302 | ||
52a6ecd2 | 303 | arlex.@OBJEXT@: arlex.c |
556274f9 | 304 | if am__fastdepCC |
7bb7d81f | 305 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f arlex.c || echo $(srcdir)/`arlex.c $(NO_WERROR) |
556274f9 RW |
306 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
307 | else | |
308 | if AMDEP | |
309 | source='arlex.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
310 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
311 | endif | |
7bb7d81f | 312 | $(COMPILE) -c `test -f arlex.c || echo $(srcdir)/`arlex.c $(NO_WERROR) |
556274f9 RW |
313 | endif |
314 | ||
52a6ecd2 | 315 | sysroff.@OBJEXT@: sysroff.c |
556274f9 | 316 | if am__fastdepCC |
7bb7d81f | 317 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f sysroff.c || echo $(srcdir)/`sysroff.c $(NO_WERROR) |
556274f9 RW |
318 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
319 | else | |
320 | if AMDEP | |
321 | source='sysroff.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
322 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
323 | endif | |
7bb7d81f | 324 | $(COMPILE) -c `test -f sysroff.c || echo $(srcdir)/`sysroff.c $(NO_WERROR) |
556274f9 RW |
325 | endif |
326 | ||
52a6ecd2 | 327 | defparse.@OBJEXT@: defparse.c |
556274f9 | 328 | if am__fastdepCC |
7bb7d81f | 329 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f defparse.c || echo $(srcdir)/`defparse.c $(NO_WERROR) |
556274f9 RW |
330 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
331 | else | |
332 | if AMDEP | |
333 | source='defparse.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
334 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
335 | endif | |
7bb7d81f | 336 | $(COMPILE) -c `test -f defparse.c || echo $(srcdir)/`defparse.c $(NO_WERROR) |
556274f9 RW |
337 | endif |
338 | ||
52a6ecd2 | 339 | deflex.@OBJEXT@: deflex.c |
556274f9 | 340 | if am__fastdepCC |
7bb7d81f | 341 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f deflex.c || echo $(srcdir)/`deflex.c $(NO_WERROR) |
556274f9 RW |
342 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
343 | else | |
344 | if AMDEP | |
345 | source='deflex.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
346 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
347 | endif | |
7bb7d81f | 348 | $(COMPILE) -c `test -f deflex.c || echo $(srcdir)/`deflex.c $(NO_WERROR) |
556274f9 RW |
349 | endif |
350 | ||
52a6ecd2 | 351 | nlmheader.@OBJEXT@: nlmheader.c |
556274f9 | 352 | if am__fastdepCC |
7bb7d81f | 353 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f nlmheader.c || echo $(srcdir)/`nlmheader.c $(NO_WERROR) |
556274f9 RW |
354 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
355 | else | |
356 | if AMDEP | |
357 | source='nlmheader.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
358 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
359 | endif | |
7bb7d81f | 360 | $(COMPILE) -c `test -f nlmheader.c || echo $(srcdir)/`nlmheader.c $(NO_WERROR) |
556274f9 RW |
361 | endif |
362 | ||
52a6ecd2 | 363 | rcparse.@OBJEXT@: rcparse.c |
556274f9 | 364 | if am__fastdepCC |
7bb7d81f | 365 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f rcparse.c || echo $(srcdir)/`rcparse.c $(NO_WERROR) |
556274f9 RW |
366 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
367 | else | |
368 | if AMDEP | |
369 | source='rcparse.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
370 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
371 | endif | |
7bb7d81f | 372 | $(COMPILE) -c `test -f rcparse.c || echo $(srcdir)/`rcparse.c $(NO_WERROR) |
556274f9 RW |
373 | endif |
374 | ||
52a6ecd2 | 375 | mcparse.@OBJEXT@: mcparse.c |
556274f9 | 376 | if am__fastdepCC |
7bb7d81f | 377 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f mcparse.c || echo $(srcdir)/`mcparse.c $(NO_WERROR) |
556274f9 RW |
378 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
379 | else | |
380 | if AMDEP | |
381 | source='mcparse.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
382 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
383 | endif | |
7bb7d81f | 384 | $(COMPILE) -c `test -f mcparse.c || echo $(srcdir)/`mcparse.c $(NO_WERROR) |
556274f9 RW |
385 | endif |
386 | ||
52a6ecd2 | 387 | rclex.@OBJEXT@: rclex.c |
556274f9 RW |
388 | if am__fastdepCC |
389 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/rclex.c $(NO_WERROR) | |
390 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
391 | else | |
392 | if AMDEP | |
393 | source='rclex.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
394 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
395 | endif | |
396 | $(COMPILE) -c $(srcdir)/rclex.c $(NO_WERROR) | |
397 | endif | |
398 | ||
52a6ecd2 | 399 | mclex.@OBJEXT@: mclex.c |
556274f9 RW |
400 | if am__fastdepCC |
401 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/mclex.c $(NO_WERROR) | |
402 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
403 | else | |
404 | if AMDEP | |
405 | source='mclex.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
406 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
407 | endif | |
408 | $(COMPILE) -c $(srcdir)/mclex.c $(NO_WERROR) | |
409 | endif | |
ceae3e33 | 410 | |
252b5132 | 411 | srconv_SOURCES = srconv.c coffgrok.c $(BULIBS) |
52a6ecd2 | 412 | srconv.@OBJEXT@: sysroff.c |
252b5132 | 413 | |
0724d64b | 414 | dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS) |
20e95c23 | 415 | dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) |
252b5132 | 416 | |
52a6ecd2 | 417 | dlltool.@OBJEXT@: |
556274f9 RW |
418 | if am__fastdepCC |
419 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(DLLTOOL_DEFS) $(srcdir)/dlltool.c | |
420 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
421 | else | |
422 | if AMDEP | |
423 | source='dlltool.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
424 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
425 | endif | |
252b5132 | 426 | $(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c |
556274f9 | 427 | endif |
252b5132 | 428 | |
52a6ecd2 | 429 | rescoff.@OBJEXT@: |
556274f9 RW |
430 | if am__fastdepCC |
431 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(DLLTOOL_DEFS) $(srcdir)/rescoff.c | |
432 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
433 | else | |
434 | if AMDEP | |
435 | source='rescoff.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
436 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
437 | endif | |
09cda596 | 438 | $(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/rescoff.c |
556274f9 | 439 | endif |
09cda596 | 440 | |
252b5132 RH |
441 | coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS) |
442 | ||
443 | sysdump_SOURCES = sysdump.c $(BULIBS) | |
52a6ecd2 | 444 | sysdump.@OBJEXT@: sysroff.c |
252b5132 RH |
445 | |
446 | # coff/sym.h and coff/ecoff.h won't be found by the automatic dependency | |
447 | # scripts, since they are only included conditionally. | |
52a6ecd2 | 448 | nlmconv.@OBJEXT@: nlmconv.c |
556274f9 RW |
449 | if am__fastdepCC |
450 | ldname=`echo ld | sed '$(transform)'`; \ | |
451 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \ | |
452 | -DLD_NAME="\"$${ldname}\"" @NLMCONV_DEFS@ $(srcdir)/nlmconv.c | |
453 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | |
454 | else | |
455 | if AMDEP | |
456 | source='nlmconv.c' object='$@' libtool=no @AMDEPBACKSLASH@ | |
457 | DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
458 | endif | |
252b5132 RH |
459 | ldname=`echo ld | sed '$(transform)'`; \ |
460 | $(COMPILE) -c -DLD_NAME="\"$${ldname}\"" @NLMCONV_DEFS@ $(srcdir)/nlmconv.c | |
556274f9 | 461 | endif |
252b5132 RH |
462 | |
463 | nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS) | |
464 | ||
4a594fce | 465 | windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.c \ |
252b5132 | 466 | winduni.c resres.c $(BULIBS) |
cd6a2ed0 | 467 | windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) $(LIBICONV) |
252b5132 | 468 | |
692ed3e7 NC |
469 | windmc_SOURCES = windmc.c mcparse.y mclex.c \ |
470 | winduni.c $(BULIBS) | |
cd6a2ed0 | 471 | windmc_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) $(LIBICONV) |
692ed3e7 | 472 | |
0724d64b | 473 | dllwrap_SOURCES = dllwrap.c version.c |
20e95c23 | 474 | dllwrap_LDADD = $(LIBIBERTY) $(LIBINTL) |
252b5132 RH |
475 | |
476 | ||
c45021f2 | 477 | EXTRA_DIST = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \ |
692ed3e7 NC |
478 | syslex.c deflex.c defparse.h defparse.c rcparse.h rcparse.c \ |
479 | mcparse.h mcparse.c | |
252b5132 | 480 | |
c45021f2 | 481 | diststuff: $(EXTRA_DIST) info |
e3e71e27 | 482 | all: info |
252b5132 | 483 | |
fe168a19 AS |
484 | # We extract version from bfd/configure.in, make sure to rerun configure |
485 | # when BFD's version changes. | |
486 | CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in | |
487 | ||
1d97d67f | 488 | DISTCLEANFILES = sysroff.c sysroff.h site.exp site.bak |
252b5132 | 489 | |
1d97d67f AM |
490 | MOSTLYCLEANFILES = sysinfo$(EXEEXT_FOR_BUILD) bin2c$(EXEEXT_FOR_BUILD) \ |
491 | binutils.log binutils.sum abcdefgh* | |
252b5132 RH |
492 | mostlyclean-local: |
493 | -rm -rf tmpdir | |
494 | ||
252b5132 RH |
495 | .PHONY: install-exec-local |
496 | ||
a7186e88 | 497 | install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS) |
b125d98b | 498 | @list='$(RENAMED_PROGS)'; for p in $$list; do \ |
a7186e88 DJ |
499 | if test -f $$p$(EXEEXT); then \ |
500 | echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p$(EXEEXT) $(bindir)/`echo $$p|sed -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ | |
501 | $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p$(EXEEXT) $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ | |
252b5132 RH |
502 | else :; fi; \ |
503 | done | |
d3d8a9ee | 504 | $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin |
252b5132 RH |
505 | for i in $(TOOL_PROGS); do \ |
506 | if [ -f $$i$(EXEEXT) ]; then \ | |
507 | j=`echo $$i | sed -e 's/-new//'`; \ | |
508 | k=`echo $$j | sed '$(transform)'`; \ | |
75aa6618 | 509 | if [ "$(bindir)/$$k" != "$(tooldir)/bin/$$j" ]; then \ |
d3d8a9ee NC |
510 | rm -f $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \ |
511 | ln $(DESTDIR)$(bindir)/$$k$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \ | |
512 | || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \ | |
252b5132 RH |
513 | fi; \ |
514 | else true; \ | |
515 | fi; \ | |
516 | done |