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