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