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