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