OSDN Git Service

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