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