Commit | Line | Data |
---|---|---|
65aa3724 SC |
1 | # This file was generated automatically by configure. Do not edit. |
2 | target_makefile_frag = ./config/mt-coff-h8300 | |
3 | host_makefile_frag = ./config/mh-sparc | |
4 | CROSS=-DCROSS_COMPILE | |
5 | ALL=all.cross | |
6 | host_alias = sun4 | |
7 | host_cpu = sparc | |
8 | host_vendor = sun | |
9 | host_os = sunos411 | |
10 | version_path = | |
11 | target_alias = h8300hms | |
12 | target_cpu = h8300 | |
13 | target_vendor = hitachi | |
14 | target_os = hms | |
15 | subdir = | |
16 | unsubdir = . | |
17 | VPATH = . | |
18 | # Makefile for the GNU linker ld (version 2) | |
19 | # Copyright (C) 1989-1991 Free Software Foundation, Inc. | |
20 | ||
21 | # This file is part of GNU ld.. | |
22 | ||
23 | # This program is free software; you can redistribute it and/or modify | |
24 | # it under the terms of the GNU General Public License as published by | |
25 | # the Free Software Foundation; either version 2 of the License, or | |
26 | # (at your option) any later version. | |
27 | # | |
28 | # This program is distributed in the hope that it will be useful, | |
29 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
30 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
31 | # GNU General Public License for more details. | |
32 | # | |
33 | # You should have received a copy of the GNU General Public License | |
34 | # along with this program; if not, write to the Free Software | |
35 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
36 | ||
65aa3724 SC |
37 | srcdir = . |
38 | ||
39 | prefix = /usr/local | |
40 | ||
41 | bindir = $(prefix)/bin | |
42 | datadir = $(prefix)/lib | |
43 | libdir = $(prefix)/lib | |
44 | mandir = $(datadir)/man | |
45 | man1dir = $(mandir)/man1 | |
46 | man2dir = $(mandir)/man2 | |
47 | man3dir = $(mandir)/man3 | |
48 | man4dir = $(mandir)/man4 | |
49 | man5dir = $(mandir)/man5 | |
50 | man6dir = $(mandir)/man6 | |
51 | man7dir = $(mandir)/man7 | |
52 | man8dir = $(mandir)/man8 | |
53 | man9dir = $(mandir)/man9 | |
54 | infodir = $(datadir)/info | |
55 | includedir = $(prefix)/include | |
56 | docdir = $(datadir)/doc | |
57 | ||
58 | SHELL = /bin/sh | |
59 | ||
60 | INSTALL = install -c | |
61 | INSTALL_PROGRAM = $(INSTALL) | |
62 | INSTALL_DATA = $(INSTALL) | |
63 | ||
64 | AR = ar | |
65 | AR_FLAGS = qv | |
66 | BISON = bison -y | |
67 | MAKEINFO = makeinfo | |
68 | RANLIB = ranlib | |
69 | ||
70 | #version=/`$(unsubdir)/../gcc$(subdir)/gcc -dumpversion` | |
71 | version= | |
72 | ||
73 | # Seach path to override the default search path for -lfoo libraries. | |
74 | # If LIB_PATH is empty, the ones in the script (if any) are left alone. | |
75 | # Otherwise, they are replaced with the ones given in LIB_PATH, | |
76 | # which may have the form: LIB_PATH=/lib:/usr/local/lib | |
77 | LIB_PATH = | |
78 | ||
79 | BASEDIR = ../.. | |
80 | INCLUDE = $(srcdir)/../include | |
81 | INCLUDES = -I. -I$(srcdir) -I$(INCLUDE) | |
82 | MINUS_G = | |
83 | ||
84 | # Where to find texinfo.tex to format docn with TeX | |
85 | TEXIDIR = $(srcdir)/../texinfo/fsf | |
86 | ||
87 | # Whether to get roff to put indexing entries on stderr | |
88 | TEXI2OPT = | |
89 | # You neeed this to generate ld-index.ms (or .mm or .me) | |
90 | # TEXI2OPT = -i | |
91 | ||
92 | TEXI2ROFF=texi2roff | |
93 | ||
94 | # Which roff program to use to generate index for texi2roff'd doc | |
95 | ROFF = groff | |
96 | ||
97 | SCRIPTS = ldgld68k.sc ldgld.sc \ | |
98 | ldlnk960.sc ldlnk960r.sc ldgld960.sc \ | |
99 | i386aout.sc ldm88k.sc ldglda29k.sc news.sc h8300hms.sc ebmon29k.sc | |
100 | ||
101 | #### Host, target, and site specific Makefile fragments come in here. | |
102 | HDEFINES = -O -D__MSDOS__ -D__GO32__ | |
103 | TDEFINES = -DDEFAULT_EMULATION=H8300HMS_EMULATION_NAME | |
104 | YACC=yacc -tvd | |
105 | #CC=gcc -Wall -ansi | |
106 | #stuff for self hosting | |
107 | HOSTING_CRT0=/lib/crt0.o | |
108 | HOSTING_LIBS=/usr/latest/lib/gcc/sun4/libgnu.a -lc | |
109 | HOSTING_EMU=LDEMULATION=gld; export LDEMULATION | |
110 | ||
111 | ### | |
112 | ||
113 | CFLAGS = $(INCLUDES) $(MINUS_G) $(HDEFINES) $(TDEFINES) $(CDEFINES) | |
114 | LINTFLAGS = $(INCLUDES) $(EXTRA_DEF) | |
115 | ||
116 | .SUFFIXES: .y .x .xr .xu .xn .xN .sc .scu .scr .scn $(SUFFIXES) | |
117 | ||
118 | # go directly to ld.new in case this ld isn't capable of | |
119 | # linking native object on this host. It can be renamed on | |
120 | # install. | |
121 | LD_PROG = ld.new | |
122 | ||
123 | # A .sc script file is needed for each emulation mode. | |
124 | # sed is used to transform this script into two variant forms: | |
125 | # A .scr script is for linking without relocation (-r flag). | |
126 | # A .scu script is like .scr, but *do* create constructors. | |
127 | # A .scn script is for linking with -N flag (mix text and data on same page). | |
128 | # A .scN script is for linking with -N flag (mix text and data on same page). | |
129 | # The diference is that segments should (need) not be page aligned. | |
130 | ||
131 | # A sed pattern to translate .sc to .scu: | |
132 | SED_MAKE_RELOC_WITH_CONSTRUCTORS=\ | |
133 | -e "/If relocating/,/End if relocating/d" \ | |
134 | -e "/=/s/[_a-zA-Z.]* *= .*//g" \ | |
135 | -e '/>/s/} *> *[a-zA-Z]*/}/' \ | |
136 | -e "/text/s/[.]text .*:/.text :/" \ | |
137 | -e "/data/s/[.]data .*:/.data :/" | |
138 | # A sed pattern to translate .scu to .scr: | |
139 | SED_REMOVE_CONSTRUCTORS= -e /CONSTRUCTORS/d | |
140 | ||
141 | .sc.scu: | |
142 | sed $(SED_MAKE_RELOC_WITH_CONSTRUCTORS) $< >$*.scu | |
143 | .scu.scr: | |
144 | sed $(SED_REMOVE_CONSTRUCTORS) < $< >$*.scr | |
145 | ||
146 | # Each builtin script file is included as a C string literal. | |
147 | # These are generated by the mkscript filter. | |
148 | .sc.x: | |
149 | go32 mkscript < $< >$*.x | |
150 | ||
151 | # if [ "x"$(LIB_PATH) = "x" ]; then mkscript < $< >$*.x ; \ | |
152 | # else \ | |
153 | # (sed <$< -e '/SEARCH_DIR(.*)/d' ; \ | |
154 | # echo $(LIB_PATH) | tr ':' ' ' | sed -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\1);/g';) | mkscript >$*.x;\ | |
155 | # fi | |
156 | ||
157 | # The .xn script is used if the -n flag is given (write-protect text).. | |
158 | # Sunos starts the text segment for demand-paged binaries at 0x2020 | |
159 | # and other binaries at 0x2000, since the exec header is paged in | |
160 | # with the text. Some other Unix variants do the same. | |
161 | # For -n and -N flags the offset of the exec header must be removed. | |
162 | # This sed script does this if the master script contains | |
163 | # a line of the form ".text 0xAAAA BLOCK(0xBBBB):" - the | |
164 | # output will contain ".text 0xBBBB:". (For Sunos AAAA=2020 and BBBB=2000.) | |
165 | .x.xn: | |
166 | sed -e '/text/s/\.text .* BLOCK(\([^)]*\)):/.text \1:/' < $< >$*.xn | |
167 | ||
168 | # The .xN script is used if the -N flag is given (don't write-protect text). | |
169 | # This is like -n, except that the data segment need not be page-aligned. | |
170 | # So get rid of commands for page-alignment: We assume these use ALIGN | |
171 | # with a hex constant that end with 00, since any normal page size is be | |
172 | # at least divisible by 256. We use the 00 to avoid matching | |
173 | # anything that tries to align of (say) 8-byte boundaries. | |
174 | .xn.xnn: | |
175 | sed -e '/ALIGN/s/ALIGN( *0x[0-9a-fA-F]*00 *)/./' < $< >$*.xnn | |
176 | ||
177 | # The xu and xr scripts don't search libraries, so LIB_PATH doesn't matter. | |
178 | .sc.xu: | |
179 | sed $(SED_MAKE_RELOC_WITH_CONSTRUCTORS) < $< | mkscript >$*.xu | |
180 | .sc.xr: | |
181 | sed $(SED_MAKE_RELOC_WITH_CONSTRUCTORS) $(SED_REMOVE_CONSTRUCTORS) \ | |
182 | < $< | mkscript >$*.xr | |
183 | ||
184 | # for self hosting | |
185 | BFDLIB=$(unsubdir)/../bfd$(subdir)/libbfd.a | |
186 | LIBIBERTY=$(unsubdir)/../libiberty$(subdir)/libiberty.a | |
187 | ||
188 | OFILES= ldgram.o ldlex.o ldlang.o ldctor.o ldmain.o ldindr.o \ | |
189 | ldwarn.o ldwrite.o ldexp.o ldlnk960.o ld__gld68k.o ld__i386aout.o \ | |
190 | ld__m88k.o ld__glda29k.o ld__news.o h8300hms.o ld__ebmon29k.o \ | |
191 | ld__gld.o ldgld960.o ldemul.o ldver.o ldmisc.o ldsym.o \ | |
192 | ldvanilla.o ldfile.o \ | |
193 | relax.o ../bfd/seclet.o lderror.o | |
194 | ||
195 | HEADERS=config.h ldmain.h ldmain.h ldwarn.h ldmisc.h ldindr.h \ | |
196 | ldsym.h ldctor.h ldlang.h ldexp.h \ | |
197 | ldlex.h ldwrite.h ldver.h ldemul.h ldfile.h ldgram.h ld.h | |
198 | ||
199 | MANSOURCES=ld.tex | |
200 | ||
201 | LDCSOURCES=ldlang.c ldctor.c ldindr.c ldmain.c ldwrite.c ldwarn.c ldlnk960.c \ | |
202 | ld__gld.c ld__gld68k.c ld__m88k.c ld__ebmon29k.c \ | |
203 | ldgld960.c ldemul.c ldver.c ldmisc.c ldexp.c ldsym.c ldfile.c \ | |
204 | ldvanilla.c relax.c ../bfd/seclet.c lderror.c | |
205 | ||
206 | GENERATED_SOURCES=ldgram.c ldlex.c ldgram.h ld__*.c | |
207 | GENERATED_HEADERS=ldgram.h | |
208 | ||
209 | LDSOURCES=$(LDCSOURCES) ldgram.y ldlex.l ldgram.h | |
210 | ||
211 | BFDSOURCES=../../bfd/common/*.c | |
212 | ||
213 | SOURCES= $(LDSOURCES) $(BFDSOURCES) | |
214 | LINTSOURCES= $(LDCSOURCES) $(BFDSOURCES) $(GENERATED_SOURCES) | |
215 | ||
216 | STAGESTUFF = *.x *.x[ru] *.sc[ru] $(GENERATED_SOURCES) $(GENERATED_HEADERS) $(OFILES) $(LD_PROG) mkscript | |
217 | ||
218 | all: $(LD_PROG) | |
219 | ||
220 | info: ld.info | |
221 | ||
222 | ldgram.h ldgram.c: ldgram.y | |
223 | $(BISON) $(BISONFLAGS) -d -o ldgram.c $(VPATH)/ldgram.y | |
224 | ||
225 | ldlex.c: ldlex.l | |
226 | lex -t $(VPATH)/ldlex.l >ldlex.c | |
227 | ||
228 | # These all start with ld__ so 'make clean' can find them. | |
229 | ||
230 | ld__gld.c: $(srcdir)/ldtemplate | |
231 | sed -e s/"<ldtarget>"/ldgld/g -e s/"<arch>"/m68k/g \ | |
232 | -e s/"<target>"//g -e s/"<TARGET>"//g <$(srcdir)/ldtemplate >$@ | |
233 | ld__news.c: $(srcdir)/ldtemplate | |
234 | sed -e s/"<ldtarget>"/news/g -e s/"<arch>"/m68k/g \ | |
235 | -e s/"<target>"/news/g -e s/"<TARGET>"/NEWS/g <$(srcdir)/ldtemplate >$@ | |
236 | ||
237 | ld__i386aout.c: $(srcdir)/ldtemplate | |
238 | sed -e s/"<ldtarget>"/i386aout/g -e s/"<arch>"/i386/g \ | |
239 | -e s/"<target>"/i386aout/g -e s/"<TARGET>"/I386AOUT/g <$(srcdir)/ldtemplate >$@ | |
240 | ||
241 | ||
242 | ld__ebmon29k.c: $(srcdir)/ldtemplate | |
243 | sed -e s/"<ldtarget>"/ebmon29k/g -e s/"<arch>"/a29k/g \ | |
244 | -e s/"gld<target>"/ebmon29k/g -e s/"GLD<TARGET>"/EBMON29K/g \ | |
245 | -e s/"<ldtarget>.x"/ebmon.x/ <$(srcdir)/ldtemplate >$@ | |
246 | ||
247 | ld__gld68k.c: $(srcdir)/ldtemplate | |
248 | sed -e s/"<ldtarget>"/ldgld68k/g -e s/"<arch>"/m68k/g \ | |
249 | -e s/"<target>"/68k/g -e s/"<TARGET>"/68K/g <$(srcdir)/ldtemplate >$@ | |
250 | ld__glda29k.c: $(srcdir)/ldtemplate | |
251 | sed -e s/"<ldtarget>"/ldglda29k/g -e s/"<arch>"/a29k/g \ | |
252 | -e s/"<target>"/29k/g -e s/"<TARGET>"/29K/g <$(srcdir)/ldtemplate >$@ | |
253 | ld__m88k.c: $(srcdir)/ldtemplate | |
254 | sed -e s/"<ldtarget>"/ldm88k/g -e s/"<arch>"/m88k/g \ | |
255 | -e s/"<target>"/m88kbcs/g -e s/"<TARGET>"/M88KBCS/g <$(srcdir)/ldtemplate >$@ | |
256 | ||
257 | # The .c files for these are generated from ldtemplete. | |
258 | ld__gld.o: mkscript ldgld.x ldgld.xr ldgld.xu ldgld.xn ldgld.xnn | |
259 | ld__news.o: mkscript news.x news.xr news.xu news.xn news.xnn | |
260 | ld__i386aout.o: mkscript i386aout.x i386aout.xr i386aout.xu i386aout.xn i386aout.xnn | |
261 | ld__ebmon29k.o: mkscript ebmon29k.x ebmon29k.xr ebmon29k.xu \ | |
262 | ebmon29k.xn ebmon29k.xnn | |
263 | ld__gld68k.o: mkscript ldgld68k.x ldgld68k.xr ldgld68k.xu \ | |
264 | ldgld68k.xn ldgld68k.xnn | |
265 | ld__glda29k.o: mkscript ldglda29k.x ldglda29k.xr ldglda29k.xu \ | |
266 | ldglda29k.xn ldglda29k.xnn | |
267 | ld__m88k.o: mkscript ldm88k.x ldm88k.xr ldm88k.xu ldm88k.xn ldm88k.xnn | |
268 | ||
269 | # The .c files for these are (for now) specially written (not ldtemplete). | |
270 | ldgld960.o: mkscript ldgld960.x | |
271 | ldlnk960.o: mkscript ldlnk960.x ldlnk960.xr | |
272 | h8300hms.o: mkscript h8300hms.x | |
273 | ||
274 | ||
275 | #$(BFDLIB): $(BFDSOURCES) | |
276 | # (cd ../bfd; make) | |
277 | ||
278 | $(LD_PROG): $(OFILES) $(BFDLIB) $(LIBIBERTY) | |
279 | >ld.rf $(CFLAGS) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(LOADLIBES) | |
280 | $(CC) @ld.rf | |
281 | ||
282 | # (cd ../bfd; make) | |
283 | # LDEMULATION=gld; export LDEMULATION; GNUTARGET=a.out-sunos-big;./ldok -format a.out-sunos-big -o ld /lib/crt0.o $(OFILES) $(BFDLIB) $(LIBIBERTY) -lc /usr/local/lib/gcc/sparc/1.91/gnulib | |
284 | # gld -o ld /lib/crt0.o $(OFILES) $(BFDLIB) $(LIBIBERTY) -lc /usr/local/lib/gcc/sparc/1.91/gnulib | |
285 | # $(CC) -Bstatic -o ld.new $(OFILES) $(BFDLIB) $(LIBIBERTY) | |
286 | ||
287 | ||
288 | ld1: ld.new | |
289 | $(HOSTING_EMU); ./ld.new -o ld1 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) | |
290 | ||
291 | ld2: ld1 | |
292 | $(HOSTING_EMU); ./ld1 -o ld2 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) | |
293 | ||
294 | ld3: ld2 | |
295 | $(HOSTING_EMU); ./ld2 -o ld3 $(HOSTING_CRT0) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(HOSTING_LIBS) | |
296 | ||
297 | ###################################################################### | |
298 | TDEFINES = -DDEFAULT_EMULATION=H8300HMS_EMULATION_NAME | |
299 | YACC=yacc -tvd | |
300 | #CC=gcc -Wall -ansi | |
301 | #stuff for self hosting | |
302 | HOSTING_CRT0=/lib/crt0.o | |
303 | HOSTING_LIBS=/usr/latest/lib/gcc/sun4/libgnu.a -lc | |
304 | HOSTING_EMU=LDEMULATION=gld; export LDEMULATION | |
305 | ||
306 | # DOCUMENTATION TARGETS | |
307 | # TeX output | |
308 | ld.dvi: $(srcdir)/ld.texinfo | |
309 | TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex $(srcdir)/ld.texinfo | |
310 | texindex ld.?? | |
311 | TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex $(srcdir)/ld.texinfo | |
312 | ||
313 | # info file for online browsing | |
314 | ld.info: $(srcdir)/ld.texinfo | |
315 | $(MAKEINFO) -o ld.info $(srcdir)/ld.texinfo | |
316 | ||
317 | #separate targets for "ms", "me", and "mm" forms of roff doc | |
318 | # Try to use a recent texi2roff. v2 was put on prep in jan91. | |
319 | # If you want an index, see texi2roff doc for postprocessing | |
320 | # and add -i to texi2roff invocations below. | |
321 | # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete | |
322 | # correspondint -e lines when later texi2roff's are current) | |
323 | # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs. | |
324 | # + @c's deleted explicitly because texi2roff sees texinfo commands in them | |
325 | # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank | |
326 | # + @alphaenumerate is ridiculously new, turned into @enumerate | |
327 | ||
328 | ld.ms: $(srcdir)/ld.texinfo | |
329 | sed -e '/\\input texinfo/d' \ | |
330 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
331 | -e '/^@ifinfo/,/^@end ifinfo/d' \ | |
332 | -e '/^@c/d' \ | |
333 | -e 's/{.*,,/{/' \ | |
334 | -e 's/@ / /g' \ | |
335 | -e 's/^@alphaenumerate/@enumerate/g' \ | |
336 | -e 's/^@end alphaenumerate/@end enumerate/g' \ | |
337 | $(srcdir)/ld.texinfo | \ | |
338 | $(TEXI2ROFF) $(TEXI2OPT) -ms | \ | |
339 | sed -e 's/---/\\(em/g' \ | |
340 | >>ld.ms | |
341 | ||
342 | # index for roff output | |
343 | ld-index.ms: ld.ms | |
344 | $(ROFF) -ms ld.ms 2>&1 1>/dev/null | \ | |
345 | sed -e '/: warning:/d' | \ | |
346 | texi2index >ld-index.ms | |
347 | ||
348 | # roff output (-mm) | |
349 | ld.mm: $(srcdir)/ld.texinfo | |
350 | sed -e '/\\input texinfo/d' \ | |
351 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
352 | -e '/^@ifinfo/,/^@end ifinfo/d' \ | |
353 | -e '/^@c/d' \ | |
354 | -e 's/{.*,,/{/' \ | |
355 | -e '/@noindent/d' \ | |
356 | -e 's/@ / /g' \ | |
357 | -e 's/^@alphaenumerate/@enumerate/g' \ | |
358 | -e 's/^@end alphaenumerate/@end enumerate/g' \ | |
359 | $(srcdir)/ld.texinfo | \ | |
360 | $(TEXI2ROFF) $(TEXI2OPT) -mm | \ | |
361 | sed -e 's/---/\\(em/g' \ | |
362 | >ld.mm | |
363 | ||
364 | # index for roff output | |
365 | ld-index.mm: ld.mm | |
366 | $(ROFF) -mm ld.mm 2>&1 1>/dev/null | \ | |
367 | sed -e '/: warning:/d' | \ | |
368 | texi2index >ld-index.mm | |
369 | ||
370 | # roff output (-me) | |
371 | ld.me: $(srcdir)/ld.texinfo | |
372 | sed -e '/\\input texinfo/d' \ | |
373 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
374 | -e '/^@ifinfo/,/^@end ifinfo/d' \ | |
375 | -e '/^@c/d' \ | |
376 | -e 's/{.*,,/{/' \ | |
377 | -e 's/@ / /g' \ | |
378 | -e 's/^@alphaenumerate/@enumerate/g' \ | |
379 | -e 's/^@end alphaenumerate/@end enumerate/g' \ | |
380 | $(srcdir)/ld.texinfo | \ | |
381 | $(TEXI2ROFF) $(TEXI2OPT) -me | \ | |
382 | sed -e 's/---/\\(em/g' \ | |
383 | >>ld.me | |
384 | ||
385 | # index for roff output | |
386 | ld-index.me: ld.me | |
387 | $(ROFF) -me ld.me 2>&1 1>/dev/null | \ | |
388 | sed -e '/: warning:/d' | \ | |
389 | texi2index >ld-index.me | |
390 | ||
391 | ||
392 | ###################################################################### | |
393 | TDEFINES = -DDEFAULT_EMULATION=H8300HMS_EMULATION_NAME | |
394 | YACC=yacc -tvd | |
395 | #CC=gcc -Wall -ansi | |
396 | #stuff for self hosting | |
397 | HOSTING_CRT0=/lib/crt0.o | |
398 | HOSTING_LIBS=/usr/latest/lib/gcc/sun4/libgnu.a -lc | |
399 | HOSTING_EMU=LDEMULATION=gld; export LDEMULATION | |
400 | ||
401 | ||
402 | mkscript: $(srcdir)/mkscript.c | |
403 | $(CC) $(CFLAGS) $(LDFLAGS) -o mkscript $(srcdir)/mkscript.c $(LOADLIBES) | |
404 | ||
405 | ldlex.c: ldlex.l ldgram.h | |
406 | ldlex.o: ldlex.c ldgram.h | |
407 | ldgram.o: ldgram.c | |
408 | ldgram.c: ldgram.y | |
409 | ||
410 | ldgld68k.x : ldgld68k.sc | |
411 | ldgld68kUr.x : ldgld68kUr.sc | |
412 | ldgld68kr.x : ldgld68kr.sc | |
413 | h8300hms.x: h8300hms.sc | |
414 | ldgld.x : ldgld.sc | |
415 | ldgldUr.x : ldgldUr.sc | |
416 | ldgldr.x : ldgldr.sc | |
417 | ldlnk960.x : ldlnk960.sc | |
418 | ldlnk960r.x : ldlnk960r.sc | |
419 | ldgld960.x : ldgld960.sc | |
420 | ldgldm88k.x : ldgldm88k.sc | |
421 | ldm88kUr.x : ldm88kUr.sc | |
422 | ldm88kr.x: ldm88kr.sc | |
423 | ldm88k.x: ldm88k.sc | |
424 | news.x: news.sc | |
425 | i386aout.x: i386aout.sc | |
426 | h8300hms.x: h8300hms.sc | |
427 | h8300hms.o: h8300hms.c | |
428 | ldgld68k.x: ldgld68k.sc | |
429 | ldglda29k.x : ldglda29k.sc | |
430 | ldglda29kr.x : ldglda29kr.sc | |
431 | ldglda29kUr.x : ldglda29kUr.sc | |
432 | ||
433 | ebmon29k.x : ebmon29k.sc | |
434 | ebmon29kr.x : ebmon29kr.sc | |
435 | ebmon29kUr.x : ebmon29kUr.sc | |
436 | ||
437 | stage1: force | |
438 | -mkdir stage1 | |
439 | -mv -f $(STAGESTUFF) stage1 | |
440 | -(cd stage1 ; ln -s $(LD_PROG) ld) | |
441 | ||
442 | stage2: force | |
443 | -mkdir stage2 | |
444 | -mv -f $(STAGESTUFF) stage2 | |
445 | -(cd stage2 ; ln -s $(LD_PROG) ld) | |
446 | ||
447 | stage3: force | |
448 | -mkdir stage3 | |
449 | -mv -f $(STAGESTUFF) stage3 | |
450 | -(cd stage3 ; ln -s $(LD_PROG) ld) | |
451 | ||
452 | against=stage2 | |
453 | ||
454 | comparison: force | |
455 | for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done | |
456 | ||
457 | de-stage1: force | |
458 | -(cd stage1 ; mv -f * ..) | |
459 | -rm ld | |
460 | -rmdir stage1 | |
461 | ||
462 | de-stage2: force | |
463 | -(cd stage2 ; mv -f * ..) | |
464 | -rm ld | |
465 | -rmdir stage2 | |
466 | ||
467 | de-stage3: force | |
468 | -(cd stage3 ; mv -f * ..) | |
469 | -rm ld | |
470 | -rmdir stage3 | |
471 | ||
472 | clean: | |
473 | -rm -f TAGS $(OFILES) $(GENERATED_SOURCES) $(GENERATED_HEADERS) | |
474 | -rm -f *.x *.x[runN] *.sc[runN] | |
475 | -rm -f ld.?? ld.??? | |
476 | -rm -f ld ld1 ld2 ld3 ld.new mkscript *.o y.output | |
477 | ||
478 | lintlog: $(SOURCES) Makefile | |
479 | $(LINT) -abhxzn $(LINTFLAGS) $(LINTSOURCES) \ | |
480 | | grep -v "pointer casts may be troublesome" \ | |
481 | | grep -v "possible pointer alignment problem" \ | |
482 | | grep -v "ignore" \ | |
483 | | grep -v "conversion from long may lose accuracy" \ | |
484 | | grep -v "warning: constant argument to NOT" \ | |
485 | | grep -v "enumeration type clash, operator CAST" \ | |
486 | | grep -v "warning: constant in conditional context"\ | |
487 | | grep -v "archive\.c" | |
488 | ||
489 | ||
490 | tags TAGS: $(SOURCES) $(HEADERS) | |
491 | etags -t $? | |
492 | ||
493 | ||
494 | objdump: objdump.c | |
495 | ||
496 | install: $(LD_PROG) | |
497 | $(INSTALL_PROGRAM) ld.new $(bindir)/ld | |
498 | # $(INSTALL_PROGRAM) ld.new $(gcclibdir)/ld | |
499 | ||
500 | install-info: info | |
501 | for i in ld.info* ; do \ | |
502 | $(INSTALL_DATA) $$i $(infodir)/$$i ; \ | |
503 | done | |
504 | ||
505 | # Something like the following might make sense for install, but doesn't work | |
506 | # - it is too fragile, depending on a gcc binary int the right place. | |
507 | # Perhaps using gcc/version.c might work? | |
508 | # # If $(gcclibdir) exists, install ld there, and put a link to it | |
509 | # # from $(bindir); otherwise put ld in $(bindir). | |
510 | # if ([ -x $(unsubdir)/../gcc$(subdir)/gcc -a -d $(gcclibdir) ]); then \ | |
511 | # $(INSTALL_PROGRAM) ld.new $(gcclibdir)/ld; \ | |
512 | # cd $(bindir); rm -f ld; ln -s $(gcclibdir)/ld ld; \ | |
513 | # else \ | |
514 | # $(INSTALL_PROGRAM) ld.new $(bindir)/ld; \ | |
515 | # fi | |
516 | ||
517 | #----------------------------------------------------------------------------- | |
518 | # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT | |
519 | # | |
520 | # 'VERSION' file must be present and contain a string of the form "x.y" | |
521 | #----------------------------------------------------------------------------- | |
522 | ||
523 | ver960.c: FORCE | |
524 | rm -f ver960.c | |
525 | echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c | |
526 | ||
527 | ||
528 | # This target should be invoked before building a new release. | |
529 | # 'VERSION' file must be present and contain a string of the form "x.y" | |
530 | # | |
531 | roll: | |
532 | @V=`cat VERSION` ; \ | |
533 | MAJ=`sed 's/\..*//' VERSION` ; \ | |
534 | MIN=`sed 's/.*\.//' VERSION` ; \ | |
535 | V=$$MAJ.`expr $$MIN + 1` ; \ | |
536 | rm -f VERSION ; \ | |
537 | echo $$V >VERSION ; \ | |
538 | echo Version $$V | |
539 | ||
540 | ||
541 | dep: $(LDSOURCES) | |
542 | mkdep $(CFLAGS) $? | |
543 | ||
544 | # Dummy target to force execution of dependent targets. | |
545 | # | |
546 | force: | |
547 | ||
548 | # Target to uncomment host-specific lines in this makefile. Such lines must | |
549 | # have the following string beginning in column 1: #__<hostname>__# | |
550 | # Original Makefile is backed up as 'Makefile.old'. | |
551 | # | |
552 | # Invoke with: make make HOST=xxx | |
553 | # | |
554 | make: | |
555 | -@if test $(HOST)x = x ; then \ | |
556 | echo '\aSpecify "make make HOST=???"'; \ | |
557 | exit 1; \ | |
558 | fi ; \ | |
559 | grep -s "^#The next line was generated by 'make make'" Makefile; \ | |
560 | if test $$? = 0 ; then \ | |
561 | echo "\aMakefile has already been processed with 'make make'";\ | |
562 | exit 1; \ | |
563 | fi ; \ | |
564 | mv -f Makefile Makefile.old; \ | |
565 | echo "#The next line was generated by 'make make'" >Makefile ; \ | |
566 | echo "HOST=$(HOST)" >>Makefile ; \ | |
567 | echo >>Makefile ; \ | |
568 | sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile | |
569 | ||
570 | # | |
571 | ||
572 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) | |
573 | $(SHELL) ./config.status | |
574 | ||
575 | ### mode:fundamental *** | |
576 | ### Local Variables: *** | |
577 | ### page-delimiter: "^#" *** | |
578 | ### End: *** | |
579 | ### end of file | |
580 | ||
581 | ||
582 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |