OSDN Git Service

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