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