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