OSDN Git Service

2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
[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   g-sercom.adb<g-sercom-linux.adb \
841   system.ads<system-linux-x86.ads
842
843   ifeq ($(strip $(filter-out marte,$(THREAD_KIND))),)
844     LIBGNAT_TARGET_PAIRS += \
845     a-exetim.adb<a-exetim-linux-marte.adb \
846     a-exetim.ads<a-exetim-linux-marte.ads \
847     a-extiti.adb<a-extiti-linux-marte.adb \
848     a-extiti.ads<a-extiti-linux-marte.ads \
849     a-rttiev.adb<a-rttiev-linux-marte.adb \
850     a-rttiev.ads<a-rttiev-linux-marte.ads \
851     g-soccon.ads<g-soccon-linux-x86-marte.ads \
852     s-osinte.adb<s-osinte-linux-marte.adb \
853     s-osinte.ads<s-osinte-linux-marte.ads \
854     s-taprop.adb<s-taprop-linux-marte.adb
855
856     EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o a-extiti.o
857
858     EH_MECHANISM=
859     THREADSLIB = -lmarte
860   else
861     LIBGNAT_TARGET_PAIRS += \
862     g-soccon.ads<g-soccon-linux-x86.ads \
863     s-osinte.adb<s-osinte-posix.adb \
864     s-osinte.ads<s-osinte-linux.ads \
865     s-tasinf.ads<s-tasinf-linux.ads \
866     s-tasinf.adb<s-tasinf-linux.adb \
867     s-taprop.adb<s-taprop-linux.adb
868
869     EH_MECHANISM=-gcc
870     THREADSLIB = -lpthread
871   endif
872
873   TOOLS_TARGET_PAIRS =  \
874     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
875     indepsw.adb<indepsw-gnu.adb
876
877   GNATLIB_SHARED = gnatlib-shared-dual
878   GMEM_LIB = gmemlib
879   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
880   LIBRARY_VERSION := $(LIB_VERSION)
881 endif
882
883 ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
884   LIBGNAT_TARGET_PAIRS = \
885   a-intnam.ads<a-intnam-freebsd.ads \
886   a-numaux.adb<a-numaux-x86.adb \
887   a-numaux.ads<a-numaux-x86.ads \
888   s-inmaop.adb<s-inmaop-posix.adb \
889   s-intman.adb<s-intman-posix.adb \
890   g-soccon.ads<g-soccon-freebsd.ads \
891   s-osinte.adb<s-osinte-posix.adb \
892   s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
893   s-osprim.adb<s-osprim-posix.adb \
894   s-taprop.adb<s-taprop-linux.adb \
895   s-tasinf.ads<s-tasinf-linux.ads \
896   s-tasinf.adb<s-tasinf-linux.adb \
897   s-taspri.ads<s-taspri-posix.ads \
898   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
899   system.ads<system-freebsd-x86.ads
900
901   TOOLS_TARGET_PAIRS =  \
902     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
903     indepsw.adb<indepsw-gnu.adb
904
905   EH_MECHANISM=-gcc
906   THREADSLIB = -lpthread
907   GNATLIB_SHARED = gnatlib-shared-dual
908   GMEM_LIB = gmemlib
909   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
910   LIBRARY_VERSION := $(LIB_VERSION)
911 endif
912
913 ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
914   LIBGNAT_TARGET_PAIRS = \
915   a-intnam.ads<a-intnam-freebsd.ads \
916   a-numaux.adb<a-numaux-x86.adb \
917   a-numaux.ads<a-numaux-x86.ads \
918   g-bytswa.adb<g-bytswa-x86.adb \
919   g-soccon.ads<g-soccon-freebsd.ads \
920   s-inmaop.adb<s-inmaop-posix.adb \
921   s-intman.adb<s-intman-posix.adb \
922   s-osinte.adb<s-osinte-freebsd.adb \
923   s-osinte.ads<s-osinte-freebsd.ads \
924   s-osprim.adb<s-osprim-posix.adb \
925   s-taprop.adb<s-taprop-posix.adb \
926   s-taspri.ads<s-taspri-posix.ads \
927   s-tpopsp.adb<s-tpopsp-posix.adb \
928   system.ads<system-freebsd-x86.ads
929
930   TOOLS_TARGET_PAIRS = \
931   mlib-tgt-specific.adb<mlib-tgt-linux.adb
932   GNATLIB_SHARED = gnatlib-shared-dual
933
934   EH_MECHANISM=-gcc
935   THREADSLIB= -lpthread
936   GMEM_LIB = gmemlib
937   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
938   LIBRARY_VERSION := $(LIB_VERSION)
939 endif
940
941 ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
942   ifeq ($(strip $(filter-out s390x,$(arch))),)
943     LIBGNAT_TARGET_PAIRS = \
944     a-intnam.ads<a-intnam-linux.ads \
945     s-inmaop.adb<s-inmaop-posix.adb \
946     s-intman.adb<s-intman-posix.adb \
947     s-osinte.adb<s-osinte-posix.adb \
948     s-osinte.ads<s-osinte-linux.ads \
949     s-osprim.adb<s-osprim-posix.adb \
950     s-taprop.adb<s-taprop-linux.adb \
951     s-tasinf.ads<s-tasinf-linux.ads \
952     s-tasinf.adb<s-tasinf-linux.adb \
953     s-taspri.ads<s-taspri-posix.ads \
954     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
955     system.ads<system-linux-s390x.ads
956   else
957     LIBGNAT_TARGET_PAIRS = \
958     a-intnam.ads<a-intnam-linux.ads \
959     s-inmaop.adb<s-inmaop-posix.adb \
960     s-intman.adb<s-intman-posix.adb \
961     s-osinte.adb<s-osinte-posix.adb \
962     s-osinte.ads<s-osinte-linux.ads \
963     s-osprim.adb<s-osprim-posix.adb \
964     s-taprop.adb<s-taprop-linux.adb \
965     s-tasinf.ads<s-tasinf-linux.ads \
966     s-tasinf.adb<s-tasinf-linux.adb \
967     s-taspri.ads<s-taspri-posix.ads \
968     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
969     system.ads<system-linux-s390.ads
970   endif
971
972   TOOLS_TARGET_PAIRS =  \
973     mlib-tgt-specific.adb<mlib-tgt-linux.adb
974
975   EH_MECHANISM=-gcc
976   THREADSLIB = -lpthread
977   GNATLIB_SHARED = gnatlib-shared-dual
978   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
979   LIBRARY_VERSION := $(LIB_VERSION)
980 endif
981
982 ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
983   ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
984     LIBGNAT_TARGET_PAIRS = \
985     a-intnam.ads<a-intnam-irix.ads \
986     s-inmaop.adb<s-inmaop-posix.adb \
987     s-intman.adb<s-intman-irix.adb \
988     s-mastop.adb<s-mastop-irix.adb \
989     s-osinte.adb<s-osinte-irix.adb \
990     s-osinte.ads<s-osinte-irix.ads \
991     s-osprim.adb<s-osprim-posix.adb \
992     s-proinf.adb<s-proinf-irix-athread.adb \
993     s-proinf.ads<s-proinf-irix-athread.ads \
994     s-taprop.adb<s-taprop-irix.adb \
995     s-tasinf.ads<s-tasinf-irix.ads \
996     s-taspri.ads<s-taspri-posix.ads \
997     s-tpopsp.adb<s-tpopsp-posix.adb \
998     s-traceb.adb<s-traceb-mastop.adb \
999     g-soccon.ads<g-soccon-irix.ads \
1000     system.ads<system-irix-n32.ads
1001
1002     THREADSLIB = -lpthread
1003     GNATLIB_SHARED = gnatlib-shared-default
1004
1005   else
1006     LIBGNAT_TARGET_PAIRS += \
1007     s-mastop.adb<s-mastop-irix.adb \
1008     s-osprim.adb<s-osprim-posix.adb \
1009     s-traceb.adb<s-traceb-mastop.adb \
1010     g-soccon.ads<g-soccon-irix.ads \
1011     system.ads<system-irix-o32.ads
1012   endif
1013
1014   EH_MECHANISM=-gcc
1015   TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-irix.adb
1016   TGT_LIB = -lexc
1017   MISCLIB = -lexc
1018   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1019   LIBRARY_VERSION := $(LIB_VERSION)
1020   GMEM_LIB = gmemlib
1021 endif
1022
1023 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
1024   LIBGNAT_TARGET_PAIRS = \
1025   a-excpol.adb<a-excpol-abort.adb \
1026   a-intnam.ads<a-intnam-hpux.ads \
1027   s-inmaop.adb<s-inmaop-posix.adb \
1028   s-interr.adb<s-interr-sigaction.adb \
1029   s-intman.adb<s-intman-posix.adb \
1030   s-osinte.adb<s-osinte-hpux-dce.adb \
1031   s-osinte.ads<s-osinte-hpux-dce.ads \
1032   s-parame.ads<s-parame-hpux.ads \
1033   s-osprim.adb<s-osprim-posix.adb \
1034   s-taprop.adb<s-taprop-hpux-dce.adb \
1035   s-taspri.ads<s-taspri-hpux-dce.ads \
1036   s-tpopsp.adb<s-tpopsp-posix.adb \
1037   g-soccon.ads<g-soccon-hpux.ads \
1038   system.ads<system-hpux.ads
1039
1040   EH_MECHANISM=-gcc
1041   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1042 endif
1043
1044 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
1045   LIBGNAT_TARGET_PAIRS = \
1046   a-intnam.ads<a-intnam-hpux.ads \
1047   s-inmaop.adb<s-inmaop-posix.adb \
1048   s-intman.adb<s-intman-posix.adb \
1049   s-osinte.adb<s-osinte-posix.adb \
1050   s-osinte.ads<s-osinte-hpux.ads \
1051   s-parame.ads<s-parame-hpux.ads \
1052   s-osprim.adb<s-osprim-posix.adb \
1053   s-traceb.adb<s-traceb-hpux.adb \
1054   s-taprop.adb<s-taprop-posix.adb \
1055   s-taspri.ads<s-taspri-posix.ads \
1056   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1057   g-soccon.ads<g-soccon-hpux.ads \
1058   system.ads<system-hpux.ads
1059
1060   TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-hpux.adb
1061   EH_MECHANISM=-gcc
1062   TGT_LIB = /usr/lib/libcl.a
1063   THREADSLIB = -lpthread
1064   GMEM_LIB = gmemlib
1065   soext = .sl
1066   SO_OPTS = -Wl,+h,
1067   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1068   GNATLIB_SHARED = gnatlib-shared-dual
1069   LIBRARY_VERSION := $(LIB_VERSION)
1070 endif
1071
1072 ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
1073   LIBGNAT_TARGET_PAIRS = \
1074   a-intnam.ads<a-intnam-aix.ads \
1075   s-inmaop.adb<s-inmaop-posix.adb \
1076   s-intman.adb<s-intman-posix.adb \
1077   s-osinte.adb<s-osinte-aix.adb \
1078   s-osinte.ads<s-osinte-aix.ads \
1079   s-osprim.adb<s-osprim-posix.adb \
1080   s-taprop.adb<s-taprop-posix.adb \
1081   s-taspri.ads<s-taspri-posix.ads \
1082   s-tpopsp.adb<s-tpopsp-posix.adb \
1083   g-soccon.ads<g-soccon-aix.ads \
1084   system.ads<system-aix.ads
1085
1086   THREADSLIB = -lpthreads
1087   PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1088
1089   TOOLS_TARGET_PAIRS = \
1090   mlib-tgt-specific.adb<mlib-tgt-aix.adb \
1091   indepsw.adb<indepsw-aix.adb
1092
1093   GMEM_LIB = gmemlib
1094 endif
1095
1096 ifeq ($(strip $(filter-out lynxos,$(osys))),)
1097   TOOLS_TARGET_PAIRS = \
1098   mlib-tgt-specific.adb<mlib-tgt-lynxos.adb \
1099   indepsw.adb<indepsw-gnu.adb
1100
1101   ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
1102     LIBGNAT_TARGET_PAIRS = \
1103     a-numaux.adb<a-numaux-x86.adb \
1104     a-numaux.ads<a-numaux-x86.ads \
1105     a-intnam.ads<a-intnam-lynxos.ads \
1106     g-bytswa.adb<g-bytswa-x86.adb \
1107     g-soccon.ads<g-soccon-lynxos.ads \
1108     g-sttsne.adb<g-sttsne-locking.adb \
1109     g-sttsne.ads<g-sttsne-locking.ads \
1110     s-inmaop.adb<s-inmaop-posix.adb \
1111     s-intman.adb<s-intman-posix.adb \
1112     s-osinte.adb<s-osinte-lynxos.adb \
1113     s-osinte.ads<s-osinte-lynxos.ads \
1114     s-osprim.adb<s-osprim-posix.adb \
1115     s-taprop.adb<s-taprop-lynxos.adb \
1116     s-taspri.ads<s-taspri-lynxos.ads \
1117     s-tpopsp.adb<s-tpopsp-lynxos.adb \
1118     system.ads<system-lynxos-x86.ads
1119
1120     PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1121
1122   else
1123     LIBGNAT_TARGET_PAIRS = \
1124     a-intnam.ads<a-intnam-lynxos.ads \
1125     g-soccon.ads<g-soccon-lynxos.ads \
1126     g-sttsne.adb<g-sttsne-locking.adb \
1127     g-sttsne.ads<g-sttsne-locking.ads \
1128     s-inmaop.adb<s-inmaop-posix.adb \
1129     s-intman.adb<s-intman-posix.adb \
1130     s-osinte.adb<s-osinte-lynxos.adb \
1131     s-osinte.ads<s-osinte-lynxos.ads \
1132     s-osprim.adb<s-osprim-posix.adb \
1133     s-taprop.adb<s-taprop-lynxos.adb \
1134     s-taspri.ads<s-taspri-lynxos.ads \
1135     s-tpopsp.adb<s-tpopsp-lynxos.adb \
1136     system.ads<system-lynxos-ppc.ads
1137   endif
1138 endif
1139
1140 ifeq ($(strip $(filter-out rtems%,$(osys))),)
1141   LIBGNAT_TARGET_PAIRS = \
1142   system.ads<system-rtems.ads \
1143   a-intnam.ads<a-intnam-rtems.ads \
1144   s-inmaop.adb<s-inmaop-posix.adb \
1145   s-intman.adb<s-intman-posix.adb \
1146   s-osinte.adb<s-osinte-rtems.adb \
1147   s-osinte.ads<s-osinte-rtems.ads \
1148   s-osprim.adb<s-osprim-posix.adb \
1149   s-parame.adb<s-parame-rtems.adb \
1150   s-taprop.adb<s-taprop-posix.adb \
1151   s-taspri.ads<s-taspri-posix.ads \
1152   s-tpopsp.adb<s-tpopsp-rtems.adb \
1153   g-soccon.ads<g-soccon-rtems.ads \
1154   s-stchop.adb<s-stchop-rtems.adb
1155 endif
1156
1157 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
1158   LIBGNAT_TARGET_PAIRS = \
1159   a-intnam.ads<a-intnam-tru64.ads \
1160   s-inmaop.adb<s-inmaop-posix.adb \
1161   s-intman.adb<s-intman-posix.adb \
1162   s-mastop.adb<s-mastop-tru64.adb \
1163   s-osinte.adb<s-osinte-tru64.adb \
1164   s-osinte.ads<s-osinte-tru64.ads \
1165   s-osprim.adb<s-osprim-unix.adb \
1166   s-taprop.adb<s-taprop-tru64.adb \
1167   s-tasinf.ads<s-tasinf-tru64.ads \
1168   s-taspri.ads<s-taspri-tru64.ads \
1169   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1170   s-traceb.adb<s-traceb-mastop.adb \
1171   g-soccon.ads<g-soccon-tru64.ads \
1172   system.ads<system-tru64.ads
1173
1174   TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-tru64.adb
1175
1176   EH_MECHANISM=-gcc
1177   GMEM_LIB=gmemlib
1178   THREADSLIB = -lpthread -lmach -lexc -lrt
1179   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1180   GNATLIB_SHARED = gnatlib-shared-default
1181   LIBRARY_VERSION := $(LIB_VERSION)
1182 endif
1183
1184 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
1185
1186 soext  = .exe
1187 hyphen = _
1188 LN = cp -p
1189 LN_S = cp -p
1190
1191 .SUFFIXES: .sym
1192
1193 .o.sym: 
1194         @ gnu:[bin]vmssymvec $<
1195 endif
1196
1197 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1198 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1199   LIBGNAT_TARGET_PAIRS_AUX1 = \
1200   g-enblsp.adb<g-enblsp-vms-ia64.adb \
1201   g-trasym.adb<g-trasym-vms-ia64.adb \
1202   s-auxdec.ads<s-auxdec-vms_64.ads \
1203   s-osinte.adb<s-osinte-vms-ia64.adb \
1204   s-osinte.ads<s-osinte-vms-ia64.ads \
1205   s-vaflop.adb<s-vaflop-vms-ia64.adb \
1206   system.ads<system-vms-ia64.ads
1207
1208   LIBGNAT_TARGET_PAIRS_AUX2 = \
1209   s-parame.ads<s-parame-vms-ia64.ads
1210 else
1211 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1212   LIBGNAT_TARGET_PAIRS_AUX1 = \
1213   g-enblsp.adb<g-enblsp-vms-alpha.adb \
1214   g-trasym.adb<g-trasym-vms-alpha.adb \
1215   s-asthan.adb<s-asthan-vms-alpha.adb \
1216   s-auxdec.ads<s-auxdec-vms_64.ads \
1217   s-osinte.adb<s-osinte-vms.adb \
1218   s-osinte.ads<s-osinte-vms.ads \
1219   s-vaflop.adb<s-vaflop-vms-alpha.adb \
1220   system.ads<system-vms_64.ads
1221
1222 ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1223   LIBGNAT_TARGET_PAIRS_AUX2 = \
1224   s-parame.ads<s-parame-vms-restrict.ads
1225 else
1226   LIBGNAT_TARGET_PAIRS_AUX2 = \
1227   s-parame.ads<s-parame-vms-alpha.ads
1228 endif
1229 endif
1230 endif
1231
1232   LIBGNAT_TARGET_PAIRS = \
1233   a-caldel.adb<a-caldel-vms.adb \
1234   a-calend.adb<a-calend-vms.adb \
1235   a-calend.ads<a-calend-vms.ads \
1236   a-dirval.adb<a-dirval-vms.adb \
1237   a-excpol.adb<a-excpol-abort.adb \
1238   a-intnam.ads<a-intnam-vms.ads \
1239   a-numaux.ads<a-numaux-vms.ads \
1240   g-expect.adb<g-expect-vms.adb \
1241   g-soccon.ads<g-soccon-vms.ads \
1242   g-socthi.ads<g-socthi-vms.ads \
1243   g-socthi.adb<g-socthi-vms.adb \
1244   g-stsifd.adb<g-stsifd-sockets.adb \
1245   g-sttsne.adb<g-sttsne-locking.adb \
1246   g-sttsne.ads<g-sttsne-locking.ads \
1247   i-c.ads<i-c-vms_64.ads \
1248   i-cstrin.ads<i-cstrin-vms_64.ads \
1249   i-cstrin.adb<i-cstrin-vms_64.adb \
1250   i-cpoint.ads<i-cpoint-vms_64.ads \
1251   i-cpoint.adb<i-cpoint-vms_64.adb \
1252   i-cstrea.adb<i-cstrea-vms.adb \
1253   s-inmaop.adb<s-inmaop-vms.adb \
1254   s-interr.adb<s-interr-vms.adb \
1255   s-intman.adb<s-intman-vms.adb \
1256   s-intman.ads<s-intman-vms.ads \
1257   s-osprim.adb<s-osprim-vms.adb \
1258   s-osprim.ads<s-osprim-vms.ads \
1259   s-taprop.adb<s-taprop-vms.adb \
1260   s-taspri.ads<s-taspri-vms.ads \
1261   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1262   s-tpopde.adb<s-tpopde-vms.adb \
1263   s-tpopde.ads<s-tpopde-vms.ads \
1264   s-traent.adb<s-traent-vms.adb \
1265   s-traent.ads<s-traent-vms.ads \
1266   $(LIBGNAT_TARGET_PAIRS_AUX1) \
1267   $(LIBGNAT_TARGET_PAIRS_AUX2)
1268
1269 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1270   TOOLS_TARGET_PAIRS= \
1271   mlib-tgt-specific.adb<mlib-tgt-vms-ia64.adb \
1272   symbols.adb<symbols-vms.adb \
1273   symbols-processing.adb<symbols-processing-vms-ia64.adb
1274 else
1275   TOOLS_TARGET_PAIRS= \
1276   mlib-tgt-specific.adb<mlib-tgt-vms-alpha.adb \
1277   symbols.adb<symbols-vms.adb \
1278   symbols-processing.adb<symbols-processing-vms-alpha.adb
1279 endif
1280
1281
1282   EXTRA_GNATMAKE_OBJS = mlib-tgt-vms.o
1283
1284   GMEM_LIB = gmemlib
1285   EH_MECHANISM=-gcc
1286   GNATLIB_SHARED=gnatlib-shared-vms
1287 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1288   EXTRA_LIBGNAT_SRCS=vmshandler.asm
1289   EXTRA_LIBGNAT_OBJS=vmshandler.o
1290 endif
1291   EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1292   EXTRA_GNATTOOLS = \
1293      ../../gnatlbr$(exeext)  \
1294      ../../gnatsym$(exeext)  \
1295      ../../vms_help$(exeext) \
1296      ../../gnat.hlp
1297   # This command transforms (YYYYMMDD) into YY,MMDD
1298   GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\)/\2,\3/')
1299   TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1300   LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1301 endif
1302
1303 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1304   LIBGNAT_TARGET_PAIRS = \
1305   a-dirval.adb<a-dirval-mingw.adb \
1306   a-excpol.adb<a-excpol-abort.adb \
1307   a-numaux.adb<a-numaux-x86.adb \
1308   a-numaux.ads<a-numaux-x86.ads \
1309   s-gloloc.adb<s-gloloc-mingw.adb \
1310   s-inmaop.adb<s-inmaop-dummy.adb \
1311   s-memory.adb<s-memory-mingw.adb \
1312   s-taspri.ads<s-taspri-mingw.ads \
1313   s-tasinf.adb<s-tasinf-mingw.adb \
1314   s-tasinf.ads<s-tasinf-mingw.ads \
1315   g-bytswa.adb<g-bytswa-x86.adb \
1316   g-socthi.ads<g-socthi-mingw.ads \
1317   g-socthi.adb<g-socthi-mingw.adb \
1318   g-stsifd.adb<g-stsifd-sockets.adb \
1319   g-soccon.ads<g-soccon-mingw.ads \
1320   g-soliop.ads<g-soliop-mingw.ads \
1321   g-sercom.adb<g-sercom-mingw.adb
1322
1323   ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
1324     LIBGNAT_TARGET_PAIRS += \
1325     s-intman.adb<s-intman-dummy.adb \
1326     s-osinte.ads<s-osinte-rtx.ads \
1327     s-osprim.adb<s-osprim-rtx.adb \
1328     s-taprop.adb<s-taprop-rtx.adb \
1329     system.ads<system-rtx.ads
1330
1331     MISCLIB = -lwsock32 -lrtapi_w32
1332     THREADSLIB=-lrtapi_w32
1333   else
1334     LIBGNAT_TARGET_PAIRS += \
1335     a-exetim.adb<a-exetim-mingw.adb \
1336     a-exetim.ads<a-exetim-mingw.ads \
1337     a-intnam.ads<a-intnam-mingw.ads \
1338     s-interr.adb<s-interr-sigaction.adb \
1339     s-intman.adb<s-intman-mingw.adb \
1340     s-osinte.ads<s-osinte-mingw.ads \
1341     s-osprim.adb<s-osprim-mingw.adb \
1342     s-taprop.adb<s-taprop-mingw.adb \
1343     system.ads<system-mingw.ads
1344
1345     EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o
1346     EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o
1347
1348     MISCLIB = -lwsock32
1349
1350     # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1351     # auto-import support for array/record will be done.
1352     GNATLIB_SHARED = gnatlib-shared-win32
1353   endif
1354
1355   TOOLS_TARGET_PAIRS= \
1356   mlib-tgt-specific.adb<mlib-tgt-mingw.adb \
1357   indepsw.adb<indepsw-mingw.adb
1358
1359   EH_MECHANISM=-gcc
1360   GMEM_LIB = gmemlib
1361   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1362   EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1363   EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1364   soext = .dll
1365   LIBRARY_VERSION := $(LIB_VERSION)
1366 endif
1367
1368 ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
1369   LIBGNAT_TARGET_PAIRS = \
1370   a-intnam.ads<a-intnam-linux.ads \
1371   g-soccon.ads<g-soccon-linux-ppc.ads \
1372   s-inmaop.adb<s-inmaop-posix.adb \
1373   s-intman.adb<s-intman-posix.adb \
1374   s-osinte.adb<s-osinte-posix.adb \
1375   s-osinte.ads<s-osinte-linux.ads \
1376   s-osprim.adb<s-osprim-posix.adb \
1377   s-taprop.adb<s-taprop-linux.adb \
1378   s-tasinf.ads<s-tasinf-linux.ads \
1379   s-tasinf.adb<s-tasinf-linux.adb \
1380   s-taspri.ads<s-taspri-posix.ads \
1381   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1382   g-sercom.adb<g-sercom-linux.adb \
1383   system.ads<system-linux-ppc.ads
1384
1385   TOOLS_TARGET_PAIRS =  \
1386     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1387     indepsw.adb<indepsw-gnu.adb
1388
1389   EH_MECHANISM=-gcc
1390   THREADSLIB = -lpthread
1391   GNATLIB_SHARED = gnatlib-shared-dual
1392   GMEM_LIB = gmemlib
1393   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1394   LIBRARY_VERSION := $(LIB_VERSION)
1395 endif
1396
1397 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
1398   LIBGNAT_TARGET_PAIRS = \
1399   a-intnam.ads<a-intnam-linux.ads \
1400   s-inmaop.adb<s-inmaop-posix.adb \
1401   s-intman.adb<s-intman-posix.adb \
1402   s-osinte.adb<s-osinte-posix.adb \
1403   s-osinte.ads<s-osinte-linux.ads \
1404   s-osprim.adb<s-osprim-posix.adb \
1405   s-taprop.adb<s-taprop-linux.adb \
1406   s-tasinf.ads<s-tasinf-linux.ads \
1407   s-tasinf.adb<s-tasinf-linux.adb \
1408   s-taspri.ads<s-taspri-posix.ads \
1409   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1410   system.ads<system-linux-sparc.ads
1411
1412   TOOLS_TARGET_PAIRS =  \
1413     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1414     indepsw.adb<indepsw-gnu.adb
1415
1416   EH_MECHANISM=-gcc
1417   THREADSLIB = -lpthread
1418   GNATLIB_SHARED = gnatlib-shared-dual
1419   GMEM_LIB = gmemlib
1420   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1421   LIBRARY_VERSION := $(LIB_VERSION)
1422 endif
1423
1424 ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1425   LIBGNAT_TARGET_PAIRS = \
1426   a-intnam.ads<a-intnam-linux.ads \
1427   s-inmaop.adb<s-inmaop-posix.adb \
1428   s-intman.adb<s-intman-posix.adb \
1429   s-osinte.adb<s-osinte-posix.adb \
1430   s-osinte.ads<s-osinte-linux-hppa.ads \
1431   s-osprim.adb<s-osprim-posix.adb \
1432   s-taprop.adb<s-taprop-linux.adb \
1433   s-tasinf.ads<s-tasinf-linux.ads \
1434   s-tasinf.adb<s-tasinf-linux.adb \
1435   s-taspri.ads<s-taspri-posix.ads \
1436   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1437   system.ads<system-linux-hppa.ads
1438
1439   TOOLS_TARGET_PAIRS =  \
1440     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1441     indepsw.adb<indepsw-gnu.adb
1442
1443   EH_MECHANISM=-gcc
1444   THREADSLIB = -lpthread
1445   GNATLIB_SHARED = gnatlib-shared-dual
1446   GMEM_LIB = gmemlib
1447   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1448   LIBRARY_VERSION := $(LIB_VERSION)
1449 endif
1450
1451 ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
1452   LIBGNAT_TARGET_PAIRS = \
1453   a-intnam.ads<a-intnam-linux.ads \
1454   s-inmaop.adb<s-inmaop-posix.adb \
1455   s-intman.adb<s-intman-posix.adb \
1456   s-osinte.adb<s-osinte-posix.adb \
1457   s-osinte.ads<s-osinte-linux.ads \
1458   s-osprim.adb<s-osprim-posix.adb \
1459   s-taprop.adb<s-taprop-linux.adb \
1460   s-tasinf.ads<s-tasinf-linux.ads \
1461   s-tasinf.adb<s-tasinf-linux.adb \
1462   s-taspri.ads<s-taspri-posix.ads \
1463   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1464   system.ads<system-linux-sh4.ads
1465
1466   TOOLS_TARGET_PAIRS =  \
1467     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1468     indepsw.adb<indepsw-linux.adb
1469
1470   EH_MECHANISM=-gcc
1471   MISCLIB=
1472   THREADSLIB = -lpthread
1473   GNATLIB_SHARED = gnatlib-shared-dual
1474   GMEM_LIB = gmemlib
1475   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1476   LIBRARY_VERSION := $(LIB_VERSION)
1477 endif
1478
1479 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1480   LIBGNAT_TARGET_PAIRS = \
1481   a-intnam.ads<a-intnam-linux.ads \
1482   a-numaux.ads<a-numaux-libc-x86.ads \
1483   g-soccon.ads<g-soccon-linux-64.ads \
1484   s-inmaop.adb<s-inmaop-posix.adb \
1485   s-intman.adb<s-intman-posix.adb \
1486   s-osinte.ads<s-osinte-linux.ads \
1487   s-osinte.adb<s-osinte-posix.adb \
1488   s-osprim.adb<s-osprim-posix.adb \
1489   s-taprop.adb<s-taprop-linux.adb \
1490   s-tasinf.ads<s-tasinf-linux.ads \
1491   s-tasinf.adb<s-tasinf-linux.adb \
1492   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1493   s-taspri.ads<s-taspri-posix.ads \
1494   g-sercom.adb<g-sercom-linux.adb \
1495   system.ads<system-linux-ia64.ads
1496
1497   TOOLS_TARGET_PAIRS =  \
1498     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1499     indepsw.adb<indepsw-gnu.adb
1500
1501   EH_MECHANISM=-gcc
1502   MISCLIB=
1503   THREADSLIB=-lpthread
1504   GNATLIB_SHARED=gnatlib-shared-dual
1505   GMEM_LIB = gmemlib
1506   PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1507   LIBRARY_VERSION := $(LIB_VERSION)
1508 endif
1509
1510 ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
1511   LIBGNAT_TARGET_PAIRS = \
1512   a-intnam.ads<a-intnam-linux.ads \
1513   s-inmaop.adb<s-inmaop-posix.adb \
1514   s-intman.adb<s-intman-posix.adb \
1515   s-osinte.ads<s-osinte-linux-alpha.ads \
1516   s-osinte.adb<s-osinte-posix.adb \
1517   s-osprim.adb<s-osprim-posix.adb \
1518   s-taprop.adb<s-taprop-linux.adb \
1519   s-tasinf.ads<s-tasinf-linux.ads \
1520   s-tasinf.adb<s-tasinf-linux.adb \
1521   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1522   s-taspri.ads<s-taspri-posix.ads \
1523   system.ads<system-linux-alpha.ads
1524
1525   TOOLS_TARGET_PAIRS =  \
1526     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1527     indepsw.adb<indepsw-gnu.adb
1528
1529   EH_MECHANISM=-gcc
1530   MISCLIB=
1531   THREADSLIB=-lpthread
1532   GNATLIB_SHARED=gnatlib-shared-dual
1533   PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1534   LIBRARY_VERSION := $(LIB_VERSION)
1535 endif
1536
1537 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
1538   LIBGNAT_TARGET_PAIRS = \
1539   a-intnam.ads<a-intnam-linux.ads \
1540   a-numaux.adb<a-numaux-x86.adb \
1541   a-numaux.ads<a-numaux-x86.ads \
1542   g-soccon.ads<g-soccon-linux-64.ads \
1543   s-inmaop.adb<s-inmaop-posix.adb \
1544   s-intman.adb<s-intman-posix.adb \
1545   s-osinte.ads<s-osinte-linux.ads \
1546   s-osinte.adb<s-osinte-posix.adb \
1547   s-osprim.adb<s-osprim-posix.adb \
1548   s-taprop.adb<s-taprop-linux.adb \
1549   s-tasinf.ads<s-tasinf-linux.ads \
1550   s-tasinf.adb<s-tasinf-linux.adb \
1551   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1552   s-taspri.ads<s-taspri-posix.ads \
1553   g-sercom.adb<g-sercom-linux.adb \
1554   system.ads<system-linux-x86_64.ads
1555
1556   TOOLS_TARGET_PAIRS =  \
1557     mlib-tgt-specific.adb<mlib-tgt-linux.adb \
1558     indepsw.adb<indepsw-gnu.adb
1559
1560   EH_MECHANISM=-gcc
1561   THREADSLIB=-lpthread
1562   GNATLIB_SHARED=gnatlib-shared-dual
1563   GMEM_LIB = gmemlib
1564   PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1565   LIBRARY_VERSION := $(LIB_VERSION)
1566 endif
1567
1568 ifeq ($(strip $(filter-out darwin%,$(osys))),)
1569   ifeq ($(strip $(filter-out %86,$(arch))),)
1570     LIBGNAT_TARGET_PAIRS = \
1571     a-intnam.ads<a-intnam-darwin.ads \
1572     s-inmaop.adb<s-inmaop-posix.adb \
1573     s-intman.adb<s-intman-posix.adb \
1574     s-osinte.adb<s-osinte-darwin.adb \
1575     s-osinte.ads<s-osinte-darwin.ads \
1576     s-osprim.adb<s-osprim-posix.adb \
1577     s-taprop.adb<s-taprop-posix.adb \
1578     s-taspri.ads<s-taspri-posix.ads \
1579     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1580     g-soccon.ads<g-soccon-darwin.ads \
1581     a-numaux.ads<a-numaux-x86.ads \
1582     a-numaux.adb<a-numaux-x86.adb \
1583     system.ads<system-darwin-x86.ads
1584   else
1585     LIBGNAT_TARGET_PAIRS = \
1586     a-intnam.ads<a-intnam-darwin.ads \
1587     s-inmaop.adb<s-inmaop-posix.adb \
1588     s-intman.adb<s-intman-posix.adb \
1589     s-osinte.adb<s-osinte-darwin.adb \
1590     s-osinte.ads<s-osinte-darwin.ads \
1591     s-osprim.adb<s-osprim-posix.adb \
1592     s-taprop.adb<s-taprop-posix.adb \
1593     s-taspri.ads<s-taspri-posix.ads \
1594     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1595     g-soccon.ads<g-soccon-darwin.ads \
1596     a-numaux.ads<a-numaux-darwin.ads \
1597     a-numaux.adb<a-numaux-darwin.adb \
1598     system.ads<system-darwin-ppc.ads
1599   endif
1600
1601   TOOLS_TARGET_PAIRS =  \
1602     mlib-tgt-specific.adb<mlib-tgt-darwin.adb
1603
1604   EH_MECHANISM=-gcc
1605   GNATLIB_SHARED = gnatlib-shared-darwin
1606   SO_OPTS = -Wl,-flat_namespace -shared-libgcc
1607   RANLIB = ranlib -c
1608   GMEM_LIB = gmemlib
1609   PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1610   LIBRARY_VERSION := $(LIB_VERSION)
1611   soext = .dylib
1612 endif
1613
1614 ifneq ($(EH_MECHANISM),)
1615   LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
1616   EXTRA_LIBGNAT_SRCS+=raise$(EH_MECHANISM).c
1617   EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
1618 endif
1619
1620 # Use the Ada 2005 version of Ada.Exceptions by default, unless specified
1621 # explicitly already. The base files (a-except.ad?) are used only for building
1622 # the compiler and other basic tools.
1623 # These base versions lack Ada 2005 additions which would cause bootstrap
1624 # problems if included in the compiler and other basic tools.
1625
1626 ifeq ($(filter-out a-except%,$(LIBGNAT_TARGET_PAIRS)),$(LIBGNAT_TARGET_PAIRS))
1627   LIBGNAT_TARGET_PAIRS += \
1628     a-except.ads<a-except-2005.ads \
1629     a-except.adb<a-except-2005.adb
1630 endif
1631
1632 # The runtime library for gnat comprises two directories.  One contains the
1633 # Ada source files that the compiler (gnat1) needs -- these files are listed
1634 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1635 # corresponding .ali files for the parts written in Ada, libgnat.a for
1636 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1637 # emulation library.  LIBGNAT_OBJS lists the objects that go into libgnat.a,
1638 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1639 # go into the directory.  The pthreads emulation is built in the threads
1640 # subdirectory and copied.
1641 LIBGNAT_SRCS = ada.h adaint.c adaint.h argv.c cio.c cstreams.c \
1642   errno.c exit.c cal.c ctrl_c.c env.c env.h \
1643   raise.h raise.c sysdep.c aux-io.c init.c initialize.c seh_init.c \
1644   final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c expect.c mkdir.c \
1645   socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
1646
1647 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o env.o \
1648   raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o \
1649   final.o tracebak.o expect.o mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
1650
1651 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1652 #  the library installation will change and there will be a
1653 #  GNAT_RTL_SRCS.  Right now we count on being able to build GNATRTL_OBJS
1654 #  from ADA_INCLUDE_SRCS.
1655
1656 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
1657 # the following include file:
1658
1659 include $(fsrcdir)/Makefile.rtl
1660
1661 GNATRTL_LINEARALGEBRA_OBJS = a-nlcoar.o a-nllcar.o a-nllrar.o a-nlrear.o \
1662   a-nucoar.o a-nurear.o i-forbla.o i-forlap.o s-gearop.o
1663
1664 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
1665   $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
1666
1667 # Default run time files
1668
1669 ADA_INCLUDE_SRCS =\
1670  ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1671  machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1672  sequenio.ads system.ads memtrack.adb \
1673  a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
1674  s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads  
1675
1676 LIBGNAT=../rts/libgnat.a 
1677
1678 GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
1679
1680 # when compiling the tools, the runtime has to be first on the path so that
1681 # it hides the runtime files lying with the rest of the sources
1682 ifeq ($(TOOLSCASE),native)
1683   vpath %.ads ../rts ../
1684   vpath %.adb ../rts ../
1685   vpath %.c   ../rts ../
1686   vpath %.h   ../rts ../
1687 endif
1688
1689 # in the cross tools case, everything is compiled with the native 
1690 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1691 ifeq ($(TOOLSCASE),cross)
1692   vpath %.ads ../
1693   vpath %.adb ../
1694   vpath %.c   ../
1695   vpath %.h   ../
1696 endif
1697
1698 ../../gnatchop$(exeext): 
1699         $(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)"
1700         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatchop 
1701         $(GNATLINK) -v gnatchop -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1702
1703 ../../gnat$(exeext): 
1704         $(GNATMAKE) -c $(ADA_INCLUDES) gnatcmd --GCC="$(CC) $(ALL_ADAFLAGS)"
1705         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatcmd 
1706         $(GNATLINK) -v gnatcmd -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1707
1708 ../../gnatkr$(exeext): 
1709         $(GNATMAKE) -c $(ADA_INCLUDES) gnatkr --GCC="$(CC) $(ALL_ADAFLAGS)"
1710         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatkr 
1711         $(GNATLINK) -v gnatkr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1712
1713 ../../gnatls$(exeext): 
1714         $(GNATMAKE) -c $(ADA_INCLUDES) gnatls --GCC="$(CC) $(ALL_ADAFLAGS)"
1715         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatls 
1716         $(GNATLINK) -v gnatls -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1717
1718 ../../gnatname$(exeext): 
1719         $(GNATMAKE) -c $(ADA_INCLUDES) gnatname --GCC="$(CC) $(ALL_ADAFLAGS)"
1720         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatname 
1721         $(GNATLINK) -v gnatname -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1722
1723 ../../gprmake$(exeext): 
1724         $(GNATMAKE) -c $(ADA_INCLUDES) gprmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1725         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gprmake
1726         $(GNATLINK) -v gprmake -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1727
1728 ../../gnatprep$(exeext): 
1729         $(GNATMAKE) -c $(ADA_INCLUDES) gnatprep --GCC="$(CC) $(ALL_ADAFLAGS)"
1730         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatprep 
1731         $(GNATLINK) -v gnatprep -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1732
1733 ../../gnatxref$(exeext): 
1734         $(GNATMAKE) -c $(ADA_INCLUDES) gnatxref --GCC="$(CC) $(ALL_ADAFLAGS)"
1735         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatxref 
1736         $(GNATLINK) -v gnatxref -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1737
1738 ../../gnatfind$(exeext): 
1739         $(GNATMAKE) -c $(ADA_INCLUDES) gnatfind --GCC="$(CC) $(ALL_ADAFLAGS)"
1740         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatfind 
1741         $(GNATLINK) -v gnatfind -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1742
1743 ../../gnatclean$(exeext): 
1744         $(GNATMAKE) -c $(ADA_INCLUDES) gnatclean --GCC="$(CC) $(ALL_ADAFLAGS)"
1745         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatclean
1746         $(GNATLINK) -v gnatclean -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1747
1748 ../../gnatsym$(exeext): 
1749         $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
1750         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
1751         $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1752
1753 ../../gnatdll$(exeext): 
1754         $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1755         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) $(GNATBIND_FLAGS) gnatdll
1756         $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1757
1758 ../../vxaddr2line$(exeext): targext.o
1759         $(GNATMAKE) -c  $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
1760         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line 
1761         $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
1762
1763 gnatmake-re:  link.o targext.o
1764         $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1765         $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1766         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake 
1767         $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1768                 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1769
1770 # Note the use of the "mv" command in order to allow gnatlink to be linked with
1771 # with the former version of gnatlink itself which cannot override itself.
1772 gnatlink-re:  link.o targext.o
1773         $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1774         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink 
1775         $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1776                     --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1777         $(MV)  ../../gnatlinknew$(exeext)  ../../gnatlink$(exeext)
1778   
1779 # Needs to be built with CC=gcc
1780 # Since the RTL should be built with the latest compiler, remove the
1781 #  stamp target in the parent directory whenever gnat1 is rebuilt
1782
1783 # Likewise for the tools
1784 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
1785         $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1786                     $(TOOLS_LIBS)
1787
1788 ../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
1789         $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1790                     $(TOOLS_LIBS)
1791
1792 ../../gnatbl$(exeext): gnatbl.o
1793         $(GCC_LINK) -o $@ $(ALL_CFLAGS) $(LDFLAGS) gnatbl.o $(TOOLS_LIBS)
1794
1795 gnatbl.o: gnatbl.c adaint.h
1796         $(CC) $(ALL_CFLAGS) $(INCLUDES) -c $< $(OUTPUT_OPTION)
1797
1798 ../stamp-gnatlib:
1799         @if [ ! -f stamp-gnatlib ] ; \
1800         then \
1801           $(ECHO) You must first build the GNAT library: make gnatlib; \
1802           false; \
1803         else \
1804           true; \
1805         fi
1806
1807 install-gnatlib: ../stamp-gnatlib
1808 #       Create the directory before deleting it, in case the directory is
1809 #       a list of directories (as it may be on VMS). This ensures we are
1810 #       deleting the right one.
1811         -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1812         -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1813         $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1814         $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1815         -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1816         -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1817         for file in rts/*.ali; do \
1818             $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1819         done
1820         -$(INSTALL_DATA) rts/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1821         -cd rts; for file in *$(arext);do \
1822             $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1823             $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
1824         done
1825         -$(foreach file, $(EXTRA_ADALIB_FILES), \
1826             $(INSTALL_DATA_DATE) rts/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
1827         ) true
1828 #     Install the shared libraries, if any, using $(INSTALL) instead
1829 #     of $(INSTALL_DATA). The latter may force a mode inappropriate
1830 #     for shared libraries on some targets, e.g. on HP-UX where the x
1831 #     permission is required.
1832         for file in gnat gnarl; do \
1833            if [ -f rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
1834               $(INSTALL) rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1835                          $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1836            fi; \
1837            if [ -f rts/lib$${file}$(soext) ]; then \
1838               $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1839               $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
1840            fi; \
1841         done
1842 # This copy must be done preserving the date on the original file.
1843         for file in rts/*.ad?; do \
1844             $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
1845         done
1846         cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1847         cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1848
1849 ../stamp-gnatlib2:
1850         $(RM) rts/s-*.ali
1851         $(RM) rts/s-*$(objext)
1852         $(RM) rts/a-*.ali
1853         $(RM) rts/a-*$(objext)
1854         $(RM) rts/*.ali
1855         $(RM) rts/*$(objext)
1856         $(RM) rts/*$(arext)
1857         $(RM) rts/*$(soext)
1858         touch ../stamp-gnatlib2
1859         $(RM) ../stamp-gnatlib
1860
1861 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1862 #       successive target commands. Although the Gnu make documentation
1863 #       implies this is true on all systems, I suspect it may not be, So care
1864 #       has been taken to allow a sed script to look for ";)" and substitue
1865 #       for ";" the appropriate character in the range of lines below
1866 #       beginning with "GNULLI Begin" and ending with "GNULLI End"
1867
1868 # GNULLI Begin ###########################################################
1869
1870 ../stamp-gnatlib1: Makefile ../stamp-gnatlib2
1871         $(RMDIR) rts
1872         $(MKDIR) rts
1873         $(CHMOD) u+w rts
1874 # Copy target independent sources
1875         $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
1876           $(LN_S) $(fsrcpfx)$(f) rts ;) true
1877 # Remove files to be replaced by target dependent sources
1878         $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1879                         rts/$(word 1,$(subst <, ,$(PAIR))))
1880         $(RM) rts/*-*-*.ads rts/*-*-*.adb
1881 # Copy new target dependent sources
1882         $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1883                   $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1884                         rts/$(word 1,$(subst <, ,$(PAIR)));)
1885         $(RM) ../stamp-gnatlib
1886         touch ../stamp-gnatlib1
1887
1888 # GNULLI End #############################################################
1889
1890 # Don't use semicolon separated shell commands that involve list expansions.
1891 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
1892 # line lengths in excess of 256 characters.
1893 # Example: cd rts; ar rc libfoo.a $(LONG_LIST_OF_OBJS)
1894 # is guaranteed to overflow the buffer.
1895
1896 gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
1897         $(MAKE) -C rts \
1898                 CC="`echo \"$(GCC_FOR_TARGET)\" \
1899                 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
1900                 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
1901                 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
1902                 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
1903                 srcdir=$(fsrcdir) \
1904                 -f ../Makefile $(LIBGNAT_OBJS)
1905         $(MAKE) -C rts \
1906                 CC="`echo \"$(GCC_FOR_TARGET)\" \
1907                 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
1908                 ADA_INCLUDES="" \
1909                 CFLAGS="$(GNATLIBCFLAGS)" \
1910                 ADAFLAGS="$(GNATLIBFLAGS)" \
1911                 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
1912                 srcdir=$(fsrcdir) \
1913                 -f ../Makefile \
1914                 $(GNATRTL_OBJS)
1915         $(RM) rts/libgnat$(arext) rts/libgnarl$(arext)
1916         $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgnat$(arext) \
1917            $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
1918         ifneq ($(PREFIX_OBJS),)
1919                 $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgccprefix$(arext) \
1920                   $(PREFIX_OBJS);
1921                 $(RANLIB_FOR_TARGET) rts/libgccprefix$(arext)
1922         endif
1923         $(RANLIB_FOR_TARGET) rts/libgnat$(arext)
1924         $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgnarl$(arext) \
1925            $(addprefix rts/,$(GNATRTL_TASKING_OBJS))
1926         $(RANLIB_FOR_TARGET) rts/libgnarl$(arext)
1927         $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgnala$(arext) \
1928            $(addprefix rts/,$(GNATRTL_LINEARALGEBRA_OBJS))
1929         $(RANLIB_FOR_TARGET) rts/libgnala$(arext)
1930         ifeq ($(GMEM_LIB),gmemlib)
1931                 $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgmem$(arext) \
1932                   rts/memtrack.o
1933                 $(RANLIB_FOR_TARGET) rts/libgmem$(arext)
1934         endif
1935         $(CHMOD) a-wx rts/*.ali
1936         touch ../stamp-gnatlib
1937
1938 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
1939 gnatlib-shared-default:
1940         $(MAKE) $(FLAGS_TO_PASS) \
1941              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1942              GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1943              THREAD_KIND="$(THREAD_KIND)" \
1944              gnatlib
1945         $(RM) rts/libgna*$(soext)
1946         cd rts; ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
1947                 $(TARGET_LIBGCC2_CFLAGS) \
1948                 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1949                 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
1950                 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1951                 $(MISCLIB) -lm
1952         cd rts; ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
1953                 $(TARGET_LIBGCC2_CFLAGS) \
1954                 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1955                 $(GNATRTL_TASKING_OBJS) \
1956                 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1957                 $(THREADSLIB)
1958         cd rts; $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1959                 libgnat$(soext)
1960         cd rts; $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1961                 libgnarl$(soext)
1962
1963 gnatlib-shared-dual:
1964         $(MAKE) $(FLAGS_TO_PASS) \
1965              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1966              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1967              THREAD_KIND="$(THREAD_KIND)" \
1968              gnatlib-shared-default
1969         $(MV) rts/libgna*$(soext) .
1970         $(RM) ../stamp-gnatlib2
1971         $(MAKE) $(FLAGS_TO_PASS) \
1972              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1973              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1974              THREAD_KIND="$(THREAD_KIND)" \
1975              gnatlib
1976         $(MV) libgna*$(soext) rts
1977
1978 gnatlib-shared-dual-win32:
1979         $(MAKE) $(FLAGS_TO_PASS) \
1980              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1981              GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1982              THREAD_KIND="$(THREAD_KIND)" \
1983              gnatlib-shared-win32
1984         $(MV) rts/libgna*$(soext) .
1985         $(RM) ../stamp-gnatlib2
1986         $(MAKE) $(FLAGS_TO_PASS) \
1987              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1988              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1989              THREAD_KIND="$(THREAD_KIND)" \
1990              gnatlib
1991         $(MV) libgna*$(soext) rts
1992
1993 # ??? we need to add the option to support auto-import of arrays/records to
1994 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
1995 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
1996 # Windows.
1997 gnatlib-shared-win32:
1998         $(MAKE) $(FLAGS_TO_PASS) \
1999              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2000              GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2001              THREAD_KIND="$(THREAD_KIND)" \
2002              gnatlib
2003         $(RM) rts/libgna*$(soext)
2004         cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2005                 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2006                 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2007                 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
2008         cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2009                 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2010                 $(GNATRTL_TASKING_OBJS) \
2011                 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2012                 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2013
2014 gnatlib-shared-darwin:
2015         $(MAKE) $(FLAGS_TO_PASS) \
2016              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2017              GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
2018                             -fno-common" \
2019              THREAD_KIND="$(THREAD_KIND)" \
2020              gnatlib
2021         $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
2022         cd rts; ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2023                 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2024                 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2025                 $(SO_OPTS) \
2026                 $(MISCLIB) -lm
2027         cd rts; ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2028                 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2029                 $(GNATRTL_TASKING_OBJS) \
2030                 $(SO_OPTS) \
2031                 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2032         cd rts; $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2033                 libgnat$(soext)
2034         cd rts; $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2035                 libgnarl$(soext)
2036
2037 gnatlib-shared-vms:
2038         $(MAKE) $(FLAGS_TO_PASS) \
2039              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2040              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2041              THREAD_KIND="$(THREAD_KIND)" \
2042              gnatlib
2043         $(RM) rts/libgna*$(soext)
2044         cd rts && echo "case_sensitive=yes" > SYMVEC_$$$$.opt && \
2045         objdump --syms $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) | \
2046         $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt && \
2047         echo "case_sensitive=NO" >> SYMVEC_$$$$.opt && \
2048         ../../xgcc -g -B../../ -shared -shared-libgcc \
2049            -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
2050            sys\$$library:trace.exe \
2051            --for-linker=/noinform \
2052            --for-linker=SYMVEC_$$$$.opt \
2053            --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2054         cd rts && echo "case_sensitive=yes" > SYMVEC_$$$$.opt && \
2055         objdump --syms $(GNATRTL_TASKING_OBJS) | \
2056         $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt && \
2057         echo "case_sensitive=NO" >> SYMVEC_$$$$.opt && \
2058         ../../xgcc -g -B../../ -shared -shared-libgcc \
2059            -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2060            libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2061            sys\$$library:trace.exe \
2062            --for-linker=/noinform \
2063            --for-linker=SYMVEC_$$$$.opt \
2064            --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2065
2066 gnatlib-shared:
2067         $(MAKE) $(FLAGS_TO_PASS) \
2068              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2069              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2070              THREAD_KIND="$(THREAD_KIND)" \
2071              TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
2072              $(GNATLIB_SHARED)
2073
2074 gnatlib-sjlj:
2075         $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1
2076         sed -e 's/ZCX_By_Default.*/ZCX_By_Default            : constant Boolean := False;/' rts/system.ads > rts/s.ads
2077         $(MV) rts/s.ads rts/system.ads
2078         $(MAKE) $(FLAGS_TO_PASS) \
2079              EH_MECHANISM="" \
2080              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2081              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2082              THREAD_KIND="$(THREAD_KIND)" \
2083              TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2084
2085 gnatlib-zcx:
2086         $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1
2087         sed -e 's/ZCX_By_Default.*/ZCX_By_Default            : constant Boolean := True;/' rts/system.ads > rts/s.ads
2088         $(MV) rts/s.ads rts/system.ads
2089         $(MAKE) $(FLAGS_TO_PASS) \
2090              EH_MECHANISM="-gcc" \
2091              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2092              GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2093              THREAD_KIND="$(THREAD_KIND)" \
2094              TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2095
2096 # .s files for cross-building
2097 gnat-cross: force
2098         make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
2099
2100 # Compiling object files from source files.
2101
2102 # Note that dependencies on obstack.h are not written
2103 # because that file is not part of GCC.
2104 # Dependencies on gvarargs.h are not written
2105 # because all that file does, when not compiling with GCC,
2106 # is include the system varargs.h.
2107
2108 b_gnatl.c : $(GNATLINK_OBJS)
2109         $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2110 b_gnatl.o : b_gnatl.c
2111
2112 b_gnatm.c : $(GNATMAKE_OBJS)
2113         $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2114 b_gnatm.o : b_gnatm.c
2115
2116 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2117 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2118
2119 # force no sibling call optimization on s-traceb.o so the number of stack
2120 # frames to be skipped when computing a call chain is not modified by
2121 # optimization. However we can do that only when building the runtime
2122 # (not the compiler) because the -fno-optimize-sibling-calls option exists
2123 # only in GCC 3 and above.
2124
2125 ifneq (,$(findstring xgcc,$(CC)))
2126 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2127 else
2128 NO_SIBLING_ADAFLAGS=
2129 endif
2130
2131 s-traceb.o  : s-traceb.adb
2132         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2133               $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2134       $< $(OUTPUT_OPTION)
2135
2136 # force debugging information on s-tasdeb.o so that it is always
2137 # possible to set conditional breakpoints on tasks.
2138
2139 s-tasdeb.o  : s-tasdeb.adb s-tasdeb.ads
2140         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2141               $< $(OUTPUT_OPTION)
2142
2143 # force no function reordering on a-except.o because of the exclusion bounds
2144 # mechanism (see the source file for more detailed information). However we
2145 # can do that only when building the runtime (not the compiler) because the
2146 # -fno-toplevel-reorder option exists only in GCC 4.2 and above.
2147
2148 ifneq (,$(findstring xgcc,$(CC)))
2149 NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
2150 else
2151 NO_REORDER_ADAFLAGS=
2152 endif
2153
2154 # force debugging information on a-except.o so that it is always
2155 # possible to set conditional breakpoints on exceptions.
2156 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2157
2158 a-except.o  : a-except.adb a-except.ads
2159         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2160               $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2161
2162 # compile s-except.o without optimization and with debug info to let the
2163 # debugger set breakpoints and inspect subprogram parameters on exception
2164 # related events.
2165
2166 s-except.o  : s-except.adb s-except.ads
2167         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2168               $< $(OUTPUT_OPTION)
2169
2170 # force debugging information on s-assert.o so that it is always
2171 # possible to set breakpoint on assert failures.
2172
2173 s-assert.o  : s-assert.adb s-assert.ads a-except.ads
2174         $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
2175               $< $(OUTPUT_OPTION)
2176
2177 adadecode.o : adadecode.c adadecode.h
2178 aux-io.o  : aux-io.c
2179 argv.o    : argv.c
2180 cal.o     : cal.c
2181 deftarg.o : deftarg.c
2182 errno.o   : errno.c
2183 exit.o    : adaint.h exit.c
2184 expect.o  : expect.c
2185 final.o   : final.c
2186 gmem.o    : gmem.c
2187 link.o    : link.c
2188 mkdir.o   : mkdir.c
2189 socket.o  : socket.c gsocket.h
2190 sysdep.o  : sysdep.c
2191 raise-gcc.o : raise-gcc.c raise.h
2192 raise.o   : raise.c raise.h
2193 vx_stack_info.o : vx_stack_info.c
2194
2195 gen-soccon: gen-soccon.c gsocket.h
2196         $(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2197                 -UIN_GCC -DTARGET=\"$(target_alias)\" \
2198                 $< $(OUTPUT_OPTION)
2199
2200 cio.o     : cio.c
2201         $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2202                  $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2203
2204 init.o    : init.c adaint.h raise.h
2205         $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2206                  $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2207
2208 initialize.o : initialize.c raise.h
2209         $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2210                  $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2211
2212 targext.o : targext.c
2213         $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2214                 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2215                 $< $(OUTPUT_OPTION)
2216
2217 # No optimization to compile this file as optimizations (-O1 or above) breaks
2218 # the SEH handling on Windows. The reasons are not clear.
2219 seh_init.o : seh_init.c raise.h
2220         $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) -O0 \
2221                  $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2222
2223 # Need to keep the frame pointer in this file to pop the stack properly on
2224 # some targets.
2225 tracebak.o  : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
2226         $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2227               -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2228
2229 # In GNU Make, ignore whether `stage*' exists.
2230 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2231 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2232
2233 force:
2234
2235 # Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
2236
2237 ../../gnatlbr$(exeext): ../../prefix.o
2238         $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2239         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2240         $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2241
2242 ../../vms_help$(exeext):
2243         $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
2244         $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
2245         $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2246
2247 ../../gnat.hlp: ../../vms_help$(exeext)
2248         ../../vms_help$(exeext) $(fsrcdir)/gnat.help_in \
2249                                 $(fsrcdir)/vms_data.ads ../../gnat.hlp