OSDN Git Service

2008-02-11 Joel Sherrill <joel.sherrill@oarcorp.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / Makefile.in
1 # Makefile for GNU Ada Compiler (GNAT).
2 #   Copyright (C) 1994-2008 Free Software Foundation, Inc.
3
4 #This file is part of GCC.
5
6 #GCC is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 3, or (at your option)
9 #any later version.
10
11 #GCC is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #GNU General Public License for more details.
15
16 #You should have received a copy of the GNU General Public License
17 #along with GCC; see the file COPYING3.  If not see
18 #<http://www.gnu.org/licenses/>.
19
20 # The makefile built from this file lives in the language subdirectory.
21 # Its purpose is to provide support for:
22 #
23 # 1) recursion where necessary, and only then (building .o's), and
24 # 2) building and debugging cc1 from the language subdirectory, and
25 # 3) nothing else.
26 #
27 # The parent makefile handles all other chores, with help from the
28 # language makefile fragment, of course.
29 #
30 # The targets for external use are:
31 # all, TAGS, ???mostlyclean, ???clean.
32
33 # This makefile will only work with Gnu make.
34 # The rules are written assuming a minimum subset of tools are available:
35 #
36 # Required:
37 #      MAKE:    Only Gnu make will work.
38 #      MV:      Must accept (at least) one, maybe wildcard, source argument,
39 #               a file or directory destination, and support creation/
40 #               modification date preservation.  Gnu mv -f works.
41 #      RM:      Must accept an arbitrary number of space separated file
42 #               arguments, or one wildcard argument. Gnu rm works.
43 #      RMDIR:   Must delete a directory and all its contents. Gnu rm -rf works.
44 #      ECHO:    Must support command line redirection. Any Unix-like
45 #               shell will typically provide this, otherwise a custom version
46 #               is trivial to write.
47 #      AR:      Gnu ar works.
48 #      MKDIR:   Gnu mkdir works.
49 #      CHMOD:   Gnu chmod works.
50 #      true:    Does nothing and returns a normal successful return code.
51 #      pwd:     Prints the current directory on stdout.
52 #      cd:      Change directory.
53 #
54 # Optional:
55 #      BISON:   Gnu bison works.
56 #      FLEX:    Gnu flex works.
57 #      Other miscellaneous tools for obscure targets.
58
59 # 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   system.ads<system-rtems.ads \
1140   a-intnam.ads<a-intnam-rtems.ads \
1141   s-inmaop.adb<s-inmaop-posix.adb \
1142   s-intman.adb<s-intman-posix.adb \
1143   s-osinte.adb<s-osinte-rtems.adb \
1144   s-osinte.ads<s-osinte-rtems.ads \
1145   s-osprim.adb<s-osprim-posix.adb \
1146   s-parame.adb<s-parame-rtems.adb \
1147   s-taprop.adb<s-taprop-posix.adb \
1148   s-taspri.ads<s-taspri-posix.ads \
1149   s-tpopsp.adb<s-tpopsp-rtems.adb \
1150   g-soccon.ads<g-soccon-rtems.ads \
1151   s-stchop.adb<s-stchop-rtems.adb
1152 endif
1153
1154 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
1155   LIBGNAT_TARGET_PAIRS = \
1156   a-intnam.ads<a-intnam-tru64.ads \
1157   s-inmaop.adb<s-inmaop-posix.adb \
1158   s-intman.adb<s-intman-posix.adb \
1159   s-mastop.adb<s-mastop-tru64.adb \
1160   s-osinte.adb<s-osinte-tru64.adb \
1161   s-osinte.ads<s-osinte-tru64.ads \
1162   s-osprim.adb<s-osprim-unix.adb \
1163   s-taprop.adb<s-taprop-tru64.adb \
1164   s-tasinf.ads<s-tasinf-tru64.ads \
1165   s-taspri.ads<s-taspri-tru64.ads \
1166   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1167   s-traceb.adb<s-traceb-mastop.adb \
1168   g-soccon.ads<g-soccon-tru64.ads \
1169   system.ads<system-tru64.ads
1170
1171   TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-tru64.adb
1172
1173   EH_MECHANISM=-gcc
1174   GMEM_LIB=gmemlib
1175   THREADSLIB = -lpthread -lmach -lexc -lrt
1176   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1177   GNATLIB_SHARED = gnatlib-shared-default
1178   LIBRARY_VERSION := $(LIB_VERSION)
1179 endif
1180
1181 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
1182
1183 soext  = .exe
1184 hyphen = _
1185 LN = cp -p
1186 LN_S = cp -p
1187
1188 .SUFFIXES: .sym
1189
1190 .o.sym: 
1191         @ gnu:[bin]vmssymvec $<
1192 endif
1193
1194 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1195 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1196   LIBGNAT_TARGET_PAIRS_AUX1 = \
1197   g-enblsp.adb<g-enblsp-vms-ia64.adb \
1198   g-trasym.adb<g-trasym-vms-ia64.adb \
1199   s-auxdec.ads<s-auxdec-vms_64.ads \
1200   s-osinte.adb<s-osinte-vms-ia64.adb \
1201   s-osinte.ads<s-osinte-vms-ia64.ads \
1202   s-vaflop.adb<s-vaflop-vms-ia64.adb \
1203   system.ads<system-vms-ia64.ads
1204
1205   LIBGNAT_TARGET_PAIRS_AUX2 = \
1206   s-parame.ads<s-parame-vms-ia64.ads
1207 else
1208 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1209   LIBGNAT_TARGET_PAIRS_AUX1 = \
1210   g-enblsp.adb<g-enblsp-vms-alpha.adb \
1211   g-trasym.adb<g-trasym-vms-alpha.adb \
1212   s-asthan.adb<s-asthan-vms-alpha.adb \
1213   s-auxdec.ads<s-auxdec-vms_64.ads \
1214   s-osinte.adb<s-osinte-vms.adb \
1215   s-osinte.ads<s-osinte-vms.ads \
1216   s-vaflop.adb<s-vaflop-vms-alpha.adb \
1217   system.ads<system-vms_64.ads
1218
1219 ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1220   LIBGNAT_TARGET_PAIRS_AUX2 = \
1221   s-parame.ads<s-parame-vms-restrict.ads
1222 else
1223   LIBGNAT_TARGET_PAIRS_AUX2 = \
1224   s-parame.ads<s-parame-vms-alpha.ads
1225 endif
1226 endif
1227 endif
1228
1229   LIBGNAT_TARGET_PAIRS = \
1230   a-caldel.adb<a-caldel-vms.adb \
1231   a-calend.adb<a-calend-vms.adb \
1232   a-calend.ads<a-calend-vms.ads \
1233   a-dirval.adb<a-dirval-vms.adb \
1234   a-excpol.adb<a-excpol-abort.adb \
1235   a-intnam.ads<a-intnam-vms.ads \
1236   a-numaux.ads<a-numaux-vms.ads \
1237   g-expect.adb<g-expect-vms.adb \
1238   g-soccon.ads<g-soccon-vms.ads \
1239   g-socthi.ads<g-socthi-vms.ads \
1240   g-socthi.adb<g-socthi-vms.adb \
1241   g-stsifd.adb<g-stsifd-sockets.adb \
1242   g-sttsne.adb<g-sttsne-locking.adb \
1243   g-sttsne.ads<g-sttsne-locking.ads \
1244   i-c.ads<i-c-vms_64.ads \
1245   i-cstrin.ads<i-cstrin-vms_64.ads \
1246   i-cstrin.adb<i-cstrin-vms_64.adb \
1247   i-cpoint.ads<i-cpoint-vms_64.ads \
1248   i-cpoint.adb<i-cpoint-vms_64.adb \
1249   i-cstrea.adb<i-cstrea-vms.adb \
1250   i-forbla.ads<i-forbla-unimplemented.ads \
1251   s-inmaop.adb<s-inmaop-vms.adb \
1252   s-interr.adb<s-interr-vms.adb \
1253   s-intman.adb<s-intman-vms.adb \
1254   s-intman.ads<s-intman-vms.ads \
1255   s-osprim.adb<s-osprim-vms.adb \
1256   s-osprim.ads<s-osprim-vms.ads \
1257   s-taprop.adb<s-taprop-vms.adb \
1258   s-taspri.ads<s-taspri-vms.ads \
1259   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1260   s-tpopde.adb<s-tpopde-vms.adb \
1261   s-tpopde.ads<s-tpopde-vms.ads \
1262   s-traent.adb<s-traent-vms.adb \
1263   s-traent.ads<s-traent-vms.ads \
1264   $(LIBGNAT_TARGET_PAIRS_AUX1) \
1265   $(LIBGNAT_TARGET_PAIRS_AUX2)
1266
1267 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1268   TOOLS_TARGET_PAIRS= \
1269   mlib-tgt-specific.adb<mlib-tgt-vms-ia64.adb \
1270   symbols.adb<symbols-vms.adb \
1271   symbols-processing.adb<symbols-processing-vms-ia64.adb
1272 else
1273   TOOLS_TARGET_PAIRS= \
1274   mlib-tgt-specific.adb<mlib-tgt-vms-alpha.adb \
1275   symbols.adb<symbols-vms.adb \
1276   symbols-processing.adb<symbols-processing-vms-alpha.adb
1277 endif
1278
1279
1280   EXTRA_GNATMAKE_OBJS = mlib-tgt-vms.o
1281
1282   GMEM_LIB = gmemlib
1283   EH_MECHANISM=-gcc
1284   GNATLIB_SHARED=gnatlib-shared-vms
1285 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1286   EXTRA_LIBGNAT_SRCS=vmshandler.asm
1287   EXTRA_LIBGNAT_OBJS=vmshandler.o
1288 endif
1289   EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1290   EXTRA_GNATTOOLS = \
1291      ../../gnatlbr$(exeext)  \
1292      ../../gnatsym$(exeext)  \
1293      ../../vms_help$(exeext) \
1294      ../../gnat.hlp
1295   # This command transforms (YYYYMMDD) into YY,MMDD
1296   GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\)/\2,\3/')
1297   TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1298   LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1299 endif
1300
1301 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1302   LIBGNAT_TARGET_PAIRS = \
1303   a-dirval.adb<a-dirval-mingw.adb \
1304   a-excpol.adb<a-excpol-abort.adb \
1305   a-numaux.adb<a-numaux-x86.adb \
1306   a-numaux.ads<a-numaux-x86.ads \
1307   s-gloloc.adb<s-gloloc-mingw.adb \
1308   s-inmaop.adb<s-inmaop-dummy.adb \
1309   s-memory.adb<s-memory-mingw.adb \
1310   s-taspri.ads<s-taspri-mingw.ads \
1311   s-tasinf.adb<s-tasinf-mingw.adb \
1312   s-tasinf.ads<s-tasinf-mingw.ads \
1313   g-bytswa.adb<g-bytswa-x86.adb \
1314   g-socthi.ads<g-socthi-mingw.ads \
1315   g-socthi.adb<g-socthi-mingw.adb \
1316   g-stsifd.adb<g-stsifd-sockets.adb \
1317   g-soccon.ads<g-soccon-mingw.ads \
1318   g-soliop.ads<g-soliop-mingw.ads
1319
1320   ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
1321     LIBGNAT_TARGET_PAIRS += \
1322     s-intman.adb<s-intman-dummy.adb \
1323     s-osinte.ads<s-osinte-rtx.ads \
1324     s-osprim.adb<s-osprim-rtx.adb \
1325     s-taprop.adb<s-taprop-rtx.adb \
1326     system.ads<system-rtx.ads
1327
1328     MISCLIB = -lwsock32 -lrtapi_w32
1329     THREADSLIB=-lrtapi_w32
1330   else
1331     LIBGNAT_TARGET_PAIRS += \
1332     a-exetim.adb<a-exetim-mingw.adb \
1333     a-exetim.ads<a-exetim-mingw.ads \
1334     a-intnam.ads<a-intnam-mingw.ads \
1335     s-interr.adb<s-interr-sigaction.adb \
1336     s-intman.adb<s-intman-mingw.adb \
1337     s-osinte.ads<s-osinte-mingw.ads \
1338     s-osprim.adb<s-osprim-mingw.adb \
1339     s-taprop.adb<s-taprop-mingw.adb \
1340     system.ads<system-mingw.ads
1341
1342     EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o
1343     EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o
1344
1345     MISCLIB = -lwsock32
1346
1347     # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1348     # auto-import support for array/record will be done.
1349     GNATLIB_SHARED = gnatlib-shared-win32
1350   endif
1351
1352   TOOLS_TARGET_PAIRS= \
1353   mlib-tgt-specific.adb<mlib-tgt-mingw.adb \
1354   indepsw.adb<indepsw-mingw.adb
1355
1356   EH_MECHANISM=-gcc
1357   GMEM_LIB = gmemlib
1358   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1359   EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1360   EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1361   soext = .dll
1362   LIBRARY_VERSION := $(LIB_VERSION)
1363 endif
1364
1365 ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
1366   LIBGNAT_TARGET_PAIRS = \
1367   a-intnam.ads<a-intnam-linux.ads \
1368   g-soccon.ads<g-soccon-linux-ppc.ads \
1369   s-inmaop.adb<s-inmaop-posix.adb \
1370   s-intman.adb<s-intman-posix.adb \
1371   s-osinte.adb<s-osinte-posix.adb \
1372   s-osinte.ads<s-osinte-linux.ads \
1373   s-osprim.adb<s-osprim-posix.adb \
1374   s-taprop.adb<s-taprop-linux.adb \
1375   s-tasinf.ads<s-tasinf-linux.ads \
1376   s-tasinf.adb<s-tasinf-linux.adb \
1377   s-taspri.ads<s-taspri-posix.ads \
1378   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1379   system.ads<system-linux-ppc.ads
1380
1381   TOOLS_TARGET_PAIRS =  \
1382     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1383     indepsw.adb<indepsw-gnu.adb
1384
1385   EH_MECHANISM=-gcc
1386   THREADSLIB = -lpthread
1387   GNATLIB_SHARED = gnatlib-shared-dual
1388   GMEM_LIB = gmemlib
1389   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1390   LIBRARY_VERSION := $(LIB_VERSION)
1391 endif
1392
1393 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
1394   LIBGNAT_TARGET_PAIRS = \
1395   a-intnam.ads<a-intnam-linux.ads \
1396   s-inmaop.adb<s-inmaop-posix.adb \
1397   s-intman.adb<s-intman-posix.adb \
1398   s-osinte.adb<s-osinte-posix.adb \
1399   s-osinte.ads<s-osinte-linux.ads \
1400   s-osprim.adb<s-osprim-posix.adb \
1401   s-taprop.adb<s-taprop-linux.adb \
1402   s-tasinf.ads<s-tasinf-linux.ads \
1403   s-tasinf.adb<s-tasinf-linux.adb \
1404   s-taspri.ads<s-taspri-posix.ads \
1405   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1406   system.ads<system-linux-sparc.ads
1407
1408   TOOLS_TARGET_PAIRS =  \
1409     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1410     indepsw.adb<indepsw-gnu.adb
1411
1412   EH_MECHANISM=-gcc
1413   THREADSLIB = -lpthread
1414   GNATLIB_SHARED = gnatlib-shared-dual
1415   GMEM_LIB = gmemlib
1416   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1417   LIBRARY_VERSION := $(LIB_VERSION)
1418 endif
1419
1420 ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1421   LIBGNAT_TARGET_PAIRS = \
1422   a-intnam.ads<a-intnam-linux.ads \
1423   s-inmaop.adb<s-inmaop-posix.adb \
1424   s-intman.adb<s-intman-posix.adb \
1425   s-osinte.adb<s-osinte-posix.adb \
1426   s-osinte.ads<s-osinte-linux-hppa.ads \
1427   s-osprim.adb<s-osprim-posix.adb \
1428   s-taprop.adb<s-taprop-linux.adb \
1429   s-tasinf.ads<s-tasinf-linux.ads \
1430   s-tasinf.adb<s-tasinf-linux.adb \
1431   s-taspri.ads<s-taspri-posix.ads \
1432   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1433   system.ads<system-linux-hppa.ads
1434
1435   TOOLS_TARGET_PAIRS =  \
1436     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1437     indepsw.adb<indepsw-gnu.adb
1438
1439   EH_MECHANISM=-gcc
1440   THREADSLIB = -lpthread
1441   GNATLIB_SHARED = gnatlib-shared-dual
1442   GMEM_LIB = gmemlib
1443   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1444   LIBRARY_VERSION := $(LIB_VERSION)
1445 endif
1446
1447 ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
1448   LIBGNAT_TARGET_PAIRS = \
1449   a-intnam.ads<a-intnam-linux.ads \
1450   s-inmaop.adb<s-inmaop-posix.adb \
1451   s-intman.adb<s-intman-posix.adb \
1452   s-osinte.adb<s-osinte-posix.adb \
1453   s-osinte.ads<s-osinte-linux.ads \
1454   s-osprim.adb<s-osprim-posix.adb \
1455   s-taprop.adb<s-taprop-linux.adb \
1456   s-tasinf.ads<s-tasinf-linux.ads \
1457   s-tasinf.adb<s-tasinf-linux.adb \
1458   s-taspri.ads<s-taspri-posix.ads \
1459   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1460   system.ads<system-linux-sh4.ads
1461
1462   TOOLS_TARGET_PAIRS =  \
1463     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1464     indepsw.adb<indepsw-linux.adb
1465
1466   EH_MECHANISM=-gcc
1467   MISCLIB=
1468   THREADSLIB = -lpthread
1469   GNATLIB_SHARED = gnatlib-shared-dual
1470   GMEM_LIB = gmemlib
1471   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1472   LIBRARY_VERSION := $(LIB_VERSION)
1473 endif
1474
1475 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1476   LIBGNAT_TARGET_PAIRS = \
1477   a-intnam.ads<a-intnam-linux.ads \
1478   a-numaux.ads<a-numaux-libc-x86.ads \
1479   g-soccon.ads<g-soccon-linux-64.ads \
1480   s-inmaop.adb<s-inmaop-posix.adb \
1481   s-intman.adb<s-intman-posix.adb \
1482   s-osinte.ads<s-osinte-linux.ads \
1483   s-osinte.adb<s-osinte-posix.adb \
1484   s-osprim.adb<s-osprim-posix.adb \
1485   s-taprop.adb<s-taprop-linux.adb \
1486   s-tasinf.ads<s-tasinf-linux.ads \
1487   s-tasinf.adb<s-tasinf-linux.adb \
1488   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1489   s-taspri.ads<s-taspri-posix.ads \
1490   system.ads<system-linux-ia64.ads
1491
1492   TOOLS_TARGET_PAIRS =  \
1493     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1494     indepsw.adb<indepsw-gnu.adb
1495
1496   EH_MECHANISM=-gcc
1497   MISCLIB=
1498   THREADSLIB=-lpthread
1499   GNATLIB_SHARED=gnatlib-shared-dual
1500   GMEM_LIB = gmemlib
1501   PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1502   LIBRARY_VERSION := $(LIB_VERSION)
1503 endif
1504
1505 ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
1506   LIBGNAT_TARGET_PAIRS = \
1507   a-intnam.ads<a-intnam-linux.ads \
1508   s-inmaop.adb<s-inmaop-posix.adb \
1509   s-intman.adb<s-intman-posix.adb \
1510   s-osinte.ads<s-osinte-linux-alpha.ads \
1511   s-osinte.adb<s-osinte-posix.adb \
1512   s-osprim.adb<s-osprim-posix.adb \
1513   s-taprop.adb<s-taprop-linux.adb \
1514   s-tasinf.ads<s-tasinf-linux.ads \
1515   s-tasinf.adb<s-tasinf-linux.adb \
1516   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1517   s-taspri.ads<s-taspri-posix.ads \
1518   system.ads<system-linux-alpha.ads
1519
1520   TOOLS_TARGET_PAIRS =  \
1521     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1522     indepsw.adb<indepsw-gnu.adb
1523
1524   EH_MECHANISM=-gcc
1525   MISCLIB=
1526   THREADSLIB=-lpthread
1527   GNATLIB_SHARED=gnatlib-shared-dual
1528   PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1529   LIBRARY_VERSION := $(LIB_VERSION)
1530 endif
1531
1532 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
1533   LIBGNAT_TARGET_PAIRS = \
1534   a-intnam.ads<a-intnam-linux.ads \
1535   a-numaux.adb<a-numaux-x86.adb \
1536   a-numaux.ads<a-numaux-x86.ads \
1537   g-soccon.ads<g-soccon-linux-64.ads \
1538   s-inmaop.adb<s-inmaop-posix.adb \
1539   s-intman.adb<s-intman-posix.adb \
1540   s-osinte.ads<s-osinte-linux.ads \
1541   s-osinte.adb<s-osinte-posix.adb \
1542   s-osprim.adb<s-osprim-posix.adb \
1543   s-taprop.adb<s-taprop-linux.adb \
1544   s-tasinf.ads<s-tasinf-linux.ads \
1545   s-tasinf.adb<s-tasinf-linux.adb \
1546   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1547   s-taspri.ads<s-taspri-posix.ads \
1548   system.ads<system-linux-x86_64.ads
1549
1550   TOOLS_TARGET_PAIRS =  \
1551     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1552     indepsw.adb<indepsw-gnu.adb
1553
1554   EH_MECHANISM=-gcc
1555   THREADSLIB=-lpthread
1556   GNATLIB_SHARED=gnatlib-shared-dual
1557   GMEM_LIB = gmemlib
1558   PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1559   LIBRARY_VERSION := $(LIB_VERSION)
1560 endif
1561
1562 ifeq ($(strip $(filter-out darwin%,$(osys))),)
1563   ifeq ($(strip $(filter-out %86,$(arch))),)
1564     LIBGNAT_TARGET_PAIRS = \
1565     a-intnam.ads<a-intnam-darwin.ads \
1566     s-inmaop.adb<s-inmaop-posix.adb \
1567     s-intman.adb<s-intman-posix.adb \
1568     s-osinte.adb<s-osinte-darwin.adb \
1569     s-osinte.ads<s-osinte-darwin.ads \
1570     s-osprim.adb<s-osprim-posix.adb \
1571     s-taprop.adb<s-taprop-posix.adb \
1572     s-taspri.ads<s-taspri-posix.ads \
1573     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1574     g-soccon.ads<g-soccon-darwin.ads \
1575     a-numaux.ads<a-numaux-x86.ads \
1576     a-numaux.adb<a-numaux-x86.adb \
1577     system.ads<system-darwin-x86.ads
1578   else
1579     LIBGNAT_TARGET_PAIRS = \
1580     a-intnam.ads<a-intnam-darwin.ads \
1581     s-inmaop.adb<s-inmaop-posix.adb \
1582     s-intman.adb<s-intman-posix.adb \
1583     s-osinte.adb<s-osinte-darwin.adb \
1584     s-osinte.ads<s-osinte-darwin.ads \
1585     s-osprim.adb<s-osprim-posix.adb \
1586     s-taprop.adb<s-taprop-posix.adb \
1587     s-taspri.ads<s-taspri-posix.ads \
1588     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1589     g-soccon.ads<g-soccon-darwin.ads \
1590     a-numaux.ads<a-numaux-darwin.ads \
1591     a-numaux.adb<a-numaux-darwin.adb \
1592     system.ads<system-darwin-ppc.ads
1593   endif
1594
1595   TOOLS_TARGET_PAIRS =  \
1596     mlib-tgt-specific.adb<mlib-tgt-darwin.adb
1597
1598   EH_MECHANISM=-gcc
1599   GNATLIB_SHARED = gnatlib-shared-darwin
1600   SO_OPTS = -Wl,-flat_namespace -shared-libgcc
1601   RANLIB = ranlib -c
1602   GMEM_LIB = gmemlib
1603   PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1604   LIBRARY_VERSION := $(LIB_VERSION)
1605   soext = .dylib
1606 endif
1607
1608 ifneq ($(EH_MECHANISM),)
1609   LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
1610   EXTRA_LIBGNAT_SRCS+=raise$(EH_MECHANISM).c
1611   EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
1612 endif
1613
1614 # Use the Ada 2005 version of Ada.Exceptions by default, unless specified
1615 # explicitly already. The base files (a-except.ad?) are used only for building
1616 # the compiler and other basic tools.
1617 # These base versions lack Ada 2005 additions which would cause bootstrap
1618 # problems if included in the compiler and other basic tools.
1619
1620 ifeq ($(filter-out a-except%,$(LIBGNAT_TARGET_PAIRS)),$(LIBGNAT_TARGET_PAIRS))
1621   LIBGNAT_TARGET_PAIRS += \
1622     a-except.ads<a-except-2005.ads \
1623     a-except.adb<a-except-2005.adb
1624 endif
1625
1626 # The runtime library for gnat comprises two directories.  One contains the
1627 # Ada source files that the compiler (gnat1) needs -- these files are listed
1628 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1629 # corresponding .ali files for the parts written in Ada, libgnat.a for
1630 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1631 # emulation library.  LIBGNAT_OBJS lists the objects that go into libgnat.a,
1632 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1633 # go into the directory.  The pthreads emulation is built in the threads
1634 # subdirectory and copied.
1635 LIBGNAT_SRCS = ada.h adaint.c adaint.h argv.c cio.c cstreams.c \
1636   errno.c exit.c cal.c ctrl_c.c env.c env.h \
1637   raise.h raise.c sysdep.c aux-io.c init.c initialize.c seh_init.c \
1638   final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c expect.c mkdir.c \
1639   socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
1640
1641 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o env.o \
1642   raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o \
1643   final.o tracebak.o expect.o mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
1644
1645 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1646 #  the library installation will change and there will be a
1647 #  GNAT_RTL_SRCS.  Right now we count on being able to build GNATRTL_OBJS
1648 #  from ADA_INCLUDE_SRCS.
1649
1650 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
1651 # the following include file:
1652
1653 include $(fsrcdir)/Makefile.rtl
1654
1655 GNATRTL_LINEARALGEBRA_OBJS = a-nlcoar.o a-nllcar.o a-nllrar.o a-nlrear.o \
1656   a-nucoar.o a-nurear.o i-forbla.o i-forlap.o s-gearop.o
1657
1658 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
1659   $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
1660
1661 # Default run time files
1662
1663 ADA_INCLUDE_SRCS =\
1664  ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1665  machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1666  sequenio.ads system.ads memtrack.adb \
1667  a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
1668  s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads  
1669
1670 LIBGNAT=../rts/libgnat.a 
1671
1672 GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
1673
1674 # when compiling the tools, the runtime has to be first on the path so that
1675 # it hides the runtime files lying with the rest of the sources
1676 ifeq ($(TOOLSCASE),native)
1677   vpath %.ads ../rts ../
1678   vpath %.adb ../rts ../
1679   vpath %.c   ../rts ../
1680   vpath %.h   ../rts ../
1681 endif
1682
1683 # in the cross tools case, everything is compiled with the native 
1684 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1685 ifeq ($(TOOLSCASE),cross)
1686   vpath %.ads ../
1687   vpath %.adb ../
1688   vpath %.c   ../
1689   vpath %.h   ../
1690 endif
1691
1692 ../../gnatchop$(exeext): 
1693         $(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)"
1694         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatchop 
1695         $(GNATLINK) -v gnatchop -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1696
1697 ../../gnat$(exeext): 
1698         $(GNATMAKE) -c $(ADA_INCLUDES) gnatcmd --GCC="$(CC) $(ALL_ADAFLAGS)"
1699         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatcmd 
1700         $(GNATLINK) -v gnatcmd -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1701
1702 ../../gnatkr$(exeext): 
1703         $(GNATMAKE) -c $(ADA_INCLUDES) gnatkr --GCC="$(CC) $(ALL_ADAFLAGS)"
1704         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatkr 
1705         $(GNATLINK) -v gnatkr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1706
1707 ../../gnatls$(exeext): 
1708         $(GNATMAKE) -c $(ADA_INCLUDES) gnatls --GCC="$(CC) $(ALL_ADAFLAGS)"
1709         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatls 
1710         $(GNATLINK) -v gnatls -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1711
1712 ../../gnatname$(exeext): 
1713         $(GNATMAKE) -c $(ADA_INCLUDES) gnatname --GCC="$(CC) $(ALL_ADAFLAGS)"
1714         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatname 
1715         $(GNATLINK) -v gnatname -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1716
1717 ../../gprmake$(exeext): 
1718         $(GNATMAKE) -c $(ADA_INCLUDES) gprmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1719         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gprmake
1720         $(GNATLINK) -v gprmake -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1721
1722 ../../gnatprep$(exeext): 
1723         $(GNATMAKE) -c $(ADA_INCLUDES) gnatprep --GCC="$(CC) $(ALL_ADAFLAGS)"
1724         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatprep 
1725         $(GNATLINK) -v gnatprep -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1726
1727 ../../gnatxref$(exeext): 
1728         $(GNATMAKE) -c $(ADA_INCLUDES) gnatxref --GCC="$(CC) $(ALL_ADAFLAGS)"
1729         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatxref 
1730         $(GNATLINK) -v gnatxref -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1731
1732 ../../gnatfind$(exeext): 
1733         $(GNATMAKE) -c $(ADA_INCLUDES) gnatfind --GCC="$(CC) $(ALL_ADAFLAGS)"
1734         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatfind 
1735         $(GNATLINK) -v gnatfind -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1736
1737 ../../gnatclean$(exeext): 
1738         $(GNATMAKE) -c $(ADA_INCLUDES) gnatclean --GCC="$(CC) $(ALL_ADAFLAGS)"
1739         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatclean
1740         $(GNATLINK) -v gnatclean -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1741
1742 ../../gnatsym$(exeext): 
1743         $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
1744         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
1745         $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1746
1747 ../../gnatdll$(exeext): 
1748         $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1749         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) $(GNATBIND_FLAGS) gnatdll
1750         $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1751
1752 ../../vxaddr2line$(exeext): targext.o
1753         $(GNATMAKE) -c  $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
1754         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line 
1755         $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
1756
1757 gnatmake-re:  link.o targext.o
1758         $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1759         $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1760         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake 
1761         $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1762                 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1763
1764 # Note the use of the "mv" command in order to allow gnatlink to be linked with
1765 # with the former version of gnatlink itself which cannot override itself.
1766 gnatlink-re:  link.o targext.o
1767         $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1768         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink 
1769         $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1770                     --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1771         $(MV)  ../../gnatlinknew$(exeext)  ../../gnatlink$(exeext)
1772   
1773 # Needs to be built with CC=gcc
1774 # Since the RTL should be built with the latest compiler, remove the
1775 #  stamp target in the parent directory whenever gnat1 is rebuilt
1776
1777 # Likewise for the tools
1778 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
1779         $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1780                     $(TOOLS_LIBS)
1781
1782 ../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
1783         $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1784                     $(TOOLS_LIBS)
1785
1786 ../../gnatbl$(exeext): gnatbl.o
1787         $(GCC_LINK) -o $@ $(ALL_CFLAGS) $(LDFLAGS) gnatbl.o $(TOOLS_LIBS)
1788
1789 gnatbl.o: gnatbl.c adaint.h
1790         $(CC) $(ALL_CFLAGS) $(INCLUDES) -c $< $(OUTPUT_OPTION)
1791
1792 ../stamp-gnatlib:
1793         @if [ ! -f stamp-gnatlib ] ; \
1794         then \
1795           $(ECHO) You must first build the GNAT library: make gnatlib; \
1796           false; \
1797         else \
1798           true; \
1799         fi
1800
1801 install-gnatlib: ../stamp-gnatlib
1802 #       Create the directory before deleting it, in case the directory is
1803 #       a list of directories (as it may be on VMS). This ensures we are
1804 #       deleting the right one.
1805         -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1806         -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1807         $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1808         $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1809         -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1810         -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1811         for file in rts/*.ali; do \
1812             $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1813         done
1814         -$(INSTALL_DATA) rts/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1815         -cd rts; for file in *$(arext);do \
1816             $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1817             $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
1818         done
1819         -$(foreach file, $(EXTRA_ADALIB_FILES), \
1820             $(INSTALL_DATA_DATE) rts/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
1821         ) true
1822 #     Install the shared libraries, if any, using $(INSTALL) instead
1823 #     of $(INSTALL_DATA). The latter may force a mode inappropriate
1824 #     for shared libraries on some targets, e.g. on HP-UX where the x
1825 #     permission is required.
1826         for file in gnat gnarl; do \
1827            if [ -f rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
1828               $(INSTALL) rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1829                          $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1830            fi; \
1831            if [ -f rts/lib$${file}$(soext) ]; then \
1832               $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1833               $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
1834            fi; \
1835         done
1836 # This copy must be done preserving the date on the original file.
1837         for file in rts/*.ad?; do \
1838             $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
1839         done
1840         cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1841         cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1842
1843 ../stamp-gnatlib2:
1844         $(RM) rts/s-*.ali
1845         $(RM) rts/s-*$(objext)
1846         $(RM) rts/a-*.ali
1847         $(RM) rts/a-*$(objext)
1848         $(RM) rts/*.ali
1849         $(RM) rts/*$(objext)
1850         $(RM) rts/*$(arext)
1851         $(RM) rts/*$(soext)
1852         touch ../stamp-gnatlib2
1853         $(RM) ../stamp-gnatlib
1854
1855 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1856 #       successive target commands. Although the Gnu make documentation
1857 #       implies this is true on all systems, I suspect it may not be, So care
1858 #       has been taken to allow a sed script to look for ";)" and substitue
1859 #       for ";" the appropriate character in the range of lines below
1860 #       beginning with "GNULLI Begin" and ending with "GNULLI End"
1861
1862 # GNULLI Begin ###########################################################
1863
1864 ../stamp-gnatlib1: Makefile ../stamp-gnatlib2
1865         $(RMDIR) rts
1866         $(MKDIR) rts
1867         $(CHMOD) u+w rts
1868 # Copy target independent sources
1869         $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
1870           $(LN_S) $(fsrcpfx)$(f) rts ;) true
1871 # Remove files to be replaced by target dependent sources
1872         $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1873                         rts/$(word 1,$(subst <, ,$(PAIR))))
1874         $(RM) rts/*-*-*.ads rts/*-*-*.adb
1875 # Copy new target dependent sources
1876         $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1877                   $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1878                         rts/$(word 1,$(subst <, ,$(PAIR)));)
1879         $(RM) ../stamp-gnatlib
1880         touch ../stamp-gnatlib1
1881
1882 # GNULLI End #############################################################
1883
1884 # Don't use semicolon separated shell commands that involve list expansions.
1885 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
1886 # line lengths in excess of 256 characters.
1887 # Example: cd rts; ar rc libfoo.a $(LONG_LIST_OF_OBJS)
1888 # is guaranteed to overflow the buffer.
1889
1890 gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
1891         $(MAKE) -C rts \
1892                 CC="`echo \"$(GCC_FOR_TARGET)\" \
1893                 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
1894                 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
1895                 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
1896                 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
1897                 srcdir=$(fsrcdir) \
1898                 -f ../Makefile $(LIBGNAT_OBJS)
1899         $(MAKE) -C rts \
1900                 CC="`echo \"$(GCC_FOR_TARGET)\" \
1901                 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
1902                 ADA_INCLUDES="" \
1903                 CFLAGS="$(GNATLIBCFLAGS)" \
1904                 ADAFLAGS="$(GNATLIBFLAGS)" \
1905                 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
1906                 srcdir=$(fsrcdir) \
1907                 -f ../Makefile \
1908                 $(GNATRTL_OBJS)
1909         $(RM) rts/libgnat$(arext) rts/libgnarl$(arext)
1910         $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgnat$(arext) \
1911            $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
1912         ifneq ($(PREFIX_OBJS),)
1913                 $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgccprefix$(arext) \
1914                   $(PREFIX_OBJS);
1915                 $(RANLIB_FOR_TARGET) rts/libgccprefix$(arext)
1916         endif
1917         $(RANLIB_FOR_TARGET) rts/libgnat$(arext)
1918         $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgnarl$(arext) \
1919            $(addprefix rts/,$(GNATRTL_TASKING_OBJS))
1920         $(RANLIB_FOR_TARGET) rts/libgnarl$(arext)
1921         $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgnala$(arext) \
1922            $(addprefix rts/,$(GNATRTL_LINEARALGEBRA_OBJS))
1923         $(RANLIB_FOR_TARGET) rts/libgnala$(arext)
1924         ifeq ($(GMEM_LIB),gmemlib)
1925                 $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgmem$(arext) \
1926                   rts/memtrack.o
1927                 $(RANLIB_FOR_TARGET) rts/libgmem$(arext)
1928         endif
1929         $(CHMOD) a-wx rts/*.ali
1930         touch ../stamp-gnatlib
1931
1932 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
1933 gnatlib-shared-default:
1934         $(MAKE) $(FLAGS_TO_PASS) \
1935              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1936              GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1937              THREAD_KIND="$(THREAD_KIND)" \
1938              gnatlib
1939         $(RM) rts/libgna*$(soext)
1940         cd rts; ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
1941                 $(TARGET_LIBGCC2_CFLAGS) \
1942                 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1943                 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
1944                 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1945                 $(MISCLIB) -lm
1946         cd rts; ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
1947                 $(TARGET_LIBGCC2_CFLAGS) \
1948                 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1949                 $(GNATRTL_TASKING_OBJS) \
1950                 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1951                 $(THREADSLIB)
1952         cd rts; $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1953                 libgnat$(soext)
1954         cd rts; $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1955                 libgnarl$(soext)
1956
1957 gnatlib-shared-dual:
1958         $(MAKE) $(FLAGS_TO_PASS) \
1959              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1960              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1961              THREAD_KIND="$(THREAD_KIND)" \
1962              gnatlib-shared-default
1963         $(MV) rts/libgna*$(soext) .
1964         $(RM) ../stamp-gnatlib2
1965         $(MAKE) $(FLAGS_TO_PASS) \
1966              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1967              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1968              THREAD_KIND="$(THREAD_KIND)" \
1969              gnatlib
1970         $(MV) libgna*$(soext) rts
1971
1972 gnatlib-shared-dual-win32:
1973         $(MAKE) $(FLAGS_TO_PASS) \
1974              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1975              GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1976              THREAD_KIND="$(THREAD_KIND)" \
1977              gnatlib-shared-win32
1978         $(MV) rts/libgna*$(soext) .
1979         $(RM) ../stamp-gnatlib2
1980         $(MAKE) $(FLAGS_TO_PASS) \
1981              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1982              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1983              THREAD_KIND="$(THREAD_KIND)" \
1984              gnatlib
1985         $(MV) libgna*$(soext) rts
1986
1987 # ??? we need to add the option to support auto-import of arrays/records to
1988 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
1989 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
1990 # Windows.
1991 gnatlib-shared-win32:
1992         $(MAKE) $(FLAGS_TO_PASS) \
1993              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1994              GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1995              THREAD_KIND="$(THREAD_KIND)" \
1996              gnatlib
1997         $(RM) rts/libgna*$(soext)
1998         cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1999                 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2000                 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2001                 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
2002         cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2003                 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2004                 $(GNATRTL_TASKING_OBJS) \
2005                 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2006                 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2007
2008 gnatlib-shared-darwin:
2009         $(MAKE) $(FLAGS_TO_PASS) \
2010              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2011              GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
2012                             -fno-common" \
2013              THREAD_KIND="$(THREAD_KIND)" \
2014              gnatlib
2015         $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
2016         cd rts; ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2017                 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2018                 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2019                 $(SO_OPTS) \
2020                 $(MISCLIB) -lm
2021         cd rts; ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2022                 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2023                 $(GNATRTL_TASKING_OBJS) \
2024                 $(SO_OPTS) \
2025                 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2026         cd rts; $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2027                 libgnat$(soext)
2028         cd rts; $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2029                 libgnarl$(soext)
2030
2031 gnatlib-shared-vms:
2032         $(MAKE) $(FLAGS_TO_PASS) \
2033              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2034              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2035              THREAD_KIND="$(THREAD_KIND)" \
2036              gnatlib
2037         $(RM) rts/libgna*$(soext)
2038         cd rts && echo "case_sensitive=yes" > SYMVEC_$$$$.opt && \
2039         objdump --syms $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) | \
2040         $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt && \
2041         echo "case_sensitive=NO" >> SYMVEC_$$$$.opt && \
2042         ../../xgcc -g -B../../ -shared -shared-libgcc \
2043            -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
2044            sys\$$library:trace.exe \
2045            --for-linker=/noinform \
2046            --for-linker=SYMVEC_$$$$.opt \
2047            --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2048         cd rts && echo "case_sensitive=yes" > SYMVEC_$$$$.opt && \
2049         objdump --syms $(GNATRTL_TASKING_OBJS) | \
2050         $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt && \
2051         echo "case_sensitive=NO" >> SYMVEC_$$$$.opt && \
2052         ../../xgcc -g -B../../ -shared -shared-libgcc \
2053            -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2054            libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2055            sys\$$library:trace.exe \
2056            --for-linker=/noinform \
2057            --for-linker=SYMVEC_$$$$.opt \
2058            --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2059
2060 gnatlib-shared:
2061         $(MAKE) $(FLAGS_TO_PASS) \
2062              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2063              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2064              THREAD_KIND="$(THREAD_KIND)" \
2065              TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
2066              $(GNATLIB_SHARED)
2067
2068 gnatlib-sjlj:
2069         $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1
2070         sed -e 's/ZCX_By_Default.*/ZCX_By_Default            : constant Boolean := False;/' rts/system.ads > rts/s.ads
2071         $(MV) rts/s.ads rts/system.ads
2072         $(MAKE) $(FLAGS_TO_PASS) \
2073              EH_MECHANISM="" \
2074              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2075              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2076              THREAD_KIND="$(THREAD_KIND)" \
2077              TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2078
2079 gnatlib-zcx:
2080         $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1
2081         sed -e 's/ZCX_By_Default.*/ZCX_By_Default            : constant Boolean := True;/' rts/system.ads > rts/s.ads
2082         $(MV) rts/s.ads rts/system.ads
2083         $(MAKE) $(FLAGS_TO_PASS) \
2084              EH_MECHANISM="-gcc" \
2085              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2086              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2087              THREAD_KIND="$(THREAD_KIND)" \
2088              TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2089
2090 # .s files for cross-building
2091 gnat-cross: force
2092         make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
2093
2094 # Compiling object files from source files.
2095
2096 # Note that dependencies on obstack.h are not written
2097 # because that file is not part of GCC.
2098 # Dependencies on gvarargs.h are not written
2099 # because all that file does, when not compiling with GCC,
2100 # is include the system varargs.h.
2101
2102 b_gnatl.c : $(GNATLINK_OBJS)
2103         $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2104 b_gnatl.o : b_gnatl.c
2105
2106 b_gnatm.c : $(GNATMAKE_OBJS)
2107         $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2108 b_gnatm.o : b_gnatm.c
2109
2110 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2111 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2112
2113 # force no sibling call optimization on s-traceb.o so the number of stack
2114 # frames to be skipped when computing a call chain is not modified by
2115 # optimization. However we can do that only when building the runtime
2116 # (not the compiler) because the -fno-optimize-sibling-calls option exists
2117 # only in GCC 3 and above.
2118
2119 ifneq (,$(findstring xgcc,$(CC)))
2120 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2121 else
2122 NO_SIBLING_ADAFLAGS=
2123 endif
2124
2125 s-traceb.o  : s-traceb.adb
2126         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2127               $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2128       $< $(OUTPUT_OPTION)
2129
2130 # force debugging information on s-tasdeb.o so that it is always
2131 # possible to set conditional breakpoints on tasks.
2132
2133 s-tasdeb.o  : s-tasdeb.adb s-tasdeb.ads
2134         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2135               $< $(OUTPUT_OPTION)
2136
2137 # force no function reordering on a-except.o because of the exclusion bounds
2138 # mechanism (see the source file for more detailed information). However we
2139 # can do that only when building the runtime (not the compiler) because the
2140 # -fno-toplevel-reorder option exists only in GCC 4.2 and above.
2141
2142 ifneq (,$(findstring xgcc,$(CC)))
2143 NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
2144 else
2145 NO_REORDER_ADAFLAGS=
2146 endif
2147
2148 # force debugging information on a-except.o so that it is always
2149 # possible to set conditional breakpoints on exceptions.
2150 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2151
2152 a-except.o  : a-except.adb a-except.ads
2153         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2154               $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2155
2156 # compile s-except.o without optimization and with debug info to let the
2157 # debugger set breakpoints and inspect subprogram parameters on exception
2158 # related events.
2159
2160 s-except.o  : s-except.adb s-except.ads
2161         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2162               $< $(OUTPUT_OPTION)
2163
2164 # force debugging information on s-assert.o so that it is always
2165 # possible to set breakpoint on assert failures.
2166
2167 s-assert.o  : s-assert.adb s-assert.ads a-except.ads
2168         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
2169               $< $(OUTPUT_OPTION)
2170
2171 adadecode.o : adadecode.c adadecode.h
2172 aux-io.o  : aux-io.c
2173 argv.o    : argv.c
2174 cal.o     : cal.c
2175 deftarg.o : deftarg.c
2176 errno.o   : errno.c
2177 exit.o    : adaint.h exit.c
2178 expect.o  : expect.c
2179 final.o   : final.c
2180 gmem.o    : gmem.c
2181 link.o    : link.c
2182 mkdir.o   : mkdir.c
2183 socket.o  : socket.c gsocket.h
2184 sysdep.o  : sysdep.c
2185 raise-gcc.o : raise-gcc.c raise.h
2186 raise.o   : raise.c raise.h
2187 vx_stack_info.o : vx_stack_info.c
2188
2189 gen-soccon: gen-soccon.c gsocket.h
2190         $(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2191                 -UIN_GCC -DTARGET=\"$(target_alias)\" \
2192                 $< $(OUTPUT_OPTION)
2193
2194 cio.o     : cio.c
2195         $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2196                  $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2197
2198 init.o    : init.c adaint.h raise.h
2199         $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2200                  $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2201
2202 initialize.o : initialize.c raise.h
2203         $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2204                  $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2205
2206 targext.o : targext.c
2207         $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2208                 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2209                 $< $(OUTPUT_OPTION)
2210
2211 # No optimization to compile this file as optimizations (-O1 or above) breaks
2212 # the SEH handling on Windows. The reasons are not clear.
2213 seh_init.o : seh_init.c raise.h
2214         $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) -O0 \
2215                  $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2216
2217 # Need to keep the frame pointer in this file to pop the stack properly on
2218 # some targets.
2219 tracebak.o  : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
2220         $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2221               -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2222
2223 # In GNU Make, ignore whether `stage*' exists.
2224 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2225 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2226
2227 force:
2228
2229 # Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
2230
2231 ../../gnatlbr$(exeext): ../../prefix.o
2232         $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2233         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2234         $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2235
2236 ../../vms_help$(exeext):
2237         $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
2238         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
2239         $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2240
2241 ../../gnat.hlp: ../../vms_help$(exeext)
2242         ../../vms_help$(exeext) $(fsrcdir)/gnat.help_in \
2243                                 $(fsrcdir)/vms_data.ads ../../gnat.hlp