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