OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / ada / gcc-interface / Makefile.in
1 # Makefile for GNU Ada Compiler (GNAT).
2 #   Copyright (C) 1994-2010 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 # 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 # vxworks MILS
603 ifeq ($(strip $(filter-out powerpc% wrs vxworksmils,$(targ))),)
604   # target pairs for vthreads runtime
605   LIBGNAT_TARGET_PAIRS = \
606   a-intnam.ads<a-intnam-vxworks.ads \
607   a-numaux.ads<a-numaux-vxworks.ads \
608   g-io.adb<g-io-vxworks-ppc-cert.adb \
609   g-io.ads<g-io-vxworks-ppc-cert.ads \
610   s-inmaop.adb<s-inmaop-posix.adb \
611   s-interr.adb<s-interr-hwint.adb \
612   s-intman.ads<s-intman-vxworks.ads \
613   s-intman.adb<s-intman-vxworks.adb \
614   s-osinte.adb<s-osinte-vxworks.adb \
615   s-osinte.ads<s-osinte-vxworks.ads \
616   s-osprim.adb<s-osprim-vxworks.adb \
617   s-parame.ads<s-parame-ae653.ads \
618   s-parame.adb<s-parame-vxworks.adb \
619   s-stchop.adb<s-stchop-vxworks.adb \
620   s-stchop.ads<s-stchop-limit.ads \
621   s-taprop.adb<s-taprop-vxworks.adb \
622   s-tasinf.ads<s-tasinf-vxworks.ads \
623   s-taspri.ads<s-taspri-vxworks.ads \
624   s-thread.adb<s-thread-ae653.adb \
625   s-tpopsp.adb<s-tpopsp-vxworks.adb \
626   s-vxwork.ads<s-vxwork-ppc.ads \
627   g-trasym.ads<g-trasym-unimplemented.ads \
628   g-trasym.adb<g-trasym-unimplemented.adb \
629   system.ads<system-vxworks-ppc.ads \
630   $(DUMMY_SOCKETS_TARGET_PAIRS)
631
632   TOOLS_TARGET_PAIRS=\
633   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
634   indepsw.adb<indepsw-gnu.adb
635
636   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-thread.o s-vxwexc.o
637   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
638
639   EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
640   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
641   GNATRTL_SOCKETS_OBJS =
642
643   ifeq ($(strip $(filter-out yes,$(TRACE))),)
644     LIBGNAT_TARGET_PAIRS += \
645     s-traces.adb<s-traces-default.adb \
646     s-trafor.adb<s-trafor-default.adb \
647     s-trafor.ads<s-trafor-default.ads \
648     s-tratas.adb<s-tratas-default.adb \
649     s-tfsetr.adb<s-tfsetr-vxworks.adb
650   endif
651 endif
652
653 # vxworksae / vxworks 653 for x86 (vxsim) - ?? vxworksmils not implemented
654 ifeq ($(strip $(filter-out %86 wrs vxworksae vxworksmils,$(targ))),)
655   # target pairs for kernel + vthreads runtime
656   LIBGNAT_TARGET_PAIRS = \
657   a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
658   a-intnam.ads<a-intnam-vxworks.ads \
659   a-numaux.ads<a-numaux-x86.ads \
660   a-numaux.adb<a-numaux-x86.adb \
661   a-sytaco.ads<1asytaco.ads \
662   a-sytaco.adb<1asytaco.adb \
663   g-bytswa.adb<g-bytswa-x86.adb \
664   g-io.adb<g-io-vxworks-ppc-cert.adb \
665   g-io.ads<g-io-vxworks-ppc-cert.ads \
666   s-inmaop.adb<s-inmaop-posix.adb \
667   s-interr.adb<s-interr-hwint.adb \
668   s-intman.ads<s-intman-vxworks.ads \
669   s-intman.adb<s-intman-vxworks.adb \
670   s-osinte.adb<s-osinte-vxworks.adb \
671   s-osinte.ads<s-osinte-vxworks.ads \
672   s-osprim.adb<s-osprim-vxworks.adb \
673   s-parame.ads<s-parame-ae653.ads \
674   s-taprop.adb<s-taprop-vxworks.adb \
675   s-tasinf.ads<s-tasinf-vxworks.ads \
676   s-taspri.ads<s-taspri-vxworks.ads \
677   s-tpopsp.adb<s-tpopsp-vxworks.adb \
678   s-vxwext.adb<s-vxwext-noints.adb \
679   s-vxwext.ads<s-vxwext-vthreads.ads \
680   s-vxwork.ads<s-vxwork-x86.ads \
681   g-trasym.ads<g-trasym-unimplemented.ads \
682   g-trasym.adb<g-trasym-unimplemented.adb \
683   system.ads<system-vxworks-x86.ads
684
685   TOOLS_TARGET_PAIRS=\
686   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
687   indepsw.adb<indepsw-gnu.adb
688
689   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
690   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
691
692   # Extra pairs for the vthreads runtime
693   ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
694     LIBGNAT_TARGET_PAIRS += \
695     s-thread.adb<s-thread-ae653.adb \
696     $(DUMMY_SOCKETS_TARGET_PAIRS)
697
698     GNATRTL_SOCKETS_OBJS =
699     EXTRA_GNATRTL_NONTASKING_OBJS += s-thread.o
700   else
701     LIBGNAT_TARGET_PAIRS += \
702     g-socthi.ads<g-socthi-vxworks.ads \
703     g-socthi.adb<g-socthi-vxworks.adb \
704     g-stsifd.adb<g-stsifd-sockets.adb \
705     g-sttsne.adb<g-sttsne-vxworks.adb \
706     g-sttsne.ads<g-sttsne-locking.ads
707   endif
708
709   ifeq ($(strip $(filter-out yes,$(TRACE))),)
710     LIBGNAT_TARGET_PAIRS += \
711     s-traces.adb<s-traces-default.adb \
712     s-trafor.adb<s-trafor-default.adb \
713     s-trafor.ads<s-trafor-default.ads \
714     s-tratas.adb<s-tratas-default.adb \
715     s-tfsetr.adb<s-tfsetr-vxworks.adb
716   endif
717 endif
718
719 ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
720   LIBGNAT_TARGET_PAIRS = \
721   a-intnam.ads<a-intnam-vxworks.ads \
722   a-numaux.ads<a-numaux-vxworks.ads \
723   s-inmaop.adb<s-inmaop-posix.adb \
724   s-interr.adb<s-interr-hwint.adb \
725   s-intman.ads<s-intman-vxworks.ads \
726   s-intman.adb<s-intman-vxworks.adb \
727   s-osinte.adb<s-osinte-vxworks.adb \
728   s-osinte.ads<s-osinte-vxworks.ads \
729   s-osprim.adb<s-osprim-vxworks.adb \
730   s-parame.ads<s-parame-vxworks.ads \
731   s-parame.adb<s-parame-vxworks.adb \
732   s-stchop.ads<s-stchop-limit.ads \
733   s-stchop.adb<s-stchop-vxworks.adb \
734   s-taprop.adb<s-taprop-vxworks.adb \
735   s-tasinf.ads<s-tasinf-vxworks.ads \
736   s-taspri.ads<s-taspri-vxworks.ads \
737   s-tpopsp.adb<s-tpopsp-vxworks.adb \
738   s-vxwork.ads<s-vxwork-sparcv9.ads \
739   g-socthi.ads<g-socthi-vxworks.ads \
740   g-socthi.adb<g-socthi-vxworks.adb \
741   g-stsifd.adb<g-stsifd-sockets.adb \
742   g-sttsne.adb<g-sttsne-vxworks.adb \
743   g-sttsne.ads<g-sttsne-locking.ads \
744   g-trasym.ads<g-trasym-unimplemented.ads \
745   g-trasym.adb<g-trasym-unimplemented.adb \
746   system.ads<system-vxworks-sparcv9.ads   \
747
748   TOOLS_TARGET_PAIRS=\
749   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
750   indepsw.adb<indepsw-gnu.adb
751
752   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
753   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
754
755   EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
756   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
757 endif
758
759 ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
760   LIBGNAT_TARGET_PAIRS = \
761   a-intnam.ads<a-intnam-vxworks.ads \
762   i-vxwork.ads<i-vxwork-x86.ads \
763   s-osinte.adb<s-osinte-vxworks.adb \
764   s-osinte.ads<s-osinte-vxworks.ads \
765   s-inmaop.adb<s-inmaop-posix.adb \
766   s-intman.ads<s-intman-vxworks.ads \
767   s-intman.adb<s-intman-vxworks.adb \
768   a-numaux.adb<a-numaux-x86.adb \
769   a-numaux.ads<a-numaux-x86.ads \
770   s-osprim.adb<s-osprim-vxworks.adb \
771   s-parame.ads<s-parame-vxworks.ads \
772   s-parame.adb<s-parame-vxworks.adb \
773   s-stchop.ads<s-stchop-limit.ads \
774   s-stchop.adb<s-stchop-vxworks.adb \
775   s-taprop.adb<s-taprop-vxworks.adb \
776   s-tasinf.ads<s-tasinf-vxworks.ads \
777   s-taspri.ads<s-taspri-vxworks.ads \
778   s-vxwork.ads<s-vxwork-x86.ads \
779   g-bytswa.adb<g-bytswa-x86.adb \
780   g-socthi.ads<g-socthi-vxworks.ads \
781   g-socthi.adb<g-socthi-vxworks.adb \
782   g-stsifd.adb<g-stsifd-sockets.adb \
783   g-sttsne.adb<g-sttsne-vxworks.adb \
784   g-sttsne.ads<g-sttsne-locking.ads \
785   g-trasym.ads<g-trasym-unimplemented.ads \
786   g-trasym.adb<g-trasym-unimplemented.adb
787
788   TOOLS_TARGET_PAIRS=\
789   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
790   indepsw.adb<indepsw-gnu.adb
791
792   ifeq ($(strip $(filter-out yes,$(TRACE))),)
793     LIBGNAT_TARGET_PAIRS += \
794     s-traces.adb<s-traces-default.adb \
795     s-trafor.adb<s-trafor-default.adb \
796     s-trafor.ads<s-trafor-default.ads \
797     s-tratas.adb<s-tratas-default.adb \
798     s-tfsetr.adb<s-tfsetr-vxworks.adb
799   endif
800
801   ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
802     LIBGNAT_TARGET_PAIRS += \
803     s-vxwext.ads<s-vxwext-rtp.ads \
804     s-vxwext.adb<s-vxwext-rtp.adb \
805     s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
806     system.ads<system-vxworks-x86-rtp.ads
807
808     EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
809   else
810     ifeq ($(strip $(filter-out rtp-smp, $(THREAD_KIND))),)
811       LIBGNAT_TARGET_PAIRS += \
812       s-vxwext.ads<s-vxwext-rtp.ads \
813       s-vxwext.adb<s-vxwext-rtp-smp.adb \
814       s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
815       system.ads<system-vxworks-x86-rtp.ads
816
817       EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
818       EXTRA_GNATRTL_TASKING_OBJS=affinity.o
819     else
820       ifeq ($(strip $(filter-out kernel-smp, $(THREAD_KIND))),)
821         LIBGNAT_TARGET_PAIRS += \
822         s-interr.adb<s-interr-hwint.adb \
823         s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
824         s-vxwext.ads<s-vxwext-kernel.ads \
825         s-vxwext.adb<s-vxwext-kernel-smp.adb \
826         system.ads<system-vxworks-x86-kernel.ads
827         EXTRA_GNATRTL_TASKING_OBJS=affinity.o
828       else
829         LIBGNAT_TARGET_PAIRS += \
830         s-interr.adb<s-interr-hwint.adb \
831         s-tpopsp.adb<s-tpopsp-vxworks.adb
832
833         ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
834           LIBGNAT_TARGET_PAIRS += \
835           s-vxwext.ads<s-vxwext-kernel.ads \
836           s-vxwext.adb<s-vxwext-kernel.adb \
837           system.ads<system-vxworks-x86-kernel.ads
838         else
839           LIBGNAT_TARGET_PAIRS += \
840           system.ads<system-vxworks-x86.ads
841         endif
842       endif
843
844       EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
845     endif
846   endif
847   EXTRA_GNATRTL_TASKING_OBJS += s-vxwork.o s-vxwext.o
848
849   EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
850   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
851 endif
852
853 ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
854   LIBGNAT_TARGET_PAIRS = \
855   a-intnam.ads<a-intnam-vxworks.ads \
856   a-numaux.ads<a-numaux-vxworks.ads \
857   s-inmaop.adb<s-inmaop-posix.adb \
858   s-interr.adb<s-interr-hwint.adb \
859   s-intman.ads<s-intman-vxworks.ads \
860   s-intman.adb<s-intman-vxworks.adb \
861   s-osinte.adb<s-osinte-vxworks.adb \
862   s-osinte.ads<s-osinte-vxworks.ads \
863   s-osprim.adb<s-osprim-vxworks.adb \
864   s-parame.ads<s-parame-vxworks.ads \
865   s-parame.adb<s-parame-vxworks.adb \
866   s-stchop.ads<s-stchop-limit.ads \
867   s-stchop.adb<s-stchop-vxworks.adb \
868   s-taprop.adb<s-taprop-vxworks.adb \
869   s-tasinf.ads<s-tasinf-vxworks.ads \
870   s-taspri.ads<s-taspri-vxworks.ads \
871   s-tpopsp.adb<s-tpopsp-vxworks.adb \
872   s-vxwork.ads<s-vxwork-arm.ads \
873   g-socthi.ads<g-socthi-vxworks.ads \
874   g-socthi.adb<g-socthi-vxworks.adb \
875   g-stsifd.adb<g-stsifd-sockets.adb \
876   g-sttsne.adb<g-sttsne-vxworks.adb \
877   g-sttsne.ads<g-sttsne-locking.ads \
878   g-trasym.ads<g-trasym-unimplemented.ads \
879   g-trasym.adb<g-trasym-unimplemented.adb \
880   system.ads<system-vxworks-arm.ads
881
882   TOOLS_TARGET_PAIRS=\
883   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
884   indepsw.adb<indepsw-gnu.adb
885
886   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
887   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
888
889   EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
890   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
891 endif
892
893 ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
894   LIBGNAT_TARGET_PAIRS = \
895   a-intnam.ads<a-intnam-vxworks.ads \
896   a-numaux.ads<a-numaux-vxworks.ads \
897   s-inmaop.adb<s-inmaop-posix.adb \
898   s-interr.adb<s-interr-hwint.adb \
899   s-intman.ads<s-intman-vxworks.ads \
900   s-intman.adb<s-intman-vxworks.adb \
901   s-osinte.adb<s-osinte-vxworks.adb \
902   s-osinte.ads<s-osinte-vxworks.ads \
903   s-osprim.adb<s-osprim-vxworks.adb \
904   s-parame.ads<s-parame-vxworks.ads \
905   s-parame.adb<s-parame-vxworks.adb \
906   s-stchop.ads<s-stchop-limit.ads \
907   s-stchop.adb<s-stchop-vxworks.adb \
908   s-taprop.adb<s-taprop-vxworks.adb \
909   s-tasinf.ads<s-tasinf-vxworks.ads \
910   s-taspri.ads<s-taspri-vxworks.ads \
911   s-tpopsp.adb<s-tpopsp-vxworks.adb \
912   s-vxwork.ads<s-vxwork-mips.ads \
913   g-socthi.ads<g-socthi-vxworks.ads \
914   g-socthi.adb<g-socthi-vxworks.adb \
915   g-stsifd.adb<g-stsifd-sockets.adb \
916   g-sttsne.adb<g-sttsne-vxworks.adb \
917   g-sttsne.ads<g-sttsne-locking.ads \
918   g-trasym.ads<g-trasym-unimplemented.ads \
919   g-trasym.adb<g-trasym-unimplemented.adb \
920   system.ads<system-vxworks-mips.ads
921
922   TOOLS_TARGET_PAIRS=\
923   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
924   indepsw.adb<indepsw-gnu.adb
925
926   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
927   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
928
929   EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
930   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
931 endif
932
933 ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
934   LIBGNAT_TARGET_PAIRS_COMMON = \
935   a-intnam.ads<a-intnam-solaris.ads \
936   s-inmaop.adb<s-inmaop-posix.adb \
937   s-intman.adb<s-intman-solaris.adb \
938   s-osinte.adb<s-osinte-solaris.adb \
939   s-osinte.ads<s-osinte-solaris.ads \
940   s-osprim.adb<s-osprim-solaris.adb \
941   s-taprop.adb<s-taprop-solaris.adb \
942   s-tasinf.adb<s-tasinf-solaris.adb \
943   s-tasinf.ads<s-tasinf-solaris.ads \
944   s-taspri.ads<s-taspri-solaris.ads \
945   s-tpopsp.adb<s-tpopsp-solaris.adb \
946   g-soliop.ads<g-soliop-solaris.ads
947
948   LIBGNAT_TARGET_PAIRS_32 = \
949   system.ads<system-solaris-sparc.ads
950
951   LIBGNAT_TARGET_PAIRS_64 = \
952   system.ads<system-solaris-sparcv9.ads
953
954   ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
955     ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
956       LIBGNAT_TARGET_PAIRS = \
957       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
958     else
959       LIBGNAT_TARGET_PAIRS = \
960       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
961     endif
962   else
963     ifeq ($(strip $(MULTISUBDIR)),/sparcv8plus)
964       LIBGNAT_TARGET_PAIRS = \
965       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
966     else
967       LIBGNAT_TARGET_PAIRS = \
968       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
969     endif
970   endif
971
972   TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
973
974   EH_MECHANISM=-gcc
975   THREADSLIB = -lposix4 -lthread
976   MISCLIB = -lposix4 -lnsl -lsocket
977   SO_OPTS = -Wl,-h,
978   GNATLIB_SHARED = gnatlib-shared-dual
979   GMEM_LIB = gmemlib
980   LIBRARY_VERSION := $(LIB_VERSION)
981
982   ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
983     LIBGNAT_TARGET_PAIRS = \
984     a-intnam.ads<a-intnam-solaris.ads \
985     s-inmaop.adb<s-inmaop-posix.adb \
986     s-intman.adb<s-intman-posix.adb \
987     s-osinte.adb<s-osinte-posix.adb \
988     s-osinte.ads<s-osinte-solaris-posix.ads \
989     s-osprim.adb<s-osprim-solaris.adb \
990     s-taprop.adb<s-taprop-posix.adb \
991     s-taspri.ads<s-taspri-posix.ads \
992     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
993     g-soliop.ads<g-soliop-solaris.ads \
994     system.ads<system-solaris-sparc.ads
995
996     THREADSLIB = -lposix4 -lpthread
997   endif
998
999   ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),)
1000     LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
1001   endif
1002 endif
1003
1004 ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
1005   LIBGNAT_TARGET_PAIRS = \
1006   a-numaux.adb<a-numaux-x86.adb \
1007   a-numaux.ads<a-numaux-x86.ads \
1008   a-intnam.ads<a-intnam-solaris.ads \
1009   s-inmaop.adb<s-inmaop-posix.adb \
1010   s-intman.adb<s-intman-solaris.adb \
1011   s-osinte.adb<s-osinte-solaris.adb \
1012   s-osinte.ads<s-osinte-solaris.ads \
1013   s-osprim.adb<s-osprim-solaris.adb \
1014   s-taprop.adb<s-taprop-solaris.adb \
1015   s-tasinf.adb<s-tasinf-solaris.adb \
1016   s-tasinf.ads<s-tasinf-solaris.ads \
1017   s-taspri.ads<s-taspri-solaris.ads \
1018   s-tpopsp.adb<s-tpopsp-solaris.adb \
1019   g-soliop.ads<g-soliop-solaris.ads
1020
1021   ifeq ($(strip $(MULTISUBDIR)),/amd64)
1022     LIBGNAT_TARGET_PAIRS += \
1023     system.ads<system-solaris-x86_64.ads
1024   else
1025     LIBGNAT_TARGET_PAIRS += \
1026     g-bytswa.adb<g-bytswa-x86.adb \
1027     system.ads<system-solaris-x86.ads
1028   endif
1029
1030   TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
1031
1032   EH_MECHANISM=-gcc
1033   THREADSLIB = -lposix4 -lthread
1034   MISCLIB = -lposix4 -lnsl -lsocket
1035   SO_OPTS = -Wl,-h,
1036   GNATLIB_SHARED = gnatlib-shared-dual
1037   GMEM_LIB = gmemlib
1038   LIBRARY_VERSION := $(LIB_VERSION)
1039 endif
1040
1041 ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
1042   LIBGNAT_TARGET_PAIRS = \
1043   a-intnam.ads<a-intnam-linux.ads \
1044   a-numaux.adb<a-numaux-x86.adb \
1045   a-numaux.ads<a-numaux-x86.ads \
1046   g-bytswa.adb<g-bytswa-x86.adb \
1047   s-inmaop.adb<s-inmaop-posix.adb \
1048   s-intman.adb<s-intman-posix.adb \
1049   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1050   g-sercom.adb<g-sercom-linux.adb
1051
1052   ifeq ($(strip $(filter-out marte,$(THREAD_KIND))),)
1053     LIBGNAT_TARGET_PAIRS += \
1054     a-exetim.adb<a-exetim-linux-marte.adb \
1055     a-exetim.ads<a-exetim-linux-marte.ads \
1056     a-extiti.adb<a-extiti-linux-marte.adb \
1057     a-extiti.ads<a-extiti-linux-marte.ads \
1058     a-rttiev.adb<a-rttiev-linux-marte.adb \
1059     a-rttiev.ads<a-rttiev-linux-marte.ads \
1060     s-osinte.adb<s-osinte-linux-marte.adb \
1061     s-osinte.ads<s-osinte-linux-marte.ads \
1062     s-osprim.adb<s-osprim-posix.adb \
1063     s-taprop.adb<s-taprop-linux-marte.adb \
1064     s-taspri.ads<s-taspri-posix.ads \
1065     system.ads<system-linux-x86.ads
1066
1067     EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o a-extiti.o
1068
1069     EH_MECHANISM=
1070     THREADSLIB = -lmarte
1071   else
1072     LIBGNAT_TARGET_PAIRS += \
1073     s-linux.ads<s-linux.ads \
1074     s-osinte.adb<s-osinte-posix.adb
1075
1076     ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
1077       LIBGNAT_TARGET_PAIRS += \
1078       s-osinte.ads<s-osinte-linux-xenomai.ads \
1079       s-osprim.adb<s-osprim-linux-xenomai.adb \
1080       s-taprop.adb<s-taprop-linux-xenomai.adb \
1081       s-taspri.ads<s-taspri-linux-xenomai.ads \
1082       system.ads<system-linux-x86-xenomai.ads
1083
1084       EH_MECHANISM=-gcc
1085     else
1086       LIBGNAT_TARGET_PAIRS += \
1087       s-osinte.ads<s-osinte-linux.ads \
1088       s-osprim.adb<s-osprim-posix.adb \
1089       s-taprop.adb<s-taprop-linux.adb \
1090       s-tasinf.ads<s-tasinf-linux.ads \
1091       s-tasinf.adb<s-tasinf-linux.adb \
1092       s-taspri.ads<s-taspri-posix.ads \
1093       system.ads<system-linux-x86.ads
1094
1095       EH_MECHANISM=-gcc
1096     endif
1097
1098     THREADSLIB = -lpthread
1099     EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
1100     EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1101   endif
1102
1103   TOOLS_TARGET_PAIRS =  \
1104     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1105     indepsw.adb<indepsw-gnu.adb
1106
1107   GNATLIB_SHARED = gnatlib-shared-dual
1108   GMEM_LIB = gmemlib
1109   LIBRARY_VERSION := $(LIB_VERSION)
1110 endif
1111
1112 ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
1113   LIBGNAT_TARGET_PAIRS = \
1114   a-intnam.ads<a-intnam-freebsd.ads \
1115   a-numaux.adb<a-numaux-x86.adb \
1116   a-numaux.ads<a-numaux-x86.ads \
1117   s-inmaop.adb<s-inmaop-posix.adb \
1118   s-intman.adb<s-intman-posix.adb \
1119   s-osinte.adb<s-osinte-posix.adb \
1120   s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
1121   s-osprim.adb<s-osprim-posix.adb \
1122   s-taprop.adb<s-taprop-linux.adb \
1123   s-tasinf.ads<s-tasinf-linux.ads \
1124   s-tasinf.adb<s-tasinf-linux.adb \
1125   s-taspri.ads<s-taspri-posix.ads \
1126   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1127   system.ads<system-freebsd-x86.ads
1128
1129   TOOLS_TARGET_PAIRS =  \
1130     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1131     indepsw.adb<indepsw-gnu.adb
1132
1133   EH_MECHANISM=-gcc
1134   THREADSLIB = -lpthread
1135   GNATLIB_SHARED = gnatlib-shared-dual
1136   GMEM_LIB = gmemlib
1137   LIBRARY_VERSION := $(LIB_VERSION)
1138 endif
1139
1140 ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(arch) $(osys))),)
1141   LIBGNAT_TARGET_PAIRS = \
1142   a-intnam.ads<a-intnam-freebsd.ads \
1143   a-numaux.adb<a-numaux-x86.adb \
1144   a-numaux.ads<a-numaux-x86.ads \
1145   s-inmaop.adb<s-inmaop-posix.adb \
1146   s-intman.adb<s-intman-posix.adb \
1147   s-osinte.adb<s-osinte-posix.adb \
1148   s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
1149   s-osprim.adb<s-osprim-posix.adb \
1150   s-taprop.adb<s-taprop-linux.adb \
1151   s-tasinf.ads<s-tasinf-linux.ads \
1152   s-tasinf.adb<s-tasinf-linux.adb \
1153   s-taspri.ads<s-taspri-posix.ads \
1154   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1155   system.ads<system-freebsd-x86_64.ads
1156
1157   TOOLS_TARGET_PAIRS =  \
1158     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1159     indepsw.adb<indepsw-gnu.adb
1160
1161   EH_MECHANISM=-gcc
1162   THREADSLIB = -lpthread
1163   GNATLIB_SHARED = gnatlib-shared-dual
1164   GMEM_LIB = gmemlib
1165   LIBRARY_VERSION := $(LIB_VERSION)
1166 endif
1167
1168 ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
1169   LIBGNAT_TARGET_PAIRS = \
1170   a-intnam.ads<a-intnam-freebsd.ads \
1171   a-numaux.adb<a-numaux-x86.adb \
1172   a-numaux.ads<a-numaux-x86.ads \
1173   g-bytswa.adb<g-bytswa-x86.adb \
1174   s-inmaop.adb<s-inmaop-posix.adb \
1175   s-intman.adb<s-intman-posix.adb \
1176   s-osinte.adb<s-osinte-freebsd.adb \
1177   s-osinte.ads<s-osinte-freebsd.ads \
1178   s-osprim.adb<s-osprim-posix.adb \
1179   s-taprop.adb<s-taprop-posix.adb \
1180   s-taspri.ads<s-taspri-posix.ads \
1181   s-tpopsp.adb<s-tpopsp-posix.adb \
1182   system.ads<system-freebsd-x86.ads
1183
1184   TOOLS_TARGET_PAIRS = \
1185   mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
1186   GNATLIB_SHARED = gnatlib-shared-dual
1187
1188   EH_MECHANISM=-gcc
1189   THREADSLIB= -lpthread
1190   GMEM_LIB = gmemlib
1191   LIBRARY_VERSION := $(LIB_VERSION)
1192 endif
1193
1194 ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
1195   LIBGNAT_TARGET_PAIRS_COMMON = \
1196   a-intnam.ads<a-intnam-linux.ads \
1197   s-inmaop.adb<s-inmaop-posix.adb \
1198   s-intman.adb<s-intman-posix.adb \
1199   s-linux.ads<s-linux.ads \
1200   s-osinte.adb<s-osinte-posix.adb \
1201   s-osinte.ads<s-osinte-linux.ads \
1202   s-osprim.adb<s-osprim-posix.adb \
1203   s-taprop.adb<s-taprop-linux.adb \
1204   s-tasinf.ads<s-tasinf-linux.ads \
1205   s-tasinf.adb<s-tasinf-linux.adb \
1206   s-taspri.ads<s-taspri-posix-noaltstack.ads \
1207   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1208   g-trasym.ads<g-trasym-unimplemented.ads \
1209   g-trasym.adb<g-trasym-unimplemented.adb
1210
1211   LIBGNAT_TARGET_PAIRS_32 = \
1212   system.ads<system-linux-s390.ads
1213
1214   LIBGNAT_TARGET_PAIRS_64 = \
1215   system.ads<system-linux-s390x.ads
1216
1217   ifeq ($(strip $(filter-out s390x,$(arch))),)
1218     ifeq ($(strip $(MULTISUBDIR)),/32)
1219       LIBGNAT_TARGET_PAIRS = \
1220       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1221     else
1222       LIBGNAT_TARGET_PAIRS = \
1223       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1224     endif
1225   else
1226     LIBGNAT_TARGET_PAIRS = \
1227     $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1228   endif
1229
1230   TOOLS_TARGET_PAIRS =  \
1231     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1232     indepsw.adb<indepsw-gnu.adb
1233
1234   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1235   EH_MECHANISM=-gcc
1236   THREADSLIB = -lpthread
1237   GNATLIB_SHARED = gnatlib-shared-dual
1238   LIBRARY_VERSION := $(LIB_VERSION)
1239 endif
1240
1241 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
1242   LIBGNAT_TARGET_PAIRS = \
1243   a-intnam.ads<a-intnam-irix.ads \
1244   s-inmaop.adb<s-inmaop-posix.adb \
1245   s-intman.adb<s-intman-irix.adb \
1246   s-mastop.adb<s-mastop-irix.adb \
1247   s-osinte.adb<s-osinte-irix.adb \
1248   s-osinte.ads<s-osinte-irix.ads \
1249   s-osprim.adb<s-osprim-posix.adb \
1250   s-proinf.adb<s-proinf-irix-athread.adb \
1251   s-proinf.ads<s-proinf-irix-athread.ads \
1252   s-taprop.adb<s-taprop-irix.adb \
1253   s-tasinf.ads<s-tasinf-irix.ads \
1254   s-taspri.ads<s-taspri-posix.ads \
1255   s-tpopsp.adb<s-tpopsp-posix.adb \
1256   s-traceb.adb<s-traceb-mastop.adb
1257
1258   ifeq ($(strip $(MULTISUBDIR)),/64)
1259     LIBGNAT_TARGET_PAIRS += \
1260     system.ads<system-irix-n64.ads
1261   else
1262     ifeq ($(strip $(MULTISUBDIR)),/32)
1263       LIBGNAT_TARGET_PAIRS += \
1264       system.ads<system-irix-o32.ads
1265     else
1266       LIBGNAT_TARGET_PAIRS += \
1267       system.ads<system-irix-n32.ads
1268     endif
1269   endif
1270
1271   THREADSLIB = -lpthread
1272   GNATLIB_SHARED = gnatlib-shared-default
1273
1274   EH_MECHANISM=-gcc
1275   TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-irix.adb
1276   TGT_LIB = -lexc
1277   MISCLIB = -lexc
1278   LIBRARY_VERSION := $(LIB_VERSION)
1279   GMEM_LIB = gmemlib
1280 endif
1281
1282 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
1283   LIBGNAT_TARGET_PAIRS = \
1284   a-excpol.adb<a-excpol-abort.adb \
1285   a-intnam.ads<a-intnam-hpux.ads \
1286   s-inmaop.adb<s-inmaop-posix.adb \
1287   s-interr.adb<s-interr-sigaction.adb \
1288   s-intman.adb<s-intman-posix.adb \
1289   s-osinte.adb<s-osinte-hpux-dce.adb \
1290   s-osinte.ads<s-osinte-hpux-dce.ads \
1291   s-parame.ads<s-parame-hpux.ads \
1292   s-osprim.adb<s-osprim-posix.adb \
1293   s-taprop.adb<s-taprop-hpux-dce.adb \
1294   s-taspri.ads<s-taspri-hpux-dce.ads \
1295   s-tpopsp.adb<s-tpopsp-posix.adb \
1296   system.ads<system-hpux.ads
1297
1298   EH_MECHANISM=-gcc
1299 endif
1300
1301 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
1302   LIBGNAT_TARGET_PAIRS = \
1303   a-intnam.ads<a-intnam-hpux.ads \
1304   s-inmaop.adb<s-inmaop-posix.adb \
1305   s-intman.adb<s-intman-posix.adb \
1306   s-osinte.adb<s-osinte-posix.adb \
1307   s-osinte.ads<s-osinte-hpux.ads \
1308   s-parame.ads<s-parame-hpux.ads \
1309   s-osprim.adb<s-osprim-posix.adb \
1310   s-traceb.adb<s-traceb-hpux.adb \
1311   s-taprop.adb<s-taprop-posix.adb \
1312   s-taspri.ads<s-taspri-posix.ads \
1313   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1314   system.ads<system-hpux.ads
1315
1316   TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb
1317   EH_MECHANISM=-gcc
1318   TGT_LIB = /usr/lib/libcl.a
1319   THREADSLIB = -lpthread
1320   GMEM_LIB = gmemlib
1321   soext = .sl
1322   SO_OPTS = -Wl,+h,
1323   GNATLIB_SHARED = gnatlib-shared-dual
1324   LIBRARY_VERSION := $(LIB_VERSION)
1325 endif
1326
1327 ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
1328   LIBGNAT_TARGET_PAIRS_COMMON = \
1329   a-intnam.ads<a-intnam-aix.ads \
1330   s-inmaop.adb<s-inmaop-posix.adb \
1331   s-intman.adb<s-intman-posix.adb \
1332   s-osinte.adb<s-osinte-aix.adb \
1333   s-osinte.ads<s-osinte-aix.ads \
1334   s-osprim.adb<s-osprim-posix.adb \
1335   s-taprop.adb<s-taprop-posix.adb \
1336   s-taspri.ads<s-taspri-posix.ads \
1337   s-tpopsp.adb<s-tpopsp-posix.adb
1338
1339   LIBGNAT_TARGET_PAIRS_32 = \
1340   system.ads<system-aix.ads
1341
1342   LIBGNAT_TARGET_PAIRS_64 = \
1343   system.ads<system-aix64.ads
1344
1345   ifeq ($(findstring ppc64, \
1346           $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) \
1347                    -print-multi-os-directory)), \
1348         ppc64)
1349     LIBGNAT_TARGET_PAIRS = \
1350     $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1351   else
1352     LIBGNAT_TARGET_PAIRS = \
1353     $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1354   endif
1355
1356   THREADSLIB = -lpthreads
1357
1358   TOOLS_TARGET_PAIRS = \
1359   mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
1360   indepsw.adb<indepsw-aix.adb
1361
1362   GMEM_LIB = gmemlib
1363 endif
1364
1365 ifeq ($(strip $(filter-out lynxos,$(osys))),)
1366   TOOLS_TARGET_PAIRS = \
1367   mlib-tgt-specific.adb<mlib-tgt-specific-lynxos.adb \
1368   indepsw.adb<indepsw-gnu.adb
1369
1370   ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
1371     LIBGNAT_TARGET_PAIRS = \
1372     a-numaux.adb<a-numaux-x86.adb \
1373     a-numaux.ads<a-numaux-x86.ads \
1374     a-intnam.ads<a-intnam-lynxos.ads \
1375     g-bytswa.adb<g-bytswa-x86.adb \
1376     g-sttsne.adb<g-sttsne-locking.adb \
1377     g-sttsne.ads<g-sttsne-locking.ads \
1378     s-inmaop.adb<s-inmaop-posix.adb \
1379     s-intman.adb<s-intman-posix.adb \
1380     s-osinte.adb<s-osinte-lynxos.adb \
1381     s-osinte.ads<s-osinte-lynxos.ads \
1382     s-osprim.adb<s-osprim-posix.adb \
1383     s-taprop.adb<s-taprop-lynxos.adb \
1384     s-taspri.ads<s-taspri-lynxos.ads \
1385     s-tpopsp.adb<s-tpopsp-lynxos.adb \
1386     g-trasym.ads<g-trasym-unimplemented.ads \
1387     g-trasym.adb<g-trasym-unimplemented.adb \
1388     system.ads<system-lynxos-x86.ads
1389
1390
1391   else
1392     LIBGNAT_TARGET_PAIRS = \
1393     a-intnam.ads<a-intnam-lynxos.ads \
1394     g-sttsne.adb<g-sttsne-locking.adb \
1395     g-sttsne.ads<g-sttsne-locking.ads \
1396     s-inmaop.adb<s-inmaop-posix.adb \
1397     s-intman.adb<s-intman-posix.adb \
1398     s-osinte.adb<s-osinte-lynxos.adb \
1399     s-osinte.ads<s-osinte-lynxos.ads \
1400     s-osprim.adb<s-osprim-posix.adb \
1401     s-taprop.adb<s-taprop-lynxos.adb \
1402     s-taspri.ads<s-taspri-lynxos.ads \
1403     s-tpopsp.adb<s-tpopsp-lynxos.adb \
1404     g-trasym.ads<g-trasym-unimplemented.ads \
1405     g-trasym.adb<g-trasym-unimplemented.adb \
1406     system.ads<system-lynxos-ppc.ads
1407   endif
1408 endif
1409
1410 ifeq ($(strip $(filter-out rtems%,$(osys))),)
1411   LIBGNAT_TARGET_PAIRS = \
1412   system.ads<system-rtems.ads \
1413   a-intnam.ads<a-intnam-rtems.ads \
1414   s-inmaop.adb<s-inmaop-posix.adb \
1415   s-intman.adb<s-intman-posix.adb \
1416   s-osinte.adb<s-osinte-rtems.adb \
1417   s-osinte.ads<s-osinte-rtems.ads \
1418   s-osprim.adb<s-osprim-posix.adb \
1419   s-parame.adb<s-parame-rtems.adb \
1420   s-taprop.adb<s-taprop-posix.adb \
1421   s-taspri.ads<s-taspri-posix.ads \
1422   s-tpopsp.adb<s-tpopsp-rtems.adb \
1423   s-stchop.adb<s-stchop-rtems.adb \
1424   s-interr.adb<s-interr-hwint.adb \
1425   g-trasym.ads<g-trasym-unimplemented.ads \
1426   g-trasym.adb<g-trasym-unimplemented.adb
1427 endif
1428
1429 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
1430   LIBGNAT_TARGET_PAIRS = \
1431   a-intnam.ads<a-intnam-tru64.ads \
1432   s-inmaop.adb<s-inmaop-posix.adb \
1433   s-intman.adb<s-intman-posix.adb \
1434   s-mastop.adb<s-mastop-tru64.adb \
1435   s-osinte.adb<s-osinte-tru64.adb \
1436   s-osinte.ads<s-osinte-tru64.ads \
1437   s-osprim.adb<s-osprim-unix.adb \
1438   s-taprop.adb<s-taprop-tru64.adb \
1439   s-tasinf.ads<s-tasinf-tru64.ads \
1440   s-taspri.ads<s-taspri-tru64.ads \
1441   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1442   s-traceb.adb<s-traceb-mastop.adb \
1443   system.ads<system-tru64.ads
1444
1445   TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb
1446
1447   EH_MECHANISM=-gcc
1448   GMEM_LIB=gmemlib
1449   THREADSLIB = -lpthread -lmach -lexc -lrt
1450   GNATLIB_SHARED = gnatlib-shared-default
1451   LIBRARY_VERSION := $(LIB_VERSION)
1452 endif
1453
1454 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
1455
1456 soext  = .exe
1457 hyphen = _
1458 LN = cp -p
1459 LN_S = cp -p
1460
1461 .SUFFIXES: .sym
1462
1463 .o.sym:
1464         @ gnu:[bin]vmssymvec $<
1465 endif
1466
1467 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1468   ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1469     LIBGNAT_TARGET_PAIRS_AUX1 = \
1470       g-enblsp.adb<g-enblsp-vms-ia64.adb \
1471       g-trasym.adb<g-trasym-vms-ia64.adb \
1472       s-asthan.adb<s-asthan-vms-ia64.adb \
1473       s-osinte.adb<s-osinte-vms-ia64.adb \
1474       s-osinte.ads<s-osinte-vms-ia64.ads \
1475       s-vaflop.adb<s-vaflop-vms-ia64.adb \
1476       g-trasym.ads<g-trasym-unimplemented.ads \
1477       g-trasym.adb<g-trasym-unimplemented.adb \
1478       system.ads<system-vms-ia64.ads
1479
1480     LIBGNAT_TARGET_PAIRS_AUX2 = \
1481       s-parame.ads<s-parame-vms-ia64.ads
1482   else
1483     ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1484       LIBGNAT_TARGET_PAIRS_AUX1 = \
1485         g-enblsp.adb<g-enblsp-vms-alpha.adb \
1486         g-trasym.adb<g-trasym-vms-alpha.adb \
1487         s-traent.adb<s-traent-vms.adb \
1488         s-traent.ads<s-traent-vms.ads \
1489         s-asthan.adb<s-asthan-vms-alpha.adb \
1490         s-osinte.adb<s-osinte-vms.adb \
1491         s-osinte.ads<s-osinte-vms.ads \
1492         s-vaflop.adb<s-vaflop-vms-alpha.adb \
1493         system.ads<system-vms_64.ads
1494
1495       ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1496         LIBGNAT_TARGET_PAIRS_AUX2 = \
1497           s-parame.ads<s-parame-vms-restrict.ads
1498       else
1499         LIBGNAT_TARGET_PAIRS_AUX2 = \
1500           s-parame.ads<s-parame-vms-alpha.ads
1501       endif
1502     endif
1503   endif
1504
1505   LIBGNAT_TARGET_PAIRS = \
1506     a-caldel.adb<a-caldel-vms.adb \
1507     a-calend.adb<a-calend-vms.adb \
1508     a-calend.ads<a-calend-vms.ads \
1509     a-dirval.adb<a-dirval-vms.adb \
1510     a-excpol.adb<a-excpol-abort.adb \
1511     a-intnam.ads<a-intnam-vms.ads \
1512     a-numaux.ads<a-numaux-vms.ads \
1513     g-expect.adb<g-expect-vms.adb \
1514     g-socthi.ads<g-socthi-vms.ads \
1515     g-socthi.adb<g-socthi-vms.adb \
1516     g-stsifd.adb<g-stsifd-sockets.adb \
1517     g-sttsne.adb<g-sttsne-locking.adb \
1518     g-sttsne.ads<g-sttsne-locking.ads \
1519     i-c.ads<i-c-vms_64.ads \
1520     i-cstrin.ads<i-cstrin-vms_64.ads \
1521     i-cstrin.adb<i-cstrin-vms_64.adb \
1522     i-cpoint.ads<i-cpoint-vms_64.ads \
1523     i-cpoint.adb<i-cpoint-vms_64.adb \
1524     i-cstrea.adb<i-cstrea-vms.adb \
1525     memtrack.adb<memtrack-vms_64.adb \
1526     s-auxdec.ads<s-auxdec-vms_64.ads \
1527     s-inmaop.adb<s-inmaop-vms.adb \
1528     s-interr.adb<s-interr-vms.adb \
1529     s-intman.adb<s-intman-vms.adb \
1530     s-intman.ads<s-intman-vms.ads \
1531     s-memory.adb<s-memory-vms_64.adb \
1532     s-memory.ads<s-memory-vms_64.ads \
1533     s-osprim.adb<s-osprim-vms.adb \
1534     s-osprim.ads<s-osprim-vms.ads \
1535     s-taprop.adb<s-taprop-vms.adb \
1536     s-tasdeb.adb<s-tasdeb-vms.adb \
1537     s-taspri.ads<s-taspri-vms.ads \
1538     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1539     s-tpopde.adb<s-tpopde-vms.adb \
1540     s-tpopde.ads<s-tpopde-vms.ads \
1541     $(LIBGNAT_TARGET_PAIRS_AUX1) \
1542     $(LIBGNAT_TARGET_PAIRS_AUX2)
1543
1544   ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1545     TOOLS_TARGET_PAIRS= \
1546       mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
1547       symbols.adb<symbols-vms.adb \
1548       symbols-processing.adb<symbols-processing-vms-ia64.adb
1549   else
1550     TOOLS_TARGET_PAIRS= \
1551       mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
1552       symbols.adb<symbols-vms.adb \
1553       symbols-processing.adb<symbols-processing-vms-alpha.adb
1554   endif
1555
1556 adamsg.o: adamsg.msg
1557         -$(DECC) --cc=message adamsg.msg -o adamsg.o
1558
1559   EXTRA_GNATMAKE_OBJS = mlib-tgt-vms_common.o
1560
1561   GMEM_LIB = gmemlib
1562   EH_MECHANISM=-gcc
1563   GNATLIB_SHARED=gnatlib-shared-vms
1564   ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1565     EXTRA_LIBGNAT_SRCS=vmshandler.asm
1566     EXTRA_LIBGNAT_OBJS=vmshandler.o
1567   endif
1568   EXTRA_LIBGNAT_SRCS+=adamsg.msg
1569   EXTRA_LIBGNAT_OBJS+=adamsg.o
1570   EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1571   EXTRA_GNATTOOLS = \
1572      ../../gnatlbr$(exeext)  \
1573      ../../gnatsym$(exeext)  \
1574      ../../vms_help$(exeext) \
1575      ../../gnat.hlp
1576   # This command transforms (YYYYMMDD) into YY,MMDD
1577   GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)ada/gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\).*/\2,\3/')
1578   TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1579   LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1580 endif
1581
1582 ifeq ($(strip $(filter-out avr none powerpc% eabispe leon% erc32% unknown elf,$(targ))),)
1583   TOOLS_TARGET_PAIRS=\
1584   mlib-tgt-specific.adb<mlib-tgt-specific-xi.adb \
1585   indepsw.adb<indepsw-gnu.adb
1586 endif
1587
1588 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1589   LIBGNAT_TARGET_PAIRS = \
1590   a-dirval.adb<a-dirval-mingw.adb \
1591   a-excpol.adb<a-excpol-abort.adb \
1592   a-numaux.adb<a-numaux-x86.adb \
1593   a-numaux.ads<a-numaux-x86.ads \
1594   s-gloloc.adb<s-gloloc-mingw.adb \
1595   s-inmaop.adb<s-inmaop-dummy.adb \
1596   s-memory.adb<s-memory-mingw.adb \
1597   s-taspri.ads<s-taspri-mingw.ads \
1598   s-tasinf.adb<s-tasinf-mingw.adb \
1599   s-tasinf.ads<s-tasinf-mingw.ads \
1600   g-bytswa.adb<g-bytswa-x86.adb \
1601   g-socthi.ads<g-socthi-mingw.ads \
1602   g-socthi.adb<g-socthi-mingw.adb \
1603   g-stsifd.adb<g-stsifd-sockets.adb \
1604   g-soliop.ads<g-soliop-mingw.ads
1605
1606   ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
1607     LIBGNAT_TARGET_PAIRS += \
1608     s-intman.adb<s-intman-dummy.adb \
1609     s-osinte.ads<s-osinte-rtx.ads \
1610     s-osprim.adb<s-osprim-rtx.adb \
1611     s-taprop.adb<s-taprop-rtx.adb
1612
1613     EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o
1614
1615     ifeq ($(strip $(filter-out rtx_w32,$(THREAD_KIND))),)
1616        LIBGNAT_TARGET_PAIRS += system.ads<system-rtx.ads
1617
1618        EH_MECHANISM=-gcc
1619     else
1620        LIBGNAT_TARGET_PAIRS += \
1621        system.ads<system-rtx-rtss.ads \
1622        s-parame.adb<s-parame-vxworks.adb
1623
1624        EH_MECHANISM=
1625     endif
1626
1627   else
1628     LIBGNAT_TARGET_PAIRS += \
1629     a-exetim.adb<a-exetim-mingw.adb \
1630     a-exetim.ads<a-exetim-mingw.ads \
1631     a-intnam.ads<a-intnam-mingw.ads \
1632     g-sercom.adb<g-sercom-mingw.adb \
1633     s-interr.adb<s-interr-sigaction.adb \
1634     s-intman.adb<s-intman-mingw.adb \
1635     s-osinte.ads<s-osinte-mingw.ads \
1636     s-osprim.adb<s-osprim-mingw.adb \
1637     s-taprop.adb<s-taprop-mingw.adb
1638
1639     ifeq ($(strip $(filter-out x86_64%,$(arch))),)
1640       LIBGNAT_TARGET_PAIRS += \
1641         system.ads<system-mingw-x86_64.ads
1642     else
1643       LIBGNAT_TARGET_PAIRS += \
1644         system.ads<system-mingw.ads
1645     endif
1646
1647     EXTRA_GNATRTL_NONTASKING_OBJS = \
1648         s-win32.o s-winext.o g-regist.o g-sse.o g-ssvety.o
1649     EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
1650
1651     MISCLIB = -lws2_32
1652
1653     # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1654     # auto-import support for array/record will be done.
1655     GNATLIB_SHARED = gnatlib-shared-win32
1656   endif
1657
1658   TOOLS_TARGET_PAIRS= \
1659   mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
1660   indepsw.adb<indepsw-mingw.adb
1661
1662   GMEM_LIB = gmemlib
1663   EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1664   EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1665   soext = .dll
1666   LIBRARY_VERSION := $(LIB_VERSION)
1667 endif
1668
1669 ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
1670   LIBGNAT_TARGET_PAIRS = \
1671   a-intnam.ads<a-intnam-linux.ads \
1672   s-inmaop.adb<s-inmaop-posix.adb \
1673   s-intman.adb<s-intman-posix.adb \
1674   s-linux.ads<s-linux.ads \
1675   s-osinte.adb<s-osinte-posix.adb \
1676   s-osinte.ads<s-osinte-linux.ads \
1677   s-osprim.adb<s-osprim-posix.adb \
1678   s-taprop.adb<s-taprop-linux.adb \
1679   s-tasinf.ads<s-tasinf-linux.ads \
1680   s-tasinf.adb<s-tasinf-linux.adb \
1681   s-taspri.ads<s-taspri-posix.ads \
1682   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1683   system.ads<system-linux-mips.ads
1684
1685   EH_MECHANISM=-gcc
1686   THREADSLIB = -lpthread
1687   GNATLIB_SHARED = gnatlib-shared-dual
1688   GMEM_LIB = gmemlib
1689   LIBRARY_VERSION := $(LIB_VERSION)
1690 endif
1691
1692 ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
1693   LIBGNAT_TARGET_PAIRS_COMMON = \
1694   a-intnam.ads<a-intnam-linux.ads \
1695   s-inmaop.adb<s-inmaop-posix.adb \
1696   s-intman.adb<s-intman-posix.adb \
1697   s-linux.ads<s-linux-mipsel.ads \
1698   s-osinte.adb<s-osinte-posix.adb \
1699   s-osinte.ads<s-osinte-linux.ads \
1700   s-osprim.adb<s-osprim-posix.adb \
1701   s-taprop.adb<s-taprop-linux.adb \
1702   s-tasinf.ads<s-tasinf-linux.ads \
1703   s-tasinf.adb<s-tasinf-linux.adb \
1704   s-taspri.ads<s-taspri-posix-noaltstack.ads \
1705   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1706   g-sercom.adb<g-sercom-linux.adb
1707
1708   LIBGNAT_TARGET_PAIRS_32 = \
1709   system.ads<system-linux-mipsel.ads
1710
1711   LIBGNAT_TARGET_PAIRS_64 = \
1712   system.ads<system-linux-mips64el.ads
1713
1714   ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1715     LIBGNAT_TARGET_PAIRS = \
1716     $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1717   else
1718     LIBGNAT_TARGET_PAIRS = \
1719     $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1720   endif
1721
1722   TOOLS_TARGET_PAIRS =  \
1723     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1724     indepsw.adb<indepsw-gnu.adb
1725
1726   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1727   EH_MECHANISM=-gcc
1728   THREADSLIB = -lpthread
1729   GNATLIB_SHARED = gnatlib-shared-dual
1730   GMEM_LIB = gmemlib
1731   LIBRARY_VERSION := $(LIB_VERSION)
1732 endif
1733
1734 ifeq ($(strip $(filter-out mips64el linux%,$(arch) $(osys))),)
1735   LIBGNAT_TARGET_PAIRS_COMMON = \
1736   a-intnam.ads<a-intnam-linux.ads \
1737   s-inmaop.adb<s-inmaop-posix.adb \
1738   s-intman.adb<s-intman-posix.adb \
1739   s-linux.ads<s-linux-mipsel.ads \
1740   s-osinte.adb<s-osinte-posix.adb \
1741   s-osinte.ads<s-osinte-linux.ads \
1742   s-osprim.adb<s-osprim-posix.adb \
1743   s-taprop.adb<s-taprop-linux.adb \
1744   s-tasinf.ads<s-tasinf-linux.ads \
1745   s-tasinf.adb<s-tasinf-linux.adb \
1746   s-taspri.ads<s-taspri-posix-noaltstack.ads \
1747   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1748   g-sercom.adb<g-sercom-linux.adb
1749
1750   LIBGNAT_TARGET_PAIRS_32 = \
1751   system.ads<system-linux-mipsel.ads
1752
1753   LIBGNAT_TARGET_PAIRS_64 = \
1754   system.ads<system-linux-mips64el.ads
1755
1756   ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1757     LIBGNAT_TARGET_PAIRS = \
1758     $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1759   else
1760     LIBGNAT_TARGET_PAIRS = \
1761     $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1762   endif
1763
1764   TOOLS_TARGET_PAIRS =  \
1765     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1766     indepsw.adb<indepsw-gnu.adb
1767
1768   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1769   EH_MECHANISM=-gcc
1770   THREADSLIB = -lpthread
1771   GNATLIB_SHARED = gnatlib-shared-dual
1772   GMEM_LIB = gmemlib
1773   LIBRARY_VERSION := $(LIB_VERSION)
1774 endif
1775
1776 ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
1777   LIBGNAT_TARGET_PAIRS_COMMON = \
1778   a-intnam.ads<a-intnam-linux.ads \
1779   s-inmaop.adb<s-inmaop-posix.adb \
1780   s-intman.adb<s-intman-posix.adb \
1781   s-linux.ads<s-linux.ads \
1782   s-osinte.adb<s-osinte-posix.adb \
1783   s-osinte.ads<s-osinte-linux.ads \
1784   s-osprim.adb<s-osprim-posix.adb \
1785   s-taprop.adb<s-taprop-linux.adb \
1786   s-tasinf.ads<s-tasinf-linux.ads \
1787   s-tasinf.adb<s-tasinf-linux.adb \
1788   s-taspri.ads<s-taspri-posix-noaltstack.ads \
1789   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1790   g-sercom.adb<g-sercom-linux.adb
1791
1792   LIBGNAT_TARGET_PAIRS_32 = \
1793   system.ads<system-linux-ppc.ads
1794
1795   LIBGNAT_TARGET_PAIRS_64 = \
1796   system.ads<system-linux-ppc64.ads
1797
1798   ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1799     LIBGNAT_TARGET_PAIRS = \
1800     $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1801   else
1802     LIBGNAT_TARGET_PAIRS = \
1803     $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1804   endif
1805
1806   ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
1807     LIBGNAT_TARGET_PAIRS += \
1808     s-osinte.ads<s-osinte-linux-xenomai.ads \
1809     s-osprim.adb<s-osprim-linux-xenomai.adb \
1810     s-taprop.adb<s-taprop-linux-xenomai.adb \
1811     s-taspri.ads<s-taspri-linux-xenomai.ads \
1812     system.ads<system-linux-ppc-xenomai.ads
1813   else
1814     LIBGNAT_TARGET_PAIRS += \
1815     s-osinte.ads<s-osinte-linux.ads \
1816     s-osprim.adb<s-osprim-posix.adb \
1817     s-taprop.adb<s-taprop-linux.adb \
1818     s-tasinf.ads<s-tasinf-linux.ads \
1819     s-tasinf.adb<s-tasinf-linux.adb \
1820     s-taspri.ads<s-taspri-posix-noaltstack.ads \
1821     system.ads<system-linux-ppc.ads
1822   endif
1823
1824   TOOLS_TARGET_PAIRS =  \
1825     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1826     indepsw.adb<indepsw-gnu.adb
1827
1828   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1829   EH_MECHANISM=-gcc
1830   THREADSLIB = -lpthread
1831   GNATLIB_SHARED = gnatlib-shared-dual
1832   GMEM_LIB = gmemlib
1833   LIBRARY_VERSION := $(LIB_VERSION)
1834 endif
1835
1836 ifeq ($(strip $(filter-out arm% linux-gnueabi,$(arch) $(osys)-$(word 4,$(targ)))),)
1837   LIBGNAT_TARGET_PAIRS = \
1838   a-intnam.ads<a-intnam-linux.ads \
1839   s-inmaop.adb<s-inmaop-posix.adb \
1840   s-intman.adb<s-intman-posix.adb \
1841   s-linux.ads<s-linux.ads \
1842   s-osinte.adb<s-osinte-posix.adb \
1843   s-osinte.ads<s-osinte-linux.ads \
1844   s-osprim.adb<s-osprim-posix.adb \
1845   s-taprop.adb<s-taprop-linux.adb \
1846   s-tasinf.ads<s-tasinf-linux.ads \
1847   s-tasinf.adb<s-tasinf-linux.adb \
1848   s-taspri.ads<s-taspri-posix-noaltstack.ads \
1849   s-tpopsp.adb<s-tpopsp-posix-foreign.adb
1850
1851   ifeq ($(strip $(filter-out arm%b,$(arch))),)
1852     LIBGNAT_TARGET_PAIRS += \
1853     system.ads<system-linux-armeb.ads
1854   else
1855     LIBGNAT_TARGET_PAIRS += \
1856     system.ads<system-linux-armel.ads
1857   endif
1858
1859   TOOLS_TARGET_PAIRS =  \
1860     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1861     indepsw.adb<indepsw-gnu.adb
1862
1863   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1864   EH_MECHANISM=
1865   THREADSLIB = -lpthread
1866   GNATLIB_SHARED = gnatlib-shared-dual
1867   GMEM_LIB = gmemlib
1868   LIBRARY_VERSION := $(LIB_VERSION)
1869 endif
1870
1871 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
1872   LIBGNAT_TARGET_PAIRS_COMMON = \
1873   a-intnam.ads<a-intnam-linux.ads \
1874   s-inmaop.adb<s-inmaop-posix.adb \
1875   s-intman.adb<s-intman-posix.adb \
1876   s-linux.ads<s-linux-sparc.ads \
1877   s-osinte.adb<s-osinte-posix.adb \
1878   s-osinte.ads<s-osinte-linux.ads \
1879   s-osprim.adb<s-osprim-posix.adb \
1880   s-taprop.adb<s-taprop-linux.adb \
1881   s-tasinf.ads<s-tasinf-linux.ads \
1882   s-tasinf.adb<s-tasinf-linux.adb \
1883   s-taspri.ads<s-taspri-posix-noaltstack.ads \
1884   s-tpopsp.adb<s-tpopsp-posix-foreign.adb
1885
1886   LIBGNAT_TARGET_PAIRS_32 = \
1887   g-trasym.ads<g-trasym-unimplemented.ads \
1888   g-trasym.adb<g-trasym-unimplemented.adb \
1889   system.ads<system-linux-sparc.ads
1890
1891   LIBGNAT_TARGET_PAIRS_64 = \
1892   system.ads<system-linux-sparcv9.ads
1893
1894   ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1895     LIBGNAT_TARGET_PAIRS = \
1896     $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1897   else
1898     LIBGNAT_TARGET_PAIRS = \
1899     $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1900   endif
1901
1902   TOOLS_TARGET_PAIRS =  \
1903     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1904     indepsw.adb<indepsw-gnu.adb
1905
1906   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1907   EH_MECHANISM=-gcc
1908   THREADSLIB = -lpthread
1909   GNATLIB_SHARED = gnatlib-shared-dual
1910   GMEM_LIB = gmemlib
1911   LIBRARY_VERSION := $(LIB_VERSION)
1912 endif
1913
1914 ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1915   LIBGNAT_TARGET_PAIRS = \
1916   a-intnam.ads<a-intnam-linux.ads \
1917   s-inmaop.adb<s-inmaop-posix.adb \
1918   s-intman.adb<s-intman-posix.adb \
1919   s-linux.ads<s-linux-hppa.ads \
1920   s-osinte.adb<s-osinte-posix.adb \
1921   s-osinte.ads<s-osinte-linux.ads \
1922   s-osprim.adb<s-osprim-posix.adb \
1923   s-taprop.adb<s-taprop-linux.adb \
1924   s-tasinf.ads<s-tasinf-linux.ads \
1925   s-tasinf.adb<s-tasinf-linux.adb \
1926   s-taspri.ads<s-taspri-posix-noaltstack.ads \
1927   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1928   g-trasym.ads<g-trasym-unimplemented.ads \
1929   g-trasym.adb<g-trasym-unimplemented.adb \
1930   system.ads<system-linux-hppa.ads
1931
1932   TOOLS_TARGET_PAIRS =  \
1933     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1934     indepsw.adb<indepsw-gnu.adb
1935
1936   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1937   EH_MECHANISM=-gcc
1938   THREADSLIB = -lpthread
1939   GNATLIB_SHARED = gnatlib-shared-dual
1940   GMEM_LIB = gmemlib
1941   LIBRARY_VERSION := $(LIB_VERSION)
1942 endif
1943
1944 ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
1945   LIBGNAT_TARGET_PAIRS = \
1946   a-intnam.ads<a-intnam-linux.ads \
1947   s-inmaop.adb<s-inmaop-posix.adb \
1948   s-intman.adb<s-intman-posix.adb \
1949   s-linux.ads<s-linux.ads \
1950   s-osinte.adb<s-osinte-posix.adb \
1951   s-osinte.ads<s-osinte-linux.ads \
1952   s-osprim.adb<s-osprim-posix.adb \
1953   s-taprop.adb<s-taprop-linux.adb \
1954   s-tasinf.ads<s-tasinf-linux.ads \
1955   s-tasinf.adb<s-tasinf-linux.adb \
1956   s-taspri.ads<s-taspri-posix-noaltstack.ads \
1957   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1958   system.ads<system-linux-sh4.ads
1959
1960   TOOLS_TARGET_PAIRS =  \
1961     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1962     indepsw.adb<indepsw-linux.adb
1963  
1964   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1965   EH_MECHANISM=-gcc
1966   MISCLIB=
1967   THREADSLIB = -lpthread
1968   GNATLIB_SHARED = gnatlib-shared-dual
1969   GMEM_LIB = gmemlib
1970   LIBRARY_VERSION := $(LIB_VERSION)
1971 endif
1972
1973 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1974   LIBGNAT_TARGET_PAIRS = \
1975   a-intnam.ads<a-intnam-linux.ads \
1976   a-numaux.ads<a-numaux-libc-x86.ads \
1977   s-inmaop.adb<s-inmaop-posix.adb \
1978   s-intman.adb<s-intman-posix.adb \
1979   s-linux.ads<s-linux.ads \
1980   s-osinte.ads<s-osinte-linux.ads \
1981   s-osinte.adb<s-osinte-posix.adb \
1982   s-osprim.adb<s-osprim-posix.adb \
1983   s-taprop.adb<s-taprop-linux.adb \
1984   s-tasinf.ads<s-tasinf-linux.ads \
1985   s-tasinf.adb<s-tasinf-linux.adb \
1986   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1987   s-taspri.ads<s-taspri-posix-noaltstack.ads \
1988   g-sercom.adb<g-sercom-linux.adb \
1989   system.ads<system-linux-ia64.ads
1990
1991   TOOLS_TARGET_PAIRS =  \
1992     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1993     indepsw.adb<indepsw-gnu.adb
1994
1995   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1996   EH_MECHANISM=-gcc
1997   MISCLIB=
1998   THREADSLIB=-lpthread
1999   GNATLIB_SHARED=gnatlib-shared-dual
2000   GMEM_LIB = gmemlib
2001   LIBRARY_VERSION := $(LIB_VERSION)
2002 endif
2003
2004 ifeq ($(strip $(filter-out ia64% hp hpux%,$(targ))),)
2005   LIBGNAT_TARGET_PAIRS = \
2006   a-intnam.ads<a-intnam-hpux.ads \
2007   s-inmaop.adb<s-inmaop-posix.adb \
2008   s-intman.adb<s-intman-posix.adb \
2009   s-osinte.adb<s-osinte-posix.adb \
2010   s-osinte.ads<s-osinte-hpux.ads \
2011   s-osprim.adb<s-osprim-posix.adb \
2012   s-taprop.adb<s-taprop-posix.adb \
2013   s-taspri.ads<s-taspri-posix-noaltstack.ads \
2014   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2015   system.ads<system-hpux-ia64.ads
2016
2017   TOOLS_TARGET_PAIRS = \
2018   mlib-tgt-specific.adb<mlib-tgt-specific-ia64-hpux.adb
2019
2020   MISCLIB=
2021   THREADSLIB=-lpthread
2022   GNATLIB_SHARED=gnatlib-shared-dual
2023   GMEM_LIB = gmemlib
2024   soext = .sl
2025   SO_OPTS = -Wl,+h,
2026   LIBRARY_VERSION := $(LIB_VERSION)
2027 endif
2028
2029 ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
2030   LIBGNAT_TARGET_PAIRS = \
2031   a-intnam.ads<a-intnam-linux.ads \
2032   s-inmaop.adb<s-inmaop-posix.adb \
2033   s-intman.adb<s-intman-posix.adb \
2034   s-linux.ads<s-linux-alpha.ads \
2035   s-osinte.ads<s-osinte-linux.ads \
2036   s-osinte.adb<s-osinte-posix.adb \
2037   s-osprim.adb<s-osprim-posix.adb \
2038   s-taprop.adb<s-taprop-linux.adb \
2039   s-tasinf.ads<s-tasinf-linux.ads \
2040   s-tasinf.adb<s-tasinf-linux.adb \
2041   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2042   s-taspri.ads<s-taspri-posix-noaltstack.ads \
2043   g-trasym.ads<g-trasym-unimplemented.ads \
2044   g-trasym.adb<g-trasym-unimplemented.adb \
2045   system.ads<system-linux-alpha.ads
2046
2047   TOOLS_TARGET_PAIRS =  \
2048     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
2049     indepsw.adb<indepsw-gnu.adb
2050
2051   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
2052   EH_MECHANISM=-gcc
2053   MISCLIB=
2054   THREADSLIB=-lpthread
2055   GNATLIB_SHARED=gnatlib-shared-dual
2056   LIBRARY_VERSION := $(LIB_VERSION)
2057 endif
2058
2059 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
2060   LIBGNAT_TARGET_PAIRS = \
2061   a-intnam.ads<a-intnam-linux.ads \
2062   a-numaux.adb<a-numaux-x86.adb \
2063   a-numaux.ads<a-numaux-x86.ads \
2064   s-inmaop.adb<s-inmaop-posix.adb \
2065   s-intman.adb<s-intman-posix.adb \
2066   s-linux.ads<s-linux.ads \
2067   s-osinte.ads<s-osinte-linux.ads \
2068   s-osinte.adb<s-osinte-posix.adb \
2069   s-osprim.adb<s-osprim-posix.adb \
2070   s-taprop.adb<s-taprop-linux.adb \
2071   s-tasinf.ads<s-tasinf-linux.ads \
2072   s-tasinf.adb<s-tasinf-linux.adb \
2073   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2074   s-taspri.ads<s-taspri-posix.ads \
2075   g-sercom.adb<g-sercom-linux.adb \
2076   system.ads<system-linux-x86_64.ads
2077
2078   TOOLS_TARGET_PAIRS =  \
2079     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
2080     indepsw.adb<indepsw-gnu.adb
2081
2082   EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
2083   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
2084   EH_MECHANISM=-gcc
2085   THREADSLIB=-lpthread
2086   GNATLIB_SHARED=gnatlib-shared-dual
2087   GMEM_LIB = gmemlib
2088   LIBRARY_VERSION := $(LIB_VERSION)
2089 endif
2090
2091 ifeq ($(strip $(filter-out darwin%,$(osys))),)
2092   ifeq ($(strip $(filter-out %86,$(arch))),)
2093     LIBGNAT_TARGET_PAIRS = \
2094     a-intnam.ads<a-intnam-darwin.ads \
2095     s-inmaop.adb<s-inmaop-posix.adb \
2096     s-intman.adb<s-intman-susv3.adb \
2097     s-osinte.adb<s-osinte-darwin.adb \
2098     s-osinte.ads<s-osinte-darwin.ads \
2099     s-osprim.adb<s-osprim-darwin.adb \
2100     s-taprop.adb<s-taprop-posix.adb \
2101     s-taspri.ads<s-taspri-posix.ads \
2102     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2103     g-trasym.ads<g-trasym-unimplemented.ads \
2104     g-trasym.adb<g-trasym-unimplemented.adb \
2105     a-numaux.ads<a-numaux-x86.ads \
2106     a-numaux.adb<a-numaux-x86.adb
2107     ifeq ($(strip $(MULTISUBDIR)),/x86_64)
2108       LIBGNAT_TARGET_PAIRS += \
2109       system.ads<system-darwin-x86_64.ads
2110     else
2111       LIBGNAT_TARGET_PAIRS += \
2112       system.ads<system-darwin-x86.ads
2113     endif
2114   endif
2115
2116   ifeq ($(strip $(filter-out %x86_64,$(arch))),)
2117     LIBGNAT_TARGET_PAIRS = \
2118     a-intnam.ads<a-intnam-darwin.ads \
2119     s-inmaop.adb<s-inmaop-posix.adb \
2120     s-intman.adb<s-intman-susv3.adb \
2121     s-osinte.adb<s-osinte-darwin.adb \
2122     s-osinte.ads<s-osinte-darwin.ads \
2123     s-osprim.adb<s-osprim-darwin.adb \
2124     s-taprop.adb<s-taprop-posix.adb \
2125     s-taspri.ads<s-taspri-posix.ads \
2126     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2127     a-numaux.ads<a-numaux-x86.ads \
2128     a-numaux.adb<a-numaux-x86.adb \
2129     g-trasym.ads<g-trasym-unimplemented.ads \
2130     g-trasym.adb<g-trasym-unimplemented.adb \
2131     system.ads<system-darwin-x86_64.ads
2132   endif
2133
2134   ifeq ($(strip $(filter-out powerpc%,$(arch))),)
2135     LIBGNAT_TARGET_PAIRS = \
2136     a-intnam.ads<a-intnam-darwin.ads \
2137     s-inmaop.adb<s-inmaop-posix.adb \
2138     s-intman.adb<s-intman-posix.adb \
2139     s-osinte.adb<s-osinte-darwin.adb \
2140     s-osinte.ads<s-osinte-darwin.ads \
2141     s-osprim.adb<s-osprim-posix.adb \
2142     s-taprop.adb<s-taprop-posix.adb \
2143     s-taspri.ads<s-taspri-posix.ads \
2144     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2145     a-numaux.ads<a-numaux-darwin.ads \
2146     a-numaux.adb<a-numaux-darwin.adb \
2147     g-trasym.ads<g-trasym-unimplemented.ads \
2148     g-trasym.adb<g-trasym-unimplemented.adb \
2149     system.ads<system-darwin-ppc.ads
2150   endif
2151
2152   TOOLS_TARGET_PAIRS =  \
2153     mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb
2154
2155   EH_MECHANISM=-gcc
2156   GNATLIB_SHARED = gnatlib-shared-darwin
2157   SO_OPTS = -Wl,-flat_namespace -shared-libgcc
2158   RANLIB = ranlib -c
2159   GMEM_LIB = gmemlib
2160   LIBRARY_VERSION := $(LIB_VERSION)
2161   soext = .dylib
2162   GCC_LINK_FLAGS=
2163 endif
2164
2165 ifneq ($(EH_MECHANISM),)
2166   LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
2167   EXTRA_LIBGNAT_SRCS+=raise$(EH_MECHANISM).c
2168   EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
2169 endif
2170
2171 # Use the Ada 2005 version of Ada.Exceptions by default, unless specified
2172 # explicitly already. The base files (a-except.ad?) are used only for building
2173 # the compiler and other basic tools.
2174 # These base versions lack Ada 2005 additions which would cause bootstrap
2175 # problems if included in the compiler and other basic tools.
2176
2177 ifeq ($(filter a-except%,$(LIBGNAT_TARGET_PAIRS)),)
2178   LIBGNAT_TARGET_PAIRS += \
2179     a-except.ads<a-except-2005.ads \
2180     a-except.adb<a-except-2005.adb
2181 endif
2182
2183 # The runtime library for gnat comprises two directories.  One contains the
2184 # Ada source files that the compiler (gnat1) needs -- these files are listed
2185 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
2186 # corresponding .ali files for the parts written in Ada, libgnat.a for
2187 # the parts of the runtime written in C, and libgthreads.a for the pthreads
2188 # emulation library.  LIBGNAT_OBJS lists the objects that go into libgnat.a,
2189 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
2190 # go into the directory.  The pthreads emulation is built in the threads
2191 # subdirectory and copied.
2192 LIBGNAT_SRCS = adadecode.c adadecode.h adaint.c adaint.h        \
2193   argv.c cio.c cstreams.c errno.c exit.c cal.c ctrl_c.c env.c env.h     \
2194   arit64.c raise.h raise.c sysdep.c aux-io.c init.c initialize.c        \
2195   seh_init.c final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c          \
2196   expect.c mkdir.c socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
2197
2198 LIBGNAT_OBJS = adadecode.o adaint.o argv.o cio.o cstreams.o ctrl_c.o    \
2199   errno.o exit.o env.o raise.o sysdep.o aux-io.o init.o initialize.o    \
2200   seh_init.o cal.o arit64.o final.o tracebak.o expect.o mkdir.o         \
2201   socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
2202
2203 # NOTE ??? - when the -I option for compiling Ada code is made to work,
2204 #  the library installation will change and there will be a
2205 #  GNAT_RTL_SRCS.  Right now we count on being able to build GNATRTL_OBJS
2206 #  from ADA_INCLUDE_SRCS.
2207
2208 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
2209 # the following include file:
2210
2211 include $(fsrcdir)/ada/Makefile.rtl
2212
2213 GNATRTL_LINEARALGEBRA_OBJS = a-nlcoar.o a-nllcar.o a-nllrar.o a-nlrear.o \
2214   a-nucoar.o a-nurear.o i-forbla.o i-forlap.o s-gearop.o
2215
2216 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
2217   $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
2218
2219 # Default run time files
2220
2221 ADA_INCLUDE_SRCS =\
2222  ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
2223  machcode.ads text_io.ads unchconv.ads unchdeal.ads \
2224  sequenio.ads system.ads memtrack.adb \
2225  a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
2226  s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
2227
2228 LIBGNAT=../$(RTSDIR)/libgnat.a
2229
2230 GCC_LINK=$(CC) $(GCC_LINK_FLAGS) $(ADA_INCLUDES)
2231
2232 # when compiling the tools, the runtime has to be first on the path so that
2233 # it hides the runtime files lying with the rest of the sources
2234 ifeq ($(TOOLSCASE),native)
2235   vpath %.ads ../$(RTSDIR) ../
2236   vpath %.adb ../$(RTSDIR) ../
2237   vpath %.c   ../$(RTSDIR) ../
2238   vpath %.h   ../$(RTSDIR) ../
2239 endif
2240
2241 # in the cross tools case, everything is compiled with the native
2242 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
2243 ifeq ($(TOOLSCASE),cross)
2244   vpath %.ads ../
2245   vpath %.adb ../
2246   vpath %.c   ../
2247   vpath %.h   ../
2248 endif
2249
2250 common-tools:
2251         $(GNATMAKE) -c -b $(ADA_INCLUDES) \
2252           --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
2253           gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
2254           gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
2255         $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
2256                 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2257         $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
2258                 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2259         $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
2260                 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2261         $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
2262                 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2263         $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
2264                 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2265         $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
2266                 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2267         $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
2268                 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2269         $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
2270                 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2271         $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
2272                 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2273
2274 ../../gnatsym$(exeext): 
2275         $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
2276         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
2277         $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2278
2279 ../../gnatdll$(exeext): 
2280         $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
2281         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
2282         $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2283
2284 ../../vxaddr2line$(exeext): targext.o
2285         $(GNATMAKE) -c  $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
2286         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
2287         $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
2288
2289 gnatmake-re:  link.o targext.o
2290         $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
2291         $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
2292         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
2293         $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
2294                 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2295
2296 # Note the use of the "mv" command in order to allow gnatlink to be linked with
2297 # with the former version of gnatlink itself which cannot override itself.
2298 gnatlink-re:  link.o targext.o
2299         $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
2300         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
2301         $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
2302                     --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2303         $(MV)  ../../gnatlinknew$(exeext)  ../../gnatlink$(exeext)
2304
2305 # Needs to be built with CC=gcc
2306 # Since the RTL should be built with the latest compiler, remove the
2307 #  stamp target in the parent directory whenever gnat1 is rebuilt
2308
2309 # Likewise for the tools
2310 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
2311         $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
2312                     $(TOOLS_LIBS)
2313
2314 ../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
2315         $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
2316                     $(TOOLS_LIBS)
2317
2318 ../stamp-gnatlib-$(RTSDIR):
2319         @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
2320         then \
2321           $(ECHO) You must first build the GNAT library: make gnatlib; \
2322           false; \
2323         else \
2324           true; \
2325         fi
2326
2327 install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
2328 #       Create the directory before deleting it, in case the directory is
2329 #       a list of directories (as it may be on VMS). This ensures we are
2330 #       deleting the right one.
2331         -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2332         -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2333         $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2334         $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2335         -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2336         -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2337         for file in $(RTSDIR)/*.ali; do \
2338             $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2339         done
2340         -$(INSTALL_DATA) $(RTSDIR)/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2341         -cd $(RTSDIR); for file in *$(arext);do \
2342             $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2343             $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
2344         done
2345         -$(foreach file, $(EXTRA_ADALIB_FILES), \
2346             $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
2347         ) true
2348 #     Install the shared libraries, if any, using $(INSTALL) instead
2349 #     of $(INSTALL_DATA). The latter may force a mode inappropriate
2350 #     for shared libraries on some targets, e.g. on HP-UX where the x
2351 #     permission is required.
2352 #     Also install the .dSYM directories if they exist (these directories
2353 #     contain the debug information for the shared libraries on darwin)
2354         for file in gnat gnarl; do \
2355            if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
2356               $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
2357                          $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2358            fi; \
2359            if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
2360               $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
2361               $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
2362            fi; \
2363            if [ -d $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM ]; then \
2364               $(CP) -r $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM \
2365                 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2366            fi; \
2367         done
2368 # This copy must be done preserving the date on the original file.
2369         for file in $(RTSDIR)/*.ad?; do \
2370             $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
2371         done
2372         cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
2373         cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
2374
2375 ../stamp-gnatlib2-$(RTSDIR):
2376         $(RM) $(RTSDIR)/s-*.ali
2377         $(RM) $(RTSDIR)/s-*$(objext)
2378         $(RM) $(RTSDIR)/a-*.ali
2379         $(RM) $(RTSDIR)/a-*$(objext)
2380         $(RM) $(RTSDIR)/*.ali
2381         $(RM) $(RTSDIR)/*$(objext)
2382         $(RM) $(RTSDIR)/*$(arext)
2383         $(RM) $(RTSDIR)/*$(soext)
2384         touch ../stamp-gnatlib2-$(RTSDIR)
2385         $(RM) ../stamp-gnatlib-$(RTSDIR)
2386
2387 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
2388 #       successive target commands. Although the Gnu make documentation
2389 #       implies this is true on all systems, I suspect it may not be, So care
2390 #       has been taken to allow a sed script to look for ";)" and substitue
2391 #       for ";" the appropriate character in the range of lines below
2392 #       beginning with "GNULLI Begin" and ending with "GNULLI End"
2393
2394 # GNULLI Begin ###########################################################
2395
2396 ../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
2397         $(RMDIR) $(RTSDIR)
2398         $(MKDIR) $(RTSDIR)
2399         $(CHMOD) u+w $(RTSDIR)
2400 # Copy target independent sources
2401         $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
2402           $(LN_S) $(fsrcpfx)ada/$(f) $(RTSDIR) ;) true
2403 # Remove files to be replaced by target dependent sources
2404         $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
2405                         $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
2406         $(RM) $(RTSDIR)/*-*-*.ads $(RTSDIR)/*-*-*.adb
2407 # Copy new target dependent sources
2408         $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
2409                   $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
2410                         $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
2411 # Copy generated target dependent sources
2412         $(RM) $(RTSDIR)/s-oscons.ads
2413         (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
2414         $(RM) ../stamp-gnatlib-$(RTSDIR)
2415         touch ../stamp-gnatlib1-$(RTSDIR)
2416
2417 # GNULLI End #############################################################
2418
2419 # Don't use semicolon separated shell commands that involve list expansions.
2420 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
2421 # line lengths in excess of 256 characters.
2422 # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
2423 # is guaranteed to overflow the buffer.
2424
2425 gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
2426         $(MAKE) -C $(RTSDIR) \
2427                 CC="`echo \"$(GCC_FOR_TARGET)\" \
2428                 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2429                 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
2430                 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
2431                 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2432                 srcdir=$(fsrcdir) \
2433                 -f ../Makefile $(LIBGNAT_OBJS)
2434         $(MAKE) -C $(RTSDIR) \
2435                 CC="`echo \"$(GCC_FOR_TARGET)\" \
2436                 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2437                 ADA_INCLUDES="" \
2438                 CFLAGS="$(GNATLIBCFLAGS)" \
2439                 ADAFLAGS="$(GNATLIBFLAGS)" \
2440                 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2441                 srcdir=$(fsrcdir) \
2442                 -f ../Makefile \
2443                 $(GNATRTL_OBJS)
2444         $(RM) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnarl$(arext)
2445         $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat$(arext) \
2446            $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
2447         $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat$(arext)
2448         $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \
2449            $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
2450         $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext)
2451         $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnala$(arext) \
2452            $(addprefix $(RTSDIR)/,$(GNATRTL_LINEARALGEBRA_OBJS))
2453         $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnala$(arext)
2454         ifeq ($(GMEM_LIB),gmemlib)
2455                 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \
2456                   $(RTSDIR)/memtrack.o
2457                 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
2458         endif
2459         $(CHMOD) a-wx $(RTSDIR)/*.ali
2460         touch ../stamp-gnatlib-$(RTSDIR)
2461
2462 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
2463 gnatlib-shared-default:
2464         $(MAKE) $(FLAGS_TO_PASS) \
2465              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2466              GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2467              GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2468              MULTISUBDIR="$(MULTISUBDIR)" \
2469              THREAD_KIND="$(THREAD_KIND)" \
2470              gnatlib
2471         $(RM) $(RTSDIR)/libgna*$(soext)
2472         cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2473                 $(TARGET_LIBGCC2_CFLAGS) \
2474                 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2475                 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2476                 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2477                 $(MISCLIB) -lm
2478         cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2479                 $(TARGET_LIBGCC2_CFLAGS) \
2480                 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2481                 $(GNATRTL_TASKING_OBJS) \
2482                 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2483                 $(THREADSLIB)
2484         cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2485                 libgnat$(soext)
2486         cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2487                 libgnarl$(soext)
2488
2489 gnatlib-shared-dual:
2490         $(MAKE) $(FLAGS_TO_PASS) \
2491              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2492              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2493              GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2494              MULTISUBDIR="$(MULTISUBDIR)" \
2495              THREAD_KIND="$(THREAD_KIND)" \
2496              gnatlib-shared-default
2497         $(MV) $(RTSDIR)/libgna*$(soext) .
2498         $(RM) ../stamp-gnatlib2-$(RTSDIR)
2499         $(MAKE) $(FLAGS_TO_PASS) \
2500              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2501              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2502              GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2503              MULTISUBDIR="$(MULTISUBDIR)" \
2504              THREAD_KIND="$(THREAD_KIND)" \
2505              gnatlib
2506         $(MV) libgna*$(soext) $(RTSDIR)
2507
2508 gnatlib-shared-dual-win32:
2509         $(MAKE) $(FLAGS_TO_PASS) \
2510              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2511              GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2512              GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2513              MULTISUBDIR="$(MULTISUBDIR)" \
2514              THREAD_KIND="$(THREAD_KIND)" \
2515              gnatlib-shared-win32
2516         $(MV) $(RTSDIR)/libgna*$(soext) .
2517         $(RM) ../stamp-gnatlib2-$(RTSDIR)
2518         $(MAKE) $(FLAGS_TO_PASS) \
2519              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2520              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2521              GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2522              MULTISUBDIR="$(MULTISUBDIR)" \
2523              THREAD_KIND="$(THREAD_KIND)" \
2524              gnatlib
2525         $(MV) libgna*$(soext) $(RTSDIR)
2526
2527 # ??? we need to add the option to support auto-import of arrays/records to
2528 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
2529 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
2530 # Windows.
2531 gnatlib-shared-win32:
2532         $(MAKE) $(FLAGS_TO_PASS) \
2533              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2534              GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2535              GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2536              MULTISUBDIR="$(MULTISUBDIR)" \
2537              THREAD_KIND="$(THREAD_KIND)" \
2538              gnatlib
2539         $(RM) $(RTSDIR)/libgna*$(soext)
2540         cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2541                 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2542                 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2543                 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
2544         cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2545                 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2546                 $(GNATRTL_TASKING_OBJS) \
2547                 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2548                 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2549
2550 gnatlib-shared-darwin:
2551         $(MAKE) $(FLAGS_TO_PASS) \
2552              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2553              GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2554              GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) -fno-common" \
2555              MULTISUBDIR="$(MULTISUBDIR)" \
2556              THREAD_KIND="$(THREAD_KIND)" \
2557              gnatlib
2558         $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
2559         cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2560                 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2561                 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2562                 $(SO_OPTS) \
2563                 -Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2564                 $(MISCLIB) -lm
2565         cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2566                 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2567                 $(GNATRTL_TASKING_OBJS) \
2568                 $(SO_OPTS) \
2569                 -Wl,-install_name,@rpath/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2570                 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2571         cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2572                 libgnat$(soext)
2573         cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2574                 libgnarl$(soext)
2575         cd $(RTSDIR); dsymutil libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2576         cd $(RTSDIR); dsymutil libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext)
2577
2578 gnatlib-shared-vms:
2579         $(MAKE) $(FLAGS_TO_PASS) \
2580              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2581              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2582              GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2583              MULTISUBDIR="$(MULTISUBDIR)" \
2584              THREAD_KIND="$(THREAD_KIND)" \
2585              gnatlib
2586         $(RM) $(RTSDIR)/libgna*$(soext)
2587         cd $(RTSDIR) && \
2588         ../../gnatsym -s SYMVEC_$$$$.opt \
2589         $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \
2590         ../../xgcc -g -B../../ -shared -shared-libgcc \
2591            -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
2592            sys\$$library:trace.exe \
2593            --for-linker=/noinform \
2594            --for-linker=SYMVEC_$$$$.opt \
2595            --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2596         cd $(RTSDIR) && \
2597         ../../gnatsym -s SYMVEC_$$$$.opt \
2598         $(GNATRTL_TASKING_OBJS) && \
2599         ../../xgcc -g -B../../ -shared -shared-libgcc \
2600            -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2601            libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2602            sys\$$library:trace.exe \
2603            --for-linker=/noinform \
2604            --for-linker=SYMVEC_$$$$.opt \
2605            --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2606
2607 gnatlib-shared:
2608         $(MAKE) $(FLAGS_TO_PASS) \
2609              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2610              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2611              GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2612              MULTISUBDIR="$(MULTISUBDIR)" \
2613              THREAD_KIND="$(THREAD_KIND)" \
2614              TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
2615              $(GNATLIB_SHARED)
2616
2617 gnatlib-sjlj:
2618         $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1-$(RTSDIR)
2619         sed -e 's/ZCX_By_Default.*/ZCX_By_Default            : constant Boolean := False;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2620         $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2621         $(MAKE) $(FLAGS_TO_PASS) \
2622              EH_MECHANISM="" \
2623              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2624              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2625              GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2626              MULTISUBDIR="$(MULTISUBDIR)" \
2627              THREAD_KIND="$(THREAD_KIND)" \
2628              TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2629
2630 gnatlib-zcx:
2631         $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1-$(RTSDIR)
2632         sed -e 's/ZCX_By_Default.*/ZCX_By_Default            : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2633         $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2634         $(MAKE) $(FLAGS_TO_PASS) \
2635              EH_MECHANISM="-gcc" \
2636              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2637              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2638              GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2639              MULTISUBDIR="$(MULTISUBDIR)" \
2640              THREAD_KIND="$(THREAD_KIND)" \
2641              TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2642
2643 # .s files for cross-building
2644 gnat-cross: force
2645         make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
2646
2647 # Compiling object files from source files.
2648
2649 # Note that dependencies on obstack.h are not written
2650 # because that file is not part of GCC.
2651 # Dependencies on gvarargs.h are not written
2652 # because all that file does, when not compiling with GCC,
2653 # is include the system varargs.h.
2654
2655 b_gnatl.c : $(GNATLINK_OBJS)
2656         $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2657 b_gnatl.o : b_gnatl.c
2658
2659 b_gnatm.c : $(GNATMAKE_OBJS)
2660         $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2661 b_gnatm.o : b_gnatm.c
2662
2663 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2664 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2665
2666 # force no sibling call optimization on s-traceb.o so the number of stack
2667 # frames to be skipped when computing a call chain is not modified by
2668 # optimization. However we can do that only when building the runtime
2669 # (not the compiler) because the -fno-optimize-sibling-calls option exists
2670 # only in GCC 3 and above.
2671
2672 ifneq (,$(findstring xgcc,$(CC)))
2673 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2674 else
2675 NO_SIBLING_ADAFLAGS=
2676 endif
2677
2678 s-traceb.o  : s-traceb.adb
2679         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2680               $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2681       $< $(OUTPUT_OPTION)
2682
2683 # force debugging information on s-tasdeb.o so that it is always
2684 # possible to set conditional breakpoints on tasks.
2685
2686 s-tasdeb.o  : s-tasdeb.adb s-tasdeb.ads
2687         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2688               $< $(OUTPUT_OPTION)
2689
2690 # force no function reordering on a-except.o because of the exclusion bounds
2691 # mechanism (see the source file for more detailed information). However we
2692 # can do that only when building the runtime (not the compiler) because the
2693 # -fno-toplevel-reorder option exists only in GCC 4.2 and above.
2694
2695 ifneq (,$(findstring xgcc,$(CC)))
2696 NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
2697 else
2698 NO_REORDER_ADAFLAGS=
2699 endif
2700
2701 # force debugging information on a-except.o so that it is always
2702 # possible to set conditional breakpoints on exceptions.
2703 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2704
2705 a-except.o  : a-except.adb a-except.ads
2706         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2707               $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2708
2709 # compile s-except.o without optimization and with debug info to let the
2710 # debugger set breakpoints and inspect subprogram parameters on exception
2711 # related events.
2712
2713 s-except.o  : s-except.adb s-except.ads
2714         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2715               $< $(OUTPUT_OPTION)
2716
2717 # force debugging information on s-assert.o so that it is always
2718 # possible to set breakpoint on assert failures.
2719
2720 s-assert.o  : s-assert.adb s-assert.ads a-except.ads
2721         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
2722               $< $(OUTPUT_OPTION)
2723
2724 adadecode.o : adadecode.c adadecode.h
2725 aux-io.o  : aux-io.c
2726 argv.o    : argv.c
2727 cal.o     : cal.c
2728 deftarg.o : deftarg.c
2729 errno.o   : errno.c
2730 exit.o    : adaint.h exit.c
2731 expect.o  : expect.c
2732 final.o   : final.c
2733 gmem.o    : gmem.c
2734 link.o    : link.c
2735 mkdir.o   : mkdir.c
2736 socket.o  : socket.c gsocket.h
2737 sysdep.o  : sysdep.c
2738 raise-gcc.o : raise-gcc.c raise.h
2739 raise.o   : raise.c raise.h
2740 vx_stack_info.o : vx_stack_info.c
2741
2742 cio.o     : cio.c
2743         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2744                  $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2745
2746 init.o    : init.c adaint.h raise.h
2747         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2748                  $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2749
2750 initialize.o : initialize.c raise.h
2751         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2752                  $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2753
2754 targext.o : targext.c
2755         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2756                 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2757                 $< $(OUTPUT_OPTION)
2758
2759 # Need to keep the frame pointer in this file to pop the stack properly on
2760 # some targets.
2761 tracebak.o  : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
2762         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
2763               $(INCLUDES) -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2764
2765 # In GNU Make, ignore whether `stage*' exists.
2766 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2767 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2768
2769 force:
2770
2771 # Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
2772
2773 ../../gnatlbr$(exeext): ../../prefix.o
2774         $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2775         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2776         $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2777
2778 ../../vms_help$(exeext):
2779         $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
2780         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
2781         $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2782
2783 ../../gnat.hlp: ../../vms_help$(exeext)
2784         ../../vms_help$(exeext) $(fsrcdir)/ada/gnat.help_in \
2785                                 $(fsrcdir)/ada/vms_data.ads ../../gnat.hlp