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