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