* configure.in (mips*el-elf*): New target.
[deliverable/binutils-gdb.git] / ld / Makefile.in
CommitLineData
ce4d59e2 1# Makefile for the GNU linker ld (version 2)
74e6b793 2# Copyright (C) 1989, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.
ce4d59e2 3
d4e5e3c3 4# This file is part of GNU ld.
ce4d59e2
SC
5
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
eb02fd64
RP
20
21srcdir = .
3a9149a7 22objdir = .
eb02fd64 23
e06ba18d
PB
24prefix = /usr/local
25
0bb95ac8 26program_transform_name =
12fa72d4
SC
27exec_prefix = $(prefix)
28bindir = $(exec_prefix)/bin
29libdir = $(exec_prefix)/lib
034351e3 30tooldir = $(exec_prefix)/$(target_alias)
e06ba18d 31datadir = $(prefix)/lib
12fa72d4 32mandir = $(prefix)/man
e06ba18d
PB
33man1dir = $(mandir)/man1
34man2dir = $(mandir)/man2
35man3dir = $(mandir)/man3
36man4dir = $(mandir)/man4
37man5dir = $(mandir)/man5
38man6dir = $(mandir)/man6
39man7dir = $(mandir)/man7
40man8dir = $(mandir)/man8
41man9dir = $(mandir)/man9
12fa72d4 42infodir = $(prefix)/info
e06ba18d
PB
43includedir = $(prefix)/include
44docdir = $(datadir)/doc
173a0c3d 45# We put the scripts in the directory $(scriptdir)/ldscripts.
559d7baf
RP
46# We can't put the scripts in $(datadir) because the SEARCH_DIR
47# directives need to be different for native and cross linkers.
173a0c3d 48scriptdir = $(tooldir)/lib
e06ba18d
PB
49
50SHELL = /bin/sh
51
e0d005f2 52INSTALL = `cd $(srcdir); pwd`/../install.sh -c
e06ba18d
PB
53INSTALL_PROGRAM = $(INSTALL)
54INSTALL_DATA = $(INSTALL)
5ebaf24b 55INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
c97b9003
DZ
56INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
57
e06ba18d
PB
58AR = ar
59AR_FLAGS = qv
77b19d3d 60CFLAGS = -g
e06ba18d 61MAKEINFO = makeinfo
2412a768 62TEXI2DVI = texi2dvi
e06ba18d 63RANLIB = ranlib
2412a768 64CC_FOR_BUILD=$(CC)
bf3acf44 65BISON = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
2df68136 66LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
8c32cf6e 67
ee17cac9
PB
68# Seach path to override the default search path for -lfoo libraries.
69# If LIB_PATH is empty, the ones in the script (if any) are left alone.
917bffa7
PB
70# (The default is usually /lib:usr/lib:/usr/local/lib, unless building
71# a cross-linker, in which case the default is empty. See genscripts.sh.)
ee17cac9
PB
72# Otherwise, they are replaced with the ones given in LIB_PATH,
73# which may have the form: LIB_PATH=/lib:/usr/local/lib
74LIB_PATH =
75
d17eb3db
ILT
76# Additional libraries which are used when ld is built native. This
77# is set by some host makefile fragments.
78NATIVE_LIB_DIRS =
79
959eba20
JO
80BASEDIR = $(srcdir)/..
81BFDDIR = $(BASEDIR)/bfd
82INCDIR = $(BASEDIR)/include
83INCLUDES = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR)
4a6afc88 84DEP = mkdep
2ee11735 85
2412a768
RP
86# What version of the manual to build
87DOCVER = gen
88
8073190b 89# Where to find texinfo.tex to format docn with TeX
d17eb3db 90TEXIDIR = $(srcdir)/../texinfo
8d317d2a 91
959eba20
JO
92# Where to find other docs needed to format with TeX
93TEXINPUTS = $(TEXIDIR):$(BFDDIR)/doc:$(srcdir)
94
10a69a37 95# Whether to get roff to put indexing entries on stderr
954ac2ea
RP
96TEXI2OPT =
97# You neeed this to generate ld-index.ms (or .mm or .me)
98# TEXI2OPT = -i
8073190b 99
e06ba18d
PB
100TEXI2ROFF=texi2roff
101
8073190b
RP
102# Which roff program to use to generate index for texi2roff'd doc
103ROFF = groff
104
5cdea2ac 105#stuff for self hosting (can be overridden in config file).
74e6b793
SS
106HOSTING_CRT0 = /lib/crt0.o
107HOSTING_LIBS = `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc
108HOSTING_EMU = -m $(EMUL)
5cdea2ac 109
3a9149a7
JW
110CXX = `if [ -f ../gcc/xgcc ] ; then \
111 echo ../gcc/xgcc -B../gcc/; \
112 else echo gcc; \
113 fi`
114CXXFLAGS = -fgnu-linker
115
8a6665ae 116# FIX_ME: using ../gcc/xgcc breaks the cdtest.
74e6b793 117CXX = g++
8a6665ae 118
3a9149a7 119# Setup the testing framework, if you have one
099c286e
BC
120EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
121 echo $${rootme}/../../expect/expect ; \
122 else echo expect ; fi`
123
124RUNTEST = `if [ -f $${srcdir}/../../dejagnu/runtest ] ; then \
125 echo $${srcdir}/../../dejagnu/runtest ; \
126 else echo runtest ; fi`
03372cf4 127RUNTESTFLAGS =
3a9149a7
JW
128RUNTEST_CC = `if [ -f ../gcc/xgcc ] ; then \
129 echo ../gcc/xgcc -B../gcc/; \
130 else echo gcc; \
131 fi`
132RUNTEST_CFLAGS = $(CFLAGS)
133RUNTEST_CXX = `if [ -f ../gcc/xgcc ] ; then \
134 echo ../gcc/xgcc -B../gcc/; \
135 else echo gcc; \
136 fi`
108f145b 137# FIX_ME: using ../gcc/xgcc breaks the cdtest.
d17eb3db 138RUNTEST_CXX = $(CXX)
3a9149a7 139RUNTEST_CXXFLAGS = $(CXXFLAGS)
c97b9003 140
4a6afc88
ILT
141# go directly to ld.new in case this ld isn't capable of
142# linking native object on this host. It can be renamed on
143# install.
144LD_PROG = ld.new
145
146all: $(LD_PROG)
147.PHONY: all
58bf66f9 148
7e5c1057 149### Host, target, and site specific Makefile fragments come in here.
63545898 150####
2ee11735 151
74e6b793 152LINTFLAGS = $(INCLUDES) $(EXTRA_DEF)
2ee11735 153
565c93e9
DM
154# The .cc suffix is used by `make check'.
155
156.SUFFIXES: .y $(SUFFIXES) .cc
157
173a0c3d
DM
158# Suppress smart makes who think they know how to automake Yacc files
159.y.c:
160
4a6afc88 161# This rule is used for the check-cdtest target.
565c93e9 162.cc.o:
3a9149a7 163 $(CXX) -c -I$(srcdir) $(CXXFLAGS) $(CFLAGS) $<
565c93e9 164
74e6b793 165ALL_CFLAGS = $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(CFLAGS)
77b19d3d 166.c.o:
4a6afc88 167 $(CC) -c $(ALL_CFLAGS) $<
f78e2569 168
eb02fd64 169# for self hosting
959eba20
JO
170BFDLIB = ../bfd/libbfd.a
171LIBIBERTY = ../libiberty/libiberty.a
eb02fd64 172
82ebe9a2
KR
173ALL_EMULATIONS = elnk960.o esun3.o ei386aout.o ego32.o evsta.o \
174 em88kbcs.o ea29k.o enews.o ehp300bsd.o ehp3hpux.o \
175 eh8300.o eh8300h.o eebmon29k.o esun4.o egld960.o \
176 em68kcoff.o est2000.o esa29200.o ei386mach.o \
177 evanilla.o ei386coff.o ez8ksim.o emipslit.o ei386bsd.o \
178 emipsbig.o emipsbsd.o emipsidt.o evax.o eh8500.o \
179 eh8500b.o eh8500s.o eh8500c.o eh8500m.o \
180 ehppaelf.o emipsidtl.o esh.o eelf_i386.o ealpha.o \
181 ei386lynx.o em68klynx.o esparclynx.o ecoff_sparc.o \
cdf71377 182 eelf32ppc.o ei386go32.o em68kaout.o ei386linux.o \
dd37f215 183 eelf32_sparc.o eelf64_sparc.o eriscix.o
7e5c1057 184
74e6b793 185CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
4a6afc88
ILT
186 ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
187 mri.c
eb02fd64 188
74e6b793 189HFILES = config.h ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
4a6afc88
ILT
190 ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
191 ldwrite.h mri.h
eb02fd64 192
74e6b793
SS
193GENERATED_CFILES = ldgram.c ldlex.c
194GENERATED_HFILES = ldgram.h ldemul-list.h
eb02fd64 195
74e6b793 196OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
4a6afc88
ILT
197 ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
198 ldfile.o ${EMULATION_OFILES}
eb02fd64 199
82ebe9a2 200LINTSOURCES = $(CFILES) $(GENERATED_CFILES) e*.c
eb02fd64 201
82ebe9a2 202STAGESTUFF = *.o ldscripts/* e*.c
e06ba18d
PB
203
204info: ld.info
4a6afc88 205.PHONY: info
2ee11735 206
173a0c3d 207ldgram.h ldgram.c: ldgram.y
5ff21fa5 208 $(BISON) $(BISONFLAGS) -d $(srcdir)/ldgram.y
31e54f5d
RP
209 mv -f y.tab.c ldgram.c
210 mv -f y.tab.h ldgram.h
cc964c6f 211
a6152e39 212# EMUL is the name of a file in the emulparams subdir, without the .sh.
4a6afc88
ILT
213ldmain.o: ldmain.c config.status
214 if [ -z "$(EMUL)" ] ; then \
215 echo "you must set a default emulation" 1>&2 ; \
216 exit 1 ; \
217 else \
218 $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' $(CFLAGS) $< ; \
219 fi
220
82ebe9a2 221ldemul-list.h: Makefile
7e5c1057
PB
222 (echo "/* This file is automatically generated. DO NOT EDIT! */";\
223 for f in `echo " " ${EMULATION_OFILES} "" \
82ebe9a2 224 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
7e5c1057
PB
225 echo "extern ld_emulation_xfer_type ld_$${f}_emulation;"; \
226 done;\
227 echo "";\
228 echo "#define EMULATION_LIST \\";\
229 for f in `echo " " ${EMULATION_OFILES} "" \
82ebe9a2 230 | sed -e 's/ e/ ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \
7e5c1057
PB
231 echo " &ld_$${f}_emulation, \\"; \
232 done;\
4a6afc88
ILT
233 echo " 0") >ldemul-tmp.h
234 mv ldemul-tmp.h ldemul-list.h
7e5c1057 235
4a6afc88 236ldlex.c: ldlex.l
5ff21fa5 237 $(LEX) -I -Cem $(srcdir)/ldlex.l
4a6afc88
ILT
238 -sed -e '/^int.*free();/d' \
239 -e '/^char.*malloc();/d' \
0b2f8d2e 240 -e 's/malloc/xmalloc/g' \
4a6afc88
ILT
241 < lex.yy.c > ldlex.c.new
242 -rm lex.yy.c
243 mv ldlex.c.new ./ldlex.c
19b03b7a 244
82ebe9a2 245# These all start with e so 'make clean' can find them.
c61b4184 246
74e6b793 247GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${host_alias} ${target_alias} ${EMUL} "$(NATIVE_LIB_DIRS)"
c06e55d9 248GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
7e5c1057 249
82ebe9a2 250esun4.c: $(srcdir)/emulparams/sun4.sh \
ed601bea 251 $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
a6152e39 252 ${GENSCRIPTS} sun4
82ebe9a2 253esun3.c: $(srcdir)/emulparams/sun3.sh \
f7e66391 254 $(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
a6152e39 255 ${GENSCRIPTS} sun3
82ebe9a2 256evsta.c: $(srcdir)/emulparams/vsta.sh \
8a432746
ILT
257 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
258 ${GENSCRIPTS} vsta
82ebe9a2 259ego32.c: $(srcdir)/emulparams/go32.sh \
8ddef552 260 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
a6152e39 261 ${GENSCRIPTS} go32
82ebe9a2 262enews.c: $(srcdir)/emulparams/news.sh \
8ddef552 263 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
a6152e39 264 ${GENSCRIPTS} news
82ebe9a2 265evax.c: $(srcdir)/emulparams/vax.sh \
8ddef552 266 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
a6152e39 267 ${GENSCRIPTS} vax
82ebe9a2 268ehp300bsd.c: $(srcdir)/emulparams/hp300bsd.sh \
8ddef552 269 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
a6152e39 270 ${GENSCRIPTS} hp300bsd
82ebe9a2 271ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
8ddef552 272 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
a6152e39 273 ${GENSCRIPTS} hp3hpux
82ebe9a2 274ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
db0a7149
KR
275 $(srcdir)/emultempl/hppaelf.em $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
276 ${GENSCRIPTS} hppaelf
82ebe9a2 277ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
8ddef552 278 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
a6152e39 279 ${GENSCRIPTS} i386aout
82ebe9a2 280ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
6c86b9ff
SC
281 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc ${GEN_DEPENDS}
282 ${GENSCRIPTS} i386go32
82ebe9a2 283ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
3c1af24d
KR
284 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
285 ${GENSCRIPTS} i386mach
82ebe9a2 286eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
8ddef552 287 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
a6152e39 288 ${GENSCRIPTS} ebmon29k
82ebe9a2 289esa29200.c: $(srcdir)/emulparams/sa29200.sh \
8ddef552 290 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sa29200.sc ${GEN_DEPENDS}
a6152e39 291 ${GENSCRIPTS} sa29200
82ebe9a2 292ea29k.c: $(srcdir)/emulparams/a29k.sh \
8ddef552 293 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
a6152e39 294 ${GENSCRIPTS} a29k
82ebe9a2 295em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
d301e438 296 $(srcdir)/emultempl/m88kbcs.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
a6152e39 297 ${GENSCRIPTS} m88kbcs
82ebe9a2 298eh8300.c: $(srcdir)/emulparams/h8300.sh \
8ddef552 299 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300.sc ${GEN_DEPENDS}
a6152e39 300 ${GENSCRIPTS} h8300
82ebe9a2 301eh8300h.c: $(srcdir)/emulparams/h8300h.sh \
4ab3a31f 302 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS}
a6152e39 303 ${GENSCRIPTS} h8300h
82ebe9a2 304eh8500.c: $(srcdir)/emulparams/h8500.sh \
8ddef552 305 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
a6152e39 306 ${GENSCRIPTS} h8500
82ebe9a2 307eh8500b.c: $(srcdir)/emulparams/h8500b.sh \
9e0f78c8
SC
308 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500b.sc ${GEN_DEPENDS}
309 ${GENSCRIPTS} h8500b
82ebe9a2 310eh8500c.c: $(srcdir)/emulparams/h8500c.sh \
9e0f78c8
SC
311 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500c.sc ${GEN_DEPENDS}
312 ${GENSCRIPTS} h8500c
82ebe9a2 313eh8500m.c: $(srcdir)/emulparams/h8500m.sh \
9e0f78c8
SC
314 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500m.sc ${GEN_DEPENDS}
315 ${GENSCRIPTS} h8500m
82ebe9a2 316eh8500s.c: $(srcdir)/emulparams/h8500s.sh \
9e0f78c8
SC
317 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500s.sc ${GEN_DEPENDS}
318 ${GENSCRIPTS} h8500s
82ebe9a2 319esh.c: $(srcdir)/emulparams/sh.sh \
8ddef552 320 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
a6152e39 321 ${GENSCRIPTS} sh
82ebe9a2 322est2000.c: $(srcdir)/emulparams/st2000.sh \
8ddef552 323 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/st2000.sc ${GEN_DEPENDS}
a6152e39 324 ${GENSCRIPTS} st2000
82ebe9a2 325ez8ksim.c: $(srcdir)/emulparams/z8ksim.sh \
8ddef552 326 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8ksim.sc ${GEN_DEPENDS}
a6152e39 327 ${GENSCRIPTS} z8ksim
82ebe9a2 328evanilla.c: $(srcdir)/emulparams/vanilla.sh \
8ddef552 329 $(srcdir)/emultempl/vanilla.em $(srcdir)/scripttempl/vanilla.sc ${GEN_DEPENDS}
a6152e39 330 ${GENSCRIPTS} vanilla
82ebe9a2 331elnk960.c: $(srcdir)/emulparams/lnk960.sh \
8ddef552 332 $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
a6152e39 333 ${GENSCRIPTS} lnk960
82ebe9a2 334egld960.c: $(srcdir)/emulparams/gld960.sh \
8ddef552 335 $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
a6152e39 336 ${GENSCRIPTS} gld960
82ebe9a2
KR
337egld960coff.c: $(srcdir)/emulparams/gld960coff.sh \
338 $(srcdir)/emultempl/gld960c.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
339 ${GENSCRIPTS} gld960coff
340em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
8ddef552 341 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
a6152e39 342 ${GENSCRIPTS} m68kcoff
82ebe9a2 343em68klynx.c: $(srcdir)/emulparams/m68klynx.sh \
028f8872 344 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m68klynx.sc ${GEN_DEPENDS}
d17eb3db 345 ${GENSCRIPTS} m68klynx
82ebe9a2 346ei386coff.c: $(srcdir)/emulparams/i386coff.sh \
8ddef552 347 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
a6152e39 348 ${GENSCRIPTS} i386coff
82ebe9a2 349ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
028f8872 350 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386lynx.sc ${GEN_DEPENDS}
d17eb3db 351 ${GENSCRIPTS} i386lynx
82ebe9a2 352emipslit.c: $(srcdir)/emulparams/mipslit.sh \
8ddef552 353 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
a6152e39 354 ${GENSCRIPTS} mipslit
82ebe9a2 355ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
8ddef552 356 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
a6152e39 357 ${GENSCRIPTS} i386bsd
82ebe9a2 358emipsbig.c: $(srcdir)/emulparams/mipsbig.sh \
8ddef552 359 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
a6152e39 360 ${GENSCRIPTS} mipsbig
82ebe9a2
KR
361emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh \
362 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
a6152e39 363 ${GENSCRIPTS} mipsbsd
82ebe9a2 364emipsidt.c: $(srcdir)/emulparams/mipsidt.sh \
8ddef552 365 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
a6152e39 366 ${GENSCRIPTS} mipsidt
82ebe9a2 367emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
8ddef552 368 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
a6152e39 369 ${GENSCRIPTS} mipsidtl
82ebe9a2 370eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
2a9fa50c 371 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
d17eb3db 372 ${GENSCRIPTS} elf_i386
82ebe9a2 373eelf32mipb.c: $(srcdir)/emulparams/elf32mipb.sh \
dd37f215 374 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
d17eb3db 375 ${GENSCRIPTS} elf32mipb
82ebe9a2 376ealpha.c: $(srcdir)/emulparams/alpha.sh \
d17eb3db
ILT
377 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
378 ${GENSCRIPTS} alpha
82ebe9a2 379ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
4a6afc88
ILT
380 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
381 ${GENSCRIPTS} coff_sparc
82ebe9a2 382esparclynx.c: $(srcdir)/emulparams/sparclynx.sh \
028f8872
SS
383 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparclynx.sc ${GEN_DEPENDS}
384 ${GENSCRIPTS} sparclynx
82ebe9a2 385eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
099c286e 386 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
c361ce46 387 ${GENSCRIPTS} elf32ppc
dd37f215
ILT
388eriscix.c: $(srcdir)/emulparams/riscix.sh \
389 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
390 ${GENSCRIPTS} riscix
82ebe9a2
KR
391em68kaout.c: $(srcdir)/emulparams/m68kaout.sh \
392 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
393 ${GENSCRIPTS} m68kaout
cdf71377
KR
394ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
395 $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
396 ${GENSCRIPTS} i386linux
397eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
398 $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
399 ${GENSCRIPTS} elf32_sparc
400eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
401 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
402 ${GENSCRIPTS} elf64_sparc
403
404epc532machaout.c: $(srcdir)/emulparams/pc532machaout.sh \
405 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
406 ${GENSCRIPTS} pc532machaout
407
408enetbsd532.c: $(srcdir)/emulparams/netbsd532.sh \
409 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
410 ${GENSCRIPTS} netbsd532
eb02fd64 411
e77463a1 412$(LD_PROG): $(OFILES) $(BFDLIB) $(LIBIBERTY)
74e6b793 413 $(CC) $(CFLAGS) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(EXTRALIBS)
d17eb3db
ILT
414
415# The generated emulation files mostly have the same dependencies.
4a6afc88 416$(EMULATION_OFILES): ../bfd/bfd.h ../bfd/sysdep.h $(INCDIR)/bfdlink.h \
c361ce46
ILT
417 ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h config.h \
418 ldctor.h ldexp.h ldlang.h
4a6afc88 419
3a9149a7
JW
420# These targets are for the dejagnu testsuites. The file site.exp
421# contains global variables that all the testsuites will use.
422# There is a current debate as to how and where to generate test
423# outputs. Rob feels each test should be built in $(objdir) with
424# a unique name. Cassidy feels that we should create a directory
425# called $(objdir)/tmpdir and do the work there. This way, there
426# is no potential conflict with existing objects, ie: as there
427# was in the past with loop.o and flow.o, and, there is no chance
428# of filling /tmp, which would cause other problems. Lastly, this
429# allow retention of the testcase name making debugging easier.
430#
431testdir = $(objdir)/tmpdir
432
d301e438 433site.exp: ./config.status Makefile
3a9149a7 434 @if [ -d $(testdir) ]; then true; else mkdir $(testdir); fi
d301e438 435 @echo "Making a new config file..."
3a9149a7 436 @rm -f ./tmp?
d301e438 437 @touch site.exp
3a9149a7 438 @mv site.exp site.bak
d301e438
JW
439 @echo "## variables are automatically generated by make ##" > ./tmp0
440 @echo "# Do not edit here. If you wish to override these" >> ./tmp0
441 @echo "# values, add them to the last section" >> ./tmp0
3a9149a7
JW
442 @echo "# HOST AND TARGET INFO" >> ./tmp0
443 @echo "set host_os $(host_os)" >> ./tmp0
444 @echo "set host_alias $(host_alias)" >> ./tmp0
445 @echo "set host_cpu $(host_cpu)" >> ./tmp0
446 @echo "set host_vendor $(host_vendor)" >> ./tmp0
447 @echo "set target_os $(target_os)" >> ./tmp0
448 @echo "set target_alias $(target_alias)" >> ./tmp0
449 @echo "set target_cpu $(target_cpu)" >> ./tmp0
450 @echo "set target_vendor $(target_vendor)" >> ./tmp0
451 @echo "set host_triplet $(host_canonical)" >> ./tmp0
452 @echo "set target_triplet $(target_canonical)" >> ./tmp0
453 @echo "# DIRECTORY INFO" >> ./tmp0
d301e438 454 @echo "set objdir `pwd`" >> ./tmp0
3a9149a7 455 @echo "set tmpdir `cd $(testdir); pwd`" >> ./tmp0
d301e438
JW
456 @echo "" >> ./tmp0
457 @echo "# LD DEPENDANCIES" >> ./tmp0
3a9149a7
JW
458 @echo "set OFILES \"$(OFILES)\"" >> ./tmp0
459 @echo "set BFDLIB \"$(BFDLIB)\"" >> ./tmp0
460 @echo "set LIBIBERTY \"$(LIBIBERTY)\"" >> ./tmp0
461 @echo "set HOSTING_EMU \"$(HOSTING_EMU)\"" >> ./tmp0
462 @echo "set HOSTING_CRT0 \"$(HOSTING_CRT0)\"" >> ./tmp0
463 @echo "set HOSTING_LIBS \"$(HOSTING_LIBS)\"" >> ./tmp0
d301e438
JW
464 @echo "" >> ./tmp0
465 @echo "## Variables generated by configure. Do Not Edit ##" >> ./tmp0
466 @cat ./tmp0 > site.exp
467 @cat site.bak | sed \
468 -e '1,/^## Variables generated by.*##/ d' >> site.exp
469 -@rm -f ./tmp?
8ddef552 470
64bb143c 471check: site.exp
f3c6455f 472 @if [ $(host_canonical) = $(target_canonical) ]; then \
099c286e
BC
473 rootme=`pwd`; export rootme; \
474 srcdir=${srcdir} ; export srcdir ; \
475 EXPECT=${EXPECT} ; export EXPECT ; \
476 if [ -f $${rootme}/../expect/expect ] ; then \
477 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
478 export TCL_LIBRARY ; fi ; \
f3c6455f
KR
479 $(RUNTEST) --tool ld \
480 --srcdir $(srcdir)/testsuite $(RUNTESTFLAGS) \
481 CC="$(RUNTEST_CC)" CFLAGS="$(RUNTEST_CFLAGS)" \
482 CXX="$(RUNTEST_CXX)" CXXFLAGS="$(RUNTEST_CXXFLAGS)" ;\
483 if [ $$? != 0 ]; then exit 1; else true; fi ;\
484 else \
485 echo No cross-linker tests yet. ;\
486 fi
d301e438 487
8ddef552 488installcheck:
4a6afc88 489.PHONY: check installcheck
e7921bd4 490
7e5c1057 491# Rules for testing by relinking ld itself.
eb02fd64 492
7e5c1057 493ld-partial.o: ld.new
a04f1d00 494 ./ld.new $(HOSTING_EMU) -o ld-partial.o -r $(OFILES)
7e5c1057 495ld1: ld-partial.o
a04f1d00 496 ./ld.new $(HOSTING_EMU) -o ld1 $(HOSTING_CRT0) ld-partial.o $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
eb02fd64 497
7e5c1057 498ld1-full: ld.new
a04f1d00 499 ./ld.new $(HOSTING_EMU) -o ld1-full $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
eb02fd64 500
d20fb445 501ld2: ld1
a04f1d00 502 ./ld1 $(HOSTING_EMU) -o ld2 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
60048a2c 503
eb02fd64 504ld3: ld2
a04f1d00 505 ./ld2 $(HOSTING_EMU) -o ld3 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS)
eb02fd64 506
d20fb445
SC
507bootstrap: ld3
508 cmp ld2 ld3
509
4a6afc88
ILT
510.PHONY: bootstrap
511
8ddef552
DM
512# A test program for C++ constructors and destructors.
513
82ebe9a2 514cdtest: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
a04f1d00 515 ./ld.new $(HOSTING_EMU) -o cdtest $(HOSTING_CRT0) \
82ebe9a2 516 cdtest-main.o cdtest-bar.o cdtest-foo.o $(HOSTING_LIBS)
917bffa7 517
099c286e
BC
518cdtest.out: cdtest
519 ./cdtest > cdtest.tmp
520 mv cdtest.tmp cdtest.out
521
82ebe9a2 522cdtest-ur.o: cdtest-main.o cdtest-bar.o cdtest-foo.o ld.new
099c286e 523 ./ld.new $(HOSTING_EMU) -o cdtest-ur.o -Ur cdtest-main.o \
82ebe9a2 524 cdtest-bar.o cdtest-foo.o
099c286e
BC
525
526cdtest-ur: cdtest-ur.o
527 ./ld.new $(HOSTING_EMU) -o cdtest-ur $(HOSTING_CRT0) cdtest-ur.o \
528 $(HOSTING_LIBS)
529
530cdtest-ur.out: cdtest-ur
531 ./cdtest-ur > cdtest-ur.tmp
532 mv cdtest-ur.tmp cdtest-ur.out
533
534check-cdtest: cdtest.out cdtest-ur.out $(srcdir)/cdtest.exp
917bffa7 535 diff $(srcdir)/cdtest.exp cdtest.out
099c286e 536 diff $(srcdir)/cdtest.exp cdtest-ur.out
4a6afc88
ILT
537
538.PHONY: check-cdtest
539
d301e438 540# END OF CHECK TARGETS
917bffa7 541
8073190b 542# DOCUMENTATION TARGETS
2412a768
RP
543# Manual configuration file; not usually attached to normal configuration,
544# because almost all configs use "gen" version of manual.
545# Set DOCVER above to change.
546configdoc.texi: ${DOCVER}-doc.texi
034351e3
PB
547 ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi || \
548 ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi || \
549 cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
2412a768 550
8073190b 551# TeX output
2412a768 552dvi: ld.dvi
d4e5e3c3 553ld.dvi: $(srcdir)/ld.texinfo configdoc.texi $(BFDDIR)/doc/bfdsumm.texi
4a6afc88 554 TEXINPUTS=$(BFDDIR)/doc:$$TEXINPUTS $(TEXI2DVI) $(srcdir)/ld.texinfo
2412a768 555
4b91c519 556ldint.dvi: $(srcdir)/ldint.texinfo
2412a768 557 $(TEXI2DVI) $(srcdir)/ldint.texinfo
8d317d2a 558
8073190b 559# info file for online browsing
4ecfad79 560ld.info: $(srcdir)/ld.texinfo configdoc.texi $(BFDDIR)/doc/bfdsumm.texi
959eba20 561 $(MAKEINFO) -I$(BFDDIR)/doc -o ld.info $(srcdir)/ld.texinfo
eb02fd64 562
4b91c519
PB
563ldint.info: $(srcdir)/ldint.texinfo
564 $(MAKEINFO) -o ldint.info $(srcdir)/ldint.texinfo
565
4a6afc88
ILT
566.PHONY: dvi
567
954ac2ea 568#separate targets for "ms", "me", and "mm" forms of roff doc
e06ba18d
PB
569# Try to use a recent texi2roff. v2 was put on prep in jan91.
570# If you want an index, see texi2roff doc for postprocessing
571# and add -i to texi2roff invocations below.
572# Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
573# correspondint -e lines when later texi2roff's are current)
574# + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
575# + @c's deleted explicitly because texi2roff sees texinfo commands in them
576# + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
577# + @alphaenumerate is ridiculously new, turned into @enumerate
578
9c7810d6 579ld.ms: $(srcdir)/ld.texinfo
8073190b
RP
580 sed -e '/\\input texinfo/d' \
581 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
e06ba18d
PB
582 -e '/^@ifinfo/,/^@end ifinfo/d' \
583 -e '/^@c/d' \
584 -e 's/{.*,,/{/' \
585 -e 's/@ / /g' \
586 -e 's/^@alphaenumerate/@enumerate/g' \
587 -e 's/^@end alphaenumerate/@end enumerate/g' \
9c7810d6 588 $(srcdir)/ld.texinfo | \
e06ba18d
PB
589 $(TEXI2ROFF) $(TEXI2OPT) -ms | \
590 sed -e 's/---/\\(em/g' \
591 >>ld.ms
8073190b
RP
592
593# index for roff output
594ld-index.ms: ld.ms
595 $(ROFF) -ms ld.ms 2>&1 1>/dev/null | \
596 sed -e '/: warning:/d' | \
597 texi2index >ld-index.ms
598
954ac2ea 599# roff output (-mm)
9c7810d6 600ld.mm: $(srcdir)/ld.texinfo
954ac2ea
RP
601 sed -e '/\\input texinfo/d' \
602 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
e06ba18d
PB
603 -e '/^@ifinfo/,/^@end ifinfo/d' \
604 -e '/^@c/d' \
9c7810d6
RP
605 -e 's/{.*,,/{/' \
606 -e '/@noindent/d' \
e06ba18d
PB
607 -e 's/@ / /g' \
608 -e 's/^@alphaenumerate/@enumerate/g' \
609 -e 's/^@end alphaenumerate/@end enumerate/g' \
9c7810d6 610 $(srcdir)/ld.texinfo | \
e06ba18d 611 $(TEXI2ROFF) $(TEXI2OPT) -mm | \
9c7810d6
RP
612 sed -e 's/---/\\(em/g' \
613 >ld.mm
954ac2ea
RP
614
615# index for roff output
616ld-index.mm: ld.mm
617 $(ROFF) -mm ld.mm 2>&1 1>/dev/null | \
618 sed -e '/: warning:/d' | \
619 texi2index >ld-index.mm
620
621# roff output (-me)
9c7810d6 622ld.me: $(srcdir)/ld.texinfo
954ac2ea
RP
623 sed -e '/\\input texinfo/d' \
624 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
e06ba18d
PB
625 -e '/^@ifinfo/,/^@end ifinfo/d' \
626 -e '/^@c/d' \
627 -e 's/{.*,,/{/' \
628 -e 's/@ / /g' \
629 -e 's/^@alphaenumerate/@enumerate/g' \
630 -e 's/^@end alphaenumerate/@end enumerate/g' \
9c7810d6 631 $(srcdir)/ld.texinfo | \
e06ba18d
PB
632 $(TEXI2ROFF) $(TEXI2OPT) -me | \
633 sed -e 's/---/\\(em/g' \
634 >>ld.me
954ac2ea
RP
635
636# index for roff output
637ld-index.me: ld.me
638 $(ROFF) -me ld.me 2>&1 1>/dev/null | \
639 sed -e '/: warning:/d' | \
640 texi2index >ld-index.me
641
e7921bd4 642stage1: force
e06ba18d 643 -mkdir stage1
ab57b174 644 -mv -f $(STAGESTUFF) $(LD_PROG) stage1
e06ba18d 645 -(cd stage1 ; ln -s $(LD_PROG) ld)
f78e2569 646
e7921bd4 647stage2: force
e06ba18d 648 -mkdir stage2
ab57b174 649 -mv -f $(STAGESTUFF) $(LD_PROG) stage2
e06ba18d 650 -(cd stage2 ; ln -s $(LD_PROG) ld)
f78e2569 651
e7921bd4 652stage3: force
e06ba18d 653 -mkdir stage3
ab57b174 654 -mv -f $(STAGESTUFF) $(LD_PROG) stage3
e06ba18d 655 -(cd stage3 ; ln -s $(LD_PROG) ld)
eb02fd64 656
74e6b793 657against = stage2
e46cdcdd
RP
658
659comparison: force
ab57b174 660 for i in $(STAGESTUFF) $(LD_PROG) ; do cmp $$i $(against)/$$i ; done
e46cdcdd 661
e7921bd4 662de-stage1: force
e06ba18d
PB
663 -(cd stage1 ; mv -f * ..)
664 -rm ld
665 -rmdir stage1
e7921bd4
RP
666
667de-stage2: force
e06ba18d
PB
668 -(cd stage2 ; mv -f * ..)
669 -rm ld
670 -rmdir stage2
e7921bd4
RP
671
672de-stage3: force
e06ba18d
PB
673 -(cd stage3 ; mv -f * ..)
674 -rm ld
675 -rmdir stage3
e7921bd4 676
4a6afc88
ILT
677.PHONY: stage1 stage2 stage3 comparison de-stage1 de-stage2 de-stage3
678
ab57b174 679# Stuff that should be included in a distribution:
74e6b793 680LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
ab57b174
ILT
681diststuff: $(LDDISTSTUFF)
682
683mostlyclean:
684 -rm -f $(STAGESTUFF) ld.?? ld.??? ldlex.[qp]
083038a7
ILT
685 -rm -f ld ld1 ld2 ld3 *.o y.output cdtest cdtest.out cdtest.tmp
686 -rm -f cdtest-ur cdtest-ur.out cdtest-ur.tmp
82ebe9a2
KR
687 -rm -f $(GENERATED_CFILES) $(GENERATED_HFILES)
688 -rm -fr tmpdir
ab57b174 689clean: mostlyclean
1e45c4c3 690 -rm -f $(LD_PROG) configdoc.texi
3c1af24d 691distclean:
82ebe9a2 692 -rm -fr Makefile config.status TAGS sysdep.h ldscripts site.exp site.bak \
3c1af24d 693 $(STAGESTUFF) ld.?? ld.??s ld.toc ld.aux ld.log ldlex.[qp] \
1e45c4c3 694 $(LD_PROG) ld ld1 ld2 ld3 *.o y.output cdtest cdtest.out \
82ebe9a2 695 configdoc.texi tmpdir
3c1af24d 696realclean: clean distclean
ab57b174 697 -rm -f $(LDDISTSTUFF)
eb02fd64 698
4a6afc88
ILT
699.PHONY: diststuff mostlyclean clean distclean realclean
700
701lintlog:$(LINTSOURCES) Makefile
2ee11735 702 $(LINT) -abhxzn $(LINTFLAGS) $(LINTSOURCES) \
eb02fd64
RP
703| grep -v "pointer casts may be troublesome" \
704| grep -v "possible pointer alignment problem" \
705| grep -v "ignore" \
706| grep -v "conversion from long may lose accuracy" \
707| grep -v "warning: constant argument to NOT" \
708| grep -v "enumeration type clash, operator CAST" \
709| grep -v "warning: constant in conditional context"\
710| grep -v "archive\.c"
711
712
cbb5c2d1
DM
713TAGS:
714 etags -t $(srcdir)/*.[chly] *.[chly]
eb02fd64 715
eb02fd64 716
91b3a2b6 717install:
8ddef552
DM
718 $(INSTALL_XFORM) ld.new $(bindir)/ld
719 $(INSTALL_XFORM1) $(srcdir)/ld.1 $(man1dir)/ld.1
173a0c3d
DM
720 for f in ldscripts/*; do \
721 $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
d360d135 722 done
9cd039e7 723 -n=`t='$(program_transform_name)'; echo ld | sed -e "" $$t`; \
56409445 724 rm -f $(tooldir)/bin/ld; \
188ce705 725 ln $(bindir)/$$n $(tooldir)/bin/ld >/dev/null 2>/dev/null \
e357065c 726 || $(INSTALL_PROGRAM) ld.new $(tooldir)/bin/ld
e06ba18d 727
db0a7149 728install-info: ld.info
82ebe9a2
KR
729 if [ -r ld.info ]; then \
730 dir=. ; \
731 else \
732 dir=$(srcdir) ; \
733 fi ; \
734 for i in `cd $$dir ; echo ld.info*` ; do \
735 $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \
afe3aa73
RP
736 done
737
12fa72d4
SC
738clean-info:
739 -rm -rf *.info*
740
4a6afc88 741.PHONY: install install-info clean-info
eb02fd64 742
4a6afc88
ILT
743# Targets to rebuild dependencies in this Makefile.
744# Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
745.dep: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES)
746 rm -f .dep1
747 $(MAKE) DEP=$(DEP) .dep1
748 sed -f dep.sed <.dep1 >.dep
eb02fd64 749
4a6afc88
ILT
750# This rule really wants a mkdep that runs "gcc -MM".
751.dep1: $(CFILES) $(GENERATED_CFILES)
752 rm -f .dep2
753 echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
754 $(DEP) -f .dep2 $(ALL_CFLAGS) $?
755 $(srcdir)/../move-if-change .dep2 .dep1
eb02fd64 756
4a6afc88
ILT
757dep.sed: dep-in.sed config.status
758 sed <$(srcdir)/dep-in.sed >dep.sed \
759 -e 's!@INCDIR@!$(INCDIR)!' \
760 -e 's!@srcdir@!$(srcdir)!'
eb02fd64 761
4a6afc88
ILT
762dep: .dep
763 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
764 cat .dep >> tmp-Makefile
765 $(srcdir)/../move-if-change tmp-Makefile Makefile
239d28f3 766
4a6afc88
ILT
767dep-in: .dep
768 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
769 cat .dep >> tmp-Makefile.in
770 $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
771
772.PHONY: dep dep-in
239d28f3 773
eb02fd64
RP
774# Dummy target to force execution of dependent targets.
775#
e7921bd4 776force:
eb02fd64 777
4a6afc88 778.PHONY: force
eb02fd64 779
f1eb48b6 780Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 781 $(SHELL) ./config.status
eb02fd64 782
4a6afc88
ILT
783# What appears below is generated by a hacked mkdep using gcc -MM.
784
785# DO NOT DELETE THIS LINE -- mkdep uses it.
786# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
787
dd37f215 788ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
4a6afc88
ILT
789 $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
790 $(INCDIR)/bfdlink.h ld.h ldexp.h ldlang.h ldmisc.h \
fb5b11ee 791 ldgram.h ldmain.h ldctor.h
dd37f215 792ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
4a6afc88 793 $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
cdf71377
KR
794 config.h ld.h ldemul.h ldmisc.h ldexp.h ldlang.h ldfile.h \
795 ldmain.h ldemul-list.h
dd37f215 796ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
4a6afc88
ILT
797 $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
798 $(INCDIR)/bfdlink.h ld.h ldmain.h ldmisc.h ldexp.h \
799 ldgram.h ldlang.h
dd37f215 800ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
4a6afc88 801 $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
4725fb48 802 ld.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
cdf71377 803 ldlex.h ldemul.h
dd37f215 804ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
4a6afc88 805 $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
4725fb48
ILT
806 $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
807 ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h ldmisc.h \
808 ldctor.h ldfile.h
dd37f215 809ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
4a6afc88 810 $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
4725fb48
ILT
811 $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h config.h \
812 ld.h ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \
813 ldemul.h ldlex.h ldfile.h ldctor.h
dd37f215 814ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
4a6afc88 815 $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
4725fb48
ILT
816 ld.h ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h \
817 ldfile.h
dd37f215 818ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
4a6afc88
ILT
819 $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
820 ld.h ldver.h ldemul.h ldmain.h
dd37f215 821ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
4a6afc88
ILT
822 $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
823 $(INCDIR)/bfdlink.h ld.h ldexp.h ldlang.h ldwrite.h \
824 ldmisc.h ldgram.h ldmain.h
dd37f215 825lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
4a6afc88 826 $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
4725fb48
ILT
827 $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h config.h ld.h \
828 ldmain.h ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h \
829 ldfile.h ldver.h
dd37f215 830mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/obstack.h \
4a6afc88
ILT
831 ../bfd/sysdep.h $(INCDIR)/fopen-same.h ld.h ldexp.h \
832 ldlang.h ldmisc.h mri.h ldgram.h
dd37f215 833ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
4a6afc88
ILT
834 $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
835 $(INCDIR)/bfdlink.h ld.h ldexp.h ldver.h ldlang.h ldemul.h \
836 ldfile.h ldmisc.h ldmain.h mri.h ldlex.h
dd37f215
ILT
837ldlex.o: ldlex.c ../bfd/bfd.h $(INCDIR)/obstack.h ../bfd/sysdep.h \
838 $(INCDIR)/fopen-same.h ld.h ldgram.h ldmisc.h ldexp.h \
839 ldlang.h ldfile.h ldlex.h ldmain.h
239d28f3
SC
840
841# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
This page took 0.170247 seconds and 4 git commands to generate.