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