]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/gcc-interface/Makefile.in
re PR ada/37977 (Missing ada multilib support for s390x)
[thirdparty/gcc.git] / gcc / ada / gcc-interface / Makefile.in
1 # Makefile for GNU Ada Compiler (GNAT).
2 # Copyright (C) 1994-2008 Free Software Foundation, Inc.
3
4 #This file is part of GCC.
5
6 #GCC 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 3, or (at your option)
9 #any later version.
10
11 #GCC 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 GCC; see the file COPYING3. If not see
18 #<http://www.gnu.org/licenses/>.
19
20 # The makefile built from this file lives in the language subdirectory.
21 # Its purpose is to provide support for:
22 #
23 # 1) recursion where necessary, and only then (building .o's), and
24 # 2) building and debugging cc1 from the language subdirectory, and
25 # 3) nothing else.
26 #
27 # The parent makefile handles all other chores, with help from the
28 # language makefile fragment, of course.
29 #
30 # The targets for external use are:
31 # all, TAGS, ???mostlyclean, ???clean.
32
33 # This makefile will only work with Gnu make.
34 # The rules are written assuming a minimum subset of tools are available:
35 #
36 # Required:
37 # MAKE: Only Gnu make will work.
38 # MV: Must accept (at least) one, maybe wildcard, source argument,
39 # a file or directory destination, and support creation/
40 # modification date preservation. Gnu mv -f works.
41 # RM: Must accept an arbitrary number of space separated file
42 # arguments, or one wildcard argument. Gnu rm works.
43 # RMDIR: Must delete a directory and all its contents. Gnu rm -rf works.
44 # ECHO: Must support command line redirection. Any Unix-like
45 # shell will typically provide this, otherwise a custom version
46 # is trivial to write.
47 # AR: Gnu ar works.
48 # MKDIR: Gnu mkdir works.
49 # CHMOD: Gnu chmod works.
50 # true: Does nothing and returns a normal successful return code.
51 # pwd: Prints the current directory on stdout.
52 # cd: Change directory.
53 #
54 # Optional:
55 # BISON: Gnu bison works.
56 # FLEX: Gnu flex works.
57 # Other miscellaneous tools for obscure targets.
58
59 # Suppress smart makes who think they know how to automake Yacc files
60 .y.c:
61
62 # Variables that exist for you to override.
63 # See below for how to change them for certain systems.
64
65 # Various ways of specifying flags for compilations:
66 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
67 # BOOT_CFLAGS is the value of CFLAGS to pass
68 # to the stage2 and stage3 compilations
69 CFLAGS = -g
70 BOOT_CFLAGS = -O $(CFLAGS)
71 # These exists to be overridden by the t-* files, respectively.
72 T_CFLAGS =
73
74 CC = cc
75 BISON = bison
76 BISONFLAGS =
77 ECHO = echo
78 LEX = flex
79 LEXFLAGS =
80 CHMOD = chmod
81 LN = ln
82 LN_S = ln -s
83 CP = cp -p
84 MV = mv -f
85 RM = rm -f
86 RMDIR = rm -rf
87 MKDIR = mkdir -p
88 AR = ar
89 AR_FLAGS = rc
90 LS = ls
91 RANLIB = @RANLIB@
92 RANLIB_FLAGS = @ranlib_flags@
93
94 SHELL = @SHELL@
95 PWD_COMMAND = $${PWDCMD-pwd}
96 # How to copy preserving the date
97 INSTALL_DATA_DATE = cp -p
98 MAKEINFO = makeinfo
99 TEXI2DVI = texi2dvi
100 TEXI2PDF = texi2pdf
101 GNATBIND_FLAGS = -static -x
102 ADA_CFLAGS =
103 ADAFLAGS = -W -Wall -gnatpg -gnata
104 SOME_ADAFLAGS =-gnata
105 FORCE_DEBUG_ADAFLAGS = -g
106 GNATLIBFLAGS = -gnatpg -nostdinc
107 GNATLIBCFLAGS = -g -O2
108 GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
109 -DIN_RTS
110 ALL_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS)
111 MOST_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(SOME_ADAFLAGS)
112 THREAD_KIND = native
113 THREADSLIB =
114 GMEM_LIB =
115 MISCLIB =
116 SYMDEPS = $(LIBINTL_DEP)
117 OUTPUT_OPTION = @OUTPUT_OPTION@
118
119 objext = .o
120 exeext =
121 arext = .a
122 soext = .so
123 shext =
124 hyphen = -
125
126 # Define this as & to perform parallel make on a Sequent.
127 # Note that this has some bugs, and it seems currently necessary
128 # to compile all the gen* files first by hand to avoid erroneous results.
129 P =
130
131 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
132 # It specifies -B./.
133 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
134 GCC_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS)
135
136 # Tools to use when building a cross-compiler.
137 # These are used because `configure' appends `cross-make'
138 # to the makefile when making a cross-compiler.
139
140 # We don't use cross-make. Instead we use the tools from the build tree,
141 # if they are available.
142 # program_transform_name and objdir are set by configure.in.
143 program_transform_name =
144 objdir = .
145
146 target_alias=@target_alias@
147 target=@target@
148 xmake_file = @xmake_file@
149 tmake_file = @tmake_file@
150 host_canonical=@host@
151 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
152 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
153
154 # Directory where sources are, from where we are.
155 VPATH = $(srcdir)
156
157 fsrcdir := $(shell cd $(srcdir);${PWD_COMMAND})
158 fsrcpfx := $(shell cd $(srcdir);${PWD_COMMAND})/
159 fcurdir := $(shell ${PWD_COMMAND})
160 fcurpfx := $(shell ${PWD_COMMAND})/
161
162 # Top build directory, relative to here.
163 top_builddir = ../..
164
165 # Internationalization library.
166 LIBINTL = @LIBINTL@
167 LIBINTL_DEP = @LIBINTL_DEP@
168
169 # Any system libraries needed just for GNAT.
170 SYSLIBS = @GNAT_LIBEXC@
171
172 # List of extra object files linked in with various programs.
173 EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o
174
175 # List of target dependent sources, overridden below as necessary
176 TARGET_ADA_SRCS =
177
178 # Type of tools build we are doing; default is not compiling tools.
179 TOOLSCASE =
180
181 # Multilib handling
182 MULTISUBDIR =
183 RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
184
185 # End of variables for you to override.
186
187 all: all.indirect
188
189 # This tells GNU Make version 3 not to put all variables in the environment.
190 .NOEXPORT:
191
192 # tmake_file and xmake_file expand to lists with entries of the form
193 # $(srcdir)/config/... but here $(srcdir) is the ada subdirectory so we
194 # need to adjust the paths. There can't be spaces in the subst arguments
195 # or we get spurious spaces in the actual list of files to include.
196
197 # target overrides
198 ifneq ($(tmake_file),)
199 include $(subst /config,/../config,$(tmake_file))
200 endif
201
202 # host overrides
203 ifneq ($(xmake_file),)
204 include $(subst /config,/../config,$(xmake_file))
205 endif
206 \f
207 # Now figure out from those variables how to compile and link.
208
209 all.indirect: Makefile ../gnat1$(exeext)
210
211 # IN_GCC distinguishes between code compiled into GCC itself and other
212 # programs built during a bootstrap.
213 # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a cross
214 # compiler which does not use the native libraries and headers.
215 INTERNAL_CFLAGS = @CROSS@ -DIN_GCC
216
217 # This is the variable actually used when we compile.
218 LOOSE_CFLAGS = `echo $(CFLAGS) $(WARN2_CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`
219 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS)
220
221 # Likewise.
222 ALL_CPPFLAGS = $(CPPFLAGS)
223
224 # This is where we get libiberty.a from.
225 LIBIBERTY = ../../libiberty/libiberty.a
226
227 # How to link with both our special library facilities
228 # and the system's installed libraries.
229 LIBS = $(LIBINTL) $(LIBIBERTY) $(SYSLIBS)
230 LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY)
231 # Default is no TGT_LIB; one might be passed down or something
232 TGT_LIB =
233 TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB)
234
235 # Specify the directories to be searched for header files.
236 # Both . and srcdir are used, in that order,
237 # so that tm.h and config.h will be found in the compilation
238 # subdirectory rather than in the source directory.
239 INCLUDES = -I- -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config \
240 -I$(srcdir)/../../include
241
242 ADA_INCLUDES = -I- -I. -I$(srcdir)
243
244 INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir) -I$(fsrcdir)/../config \
245 -I$(fsrcdir)/../../include -I$(fsrcdir)/..
246 ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir) -I$(fsrcdir)/gcc
247
248 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
249 .SUFFIXES: .in .def
250
251 # Say how to compile Ada programs.
252 .SUFFIXES: .ada .adb .ads .asm
253
254 # Always use -I$(srcdir)/config when compiling.
255 .asm.o:
256 $(CC) -c -x assembler $< $(OUTPUT_OPTION)
257
258 .c.o:
259 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
260 $(OUTPUT_OPTION)
261
262 .adb.o:
263 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
264
265 .ads.o:
266 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
267
268 # how to regenerate this file
269 Makefile: ../config.status $(srcdir)/gcc-interface/Makefile.in $(srcdir)/Makefile.in $(srcdir)/../version.c
270 cd ..; \
271 LANGUAGES="$(CONFIG_LANGUAGES)" \
272 CONFIG_HEADERS= \
273 CONFIG_FILES="ada/gcc-interface/Makefile ada/Makefile" $(SHELL) config.status
274
275 # This tells GNU make version 3 not to export all the variables
276 # defined in this file into the environment.
277 .NOEXPORT:
278 \f
279 # Lists of files for various purposes.
280
281 GNATLINK_OBJS = gnatlink.o \
282 a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \
283 gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \
284 osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
285 sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \
286 types.o validsw.o widechar.o
287
288 GNATMAKE_OBJS = a-except.o ali.o ali-util.o s-casuti.o \
289 alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\
290 erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
291 gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
292 make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o \
293 mlib-tgt-specific.o mlib-utl.o namet.o nlists.o opt.o osint.o osint-m.o output.o \
294 prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o prj-err.o prj-ext.o prj-nmsc.o \
295 prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \
296 rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
297 scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o \
298 sinfo.o sinput.o sinput-c.o sinput-p.o \
299 snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o switch.o switch-m.o \
300 table.o targparm.o tempdir.o tree_io.o types.o \
301 uintp.o uname.o urealp.o usage.o widechar.o \
302 $(EXTRA_GNATMAKE_OBJS)
303
304 # Convert the target variable into a space separated list of architecture,
305 # manufacturer, and operating system and assign each of those to its own
306 # variable.
307
308 host:=$(subst -, ,$(host_canonical))
309 targ:=$(subst -, ,$(target))
310 arch:=$(word 1,$(targ))
311 ifeq ($(words $(targ)),2)
312 manu:=
313 osys:=$(word 2,$(targ))
314 else
315 manu:=$(word 2,$(targ))
316 osys:=$(word 3,$(targ))
317 endif
318
319 # Make arch match the current multilib so that the RTS selection code
320 # picks up the right files. For a given target this must be coherent
321 # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
322
323 ifeq ($(strip $(filter-out %x86_64, $(arch))),)
324 ifeq ($(strip $(MULTISUBDIR)),/32)
325 arch:=i686
326 endif
327 endif
328
329 # ???: handle more multilib targets
330
331 # LIBGNAT_TARGET_PAIRS is a list of pairs of filenames.
332 # The members of each pair must be separated by a '<' and no whitespace.
333 # Each pair must be separated by some amount of whitespace from the following
334 # pair.
335
336 # Non-tasking case:
337
338 LIBGNAT_TARGET_PAIRS = \
339 a-intnam.ads<a-intnam-dummy.ads \
340 s-inmaop.adb<s-inmaop-dummy.adb \
341 s-intman.adb<s-intman-dummy.adb \
342 s-osinte.ads<s-osinte-dummy.ads \
343 s-osprim.adb<s-osprim-posix.adb \
344 s-taprop.adb<s-taprop-dummy.adb \
345 s-taspri.ads<s-taspri-dummy.ads
346
347 # When using the GCC exception handling mechanism, we need to use an
348 # alternate body for a-exexpr.adb (a-exexpr-gcc.adb)
349
350 EH_MECHANISM=
351
352 # Default shared object option. Note that we rely on the fact that the "soname"
353 # option will always be present and last in this flag, so that we can have
354 # $(SO_OPTS)libgnat-x.xx
355
356 SO_OPTS = -Wl,-soname,
357
358 # Default gnatlib-shared target.
359 # By default, equivalent to gnatlib.
360 # Set to gnatlib-shared-default, gnatlib-shared-dual, or a platform specific
361 # target when supported.
362 GNATLIB_SHARED = gnatlib
363
364 # default value for gnatmake's target dependent file
365 MLIB_TGT = mlib-tgt
366
367 # By default, do not distribute prefix.o (in libgccprefix), since it is only
368 # needed by external GNAT tools such as gnatdist and Glide.
369 # Override this variable on native platforms when needed.
370 PREFIX_OBJS =
371
372 # To avoid duplicate code, use this variable to set PREFIX_OBJS when needed:
373 PREFIX_REAL_OBJS = ../prefix.o \
374 ../../libiberty/concat.o \
375 ../../libiberty/xmalloc.o \
376 ../../libiberty/xstrdup.o \
377 ../../libiberty/xexit.o
378
379 # By default, build socket support units. On platforms that do not support
380 # sockets, reset this variable to empty and add DUMMY_SOCKETS_TARGET_PAIRS
381 # to LIBGNAT_TARGET_PAIRS.
382
383 GNATRTL_SOCKETS_OBJS = g-soccon$(objext) g-socket$(objext) g-socthi$(objext) \
384 g-soliop$(objext) g-sothco$(objext) g-sttsne$(objext)
385
386 DUMMY_SOCKETS_TARGET_PAIRS = \
387 g-socket.adb<g-socket-dummy.adb \
388 g-socket.ads<g-socket-dummy.ads \
389 g-socthi.adb<g-socthi-dummy.adb \
390 g-socthi.ads<g-socthi-dummy.ads \
391 g-sothco.adb<g-sothco-dummy.adb \
392 g-sothco.ads<g-sothco-dummy.ads \
393 g-sttsne.ads<g-sttsne-dummy.ads
394
395 LIB_VERSION = $(strip $(shell grep ' Library_Version :' $(fsrcpfx)gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/'))
396
397 # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
398 # $(strip STRING) removes leading and trailing spaces from STRING.
399 # If what's left is null then it's a match.
400
401 ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
402 LIBGNAT_TARGET_PAIRS = \
403 a-intnam.ads<a-intnam-vxworks.ads \
404 a-numaux.ads<a-numaux-vxworks.ads \
405 s-inmaop.adb<s-inmaop-posix.adb \
406 s-interr.adb<s-interr-hwint.adb \
407 s-intman.ads<s-intman-vxworks.ads \
408 s-intman.adb<s-intman-vxworks.adb \
409 s-osinte.adb<s-osinte-vxworks-kernel.adb \
410 s-osinte.ads<s-osinte-vxworks.ads \
411 s-osprim.adb<s-osprim-vxworks.adb \
412 s-parame.ads<s-parame-vxworks.ads \
413 s-parame.adb<s-parame-vxworks.adb \
414 s-stchop.ads<s-stchop-limit.ads \
415 s-stchop.adb<s-stchop-vxworks.adb \
416 s-taprop.adb<s-taprop-vxworks.adb \
417 s-taspri.ads<s-taspri-vxworks.ads \
418 s-tpopsp.adb<s-tpopsp-vxworks.adb \
419 s-vxwork.ads<s-vxwork-m68k.ads \
420 g-socthi.ads<g-socthi-vxworks.ads \
421 g-socthi.adb<g-socthi-vxworks.adb \
422 g-stsifd.adb<g-stsifd-sockets.adb \
423 g-sttsne.adb<g-sttsne-vxworks.adb \
424 g-sttsne.ads<g-sttsne-locking.ads \
425 system.ads<system-vxworks-m68k.ads
426
427 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
428
429 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
430 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
431
432 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
433 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
434
435 ifeq ($(strip $(filter-out yes,$(TRACE))),)
436 LIBGNAT_TARGET_PAIRS += \
437 s-traces.adb<s-traces-default.adb \
438 s-tratas.adb<s-tratas-default.adb \
439 s-trafor.adb<s-trafor-default.adb \
440 s-trafor.ads<s-trafor-default.ads \
441 s-tfsetr.adb<s-tfsetr-vxworks.adb
442 endif
443 endif
444
445 ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
446 LIBGNAT_TARGET_PAIRS = \
447 a-intnam.ads<a-intnam-vxworks.ads \
448 a-numaux.ads<a-numaux-vxworks.ads \
449 s-inmaop.adb<s-inmaop-posix.adb \
450 s-intman.ads<s-intman-vxworks.ads \
451 s-intman.adb<s-intman-vxworks.adb \
452 s-osprim.adb<s-osprim-vxworks.adb \
453 s-parame.ads<s-parame-vxworks.ads \
454 s-parame.adb<s-parame-vxworks.adb \
455 s-stchop.ads<s-stchop-limit.ads \
456 s-stchop.adb<s-stchop-vxworks.adb \
457 s-taprop.adb<s-taprop-vxworks.adb \
458 s-taspri.ads<s-taspri-vxworks.ads \
459 s-vxwork.ads<s-vxwork-ppc.ads \
460 g-socthi.ads<g-socthi-vxworks.ads \
461 g-socthi.adb<g-socthi-vxworks.adb \
462 g-stsifd.adb<g-stsifd-sockets.adb \
463 g-sttsne.adb<g-sttsne-vxworks.adb \
464 g-sttsne.ads<g-sttsne-locking.ads
465
466 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
467
468 ifeq ($(strip $(filter-out yes,$(TRACE))),)
469 LIBGNAT_TARGET_PAIRS += \
470 s-traces.adb<s-traces-default.adb \
471 s-trafor.adb<s-trafor-default.adb \
472 s-trafor.ads<s-trafor-default.ads \
473 s-tratas.adb<s-tratas-default.adb \
474 s-tfsetr.adb<s-tfsetr-vxworks.adb
475 endif
476
477 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
478 LIBGNAT_TARGET_PAIRS += \
479 s-osinte.adb<s-osinte-vxworks-rtp.adb \
480 s-osinte.ads<s-osinte-vxworks6.ads \
481 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
482 system.ads<system-vxworks-ppc-rtp.ads
483
484 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
485 else
486 LIBGNAT_TARGET_PAIRS += \
487 s-interr.adb<s-interr-hwint.adb \
488 s-tpopsp.adb<s-tpopsp-vxworks.adb \
489 system.ads<system-vxworks-ppc.ads
490
491 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
492 LIBGNAT_TARGET_PAIRS += \
493 s-osinte.ads<s-osinte-vxworks6.ads \
494 s-osinte.adb<s-osinte-vxworks-kernel.adb
495 else
496 LIBGNAT_TARGET_PAIRS += \
497 s-osinte.ads<s-osinte-vxworks.ads \
498 s-osinte.adb<s-osinte-vxworks.adb
499 endif
500
501 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
502 endif
503
504 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
505
506 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
507 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
508 endif
509
510 # vxworksae / vxworks 653
511 ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(targ))),)
512 # target pairs for kernel + vthreads runtime
513 LIBGNAT_TARGET_PAIRS = \
514 a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
515 a-intnam.ads<a-intnam-vxworks.ads \
516 a-numaux.ads<a-numaux-vxworks.ads \
517 g-io.adb<g-io-vxworks-ppc-cert.adb \
518 g-io.ads<g-io-vxworks-ppc-cert.ads \
519 s-inmaop.adb<s-inmaop-posix.adb \
520 s-interr.adb<s-interr-hwint.adb \
521 s-intman.ads<s-intman-vxworks.ads \
522 s-intman.adb<s-intman-vxworks.adb \
523 s-osinte.adb<s-osinte-vxworks-kernel.adb \
524 s-osinte.ads<s-osinte-vxworks.ads \
525 s-osprim.adb<s-osprim-vxworks.adb \
526 s-parame.ads<s-parame-ae653.ads \
527 s-parame.adb<s-parame-vxworks.adb \
528 s-taprop.adb<s-taprop-vxworks.adb \
529 s-taspri.ads<s-taspri-vxworks.ads \
530 s-tpopsp.adb<s-tpopsp-vxworks.adb \
531 s-vxwork.ads<s-vxwork-ppc.ads \
532 g-socthi.ads<g-socthi-vxworks.ads \
533 g-socthi.adb<g-socthi-vxworks.adb \
534 g-stsifd.adb<g-stsifd-sockets.adb \
535 g-sttsne.adb<g-sttsne-vxworks.adb \
536 g-sttsne.ads<g-sttsne-locking.ads \
537 system.ads<system-vxworks-ppc-vthread.ads
538
539 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
540
541 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
542 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
543
544 # Extra pairs for the vthreads runtime
545 ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
546 LIBGNAT_TARGET_PAIRS += \
547 s-thread.adb<s-thread-ae653.adb
548 EXTRA_GNATRTL_NONTASKING_OBJS += s-thread.o
549 endif
550
551 ifeq ($(strip $(filter-out yes,$(TRACE))),)
552 LIBGNAT_TARGET_PAIRS += \
553 s-traces.adb<s-traces-default.adb \
554 s-trafor.adb<s-trafor-default.adb \
555 s-trafor.ads<s-trafor-default.ads \
556 s-tratas.adb<s-tratas-default.adb \
557 s-tfsetr.adb<s-tfsetr-vxworks.adb
558 endif
559 endif
560
561 ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
562 LIBGNAT_TARGET_PAIRS = \
563 a-intnam.ads<a-intnam-vxworks.ads \
564 a-numaux.ads<a-numaux-vxworks.ads \
565 s-inmaop.adb<s-inmaop-posix.adb \
566 s-interr.adb<s-interr-hwint.adb \
567 s-intman.ads<s-intman-vxworks.ads \
568 s-intman.adb<s-intman-vxworks.adb \
569 s-osinte.adb<s-osinte-vxworks-kernel.adb \
570 s-osinte.ads<s-osinte-vxworks.ads \
571 s-osprim.adb<s-osprim-vxworks.adb \
572 s-parame.ads<s-parame-vxworks.ads \
573 s-parame.adb<s-parame-vxworks.adb \
574 s-stchop.ads<s-stchop-limit.ads \
575 s-stchop.adb<s-stchop-vxworks.adb \
576 s-taprop.adb<s-taprop-vxworks.adb \
577 s-taspri.ads<s-taspri-vxworks.ads \
578 s-tpopsp.adb<s-tpopsp-vxworks.adb \
579 s-vxwork.ads<s-vxwork-sparcv9.ads \
580 g-socthi.ads<g-socthi-vxworks.ads \
581 g-socthi.adb<g-socthi-vxworks.adb \
582 g-stsifd.adb<g-stsifd-sockets.adb \
583 g-sttsne.adb<g-sttsne-vxworks.adb \
584 g-sttsne.ads<g-sttsne-locking.ads \
585 system.ads<system-vxworks-sparcv9.ads \
586
587 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
588
589 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
590 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
591
592 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
593 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
594 endif
595
596 ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
597 LIBGNAT_TARGET_PAIRS = \
598 a-intnam.ads<a-intnam-vxworks.ads \
599 i-vxwork.ads<i-vxwork-x86.ads \
600 s-inmaop.adb<s-inmaop-posix.adb \
601 s-intman.ads<s-intman-vxworks.ads \
602 s-intman.adb<s-intman-vxworks.adb \
603 a-numaux.adb<a-numaux-x86.adb \
604 a-numaux.ads<a-numaux-x86.ads \
605 s-osprim.adb<s-osprim-vxworks.adb \
606 s-parame.ads<s-parame-vxworks.ads \
607 s-parame.adb<s-parame-vxworks.adb \
608 s-stchop.ads<s-stchop-limit.ads \
609 s-stchop.adb<s-stchop-vxworks.adb \
610 s-taprop.adb<s-taprop-vxworks.adb \
611 s-taspri.ads<s-taspri-vxworks.ads \
612 s-vxwork.ads<s-vxwork-x86.ads \
613 g-bytswa.adb<g-bytswa-x86.adb \
614 g-socthi.ads<g-socthi-vxworks.ads \
615 g-socthi.adb<g-socthi-vxworks.adb \
616 g-stsifd.adb<g-stsifd-sockets.adb \
617 g-sttsne.adb<g-sttsne-vxworks.adb \
618 g-sttsne.ads<g-sttsne-locking.ads
619
620 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
621
622 ifeq ($(strip $(filter-out yes,$(TRACE))),)
623 LIBGNAT_TARGET_PAIRS += \
624 s-traces.adb<s-traces-default.adb \
625 s-trafor.adb<s-trafor-default.adb \
626 s-trafor.ads<s-trafor-default.ads \
627 s-tratas.adb<s-tratas-default.adb \
628 s-tfsetr.adb<s-tfsetr-vxworks.adb
629 endif
630
631 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
632 LIBGNAT_TARGET_PAIRS += \
633 s-osinte.adb<s-osinte-vxworks-rtp.adb \
634 s-osinte.ads<s-osinte-vxworks6.ads \
635 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
636 system.ads<system-vxworks-x86-rtp.ads
637
638 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
639 else
640 LIBGNAT_TARGET_PAIRS += \
641 s-interr.adb<s-interr-hwint.adb \
642 s-tpopsp.adb<s-tpopsp-vxworks.adb \
643 system.ads<system-vxworks-x86.ads
644
645 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
646 LIBGNAT_TARGET_PAIRS += \
647 s-osinte.ads<s-osinte-vxworks6.ads \
648 s-osinte.adb<s-osinte-vxworks-kernel.adb
649 else
650 LIBGNAT_TARGET_PAIRS += \
651 s-osinte.ads<s-osinte-vxworks.ads \
652 s-osinte.adb<s-osinte-vxworks.adb
653 endif
654
655 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
656 endif
657
658 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
659
660 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
661 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
662 endif
663
664 ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
665 LIBGNAT_TARGET_PAIRS = \
666 a-intnam.ads<a-intnam-vxworks.ads \
667 a-numaux.ads<a-numaux-vxworks.ads \
668 s-inmaop.adb<s-inmaop-posix.adb \
669 s-interr.adb<s-interr-hwint.adb \
670 s-intman.ads<s-intman-vxworks.ads \
671 s-intman.adb<s-intman-vxworks.adb \
672 s-osinte.adb<s-osinte-vxworks-kernel.adb \
673 s-osinte.ads<s-osinte-vxworks.ads \
674 s-osprim.adb<s-osprim-vxworks.adb \
675 s-parame.ads<s-parame-vxworks.ads \
676 s-parame.adb<s-parame-vxworks.adb \
677 s-stchop.ads<s-stchop-limit.ads \
678 s-stchop.adb<s-stchop-vxworks.adb \
679 s-taprop.adb<s-taprop-vxworks.adb \
680 s-taspri.ads<s-taspri-vxworks.ads \
681 s-tpopsp.adb<s-tpopsp-vxworks.adb \
682 s-vxwork.ads<s-vxwork-arm.ads \
683 g-socthi.ads<g-socthi-vxworks.ads \
684 g-socthi.adb<g-socthi-vxworks.adb \
685 g-stsifd.adb<g-stsifd-sockets.adb \
686 g-sttsne.adb<g-sttsne-vxworks.adb \
687 g-sttsne.ads<g-sttsne-locking.ads \
688 system.ads<system-vxworks-arm.ads
689
690 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
691
692 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
693 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
694
695 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
696 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
697 endif
698
699 ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
700 LIBGNAT_TARGET_PAIRS = \
701 a-intnam.ads<a-intnam-vxworks.ads \
702 a-numaux.ads<a-numaux-vxworks.ads \
703 s-inmaop.adb<s-inmaop-posix.adb \
704 s-interr.adb<s-interr-hwint.adb \
705 s-intman.ads<s-intman-vxworks.ads \
706 s-intman.adb<s-intman-vxworks.adb \
707 s-osinte.adb<s-osinte-vxworks-kernel.adb \
708 s-osinte.ads<s-osinte-vxworks.ads \
709 s-osprim.adb<s-osprim-vxworks.adb \
710 s-parame.ads<s-parame-vxworks.ads \
711 s-parame.adb<s-parame-vxworks.adb \
712 s-stchop.ads<s-stchop-limit.ads \
713 s-stchop.adb<s-stchop-vxworks.adb \
714 s-taprop.adb<s-taprop-vxworks.adb \
715 s-taspri.ads<s-taspri-vxworks.ads \
716 s-tpopsp.adb<s-tpopsp-vxworks.adb \
717 s-vxwork.ads<s-vxwork-mips.ads \
718 g-socthi.ads<g-socthi-vxworks.ads \
719 g-socthi.adb<g-socthi-vxworks.adb \
720 g-stsifd.adb<g-stsifd-sockets.adb \
721 g-sttsne.adb<g-sttsne-vxworks.adb \
722 g-sttsne.ads<g-sttsne-locking.ads \
723 system.ads<system-vxworks-mips.ads
724
725 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
726
727 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
728 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
729
730 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
731 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
732 endif
733
734 ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
735 LIBGNAT_TARGET_PAIRS_32 = \
736 a-intnam.ads<a-intnam-solaris.ads \
737 s-inmaop.adb<s-inmaop-posix.adb \
738 s-intman.adb<s-intman-solaris.adb \
739 s-osinte.adb<s-osinte-solaris.adb \
740 s-osinte.ads<s-osinte-solaris.ads \
741 s-osprim.adb<s-osprim-solaris.adb \
742 s-taprop.adb<s-taprop-solaris.adb \
743 s-tasinf.adb<s-tasinf-solaris.adb \
744 s-tasinf.ads<s-tasinf-solaris.ads \
745 s-taspri.ads<s-taspri-solaris.ads \
746 s-tpopsp.adb<s-tpopsp-solaris.adb \
747 g-soliop.ads<g-soliop-solaris.ads \
748 system.ads<system-solaris-sparc.ads
749
750 LIBGNAT_TARGET_PAIRS_64 = \
751 a-intnam.ads<a-intnam-solaris.ads \
752 s-inmaop.adb<s-inmaop-posix.adb \
753 s-intman.adb<s-intman-solaris.adb \
754 s-osinte.adb<s-osinte-solaris.adb \
755 s-osinte.ads<s-osinte-solaris.ads \
756 s-osprim.adb<s-osprim-solaris.adb \
757 s-taprop.adb<s-taprop-solaris.adb \
758 s-tasinf.adb<s-tasinf-solaris.adb \
759 s-tasinf.ads<s-tasinf-solaris.ads \
760 s-taspri.ads<s-taspri-solaris.ads \
761 s-tpopsp.adb<s-tpopsp-solaris.adb \
762 g-soliop.ads<g-soliop-solaris.ads \
763 system.ads<system-solaris-sparcv9.ads
764
765 ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
766 ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
767 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
768 else
769 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
770 endif
771 else
772 ifeq ($(strip $(MULTISUBDIR)),/sparcv7)
773 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
774 else
775 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
776 endif
777 endif
778
779 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
780
781 EH_MECHANISM=-gcc
782 THREADSLIB = -lposix4 -lthread
783 MISCLIB = -lposix4 -lnsl -lsocket
784 SO_OPTS = -Wl,-h,
785 GNATLIB_SHARED = gnatlib-shared-dual
786 GMEM_LIB = gmemlib
787 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
788 LIBRARY_VERSION := $(LIB_VERSION)
789
790 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
791 LIBGNAT_TARGET_PAIRS = \
792 a-intnam.ads<a-intnam-solaris.ads \
793 s-inmaop.adb<s-inmaop-posix.adb \
794 s-intman.adb<s-intman-posix.adb \
795 s-osinte.adb<s-osinte-posix.adb \
796 s-osinte.ads<s-osinte-solaris-posix.ads \
797 s-osprim.adb<s-osprim-solaris.adb \
798 s-taprop.adb<s-taprop-posix.adb \
799 s-taspri.ads<s-taspri-posix.ads \
800 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
801 g-soliop.ads<g-soliop-solaris.ads \
802 system.ads<system-solaris-sparc.ads
803
804 THREADSLIB = -lposix4 -lpthread
805 endif
806
807 ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),)
808 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
809 endif
810 endif
811
812 ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
813 LIBGNAT_TARGET_PAIRS = \
814 a-numaux.adb<a-numaux-x86.adb \
815 a-numaux.ads<a-numaux-x86.ads \
816 a-intnam.ads<a-intnam-solaris.ads \
817 s-inmaop.adb<s-inmaop-posix.adb \
818 s-intman.adb<s-intman-solaris.adb \
819 s-osinte.adb<s-osinte-solaris.adb \
820 s-osinte.ads<s-osinte-solaris.ads \
821 s-osprim.adb<s-osprim-solaris.adb \
822 s-taprop.adb<s-taprop-solaris.adb \
823 s-tasinf.adb<s-tasinf-solaris.adb \
824 s-tasinf.ads<s-tasinf-solaris.ads \
825 s-taspri.ads<s-taspri-solaris.ads \
826 s-tpopsp.adb<s-tpopsp-solaris.adb \
827 g-bytswa.adb<g-bytswa-x86.adb \
828 g-soliop.ads<g-soliop-solaris.ads \
829 system.ads<system-solaris-x86.ads
830
831 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
832
833 EH_MECHANISM=-gcc
834 THREADSLIB = -lposix4 -lthread
835 MISCLIB = -lposix4 -lnsl -lsocket
836 SO_OPTS = -Wl,-h,
837 GNATLIB_SHARED = gnatlib-shared-dual
838 GMEM_LIB = gmemlib
839 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
840 LIBRARY_VERSION := $(LIB_VERSION)
841 endif
842
843 ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
844 LIBGNAT_TARGET_PAIRS = \
845 a-intnam.ads<a-intnam-linux.ads \
846 a-numaux.adb<a-numaux-x86.adb \
847 a-numaux.ads<a-numaux-x86.ads \
848 g-bytswa.adb<g-bytswa-x86.adb \
849 s-inmaop.adb<s-inmaop-posix.adb \
850 s-intman.adb<s-intman-posix.adb \
851 s-osprim.adb<s-osprim-posix.adb \
852 s-taspri.ads<s-taspri-posix.ads \
853 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
854 g-sercom.adb<g-sercom-linux.adb \
855 system.ads<system-linux-x86.ads
856
857 ifeq ($(strip $(filter-out marte,$(THREAD_KIND))),)
858 LIBGNAT_TARGET_PAIRS += \
859 a-exetim.adb<a-exetim-linux-marte.adb \
860 a-exetim.ads<a-exetim-linux-marte.ads \
861 a-extiti.adb<a-extiti-linux-marte.adb \
862 a-extiti.ads<a-extiti-linux-marte.ads \
863 a-rttiev.adb<a-rttiev-linux-marte.adb \
864 a-rttiev.ads<a-rttiev-linux-marte.ads \
865 s-osinte.adb<s-osinte-linux-marte.adb \
866 s-osinte.ads<s-osinte-linux-marte.ads \
867 s-taprop.adb<s-taprop-linux-marte.adb
868
869 EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o a-extiti.o
870
871 EH_MECHANISM=
872 THREADSLIB = -lmarte
873 else
874 LIBGNAT_TARGET_PAIRS += \
875 s-linux.ads<s-linux.ads \
876 s-osinte.adb<s-osinte-posix.adb
877
878 ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
879 LIBGNAT_TARGET_PAIRS += \
880 s-osinte.ads<s-osinte-linux-xenomai.ads \
881 s-taprop.adb<s-taprop-linux-xenomai.adb
882
883 EH_MECHANISM=
884 else
885 LIBGNAT_TARGET_PAIRS += \
886 s-osinte.ads<s-osinte-linux.ads \
887 s-taprop.adb<s-taprop-linux.adb \
888 s-tasinf.ads<s-tasinf-linux.ads \
889 s-tasinf.adb<s-tasinf-linux.adb
890
891 EH_MECHANISM=-gcc
892 endif
893
894 THREADSLIB = -lpthread
895 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
896 endif
897
898 TOOLS_TARGET_PAIRS = \
899 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
900 indepsw.adb<indepsw-gnu.adb
901
902 GNATLIB_SHARED = gnatlib-shared-dual
903 GMEM_LIB = gmemlib
904 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
905 LIBRARY_VERSION := $(LIB_VERSION)
906 endif
907
908 ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
909 LIBGNAT_TARGET_PAIRS = \
910 a-intnam.ads<a-intnam-freebsd.ads \
911 a-numaux.adb<a-numaux-x86.adb \
912 a-numaux.ads<a-numaux-x86.ads \
913 s-inmaop.adb<s-inmaop-posix.adb \
914 s-intman.adb<s-intman-posix.adb \
915 s-osinte.adb<s-osinte-posix.adb \
916 s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
917 s-osprim.adb<s-osprim-posix.adb \
918 s-taprop.adb<s-taprop-linux.adb \
919 s-tasinf.ads<s-tasinf-linux.ads \
920 s-tasinf.adb<s-tasinf-linux.adb \
921 s-taspri.ads<s-taspri-posix.ads \
922 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
923 system.ads<system-freebsd-x86.ads
924
925 TOOLS_TARGET_PAIRS = \
926 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
927 indepsw.adb<indepsw-gnu.adb
928
929 EH_MECHANISM=-gcc
930 THREADSLIB = -lpthread
931 GNATLIB_SHARED = gnatlib-shared-dual
932 GMEM_LIB = gmemlib
933 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
934 LIBRARY_VERSION := $(LIB_VERSION)
935 endif
936
937 ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
938 LIBGNAT_TARGET_PAIRS = \
939 a-intnam.ads<a-intnam-freebsd.ads \
940 a-numaux.adb<a-numaux-x86.adb \
941 a-numaux.ads<a-numaux-x86.ads \
942 g-bytswa.adb<g-bytswa-x86.adb \
943 s-inmaop.adb<s-inmaop-posix.adb \
944 s-intman.adb<s-intman-posix.adb \
945 s-osinte.adb<s-osinte-freebsd.adb \
946 s-osinte.ads<s-osinte-freebsd.ads \
947 s-osprim.adb<s-osprim-posix.adb \
948 s-taprop.adb<s-taprop-posix.adb \
949 s-taspri.ads<s-taspri-posix.ads \
950 s-tpopsp.adb<s-tpopsp-posix.adb \
951 system.ads<system-freebsd-x86.ads
952
953 TOOLS_TARGET_PAIRS = \
954 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
955 GNATLIB_SHARED = gnatlib-shared-dual
956
957 EH_MECHANISM=-gcc
958 THREADSLIB= -lpthread
959 GMEM_LIB = gmemlib
960 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
961 LIBRARY_VERSION := $(LIB_VERSION)
962 endif
963
964 ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
965 LIBGNAT_TARGET_PAIRS_COMMON = \
966 a-intnam.ads<a-intnam-linux.ads \
967 s-inmaop.adb<s-inmaop-posix.adb \
968 s-intman.adb<s-intman-posix.adb \
969 s-linux.ads<s-linux.ads \
970 s-osinte.adb<s-osinte-posix.adb \
971 s-osinte.ads<s-osinte-linux.ads \
972 s-osprim.adb<s-osprim-posix.adb \
973 s-taprop.adb<s-taprop-linux.adb \
974 s-tasinf.ads<s-tasinf-linux.ads \
975 s-tasinf.adb<s-tasinf-linux.adb \
976 s-taspri.ads<s-taspri-posix-noaltstack.ads \
977 s-tpopsp.adb<s-tpopsp-posix-foreign.adb
978
979 LIBGNAT_TARGET_PAIRS_32 = \
980 system.ads<system-linux-s390.ads
981
982 LIBGNAT_TARGET_PAIRS_64 = \
983 system.ads<system-linux-s390x.ads
984
985 ifeq ($(strip $(filter-out s390x,$(arch))),)
986 ifeq ($(strip $(MULTISUBDIR)),/32)
987 LIBGNAT_TARGET_PAIRS = \
988 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
989 else
990 LIBGNAT_TARGET_PAIRS = \
991 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
992 endif
993 else
994 LIBGNAT_TARGET_PAIRS = \
995 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
996 endif
997
998 TOOLS_TARGET_PAIRS = \
999 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
1000
1001 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1002 EH_MECHANISM=-gcc
1003 THREADSLIB = -lpthread
1004 GNATLIB_SHARED = gnatlib-shared-dual
1005 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1006 LIBRARY_VERSION := $(LIB_VERSION)
1007 endif
1008
1009 ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
1010 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
1011 LIBGNAT_TARGET_PAIRS = \
1012 a-intnam.ads<a-intnam-irix.ads \
1013 s-inmaop.adb<s-inmaop-posix.adb \
1014 s-intman.adb<s-intman-irix.adb \
1015 s-mastop.adb<s-mastop-irix.adb \
1016 s-osinte.adb<s-osinte-irix.adb \
1017 s-osinte.ads<s-osinte-irix.ads \
1018 s-osprim.adb<s-osprim-posix.adb \
1019 s-proinf.adb<s-proinf-irix-athread.adb \
1020 s-proinf.ads<s-proinf-irix-athread.ads \
1021 s-taprop.adb<s-taprop-irix.adb \
1022 s-tasinf.ads<s-tasinf-irix.ads \
1023 s-taspri.ads<s-taspri-posix.ads \
1024 s-tpopsp.adb<s-tpopsp-posix.adb \
1025 s-traceb.adb<s-traceb-mastop.adb \
1026 system.ads<system-irix-n32.ads
1027
1028 THREADSLIB = -lpthread
1029 GNATLIB_SHARED = gnatlib-shared-default
1030
1031 else
1032 LIBGNAT_TARGET_PAIRS += \
1033 s-mastop.adb<s-mastop-irix.adb \
1034 s-osprim.adb<s-osprim-posix.adb \
1035 s-traceb.adb<s-traceb-mastop.adb \
1036 system.ads<system-irix-o32.ads
1037 endif
1038
1039 EH_MECHANISM=-gcc
1040 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-irix.adb
1041 TGT_LIB = -lexc
1042 MISCLIB = -lexc
1043 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1044 LIBRARY_VERSION := $(LIB_VERSION)
1045 GMEM_LIB = gmemlib
1046 endif
1047
1048 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
1049 LIBGNAT_TARGET_PAIRS = \
1050 a-excpol.adb<a-excpol-abort.adb \
1051 a-intnam.ads<a-intnam-hpux.ads \
1052 s-inmaop.adb<s-inmaop-posix.adb \
1053 s-interr.adb<s-interr-sigaction.adb \
1054 s-intman.adb<s-intman-posix.adb \
1055 s-osinte.adb<s-osinte-hpux-dce.adb \
1056 s-osinte.ads<s-osinte-hpux-dce.ads \
1057 s-parame.ads<s-parame-hpux.ads \
1058 s-osprim.adb<s-osprim-posix.adb \
1059 s-taprop.adb<s-taprop-hpux-dce.adb \
1060 s-taspri.ads<s-taspri-hpux-dce.ads \
1061 s-tpopsp.adb<s-tpopsp-posix.adb \
1062 system.ads<system-hpux.ads
1063
1064 EH_MECHANISM=-gcc
1065 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1066 endif
1067
1068 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
1069 LIBGNAT_TARGET_PAIRS = \
1070 a-intnam.ads<a-intnam-hpux.ads \
1071 s-inmaop.adb<s-inmaop-posix.adb \
1072 s-intman.adb<s-intman-posix.adb \
1073 s-osinte.adb<s-osinte-posix.adb \
1074 s-osinte.ads<s-osinte-hpux.ads \
1075 s-parame.ads<s-parame-hpux.ads \
1076 s-osprim.adb<s-osprim-posix.adb \
1077 s-traceb.adb<s-traceb-hpux.adb \
1078 s-taprop.adb<s-taprop-posix.adb \
1079 s-taspri.ads<s-taspri-posix.ads \
1080 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1081 system.ads<system-hpux.ads
1082
1083 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb
1084 EH_MECHANISM=-gcc
1085 TGT_LIB = /usr/lib/libcl.a
1086 THREADSLIB = -lpthread
1087 GMEM_LIB = gmemlib
1088 soext = .sl
1089 SO_OPTS = -Wl,+h,
1090 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1091 GNATLIB_SHARED = gnatlib-shared-dual
1092 LIBRARY_VERSION := $(LIB_VERSION)
1093 endif
1094
1095 ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
1096 LIBGNAT_TARGET_PAIRS = \
1097 a-intnam.ads<a-intnam-aix.ads \
1098 s-inmaop.adb<s-inmaop-posix.adb \
1099 s-intman.adb<s-intman-posix.adb \
1100 s-osinte.adb<s-osinte-aix.adb \
1101 s-osinte.ads<s-osinte-aix.ads \
1102 s-osprim.adb<s-osprim-posix.adb \
1103 s-taprop.adb<s-taprop-posix.adb \
1104 s-taspri.ads<s-taspri-posix.ads \
1105 s-tpopsp.adb<s-tpopsp-posix.adb \
1106 system.ads<system-aix.ads
1107
1108 THREADSLIB = -lpthreads
1109 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1110
1111 TOOLS_TARGET_PAIRS = \
1112 mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
1113 indepsw.adb<indepsw-aix.adb
1114
1115 GMEM_LIB = gmemlib
1116 endif
1117
1118 ifeq ($(strip $(filter-out lynxos,$(osys))),)
1119 TOOLS_TARGET_PAIRS = \
1120 mlib-tgt-specific.adb<mlib-tgt-specific-lynxos.adb \
1121 indepsw.adb<indepsw-gnu.adb
1122
1123 ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
1124 LIBGNAT_TARGET_PAIRS = \
1125 a-numaux.adb<a-numaux-x86.adb \
1126 a-numaux.ads<a-numaux-x86.ads \
1127 a-intnam.ads<a-intnam-lynxos.ads \
1128 g-bytswa.adb<g-bytswa-x86.adb \
1129 g-sttsne.adb<g-sttsne-locking.adb \
1130 g-sttsne.ads<g-sttsne-locking.ads \
1131 s-inmaop.adb<s-inmaop-posix.adb \
1132 s-intman.adb<s-intman-posix.adb \
1133 s-osinte.adb<s-osinte-lynxos.adb \
1134 s-osinte.ads<s-osinte-lynxos.ads \
1135 s-osprim.adb<s-osprim-posix.adb \
1136 s-taprop.adb<s-taprop-lynxos.adb \
1137 s-taspri.ads<s-taspri-lynxos.ads \
1138 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1139 system.ads<system-lynxos-x86.ads
1140
1141 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1142
1143 else
1144 LIBGNAT_TARGET_PAIRS = \
1145 a-intnam.ads<a-intnam-lynxos.ads \
1146 g-sttsne.adb<g-sttsne-locking.adb \
1147 g-sttsne.ads<g-sttsne-locking.ads \
1148 s-inmaop.adb<s-inmaop-posix.adb \
1149 s-intman.adb<s-intman-posix.adb \
1150 s-osinte.adb<s-osinte-lynxos.adb \
1151 s-osinte.ads<s-osinte-lynxos.ads \
1152 s-osprim.adb<s-osprim-posix.adb \
1153 s-taprop.adb<s-taprop-lynxos.adb \
1154 s-taspri.ads<s-taspri-lynxos.ads \
1155 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1156 system.ads<system-lynxos-ppc.ads
1157 endif
1158 endif
1159
1160 ifeq ($(strip $(filter-out rtems%,$(osys))),)
1161 LIBGNAT_TARGET_PAIRS = \
1162 system.ads<system-rtems.ads \
1163 a-intnam.ads<a-intnam-rtems.ads \
1164 s-inmaop.adb<s-inmaop-posix.adb \
1165 s-intman.adb<s-intman-posix.adb \
1166 s-osinte.adb<s-osinte-rtems.adb \
1167 s-osinte.ads<s-osinte-rtems.ads \
1168 s-osprim.adb<s-osprim-posix.adb \
1169 s-parame.adb<s-parame-rtems.adb \
1170 s-taprop.adb<s-taprop-posix.adb \
1171 s-taspri.ads<s-taspri-posix.ads \
1172 s-tpopsp.adb<s-tpopsp-rtems.adb \
1173 s-stchop.adb<s-stchop-rtems.adb \
1174 s-interr.adb<s-interr-hwint.adb
1175 endif
1176
1177 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
1178 LIBGNAT_TARGET_PAIRS = \
1179 a-intnam.ads<a-intnam-tru64.ads \
1180 s-inmaop.adb<s-inmaop-posix.adb \
1181 s-intman.adb<s-intman-posix.adb \
1182 s-mastop.adb<s-mastop-tru64.adb \
1183 s-osinte.adb<s-osinte-tru64.adb \
1184 s-osinte.ads<s-osinte-tru64.ads \
1185 s-osprim.adb<s-osprim-unix.adb \
1186 s-taprop.adb<s-taprop-tru64.adb \
1187 s-tasinf.ads<s-tasinf-tru64.ads \
1188 s-taspri.ads<s-taspri-tru64.ads \
1189 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1190 s-traceb.adb<s-traceb-mastop.adb \
1191 system.ads<system-tru64.ads
1192
1193 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb
1194
1195 EH_MECHANISM=-gcc
1196 GMEM_LIB=gmemlib
1197 THREADSLIB = -lpthread -lmach -lexc -lrt
1198 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1199 GNATLIB_SHARED = gnatlib-shared-default
1200 LIBRARY_VERSION := $(LIB_VERSION)
1201 endif
1202
1203 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
1204
1205 soext = .exe
1206 hyphen = _
1207 LN = cp -p
1208 LN_S = cp -p
1209
1210 .SUFFIXES: .sym
1211
1212 .o.sym:
1213 @ gnu:[bin]vmssymvec $<
1214 endif
1215
1216 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1217 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1218 LIBGNAT_TARGET_PAIRS_AUX1 = \
1219 g-enblsp.adb<g-enblsp-vms-ia64.adb \
1220 g-trasym.adb<g-trasym-vms-ia64.adb \
1221 s-asthan.adb<s-asthan-vms-ia64.adb \
1222 s-osinte.adb<s-osinte-vms-ia64.adb \
1223 s-osinte.ads<s-osinte-vms-ia64.ads \
1224 s-vaflop.adb<s-vaflop-vms-ia64.adb \
1225 system.ads<system-vms-ia64.ads
1226
1227 LIBGNAT_TARGET_PAIRS_AUX2 = \
1228 s-parame.ads<s-parame-vms-ia64.ads
1229 else
1230 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1231 LIBGNAT_TARGET_PAIRS_AUX1 = \
1232 g-enblsp.adb<g-enblsp-vms-alpha.adb \
1233 g-trasym.adb<g-trasym-vms-alpha.adb \
1234 s-traent.adb<s-traent-vms.adb \
1235 s-traent.ads<s-traent-vms.ads \
1236 s-asthan.adb<s-asthan-vms-alpha.adb \
1237 s-osinte.adb<s-osinte-vms.adb \
1238 s-osinte.ads<s-osinte-vms.ads \
1239 s-vaflop.adb<s-vaflop-vms-alpha.adb \
1240 system.ads<system-vms_64.ads
1241
1242 ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1243 LIBGNAT_TARGET_PAIRS_AUX2 = \
1244 s-parame.ads<s-parame-vms-restrict.ads
1245 else
1246 LIBGNAT_TARGET_PAIRS_AUX2 = \
1247 s-parame.ads<s-parame-vms-alpha.ads
1248 endif
1249 endif
1250 endif
1251
1252 LIBGNAT_TARGET_PAIRS = \
1253 a-caldel.adb<a-caldel-vms.adb \
1254 a-calend.adb<a-calend-vms.adb \
1255 a-calend.ads<a-calend-vms.ads \
1256 a-dirval.adb<a-dirval-vms.adb \
1257 a-excpol.adb<a-excpol-abort.adb \
1258 a-intnam.ads<a-intnam-vms.ads \
1259 a-numaux.ads<a-numaux-vms.ads \
1260 g-expect.adb<g-expect-vms.adb \
1261 g-socthi.ads<g-socthi-vms.ads \
1262 g-socthi.adb<g-socthi-vms.adb \
1263 g-stsifd.adb<g-stsifd-sockets.adb \
1264 g-sttsne.adb<g-sttsne-locking.adb \
1265 g-sttsne.ads<g-sttsne-locking.ads \
1266 i-c.ads<i-c-vms_64.ads \
1267 i-cstrin.ads<i-cstrin-vms_64.ads \
1268 i-cstrin.adb<i-cstrin-vms_64.adb \
1269 i-cpoint.ads<i-cpoint-vms_64.ads \
1270 i-cpoint.adb<i-cpoint-vms_64.adb \
1271 i-cstrea.adb<i-cstrea-vms.adb \
1272 memtrack.adb<memtrack-vms_64.adb \
1273 s-auxdec.ads<s-auxdec-vms_64.ads \
1274 s-crtl.ads<s-crtl-vms_64.ads \
1275 s-inmaop.adb<s-inmaop-vms.adb \
1276 s-interr.adb<s-interr-vms.adb \
1277 s-intman.adb<s-intman-vms.adb \
1278 s-intman.ads<s-intman-vms.ads \
1279 s-memory.adb<s-memory-vms_64.adb \
1280 s-memory.ads<s-memory-vms_64.ads \
1281 s-osprim.adb<s-osprim-vms.adb \
1282 s-osprim.ads<s-osprim-vms.ads \
1283 s-taprop.adb<s-taprop-vms.adb \
1284 s-taspri.ads<s-taspri-vms.ads \
1285 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1286 s-tpopde.adb<s-tpopde-vms.adb \
1287 s-tpopde.ads<s-tpopde-vms.ads \
1288 $(LIBGNAT_TARGET_PAIRS_AUX1) \
1289 $(LIBGNAT_TARGET_PAIRS_AUX2)
1290
1291 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1292 TOOLS_TARGET_PAIRS= \
1293 mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
1294 symbols.adb<symbols-vms.adb \
1295 symbols-processing.adb<symbols-processing-vms-ia64.adb
1296 else
1297 TOOLS_TARGET_PAIRS= \
1298 mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
1299 symbols.adb<symbols-vms.adb \
1300 symbols-processing.adb<symbols-processing-vms-alpha.adb
1301 endif
1302
1303 adamsg.o: adamsg.msg
1304 -$(DECC) --cc=message adamsg.msg -o adamsg.o
1305
1306 EXTRA_GNATMAKE_OBJS = mlib-tgt-vms_common.o
1307
1308 GMEM_LIB = gmemlib
1309 EH_MECHANISM=-gcc
1310 GNATLIB_SHARED=gnatlib-shared-vms
1311 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1312 EXTRA_LIBGNAT_SRCS=vmshandler.asm
1313 EXTRA_LIBGNAT_OBJS=vmshandler.o
1314 endif
1315 EXTRA_LIBGNAT_SRCS+=adamsg.msg
1316 EXTRA_LIBGNAT_OBJS+=adamsg.o
1317 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1318 EXTRA_GNATTOOLS = \
1319 ../../gnatlbr$(exeext) \
1320 ../../gnatsym$(exeext) \
1321 ../../vms_help$(exeext) \
1322 ../../gnat.hlp
1323 # This command transforms (YYYYMMDD) into YY,MMDD
1324 GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\).*/\2,\3/')
1325 TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1326 LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1327 endif
1328
1329 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1330 LIBGNAT_TARGET_PAIRS = \
1331 a-dirval.adb<a-dirval-mingw.adb \
1332 a-excpol.adb<a-excpol-abort.adb \
1333 a-numaux.adb<a-numaux-x86.adb \
1334 a-numaux.ads<a-numaux-x86.ads \
1335 s-gloloc.adb<s-gloloc-mingw.adb \
1336 s-inmaop.adb<s-inmaop-dummy.adb \
1337 s-memory.adb<s-memory-mingw.adb \
1338 s-taspri.ads<s-taspri-mingw.ads \
1339 s-tasinf.adb<s-tasinf-mingw.adb \
1340 s-tasinf.ads<s-tasinf-mingw.ads \
1341 g-bytswa.adb<g-bytswa-x86.adb \
1342 g-socthi.ads<g-socthi-mingw.ads \
1343 g-socthi.adb<g-socthi-mingw.adb \
1344 g-stsifd.adb<g-stsifd-sockets.adb \
1345 g-soliop.ads<g-soliop-mingw.ads
1346
1347 ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
1348 LIBGNAT_TARGET_PAIRS += \
1349 s-intman.adb<s-intman-dummy.adb \
1350 s-osinte.ads<s-osinte-rtx.ads \
1351 s-osprim.adb<s-osprim-rtx.adb \
1352 s-taprop.adb<s-taprop-rtx.adb
1353
1354 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o
1355
1356 ifeq ($(strip $(filter-out rtx_w32,$(THREAD_KIND))),)
1357 LIBGNAT_TARGET_PAIRS += system.ads<system-rtx.ads
1358
1359 EH_MECHANISM=-gcc
1360 else
1361 LIBGNAT_TARGET_PAIRS += \
1362 system.ads<system-rtx-rtss.ads \
1363 s-parame.adb<s-parame-vxworks.adb
1364
1365 EH_MECHANISM=
1366 endif
1367
1368 else
1369 LIBGNAT_TARGET_PAIRS += \
1370 a-exetim.adb<a-exetim-mingw.adb \
1371 a-exetim.ads<a-exetim-mingw.ads \
1372 a-intnam.ads<a-intnam-mingw.ads \
1373 g-sercom.adb<g-sercom-mingw.adb \
1374 s-interr.adb<s-interr-sigaction.adb \
1375 s-intman.adb<s-intman-mingw.adb \
1376 s-osinte.ads<s-osinte-mingw.ads \
1377 s-osprim.adb<s-osprim-mingw.adb \
1378 s-taprop.adb<s-taprop-mingw.adb
1379
1380 ifeq ($(strip $(filter-out x86_64%,$(arch))),)
1381 LIBGNAT_TARGET_PAIRS += \
1382 system.ads<system-mingw-x86_64.ads
1383 else
1384 LIBGNAT_TARGET_PAIRS += \
1385 system.ads<system-mingw.ads
1386 endif
1387
1388 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o s-winext.o g-regist.o
1389 EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
1390
1391 MISCLIB = -lwsock32
1392
1393 # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1394 # auto-import support for array/record will be done.
1395 GNATLIB_SHARED = gnatlib-shared-win32
1396
1397 EH_MECHANISM=-gcc
1398 endif
1399
1400 TOOLS_TARGET_PAIRS= \
1401 mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
1402 indepsw.adb<indepsw-mingw.adb
1403
1404 GMEM_LIB = gmemlib
1405 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1406 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1407 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1408 soext = .dll
1409 LIBRARY_VERSION := $(LIB_VERSION)
1410 endif
1411
1412 ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
1413 LIBGNAT_TARGET_PAIRS = \
1414 a-intnam.ads<a-intnam-linux.ads \
1415 s-inmaop.adb<s-inmaop-posix.adb \
1416 s-intman.adb<s-intman-posix.adb \
1417 s-linux.ads<s-linux.ads \
1418 s-osinte.adb<s-osinte-posix.adb \
1419 s-osinte.ads<s-osinte-linux.ads \
1420 s-osprim.adb<s-osprim-posix.adb \
1421 s-taprop.adb<s-taprop-linux.adb \
1422 s-tasinf.ads<s-tasinf-linux.ads \
1423 s-tasinf.adb<s-tasinf-linux.adb \
1424 s-taspri.ads<s-taspri-posix.ads \
1425 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1426 system.ads<system-linux-mips.ads
1427
1428 EH_MECHANISM=-gcc
1429 THREADSLIB = -lpthread
1430 GNATLIB_SHARED = gnatlib-shared-dual
1431 GMEM_LIB = gmemlib
1432 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1433 LIBRARY_VERSION := $(LIB_VERSION)
1434 endif
1435
1436 ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
1437 LIBGNAT_TARGET_PAIRS = \
1438 a-intnam.ads<a-intnam-linux.ads \
1439 s-inmaop.adb<s-inmaop-posix.adb \
1440 s-intman.adb<s-intman-posix.adb \
1441 s-linux.ads<s-linux.ads \
1442 s-osinte.adb<s-osinte-posix.adb \
1443 s-osinte.ads<s-osinte-linux.ads \
1444 s-osprim.adb<s-osprim-posix.adb \
1445 s-taprop.adb<s-taprop-linux.adb \
1446 s-tasinf.ads<s-tasinf-linux.ads \
1447 s-tasinf.adb<s-tasinf-linux.adb \
1448 s-taspri.ads<s-taspri-posix.ads \
1449 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1450 system.ads<system-linux-mipsel.ads
1451
1452 EH_MECHANISM=-gcc
1453 THREADSLIB = -lpthread
1454 GNATLIB_SHARED = gnatlib-shared-dual
1455 GMEM_LIB = gmemlib
1456 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1457 LIBRARY_VERSION := $(LIB_VERSION)
1458 endif
1459
1460 ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
1461 LIBGNAT_TARGET_PAIRS_COMMON = \
1462 a-intnam.ads<a-intnam-linux.ads \
1463 s-inmaop.adb<s-inmaop-posix.adb \
1464 s-intman.adb<s-intman-posix.adb \
1465 s-linux.ads<s-linux.ads \
1466 s-osinte.adb<s-osinte-posix.adb \
1467 s-osinte.ads<s-osinte-linux.ads \
1468 s-osprim.adb<s-osprim-posix.adb \
1469 s-taprop.adb<s-taprop-linux.adb \
1470 s-tasinf.ads<s-tasinf-linux.ads \
1471 s-tasinf.adb<s-tasinf-linux.adb \
1472 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1473 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1474 g-sercom.adb<g-sercom-linux.adb
1475
1476 LIBGNAT_TARGET_PAIRS_32 = \
1477 system.ads<system-linux-ppc.ads
1478
1479 LIBGNAT_TARGET_PAIRS_64 = \
1480 system.ads<system-linux-ppc64.ads
1481
1482 ifeq ($(strip $(MULTISUBDIR)),/64)
1483 LIBGNAT_TARGET_PAIRS = \
1484 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1485 else
1486 LIBGNAT_TARGET_PAIRS = \
1487 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1488 endif
1489
1490 TOOLS_TARGET_PAIRS = \
1491 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1492 indepsw.adb<indepsw-gnu.adb
1493
1494 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1495 EH_MECHANISM=-gcc
1496 THREADSLIB = -lpthread
1497 GNATLIB_SHARED = gnatlib-shared-dual
1498 GMEM_LIB = gmemlib
1499 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1500 LIBRARY_VERSION := $(LIB_VERSION)
1501 endif
1502
1503 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
1504 LIBGNAT_TARGET_PAIRS_32 = \
1505 a-intnam.ads<a-intnam-linux.ads \
1506 s-inmaop.adb<s-inmaop-posix.adb \
1507 s-intman.adb<s-intman-posix.adb \
1508 s-linux.ads<s-linux.ads \
1509 s-osinte.adb<s-osinte-posix.adb \
1510 s-osinte.ads<s-osinte-linux.ads \
1511 s-osprim.adb<s-osprim-posix.adb \
1512 s-taprop.adb<s-taprop-linux.adb \
1513 s-tasinf.ads<s-tasinf-linux.ads \
1514 s-tasinf.adb<s-tasinf-linux.adb \
1515 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1516 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1517 system.ads<system-linux-sparc.ads
1518
1519 LIBGNAT_TARGET_PAIRS_64 = \
1520 a-intnam.ads<a-intnam-linux.ads \
1521 s-inmaop.adb<s-inmaop-posix.adb \
1522 s-intman.adb<s-intman-posix.adb \
1523 s-linux.ads<s-linux.ads \
1524 s-osinte.adb<s-osinte-posix.adb \
1525 s-osinte.ads<s-osinte-linux.ads \
1526 s-osprim.adb<s-osprim-posix.adb \
1527 s-taprop.adb<s-taprop-linux.adb \
1528 s-tasinf.ads<s-tasinf-linux.ads \
1529 s-tasinf.adb<s-tasinf-linux.adb \
1530 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1531 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1532 system.ads<system-linux-sparcv9.ads
1533
1534 ifeq ($(strip $(MULTISUBDIR)),/64)
1535 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
1536 else
1537 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
1538 endif
1539
1540 TOOLS_TARGET_PAIRS = \
1541 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1542 indepsw.adb<indepsw-gnu.adb
1543
1544 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1545 EH_MECHANISM=-gcc
1546 THREADSLIB = -lpthread
1547 GNATLIB_SHARED = gnatlib-shared-dual
1548 GMEM_LIB = gmemlib
1549 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1550 LIBRARY_VERSION := $(LIB_VERSION)
1551 endif
1552
1553 ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1554 LIBGNAT_TARGET_PAIRS = \
1555 a-intnam.ads<a-intnam-linux.ads \
1556 s-inmaop.adb<s-inmaop-posix.adb \
1557 s-intman.adb<s-intman-posix.adb \
1558 s-linux.ads<s-linux-hppa.ads \
1559 s-osinte.adb<s-osinte-posix.adb \
1560 s-osinte.ads<s-osinte-linux.ads \
1561 s-osprim.adb<s-osprim-posix.adb \
1562 s-taprop.adb<s-taprop-linux.adb \
1563 s-tasinf.ads<s-tasinf-linux.ads \
1564 s-tasinf.adb<s-tasinf-linux.adb \
1565 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1566 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1567 system.ads<system-linux-hppa.ads
1568
1569 TOOLS_TARGET_PAIRS = \
1570 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1571 indepsw.adb<indepsw-gnu.adb
1572
1573 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1574 EH_MECHANISM=-gcc
1575 THREADSLIB = -lpthread
1576 GNATLIB_SHARED = gnatlib-shared-dual
1577 GMEM_LIB = gmemlib
1578 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1579 LIBRARY_VERSION := $(LIB_VERSION)
1580 endif
1581
1582 ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
1583 LIBGNAT_TARGET_PAIRS = \
1584 a-intnam.ads<a-intnam-linux.ads \
1585 s-inmaop.adb<s-inmaop-posix.adb \
1586 s-intman.adb<s-intman-posix.adb \
1587 s-linux.ads<s-linux.ads \
1588 s-osinte.adb<s-osinte-posix.adb \
1589 s-osinte.ads<s-osinte-linux.ads \
1590 s-osprim.adb<s-osprim-posix.adb \
1591 s-taprop.adb<s-taprop-linux.adb \
1592 s-tasinf.ads<s-tasinf-linux.ads \
1593 s-tasinf.adb<s-tasinf-linux.adb \
1594 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1595 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1596 system.ads<system-linux-sh4.ads
1597
1598 TOOLS_TARGET_PAIRS = \
1599 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1600 indepsw.adb<indepsw-linux.adb
1601
1602 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1603 EH_MECHANISM=-gcc
1604 MISCLIB=
1605 THREADSLIB = -lpthread
1606 GNATLIB_SHARED = gnatlib-shared-dual
1607 GMEM_LIB = gmemlib
1608 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1609 LIBRARY_VERSION := $(LIB_VERSION)
1610 endif
1611
1612 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1613 LIBGNAT_TARGET_PAIRS = \
1614 a-intnam.ads<a-intnam-linux.ads \
1615 a-numaux.ads<a-numaux-libc-x86.ads \
1616 s-inmaop.adb<s-inmaop-posix.adb \
1617 s-intman.adb<s-intman-posix.adb \
1618 s-linux.ads<s-linux.ads \
1619 s-osinte.ads<s-osinte-linux.ads \
1620 s-osinte.adb<s-osinte-posix.adb \
1621 s-osprim.adb<s-osprim-posix.adb \
1622 s-taprop.adb<s-taprop-linux.adb \
1623 s-tasinf.ads<s-tasinf-linux.ads \
1624 s-tasinf.adb<s-tasinf-linux.adb \
1625 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1626 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1627 g-sercom.adb<g-sercom-linux.adb \
1628 system.ads<system-linux-ia64.ads
1629
1630 TOOLS_TARGET_PAIRS = \
1631 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1632 indepsw.adb<indepsw-gnu.adb
1633
1634 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1635 EH_MECHANISM=-gcc
1636 MISCLIB=
1637 THREADSLIB=-lpthread
1638 GNATLIB_SHARED=gnatlib-shared-dual
1639 GMEM_LIB = gmemlib
1640 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1641 LIBRARY_VERSION := $(LIB_VERSION)
1642 endif
1643
1644 ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
1645 LIBGNAT_TARGET_PAIRS = \
1646 a-intnam.ads<a-intnam-linux.ads \
1647 s-inmaop.adb<s-inmaop-posix.adb \
1648 s-intman.adb<s-intman-posix.adb \
1649 s-linux.ads<s-linux-alpha.ads \
1650 s-osinte.ads<s-osinte-linux.ads \
1651 s-osinte.adb<s-osinte-posix.adb \
1652 s-osprim.adb<s-osprim-posix.adb \
1653 s-taprop.adb<s-taprop-linux.adb \
1654 s-tasinf.ads<s-tasinf-linux.ads \
1655 s-tasinf.adb<s-tasinf-linux.adb \
1656 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1657 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1658 system.ads<system-linux-alpha.ads
1659
1660 TOOLS_TARGET_PAIRS = \
1661 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1662 indepsw.adb<indepsw-gnu.adb
1663
1664 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1665 EH_MECHANISM=-gcc
1666 MISCLIB=
1667 THREADSLIB=-lpthread
1668 GNATLIB_SHARED=gnatlib-shared-dual
1669 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1670 LIBRARY_VERSION := $(LIB_VERSION)
1671 endif
1672
1673 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
1674 LIBGNAT_TARGET_PAIRS = \
1675 a-intnam.ads<a-intnam-linux.ads \
1676 a-numaux.adb<a-numaux-x86.adb \
1677 a-numaux.ads<a-numaux-x86.ads \
1678 s-inmaop.adb<s-inmaop-posix.adb \
1679 s-intman.adb<s-intman-posix.adb \
1680 s-linux.ads<s-linux.ads \
1681 s-osinte.ads<s-osinte-linux.ads \
1682 s-osinte.adb<s-osinte-posix.adb \
1683 s-osprim.adb<s-osprim-posix.adb \
1684 s-taprop.adb<s-taprop-linux.adb \
1685 s-tasinf.ads<s-tasinf-linux.ads \
1686 s-tasinf.adb<s-tasinf-linux.adb \
1687 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1688 s-taspri.ads<s-taspri-posix.ads \
1689 g-sercom.adb<g-sercom-linux.adb \
1690 system.ads<system-linux-x86_64.ads
1691
1692 TOOLS_TARGET_PAIRS = \
1693 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1694 indepsw.adb<indepsw-gnu.adb
1695
1696 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1697 EH_MECHANISM=-gcc
1698 THREADSLIB=-lpthread
1699 GNATLIB_SHARED=gnatlib-shared-dual
1700 GMEM_LIB = gmemlib
1701 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1702 LIBRARY_VERSION := $(LIB_VERSION)
1703 endif
1704
1705 ifeq ($(strip $(filter-out darwin%,$(osys))),)
1706 ifeq ($(strip $(filter-out %86,$(arch))),)
1707 LIBGNAT_TARGET_PAIRS = \
1708 a-intnam.ads<a-intnam-darwin.ads \
1709 s-inmaop.adb<s-inmaop-posix.adb \
1710 s-intman.adb<s-intman-posix.adb \
1711 s-osinte.adb<s-osinte-darwin.adb \
1712 s-osinte.ads<s-osinte-darwin.ads \
1713 s-osprim.adb<s-osprim-posix.adb \
1714 s-taprop.adb<s-taprop-posix.adb \
1715 s-taspri.ads<s-taspri-posix.ads \
1716 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1717 a-numaux.ads<a-numaux-x86.ads \
1718 a-numaux.adb<a-numaux-x86.adb \
1719 system.ads<system-darwin-x86.ads
1720 else
1721 LIBGNAT_TARGET_PAIRS = \
1722 a-intnam.ads<a-intnam-darwin.ads \
1723 s-inmaop.adb<s-inmaop-posix.adb \
1724 s-intman.adb<s-intman-posix.adb \
1725 s-osinte.adb<s-osinte-darwin.adb \
1726 s-osinte.ads<s-osinte-darwin.ads \
1727 s-osprim.adb<s-osprim-posix.adb \
1728 s-taprop.adb<s-taprop-posix.adb \
1729 s-taspri.ads<s-taspri-posix.ads \
1730 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1731 a-numaux.ads<a-numaux-darwin.ads \
1732 a-numaux.adb<a-numaux-darwin.adb \
1733 system.ads<system-darwin-ppc.ads
1734 endif
1735
1736 TOOLS_TARGET_PAIRS = \
1737 mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb
1738
1739 EH_MECHANISM=-gcc
1740 GNATLIB_SHARED = gnatlib-shared-darwin
1741 SO_OPTS = -Wl,-flat_namespace -shared-libgcc
1742 RANLIB = ranlib -c
1743 GMEM_LIB = gmemlib
1744 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1745 LIBRARY_VERSION := $(LIB_VERSION)
1746 soext = .dylib
1747 endif
1748
1749 ifneq ($(EH_MECHANISM),)
1750 LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
1751 EXTRA_LIBGNAT_SRCS+=raise$(EH_MECHANISM).c
1752 EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
1753 endif
1754
1755 # Use the Ada 2005 version of Ada.Exceptions by default, unless specified
1756 # explicitly already. The base files (a-except.ad?) are used only for building
1757 # the compiler and other basic tools.
1758 # These base versions lack Ada 2005 additions which would cause bootstrap
1759 # problems if included in the compiler and other basic tools.
1760
1761 ifeq ($(filter-out a-except%,$(LIBGNAT_TARGET_PAIRS)),$(LIBGNAT_TARGET_PAIRS))
1762 LIBGNAT_TARGET_PAIRS += \
1763 a-except.ads<a-except-2005.ads \
1764 a-except.adb<a-except-2005.adb
1765 endif
1766
1767 # The runtime library for gnat comprises two directories. One contains the
1768 # Ada source files that the compiler (gnat1) needs -- these files are listed
1769 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1770 # corresponding .ali files for the parts written in Ada, libgnat.a for
1771 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1772 # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1773 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1774 # go into the directory. The pthreads emulation is built in the threads
1775 # subdirectory and copied.
1776 LIBGNAT_SRCS = adaint.c adaint.h argv.c cio.c cstreams.c \
1777 errno.c exit.c cal.c ctrl_c.c env.c env.h arit64.c \
1778 raise.h raise.c sysdep.c aux-io.c init.c initialize.c seh_init.c \
1779 final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c expect.c mkdir.c \
1780 socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
1781
1782 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o env.o \
1783 raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o arit64.o \
1784 final.o tracebak.o expect.o mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
1785
1786 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1787 # the library installation will change and there will be a
1788 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1789 # from ADA_INCLUDE_SRCS.
1790
1791 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
1792 # the following include file:
1793
1794 include $(fsrcdir)/Makefile.rtl
1795
1796 GNATRTL_LINEARALGEBRA_OBJS = a-nlcoar.o a-nllcar.o a-nllrar.o a-nlrear.o \
1797 a-nucoar.o a-nurear.o i-forbla.o i-forlap.o s-gearop.o
1798
1799 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
1800 $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
1801
1802 # Default run time files
1803
1804 ADA_INCLUDE_SRCS =\
1805 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1806 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1807 sequenio.ads system.ads memtrack.adb \
1808 a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
1809 s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
1810
1811 LIBGNAT=../$(RTSDIR)/libgnat.a
1812
1813 GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
1814
1815 # when compiling the tools, the runtime has to be first on the path so that
1816 # it hides the runtime files lying with the rest of the sources
1817 ifeq ($(TOOLSCASE),native)
1818 vpath %.ads ../$(RTSDIR) ../
1819 vpath %.adb ../$(RTSDIR) ../
1820 vpath %.c ../$(RTSDIR) ../
1821 vpath %.h ../$(RTSDIR) ../
1822 endif
1823
1824 # in the cross tools case, everything is compiled with the native
1825 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1826 ifeq ($(TOOLSCASE),cross)
1827 vpath %.ads ../
1828 vpath %.adb ../
1829 vpath %.c ../
1830 vpath %.h ../
1831 endif
1832
1833 common-tools:
1834 $(GNATMAKE) -c -b $(ADA_INCLUDES) \
1835 --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
1836 gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
1837 gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
1838 $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
1839 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1840 $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
1841 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1842 $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
1843 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1844 $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
1845 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1846 $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
1847 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1848 $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
1849 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1850 $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
1851 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1852 $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
1853 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1854 $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
1855 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1856
1857 ../../gnatsym$(exeext):
1858 $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
1859 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
1860 $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1861
1862 ../../gnatdll$(exeext):
1863 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1864 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
1865 $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1866
1867 ../../vxaddr2line$(exeext): targext.o
1868 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
1869 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
1870 $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
1871
1872 gnatmake-re: link.o targext.o
1873 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1874 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1875 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
1876 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1877 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1878
1879 # Note the use of the "mv" command in order to allow gnatlink to be linked with
1880 # with the former version of gnatlink itself which cannot override itself.
1881 gnatlink-re: link.o targext.o
1882 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1883 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
1884 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1885 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1886 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
1887
1888 # Needs to be built with CC=gcc
1889 # Since the RTL should be built with the latest compiler, remove the
1890 # stamp target in the parent directory whenever gnat1 is rebuilt
1891
1892 # Likewise for the tools
1893 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
1894 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1895 $(TOOLS_LIBS)
1896
1897 ../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
1898 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1899 $(TOOLS_LIBS)
1900
1901 ../stamp-gnatlib-$(RTSDIR):
1902 @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
1903 then \
1904 $(ECHO) You must first build the GNAT library: make gnatlib; \
1905 false; \
1906 else \
1907 true; \
1908 fi
1909
1910 install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
1911 # Create the directory before deleting it, in case the directory is
1912 # a list of directories (as it may be on VMS). This ensures we are
1913 # deleting the right one.
1914 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1915 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1916 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1917 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1918 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1919 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1920 for file in $(RTSDIR)/*.ali; do \
1921 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1922 done
1923 -$(INSTALL_DATA) $(RTSDIR)/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1924 -cd $(RTSDIR); for file in *$(arext);do \
1925 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1926 $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
1927 done
1928 -$(foreach file, $(EXTRA_ADALIB_FILES), \
1929 $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
1930 ) true
1931 # Install the shared libraries, if any, using $(INSTALL) instead
1932 # of $(INSTALL_DATA). The latter may force a mode inappropriate
1933 # for shared libraries on some targets, e.g. on HP-UX where the x
1934 # permission is required.
1935 for file in gnat gnarl; do \
1936 if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
1937 $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1938 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1939 fi; \
1940 if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
1941 $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1942 $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
1943 fi; \
1944 done
1945 # This copy must be done preserving the date on the original file.
1946 for file in $(RTSDIR)/*.ad?; do \
1947 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
1948 done
1949 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1950 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1951
1952 ../stamp-gnatlib2-$(RTSDIR):
1953 $(RM) $(RTSDIR)/s-*.ali
1954 $(RM) $(RTSDIR)/s-*$(objext)
1955 $(RM) $(RTSDIR)/a-*.ali
1956 $(RM) $(RTSDIR)/a-*$(objext)
1957 $(RM) $(RTSDIR)/*.ali
1958 $(RM) $(RTSDIR)/*$(objext)
1959 $(RM) $(RTSDIR)/*$(arext)
1960 $(RM) $(RTSDIR)/*$(soext)
1961 touch ../stamp-gnatlib2-$(RTSDIR)
1962 $(RM) ../stamp-gnatlib-$(RTSDIR)
1963
1964 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1965 # successive target commands. Although the Gnu make documentation
1966 # implies this is true on all systems, I suspect it may not be, So care
1967 # has been taken to allow a sed script to look for ";)" and substitue
1968 # for ";" the appropriate character in the range of lines below
1969 # beginning with "GNULLI Begin" and ending with "GNULLI End"
1970
1971 # GNULLI Begin ###########################################################
1972
1973 ../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
1974 $(RMDIR) $(RTSDIR)
1975 $(MKDIR) $(RTSDIR)
1976 $(CHMOD) u+w $(RTSDIR)
1977 # Copy target independent sources
1978 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
1979 $(LN_S) $(fsrcpfx)$(f) $(RTSDIR) ;) true
1980 # Remove files to be replaced by target dependent sources
1981 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1982 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
1983 $(RM) $(RTSDIR)/*-*-*.ads $(RTSDIR)/*-*-*.adb
1984 # Copy new target dependent sources
1985 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1986 $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1987 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
1988 # Copy generated target dependent sources
1989 $(RM) $(RTSDIR)/s-oscons.ads
1990 (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
1991 $(RM) ../stamp-gnatlib-$(RTSDIR)
1992 touch ../stamp-gnatlib1-$(RTSDIR)
1993
1994 # GNULLI End #############################################################
1995
1996 # Don't use semicolon separated shell commands that involve list expansions.
1997 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
1998 # line lengths in excess of 256 characters.
1999 # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
2000 # is guaranteed to overflow the buffer.
2001
2002 gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
2003 $(MAKE) -C $(RTSDIR) \
2004 CC="`echo \"$(GCC_FOR_TARGET)\" \
2005 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2006 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
2007 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
2008 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2009 srcdir=$(fsrcdir) \
2010 -f ../Makefile $(LIBGNAT_OBJS)
2011 $(MAKE) -C $(RTSDIR) \
2012 CC="`echo \"$(GCC_FOR_TARGET)\" \
2013 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2014 ADA_INCLUDES="" \
2015 CFLAGS="$(GNATLIBCFLAGS)" \
2016 ADAFLAGS="$(GNATLIBFLAGS)" \
2017 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2018 srcdir=$(fsrcdir) \
2019 -f ../Makefile \
2020 $(GNATRTL_OBJS)
2021 $(RM) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnarl$(arext)
2022 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat$(arext) \
2023 $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
2024 ifneq ($(PREFIX_OBJS),)
2025 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgccprefix$(arext) \
2026 $(PREFIX_OBJS);
2027 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgccprefix$(arext)
2028 endif
2029 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat$(arext)
2030 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \
2031 $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
2032 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext)
2033 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnala$(arext) \
2034 $(addprefix $(RTSDIR)/,$(GNATRTL_LINEARALGEBRA_OBJS))
2035 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnala$(arext)
2036 ifeq ($(GMEM_LIB),gmemlib)
2037 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \
2038 $(RTSDIR)/memtrack.o
2039 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
2040 endif
2041 $(CHMOD) a-wx $(RTSDIR)/*.ali
2042 touch ../stamp-gnatlib-$(RTSDIR)
2043
2044 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
2045 gnatlib-shared-default:
2046 $(MAKE) $(FLAGS_TO_PASS) \
2047 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2048 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2049 MULTISUBDIR="$(MULTISUBDIR)" \
2050 THREAD_KIND="$(THREAD_KIND)" \
2051 gnatlib
2052 $(RM) $(RTSDIR)/libgna*$(soext)
2053 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2054 $(TARGET_LIBGCC2_CFLAGS) \
2055 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2056 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2057 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2058 $(MISCLIB) -lm
2059 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2060 $(TARGET_LIBGCC2_CFLAGS) \
2061 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2062 $(GNATRTL_TASKING_OBJS) \
2063 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2064 $(THREADSLIB)
2065 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2066 libgnat$(soext)
2067 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2068 libgnarl$(soext)
2069
2070 gnatlib-shared-dual:
2071 $(MAKE) $(FLAGS_TO_PASS) \
2072 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2073 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2074 MULTISUBDIR="$(MULTISUBDIR)" \
2075 THREAD_KIND="$(THREAD_KIND)" \
2076 gnatlib-shared-default
2077 $(MV) $(RTSDIR)/libgna*$(soext) .
2078 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2079 $(MAKE) $(FLAGS_TO_PASS) \
2080 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2081 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2082 MULTISUBDIR="$(MULTISUBDIR)" \
2083 THREAD_KIND="$(THREAD_KIND)" \
2084 gnatlib
2085 $(MV) libgna*$(soext) $(RTSDIR)
2086
2087 gnatlib-shared-dual-win32:
2088 $(MAKE) $(FLAGS_TO_PASS) \
2089 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2090 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2091 MULTISUBDIR="$(MULTISUBDIR)" \
2092 THREAD_KIND="$(THREAD_KIND)" \
2093 gnatlib-shared-win32
2094 $(MV) $(RTSDIR)/libgna*$(soext) .
2095 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2096 $(MAKE) $(FLAGS_TO_PASS) \
2097 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2098 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2099 MULTISUBDIR="$(MULTISUBDIR)" \
2100 THREAD_KIND="$(THREAD_KIND)" \
2101 gnatlib
2102 $(MV) libgna*$(soext) $(RTSDIR)
2103
2104 # ??? we need to add the option to support auto-import of arrays/records to
2105 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
2106 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
2107 # Windows.
2108 gnatlib-shared-win32:
2109 $(MAKE) $(FLAGS_TO_PASS) \
2110 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2111 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2112 MULTISUBDIR="$(MULTISUBDIR)" \
2113 THREAD_KIND="$(THREAD_KIND)" \
2114 gnatlib
2115 $(RM) $(RTSDIR)/libgna*$(soext)
2116 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2117 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2118 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2119 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
2120 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2121 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2122 $(GNATRTL_TASKING_OBJS) \
2123 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2124 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2125
2126 gnatlib-shared-darwin:
2127 $(MAKE) $(FLAGS_TO_PASS) \
2128 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2129 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
2130 -fno-common" \
2131 MULTISUBDIR="$(MULTISUBDIR)" \
2132 THREAD_KIND="$(THREAD_KIND)" \
2133 gnatlib
2134 $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
2135 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2136 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2137 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2138 $(SO_OPTS) \
2139 $(MISCLIB) -lm
2140 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2141 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2142 $(GNATRTL_TASKING_OBJS) \
2143 $(SO_OPTS) \
2144 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2145 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2146 libgnat$(soext)
2147 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2148 libgnarl$(soext)
2149
2150 gnatlib-shared-vms:
2151 $(MAKE) $(FLAGS_TO_PASS) \
2152 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2153 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2154 MULTISUBDIR="$(MULTISUBDIR)" \
2155 THREAD_KIND="$(THREAD_KIND)" \
2156 gnatlib
2157 $(RM) $(RTSDIR)/libgna*$(soext)
2158 cd $(RTSDIR) && \
2159 ../../gnatsym -s SYMVEC_$$$$.opt \
2160 $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \
2161 ../../xgcc -g -B../../ -shared -shared-libgcc \
2162 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
2163 sys\$$library:trace.exe \
2164 --for-linker=/noinform \
2165 --for-linker=SYMVEC_$$$$.opt \
2166 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2167 cd $(RTSDIR) && \
2168 ../../gnatsym -s SYMVEC_$$$$.opt \
2169 $(GNATRTL_TASKING_OBJS) && \
2170 ../../xgcc -g -B../../ -shared -shared-libgcc \
2171 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2172 libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2173 sys\$$library:trace.exe \
2174 --for-linker=/noinform \
2175 --for-linker=SYMVEC_$$$$.opt \
2176 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2177
2178 gnatlib-shared:
2179 $(MAKE) $(FLAGS_TO_PASS) \
2180 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2181 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2182 MULTISUBDIR="$(MULTISUBDIR)" \
2183 THREAD_KIND="$(THREAD_KIND)" \
2184 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
2185 $(GNATLIB_SHARED)
2186
2187 gnatlib-sjlj:
2188 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1-$(RTSDIR)
2189 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2190 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2191 $(MAKE) $(FLAGS_TO_PASS) \
2192 EH_MECHANISM="" \
2193 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2194 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2195 MULTISUBDIR="$(MULTISUBDIR)" \
2196 THREAD_KIND="$(THREAD_KIND)" \
2197 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2198
2199 gnatlib-zcx:
2200 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1-$(RTSDIR)
2201 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2202 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2203 $(MAKE) $(FLAGS_TO_PASS) \
2204 EH_MECHANISM="-gcc" \
2205 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2206 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2207 MULTISUBDIR="$(MULTISUBDIR)" \
2208 THREAD_KIND="$(THREAD_KIND)" \
2209 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2210
2211 # .s files for cross-building
2212 gnat-cross: force
2213 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
2214
2215 # Compiling object files from source files.
2216
2217 # Note that dependencies on obstack.h are not written
2218 # because that file is not part of GCC.
2219 # Dependencies on gvarargs.h are not written
2220 # because all that file does, when not compiling with GCC,
2221 # is include the system varargs.h.
2222
2223 b_gnatl.c : $(GNATLINK_OBJS)
2224 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2225 b_gnatl.o : b_gnatl.c
2226
2227 b_gnatm.c : $(GNATMAKE_OBJS)
2228 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2229 b_gnatm.o : b_gnatm.c
2230
2231 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2232 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2233
2234 # force no sibling call optimization on s-traceb.o so the number of stack
2235 # frames to be skipped when computing a call chain is not modified by
2236 # optimization. However we can do that only when building the runtime
2237 # (not the compiler) because the -fno-optimize-sibling-calls option exists
2238 # only in GCC 3 and above.
2239
2240 ifneq (,$(findstring xgcc,$(CC)))
2241 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2242 else
2243 NO_SIBLING_ADAFLAGS=
2244 endif
2245
2246 s-traceb.o : s-traceb.adb
2247 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2248 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2249 $< $(OUTPUT_OPTION)
2250
2251 # force debugging information on s-tasdeb.o so that it is always
2252 # possible to set conditional breakpoints on tasks.
2253
2254 s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
2255 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2256 $< $(OUTPUT_OPTION)
2257
2258 # force no function reordering on a-except.o because of the exclusion bounds
2259 # mechanism (see the source file for more detailed information). However we
2260 # can do that only when building the runtime (not the compiler) because the
2261 # -fno-toplevel-reorder option exists only in GCC 4.2 and above.
2262
2263 ifneq (,$(findstring xgcc,$(CC)))
2264 NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
2265 else
2266 NO_REORDER_ADAFLAGS=
2267 endif
2268
2269 # force debugging information on a-except.o so that it is always
2270 # possible to set conditional breakpoints on exceptions.
2271 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2272
2273 a-except.o : a-except.adb a-except.ads
2274 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2275 $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2276
2277 # compile s-except.o without optimization and with debug info to let the
2278 # debugger set breakpoints and inspect subprogram parameters on exception
2279 # related events.
2280
2281 s-except.o : s-except.adb s-except.ads
2282 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2283 $< $(OUTPUT_OPTION)
2284
2285 # force debugging information on s-assert.o so that it is always
2286 # possible to set breakpoint on assert failures.
2287
2288 s-assert.o : s-assert.adb s-assert.ads a-except.ads
2289 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
2290 $< $(OUTPUT_OPTION)
2291
2292 adadecode.o : adadecode.c adadecode.h
2293 aux-io.o : aux-io.c
2294 argv.o : argv.c
2295 cal.o : cal.c
2296 deftarg.o : deftarg.c
2297 errno.o : errno.c
2298 exit.o : adaint.h exit.c
2299 expect.o : expect.c
2300 final.o : final.c
2301 gmem.o : gmem.c
2302 link.o : link.c
2303 mkdir.o : mkdir.c
2304 socket.o : socket.c gsocket.h
2305 sysdep.o : sysdep.c
2306 raise-gcc.o : raise-gcc.c raise.h
2307 raise.o : raise.c raise.h
2308 vx_stack_info.o : vx_stack_info.c
2309
2310 cio.o : cio.c
2311 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2312 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2313
2314 init.o : init.c adaint.h raise.h
2315 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2316 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2317
2318 initialize.o : initialize.c raise.h
2319 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2320 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2321
2322 targext.o : targext.c
2323 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2324 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2325 $< $(OUTPUT_OPTION)
2326
2327 # No optimization to compile this file as optimizations (-O1 or above) breaks
2328 # the SEH handling on Windows. The reasons are not clear.
2329 seh_init.o : seh_init.c raise.h
2330 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) -O0 \
2331 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2332
2333 # Need to keep the frame pointer in this file to pop the stack properly on
2334 # some targets.
2335 tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
2336 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2337 -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2338
2339 # In GNU Make, ignore whether `stage*' exists.
2340 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2341 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2342
2343 force:
2344
2345 # Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
2346
2347 ../../gnatlbr$(exeext): ../../prefix.o
2348 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2349 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2350 $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2351
2352 ../../vms_help$(exeext):
2353 $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
2354 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
2355 $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2356
2357 ../../gnat.hlp: ../../vms_help$(exeext)
2358 ../../vms_help$(exeext) $(fsrcdir)/gnat.help_in \
2359 $(fsrcdir)/vms_data.ads ../../gnat.hlp