OSDN Git Service

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