]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/gcc-interface/Makefile.in
* id.po: Update.
[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))),)
735 LIBGNAT_TARGET_PAIRS_32 = \
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 \
a1ab4c31
AC
747 g-soliop.ads<g-soliop-solaris.ads \
748 system.ads<system-solaris-sparc.ads
749
750 LIBGNAT_TARGET_PAIRS_64 = \
751 a-intnam.ads<a-intnam-solaris.ads \
752 s-inmaop.adb<s-inmaop-posix.adb \
753 s-intman.adb<s-intman-solaris.adb \
754 s-osinte.adb<s-osinte-solaris.adb \
755 s-osinte.ads<s-osinte-solaris.ads \
756 s-osprim.adb<s-osprim-solaris.adb \
757 s-taprop.adb<s-taprop-solaris.adb \
758 s-tasinf.adb<s-tasinf-solaris.adb \
759 s-tasinf.ads<s-tasinf-solaris.ads \
760 s-taspri.ads<s-taspri-solaris.ads \
761 s-tpopsp.adb<s-tpopsp-solaris.adb \
a1ab4c31
AC
762 g-soliop.ads<g-soliop-solaris.ads \
763 system.ads<system-solaris-sparcv9.ads
764
765 ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
8f5730b9
EB
766 ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
767 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
768 else
769 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
770 endif
a1ab4c31 771 else
8f5730b9
EB
772 ifeq ($(strip $(MULTISUBDIR)),/sparcv7)
773 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
774 else
775 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
776 endif
a1ab4c31
AC
777 endif
778
779 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
780
781 EH_MECHANISM=-gcc
782 THREADSLIB = -lposix4 -lthread
783 MISCLIB = -lposix4 -lnsl -lsocket
784 SO_OPTS = -Wl,-h,
785 GNATLIB_SHARED = gnatlib-shared-dual
786 GMEM_LIB = gmemlib
787 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
788 LIBRARY_VERSION := $(LIB_VERSION)
789
790 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
791 LIBGNAT_TARGET_PAIRS = \
792 a-intnam.ads<a-intnam-solaris.ads \
793 s-inmaop.adb<s-inmaop-posix.adb \
794 s-intman.adb<s-intman-posix.adb \
795 s-osinte.adb<s-osinte-posix.adb \
796 s-osinte.ads<s-osinte-solaris-posix.ads \
797 s-osprim.adb<s-osprim-solaris.adb \
798 s-taprop.adb<s-taprop-posix.adb \
799 s-taspri.ads<s-taspri-posix.ads \
800 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
a1ab4c31
AC
801 g-soliop.ads<g-soliop-solaris.ads \
802 system.ads<system-solaris-sparc.ads
803
804 THREADSLIB = -lposix4 -lpthread
805 endif
806
807 ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),)
808 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
809 endif
810endif
811
812ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
813 LIBGNAT_TARGET_PAIRS = \
814 a-numaux.adb<a-numaux-x86.adb \
815 a-numaux.ads<a-numaux-x86.ads \
816 a-intnam.ads<a-intnam-solaris.ads \
817 s-inmaop.adb<s-inmaop-posix.adb \
818 s-intman.adb<s-intman-solaris.adb \
819 s-osinte.adb<s-osinte-solaris.adb \
820 s-osinte.ads<s-osinte-solaris.ads \
821 s-osprim.adb<s-osprim-solaris.adb \
822 s-taprop.adb<s-taprop-solaris.adb \
823 s-tasinf.adb<s-tasinf-solaris.adb \
824 s-tasinf.ads<s-tasinf-solaris.ads \
825 s-taspri.ads<s-taspri-solaris.ads \
826 s-tpopsp.adb<s-tpopsp-solaris.adb \
827 g-bytswa.adb<g-bytswa-x86.adb \
a1ab4c31
AC
828 g-soliop.ads<g-soliop-solaris.ads \
829 system.ads<system-solaris-x86.ads
830
831 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
832
833 EH_MECHANISM=-gcc
834 THREADSLIB = -lposix4 -lthread
835 MISCLIB = -lposix4 -lnsl -lsocket
836 SO_OPTS = -Wl,-h,
837 GNATLIB_SHARED = gnatlib-shared-dual
838 GMEM_LIB = gmemlib
839 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
840 LIBRARY_VERSION := $(LIB_VERSION)
841endif
842
843ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
844 LIBGNAT_TARGET_PAIRS = \
845 a-intnam.ads<a-intnam-linux.ads \
846 a-numaux.adb<a-numaux-x86.adb \
847 a-numaux.ads<a-numaux-x86.ads \
848 g-bytswa.adb<g-bytswa-x86.adb \
849 s-inmaop.adb<s-inmaop-posix.adb \
850 s-intman.adb<s-intman-posix.adb \
851 s-osprim.adb<s-osprim-posix.adb \
852 s-taspri.ads<s-taspri-posix.ads \
853 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
854 g-sercom.adb<g-sercom-linux.adb \
855 system.ads<system-linux-x86.ads
856
857 ifeq ($(strip $(filter-out marte,$(THREAD_KIND))),)
858 LIBGNAT_TARGET_PAIRS += \
859 a-exetim.adb<a-exetim-linux-marte.adb \
860 a-exetim.ads<a-exetim-linux-marte.ads \
861 a-extiti.adb<a-extiti-linux-marte.adb \
862 a-extiti.ads<a-extiti-linux-marte.ads \
863 a-rttiev.adb<a-rttiev-linux-marte.adb \
864 a-rttiev.ads<a-rttiev-linux-marte.ads \
a1ab4c31
AC
865 s-osinte.adb<s-osinte-linux-marte.adb \
866 s-osinte.ads<s-osinte-linux-marte.ads \
867 s-taprop.adb<s-taprop-linux-marte.adb
868
869 EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o a-extiti.o
870
871 EH_MECHANISM=
872 THREADSLIB = -lmarte
873 else
874 LIBGNAT_TARGET_PAIRS += \
a1ab4c31 875 s-linux.ads<s-linux.ads \
37efd88e
JR
876 s-osinte.adb<s-osinte-posix.adb
877
878 ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
879 LIBGNAT_TARGET_PAIRS += \
880 s-osinte.ads<s-osinte-linux-xenomai.ads \
881 s-taprop.adb<s-taprop-linux-xenomai.adb
882
883 EH_MECHANISM=
884 else
885 LIBGNAT_TARGET_PAIRS += \
886 s-osinte.ads<s-osinte-linux.ads \
887 s-taprop.adb<s-taprop-linux.adb \
888 s-tasinf.ads<s-tasinf-linux.ads \
889 s-tasinf.adb<s-tasinf-linux.adb
890
891 EH_MECHANISM=-gcc
892 endif
a1ab4c31 893
a1ab4c31
AC
894 THREADSLIB = -lpthread
895 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
896 endif
897
898 TOOLS_TARGET_PAIRS = \
899 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
900 indepsw.adb<indepsw-gnu.adb
901
902 GNATLIB_SHARED = gnatlib-shared-dual
903 GMEM_LIB = gmemlib
904 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
905 LIBRARY_VERSION := $(LIB_VERSION)
906endif
907
908ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
909 LIBGNAT_TARGET_PAIRS = \
910 a-intnam.ads<a-intnam-freebsd.ads \
911 a-numaux.adb<a-numaux-x86.adb \
912 a-numaux.ads<a-numaux-x86.ads \
913 s-inmaop.adb<s-inmaop-posix.adb \
914 s-intman.adb<s-intman-posix.adb \
a1ab4c31
AC
915 s-osinte.adb<s-osinte-posix.adb \
916 s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
917 s-osprim.adb<s-osprim-posix.adb \
918 s-taprop.adb<s-taprop-linux.adb \
919 s-tasinf.ads<s-tasinf-linux.ads \
920 s-tasinf.adb<s-tasinf-linux.adb \
921 s-taspri.ads<s-taspri-posix.ads \
922 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
923 system.ads<system-freebsd-x86.ads
924
925 TOOLS_TARGET_PAIRS = \
926 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
927 indepsw.adb<indepsw-gnu.adb
928
929 EH_MECHANISM=-gcc
930 THREADSLIB = -lpthread
931 GNATLIB_SHARED = gnatlib-shared-dual
932 GMEM_LIB = gmemlib
933 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
934 LIBRARY_VERSION := $(LIB_VERSION)
935endif
936
937ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
938 LIBGNAT_TARGET_PAIRS = \
939 a-intnam.ads<a-intnam-freebsd.ads \
940 a-numaux.adb<a-numaux-x86.adb \
941 a-numaux.ads<a-numaux-x86.ads \
942 g-bytswa.adb<g-bytswa-x86.adb \
a1ab4c31
AC
943 s-inmaop.adb<s-inmaop-posix.adb \
944 s-intman.adb<s-intman-posix.adb \
945 s-osinte.adb<s-osinte-freebsd.adb \
946 s-osinte.ads<s-osinte-freebsd.ads \
947 s-osprim.adb<s-osprim-posix.adb \
948 s-taprop.adb<s-taprop-posix.adb \
949 s-taspri.ads<s-taspri-posix.ads \
950 s-tpopsp.adb<s-tpopsp-posix.adb \
951 system.ads<system-freebsd-x86.ads
952
953 TOOLS_TARGET_PAIRS = \
954 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
955 GNATLIB_SHARED = gnatlib-shared-dual
956
957 EH_MECHANISM=-gcc
958 THREADSLIB= -lpthread
959 GMEM_LIB = gmemlib
960 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
961 LIBRARY_VERSION := $(LIB_VERSION)
962endif
963
964ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
965 ifeq ($(strip $(filter-out s390x,$(arch))),)
966 LIBGNAT_TARGET_PAIRS = \
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 system.ads<system-linux-s390x.ads
980 else
981 LIBGNAT_TARGET_PAIRS = \
982 a-intnam.ads<a-intnam-linux.ads \
983 s-inmaop.adb<s-inmaop-posix.adb \
984 s-intman.adb<s-intman-posix.adb \
985 s-linux.ads<s-linux.ads \
986 s-osinte.adb<s-osinte-posix.adb \
987 s-osinte.ads<s-osinte-linux.ads \
988 s-osprim.adb<s-osprim-posix.adb \
989 s-taprop.adb<s-taprop-linux.adb \
990 s-tasinf.ads<s-tasinf-linux.ads \
991 s-tasinf.adb<s-tasinf-linux.adb \
992 s-taspri.ads<s-taspri-posix-noaltstack.ads \
993 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
994 system.ads<system-linux-s390.ads
995 endif
996
997 TOOLS_TARGET_PAIRS = \
998 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
999
1000 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1001 EH_MECHANISM=-gcc
1002 THREADSLIB = -lpthread
1003 GNATLIB_SHARED = gnatlib-shared-dual
1004 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1005 LIBRARY_VERSION := $(LIB_VERSION)
1006endif
1007
1008ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
1009 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
1010 LIBGNAT_TARGET_PAIRS = \
1011 a-intnam.ads<a-intnam-irix.ads \
1012 s-inmaop.adb<s-inmaop-posix.adb \
1013 s-intman.adb<s-intman-irix.adb \
1014 s-mastop.adb<s-mastop-irix.adb \
1015 s-osinte.adb<s-osinte-irix.adb \
1016 s-osinte.ads<s-osinte-irix.ads \
1017 s-osprim.adb<s-osprim-posix.adb \
1018 s-proinf.adb<s-proinf-irix-athread.adb \
1019 s-proinf.ads<s-proinf-irix-athread.ads \
1020 s-taprop.adb<s-taprop-irix.adb \
1021 s-tasinf.ads<s-tasinf-irix.ads \
1022 s-taspri.ads<s-taspri-posix.ads \
1023 s-tpopsp.adb<s-tpopsp-posix.adb \
1024 s-traceb.adb<s-traceb-mastop.adb \
a1ab4c31
AC
1025 system.ads<system-irix-n32.ads
1026
1027 THREADSLIB = -lpthread
1028 GNATLIB_SHARED = gnatlib-shared-default
1029
1030 else
1031 LIBGNAT_TARGET_PAIRS += \
1032 s-mastop.adb<s-mastop-irix.adb \
1033 s-osprim.adb<s-osprim-posix.adb \
1034 s-traceb.adb<s-traceb-mastop.adb \
a1ab4c31
AC
1035 system.ads<system-irix-o32.ads
1036 endif
1037
1038 EH_MECHANISM=-gcc
1039 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-irix.adb
1040 TGT_LIB = -lexc
1041 MISCLIB = -lexc
1042 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1043 LIBRARY_VERSION := $(LIB_VERSION)
1044 GMEM_LIB = gmemlib
1045endif
1046
1047ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
1048 LIBGNAT_TARGET_PAIRS = \
1049 a-excpol.adb<a-excpol-abort.adb \
1050 a-intnam.ads<a-intnam-hpux.ads \
1051 s-inmaop.adb<s-inmaop-posix.adb \
1052 s-interr.adb<s-interr-sigaction.adb \
1053 s-intman.adb<s-intman-posix.adb \
1054 s-osinte.adb<s-osinte-hpux-dce.adb \
1055 s-osinte.ads<s-osinte-hpux-dce.ads \
1056 s-parame.ads<s-parame-hpux.ads \
1057 s-osprim.adb<s-osprim-posix.adb \
1058 s-taprop.adb<s-taprop-hpux-dce.adb \
1059 s-taspri.ads<s-taspri-hpux-dce.ads \
1060 s-tpopsp.adb<s-tpopsp-posix.adb \
a1ab4c31
AC
1061 system.ads<system-hpux.ads
1062
1063 EH_MECHANISM=-gcc
1064 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1065endif
1066
1067ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
1068 LIBGNAT_TARGET_PAIRS = \
1069 a-intnam.ads<a-intnam-hpux.ads \
1070 s-inmaop.adb<s-inmaop-posix.adb \
1071 s-intman.adb<s-intman-posix.adb \
1072 s-osinte.adb<s-osinte-posix.adb \
1073 s-osinte.ads<s-osinte-hpux.ads \
1074 s-parame.ads<s-parame-hpux.ads \
1075 s-osprim.adb<s-osprim-posix.adb \
1076 s-traceb.adb<s-traceb-hpux.adb \
1077 s-taprop.adb<s-taprop-posix.adb \
1078 s-taspri.ads<s-taspri-posix.ads \
1079 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
a1ab4c31
AC
1080 system.ads<system-hpux.ads
1081
1082 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb
1083 EH_MECHANISM=-gcc
1084 TGT_LIB = /usr/lib/libcl.a
1085 THREADSLIB = -lpthread
1086 GMEM_LIB = gmemlib
1087 soext = .sl
1088 SO_OPTS = -Wl,+h,
1089 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1090 GNATLIB_SHARED = gnatlib-shared-dual
1091 LIBRARY_VERSION := $(LIB_VERSION)
1092endif
1093
1094ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
1095 LIBGNAT_TARGET_PAIRS = \
1096 a-intnam.ads<a-intnam-aix.ads \
1097 s-inmaop.adb<s-inmaop-posix.adb \
1098 s-intman.adb<s-intman-posix.adb \
1099 s-osinte.adb<s-osinte-aix.adb \
1100 s-osinte.ads<s-osinte-aix.ads \
1101 s-osprim.adb<s-osprim-posix.adb \
1102 s-taprop.adb<s-taprop-posix.adb \
1103 s-taspri.ads<s-taspri-posix.ads \
1104 s-tpopsp.adb<s-tpopsp-posix.adb \
a1ab4c31
AC
1105 system.ads<system-aix.ads
1106
1107 THREADSLIB = -lpthreads
1108 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1109
1110 TOOLS_TARGET_PAIRS = \
1111 mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
1112 indepsw.adb<indepsw-aix.adb
1113
1114 GMEM_LIB = gmemlib
1115endif
1116
1117ifeq ($(strip $(filter-out lynxos,$(osys))),)
1118 TOOLS_TARGET_PAIRS = \
1119 mlib-tgt-specific.adb<mlib-tgt-specific-lynxos.adb \
1120 indepsw.adb<indepsw-gnu.adb
1121
1122 ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
1123 LIBGNAT_TARGET_PAIRS = \
1124 a-numaux.adb<a-numaux-x86.adb \
1125 a-numaux.ads<a-numaux-x86.ads \
1126 a-intnam.ads<a-intnam-lynxos.ads \
1127 g-bytswa.adb<g-bytswa-x86.adb \
a1ab4c31
AC
1128 g-sttsne.adb<g-sttsne-locking.adb \
1129 g-sttsne.ads<g-sttsne-locking.ads \
1130 s-inmaop.adb<s-inmaop-posix.adb \
1131 s-intman.adb<s-intman-posix.adb \
1132 s-osinte.adb<s-osinte-lynxos.adb \
1133 s-osinte.ads<s-osinte-lynxos.ads \
1134 s-osprim.adb<s-osprim-posix.adb \
1135 s-taprop.adb<s-taprop-lynxos.adb \
1136 s-taspri.ads<s-taspri-lynxos.ads \
1137 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1138 system.ads<system-lynxos-x86.ads
1139
1140 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1141
1142 else
1143 LIBGNAT_TARGET_PAIRS = \
1144 a-intnam.ads<a-intnam-lynxos.ads \
a1ab4c31
AC
1145 g-sttsne.adb<g-sttsne-locking.adb \
1146 g-sttsne.ads<g-sttsne-locking.ads \
1147 s-inmaop.adb<s-inmaop-posix.adb \
1148 s-intman.adb<s-intman-posix.adb \
1149 s-osinte.adb<s-osinte-lynxos.adb \
1150 s-osinte.ads<s-osinte-lynxos.ads \
1151 s-osprim.adb<s-osprim-posix.adb \
1152 s-taprop.adb<s-taprop-lynxos.adb \
1153 s-taspri.ads<s-taspri-lynxos.ads \
1154 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1155 system.ads<system-lynxos-ppc.ads
1156 endif
1157endif
1158
1159ifeq ($(strip $(filter-out rtems%,$(osys))),)
1160 LIBGNAT_TARGET_PAIRS = \
1161 system.ads<system-rtems.ads \
1162 a-intnam.ads<a-intnam-rtems.ads \
1163 s-inmaop.adb<s-inmaop-posix.adb \
1164 s-intman.adb<s-intman-posix.adb \
1165 s-osinte.adb<s-osinte-rtems.adb \
1166 s-osinte.ads<s-osinte-rtems.ads \
1167 s-osprim.adb<s-osprim-posix.adb \
1168 s-parame.adb<s-parame-rtems.adb \
1169 s-taprop.adb<s-taprop-posix.adb \
1170 s-taspri.ads<s-taspri-posix.ads \
1171 s-tpopsp.adb<s-tpopsp-rtems.adb \
1011d8a2
JS
1172 s-stchop.adb<s-stchop-rtems.adb \
1173 s-interr.adb<s-interr-hwint.adb
a1ab4c31
AC
1174endif
1175
1176ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
1177 LIBGNAT_TARGET_PAIRS = \
1178 a-intnam.ads<a-intnam-tru64.ads \
1179 s-inmaop.adb<s-inmaop-posix.adb \
1180 s-intman.adb<s-intman-posix.adb \
1181 s-mastop.adb<s-mastop-tru64.adb \
1182 s-osinte.adb<s-osinte-tru64.adb \
1183 s-osinte.ads<s-osinte-tru64.ads \
1184 s-osprim.adb<s-osprim-unix.adb \
1185 s-taprop.adb<s-taprop-tru64.adb \
1186 s-tasinf.ads<s-tasinf-tru64.ads \
1187 s-taspri.ads<s-taspri-tru64.ads \
1188 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1189 s-traceb.adb<s-traceb-mastop.adb \
a1ab4c31
AC
1190 system.ads<system-tru64.ads
1191
1192 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb
1193
1194 EH_MECHANISM=-gcc
1195 GMEM_LIB=gmemlib
1196 THREADSLIB = -lpthread -lmach -lexc -lrt
1197 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1198 GNATLIB_SHARED = gnatlib-shared-default
1199 LIBRARY_VERSION := $(LIB_VERSION)
1200endif
1201
1202ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
1203
1204soext = .exe
1205hyphen = _
1206LN = cp -p
1207LN_S = cp -p
1208
1209.SUFFIXES: .sym
1210
1211.o.sym:
1212 @ gnu:[bin]vmssymvec $<
1213endif
1214
1215ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1216ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1217 LIBGNAT_TARGET_PAIRS_AUX1 = \
1218 g-enblsp.adb<g-enblsp-vms-ia64.adb \
1219 g-trasym.adb<g-trasym-vms-ia64.adb \
1220 s-asthan.adb<s-asthan-vms-ia64.adb \
1221 s-osinte.adb<s-osinte-vms-ia64.adb \
1222 s-osinte.ads<s-osinte-vms-ia64.ads \
1223 s-vaflop.adb<s-vaflop-vms-ia64.adb \
1224 system.ads<system-vms-ia64.ads
1225
1226 LIBGNAT_TARGET_PAIRS_AUX2 = \
1227 s-parame.ads<s-parame-vms-ia64.ads
1228else
1229ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1230 LIBGNAT_TARGET_PAIRS_AUX1 = \
1231 g-enblsp.adb<g-enblsp-vms-alpha.adb \
1232 g-trasym.adb<g-trasym-vms-alpha.adb \
1233 s-traent.adb<s-traent-vms.adb \
1234 s-traent.ads<s-traent-vms.ads \
1235 s-asthan.adb<s-asthan-vms-alpha.adb \
1236 s-osinte.adb<s-osinte-vms.adb \
1237 s-osinte.ads<s-osinte-vms.ads \
1238 s-vaflop.adb<s-vaflop-vms-alpha.adb \
1239 system.ads<system-vms_64.ads
1240
1241ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1242 LIBGNAT_TARGET_PAIRS_AUX2 = \
1243 s-parame.ads<s-parame-vms-restrict.ads
1244else
1245 LIBGNAT_TARGET_PAIRS_AUX2 = \
1246 s-parame.ads<s-parame-vms-alpha.ads
1247endif
1248endif
1249endif
1250
1251 LIBGNAT_TARGET_PAIRS = \
1252 a-caldel.adb<a-caldel-vms.adb \
1253 a-calend.adb<a-calend-vms.adb \
1254 a-calend.ads<a-calend-vms.ads \
1255 a-dirval.adb<a-dirval-vms.adb \
1256 a-excpol.adb<a-excpol-abort.adb \
1257 a-intnam.ads<a-intnam-vms.ads \
1258 a-numaux.ads<a-numaux-vms.ads \
1259 g-expect.adb<g-expect-vms.adb \
a1ab4c31
AC
1260 g-socthi.ads<g-socthi-vms.ads \
1261 g-socthi.adb<g-socthi-vms.adb \
1262 g-stsifd.adb<g-stsifd-sockets.adb \
1263 g-sttsne.adb<g-sttsne-locking.adb \
1264 g-sttsne.ads<g-sttsne-locking.ads \
1265 i-c.ads<i-c-vms_64.ads \
1266 i-cstrin.ads<i-cstrin-vms_64.ads \
1267 i-cstrin.adb<i-cstrin-vms_64.adb \
1268 i-cpoint.ads<i-cpoint-vms_64.ads \
1269 i-cpoint.adb<i-cpoint-vms_64.adb \
1270 i-cstrea.adb<i-cstrea-vms.adb \
1271 memtrack.adb<memtrack-vms_64.adb \
1272 s-auxdec.ads<s-auxdec-vms_64.ads \
1273 s-crtl.ads<s-crtl-vms_64.ads \
1274 s-inmaop.adb<s-inmaop-vms.adb \
1275 s-interr.adb<s-interr-vms.adb \
1276 s-intman.adb<s-intman-vms.adb \
1277 s-intman.ads<s-intman-vms.ads \
1278 s-memory.adb<s-memory-vms_64.adb \
1279 s-memory.ads<s-memory-vms_64.ads \
1280 s-osprim.adb<s-osprim-vms.adb \
1281 s-osprim.ads<s-osprim-vms.ads \
1282 s-taprop.adb<s-taprop-vms.adb \
1283 s-taspri.ads<s-taspri-vms.ads \
1284 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1285 s-tpopde.adb<s-tpopde-vms.adb \
1286 s-tpopde.ads<s-tpopde-vms.ads \
1287 $(LIBGNAT_TARGET_PAIRS_AUX1) \
1288 $(LIBGNAT_TARGET_PAIRS_AUX2)
1289
1290ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1291 TOOLS_TARGET_PAIRS= \
1292 mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
1293 symbols.adb<symbols-vms.adb \
1294 symbols-processing.adb<symbols-processing-vms-ia64.adb
1295else
1296 TOOLS_TARGET_PAIRS= \
1297 mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
1298 symbols.adb<symbols-vms.adb \
1299 symbols-processing.adb<symbols-processing-vms-alpha.adb
1300endif
1301
1302adamsg.o: adamsg.msg
1303 -$(DECC) --cc=message adamsg.msg -o adamsg.o
1304
1305 EXTRA_GNATMAKE_OBJS = mlib-tgt-vms_common.o
1306
1307 GMEM_LIB = gmemlib
1308 EH_MECHANISM=-gcc
1309 GNATLIB_SHARED=gnatlib-shared-vms
1310ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1311 EXTRA_LIBGNAT_SRCS=vmshandler.asm
1312 EXTRA_LIBGNAT_OBJS=vmshandler.o
1313endif
1314 EXTRA_LIBGNAT_SRCS+=adamsg.msg
1315 EXTRA_LIBGNAT_OBJS+=adamsg.o
1316 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1317 EXTRA_GNATTOOLS = \
1318 ../../gnatlbr$(exeext) \
1319 ../../gnatsym$(exeext) \
1320 ../../vms_help$(exeext) \
1321 ../../gnat.hlp
1322 # This command transforms (YYYYMMDD) into YY,MMDD
1323 GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\).*/\2,\3/')
1324 TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1325 LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1326endif
1327
1328ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1329 LIBGNAT_TARGET_PAIRS = \
1330 a-dirval.adb<a-dirval-mingw.adb \
1331 a-excpol.adb<a-excpol-abort.adb \
1332 a-numaux.adb<a-numaux-x86.adb \
1333 a-numaux.ads<a-numaux-x86.ads \
1334 s-gloloc.adb<s-gloloc-mingw.adb \
1335 s-inmaop.adb<s-inmaop-dummy.adb \
1336 s-memory.adb<s-memory-mingw.adb \
1337 s-taspri.ads<s-taspri-mingw.ads \
1338 s-tasinf.adb<s-tasinf-mingw.adb \
1339 s-tasinf.ads<s-tasinf-mingw.ads \
1340 g-bytswa.adb<g-bytswa-x86.adb \
1341 g-socthi.ads<g-socthi-mingw.ads \
1342 g-socthi.adb<g-socthi-mingw.adb \
1343 g-stsifd.adb<g-stsifd-sockets.adb \
a1ab4c31
AC
1344 g-soliop.ads<g-soliop-mingw.ads
1345
1346 ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
1347 LIBGNAT_TARGET_PAIRS += \
1348 s-intman.adb<s-intman-dummy.adb \
1349 s-osinte.ads<s-osinte-rtx.ads \
1350 s-osprim.adb<s-osprim-rtx.adb \
f921a1cd 1351 s-taprop.adb<s-taprop-rtx.adb
a1ab4c31
AC
1352
1353 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o
1354
f921a1cd
JR
1355 ifeq ($(strip $(filter-out rtx_w32,$(THREAD_KIND))),)
1356 LIBGNAT_TARGET_PAIRS += system.ads<system-rtx.ads
1357
1358 EH_MECHANISM=-gcc
1359 else
d59214bd
JR
1360 LIBGNAT_TARGET_PAIRS += \
1361 system.ads<system-rtx-rtss.ads \
1362 s-parame.adb<s-parame-vxworks.adb
f921a1cd
JR
1363
1364 EH_MECHANISM=
1365 endif
1366
a1ab4c31
AC
1367 else
1368 LIBGNAT_TARGET_PAIRS += \
1369 a-exetim.adb<a-exetim-mingw.adb \
1370 a-exetim.ads<a-exetim-mingw.ads \
1371 a-intnam.ads<a-intnam-mingw.ads \
1372 g-sercom.adb<g-sercom-mingw.adb \
1373 s-interr.adb<s-interr-sigaction.adb \
1374 s-intman.adb<s-intman-mingw.adb \
1375 s-osinte.ads<s-osinte-mingw.ads \
1376 s-osprim.adb<s-osprim-mingw.adb \
b282ab37 1377 s-taprop.adb<s-taprop-mingw.adb
a1ab4c31 1378
b282ab37
AC
1379 ifeq ($(strip $(filter-out x86_64%,$(arch))),)
1380 LIBGNAT_TARGET_PAIRS += \
b282ab37
AC
1381 system.ads<system-mingw-x86_64.ads
1382 else
1383 LIBGNAT_TARGET_PAIRS += \
b282ab37
AC
1384 system.ads<system-mingw.ads
1385 endif
1386
62641193 1387 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o s-winext.o g-regist.o
a1ab4c31
AC
1388 EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
1389
1390 MISCLIB = -lwsock32
1391
1392 # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1393 # auto-import support for array/record will be done.
1394 GNATLIB_SHARED = gnatlib-shared-win32
f921a1cd
JR
1395
1396 EH_MECHANISM=-gcc
a1ab4c31
AC
1397 endif
1398
1399 TOOLS_TARGET_PAIRS= \
1400 mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
1401 indepsw.adb<indepsw-mingw.adb
1402
a1ab4c31
AC
1403 GMEM_LIB = gmemlib
1404 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1405 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1406 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1407 soext = .dll
1408 LIBRARY_VERSION := $(LIB_VERSION)
1409endif
1410
1411ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
1412 LIBGNAT_TARGET_PAIRS = \
1413 a-intnam.ads<a-intnam-linux.ads \
a1ab4c31
AC
1414 s-inmaop.adb<s-inmaop-posix.adb \
1415 s-intman.adb<s-intman-posix.adb \
1416 s-linux.ads<s-linux.ads \
1417 s-osinte.adb<s-osinte-posix.adb \
1418 s-osinte.ads<s-osinte-linux.ads \
1419 s-osprim.adb<s-osprim-posix.adb \
1420 s-taprop.adb<s-taprop-linux.adb \
1421 s-tasinf.ads<s-tasinf-linux.ads \
1422 s-tasinf.adb<s-tasinf-linux.adb \
1423 s-taspri.ads<s-taspri-posix.ads \
1424 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1425 system.ads<system-linux-mips.ads
1426
1427 EH_MECHANISM=-gcc
1428 THREADSLIB = -lpthread
1429 GNATLIB_SHARED = gnatlib-shared-dual
1430 GMEM_LIB = gmemlib
1431 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1432 LIBRARY_VERSION := $(LIB_VERSION)
1433endif
1434
1435ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
1436 LIBGNAT_TARGET_PAIRS = \
1437 a-intnam.ads<a-intnam-linux.ads \
a1ab4c31
AC
1438 s-inmaop.adb<s-inmaop-posix.adb \
1439 s-intman.adb<s-intman-posix.adb \
1440 s-linux.ads<s-linux.ads \
1441 s-osinte.adb<s-osinte-posix.adb \
1442 s-osinte.ads<s-osinte-linux.ads \
1443 s-osprim.adb<s-osprim-posix.adb \
1444 s-taprop.adb<s-taprop-linux.adb \
1445 s-tasinf.ads<s-tasinf-linux.ads \
1446 s-tasinf.adb<s-tasinf-linux.adb \
1447 s-taspri.ads<s-taspri-posix.ads \
1448 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1449 system.ads<system-linux-mipsel.ads
1450
1451 EH_MECHANISM=-gcc
1452 THREADSLIB = -lpthread
1453 GNATLIB_SHARED = gnatlib-shared-dual
1454 GMEM_LIB = gmemlib
1455 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1456 LIBRARY_VERSION := $(LIB_VERSION)
1457endif
1458
1459ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
9e81dbc7 1460 LIBGNAT_TARGET_PAIRS_COMMON = \
a1ab4c31 1461 a-intnam.ads<a-intnam-linux.ads \
a1ab4c31
AC
1462 s-inmaop.adb<s-inmaop-posix.adb \
1463 s-intman.adb<s-intman-posix.adb \
1464 s-linux.ads<s-linux.ads \
1465 s-osinte.adb<s-osinte-posix.adb \
1466 s-osinte.ads<s-osinte-linux.ads \
1467 s-osprim.adb<s-osprim-posix.adb \
1468 s-taprop.adb<s-taprop-linux.adb \
1469 s-tasinf.ads<s-tasinf-linux.ads \
1470 s-tasinf.adb<s-tasinf-linux.adb \
1471 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1472 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
9e81dbc7
AS
1473 g-sercom.adb<g-sercom-linux.adb
1474
1475 LIBGNAT_TARGET_PAIRS_32 = \
a1ab4c31
AC
1476 system.ads<system-linux-ppc.ads
1477
9e81dbc7
AS
1478 LIBGNAT_TARGET_PAIRS_64 = \
1479 system.ads<system-linux-ppc64.ads
1480
1481 ifeq ($(strip $(MULTISUBDIR)),/64)
1482 LIBGNAT_TARGET_PAIRS = \
1483 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1484 else
1485 LIBGNAT_TARGET_PAIRS = \
1486 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1487 endif
1488
a1ab4c31
AC
1489 TOOLS_TARGET_PAIRS = \
1490 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1491 indepsw.adb<indepsw-gnu.adb
1492
1493 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1494 EH_MECHANISM=-gcc
1495 THREADSLIB = -lpthread
1496 GNATLIB_SHARED = gnatlib-shared-dual
1497 GMEM_LIB = gmemlib
1498 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1499 LIBRARY_VERSION := $(LIB_VERSION)
1500endif
1501
1502ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
7193e639 1503 LIBGNAT_TARGET_PAIRS_32 = \
a1ab4c31
AC
1504 a-intnam.ads<a-intnam-linux.ads \
1505 s-inmaop.adb<s-inmaop-posix.adb \
1506 s-intman.adb<s-intman-posix.adb \
1507 s-linux.ads<s-linux.ads \
1508 s-osinte.adb<s-osinte-posix.adb \
1509 s-osinte.ads<s-osinte-linux.ads \
1510 s-osprim.adb<s-osprim-posix.adb \
1511 s-taprop.adb<s-taprop-linux.adb \
1512 s-tasinf.ads<s-tasinf-linux.ads \
1513 s-tasinf.adb<s-tasinf-linux.adb \
1514 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1515 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1516 system.ads<system-linux-sparc.ads
1517
7193e639
LG
1518 LIBGNAT_TARGET_PAIRS_64 = \
1519 a-intnam.ads<a-intnam-linux.ads \
1520 s-inmaop.adb<s-inmaop-posix.adb \
1521 s-intman.adb<s-intman-posix.adb \
1522 s-linux.ads<s-linux.ads \
1523 s-osinte.adb<s-osinte-posix.adb \
1524 s-osinte.ads<s-osinte-linux.ads \
1525 s-osprim.adb<s-osprim-posix.adb \
1526 s-taprop.adb<s-taprop-linux.adb \
1527 s-tasinf.ads<s-tasinf-linux.ads \
1528 s-tasinf.adb<s-tasinf-linux.adb \
1529 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1530 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1531 system.ads<system-linux-sparcv9.ads
1532
1533 ifeq ($(strip $(MULTISUBDIR)),/64)
1534 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
1535 else
1536 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
1537 endif
1538
a1ab4c31
AC
1539 TOOLS_TARGET_PAIRS = \
1540 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1541 indepsw.adb<indepsw-gnu.adb
1542
1543 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1544 EH_MECHANISM=-gcc
1545 THREADSLIB = -lpthread
1546 GNATLIB_SHARED = gnatlib-shared-dual
1547 GMEM_LIB = gmemlib
1548 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1549 LIBRARY_VERSION := $(LIB_VERSION)
1550endif
1551
1552ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1553 LIBGNAT_TARGET_PAIRS = \
1554 a-intnam.ads<a-intnam-linux.ads \
1555 s-inmaop.adb<s-inmaop-posix.adb \
1556 s-intman.adb<s-intman-posix.adb \
1557 s-linux.ads<s-linux-hppa.ads \
1558 s-osinte.adb<s-osinte-posix.adb \
1559 s-osinte.ads<s-osinte-linux.ads \
1560 s-osprim.adb<s-osprim-posix.adb \
1561 s-taprop.adb<s-taprop-linux.adb \
1562 s-tasinf.ads<s-tasinf-linux.ads \
1563 s-tasinf.adb<s-tasinf-linux.adb \
1564 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1565 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1566 system.ads<system-linux-hppa.ads
1567
1568 TOOLS_TARGET_PAIRS = \
1569 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1570 indepsw.adb<indepsw-gnu.adb
1571
1572 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1573 EH_MECHANISM=-gcc
1574 THREADSLIB = -lpthread
1575 GNATLIB_SHARED = gnatlib-shared-dual
1576 GMEM_LIB = gmemlib
1577 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1578 LIBRARY_VERSION := $(LIB_VERSION)
1579endif
1580
1581ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
1582 LIBGNAT_TARGET_PAIRS = \
1583 a-intnam.ads<a-intnam-linux.ads \
1584 s-inmaop.adb<s-inmaop-posix.adb \
1585 s-intman.adb<s-intman-posix.adb \
1586 s-linux.ads<s-linux.ads \
1587 s-osinte.adb<s-osinte-posix.adb \
1588 s-osinte.ads<s-osinte-linux.ads \
1589 s-osprim.adb<s-osprim-posix.adb \
1590 s-taprop.adb<s-taprop-linux.adb \
1591 s-tasinf.ads<s-tasinf-linux.ads \
1592 s-tasinf.adb<s-tasinf-linux.adb \
1593 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1594 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1595 system.ads<system-linux-sh4.ads
1596
1597 TOOLS_TARGET_PAIRS = \
1598 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1599 indepsw.adb<indepsw-linux.adb
1600
1601 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1602 EH_MECHANISM=-gcc
1603 MISCLIB=
1604 THREADSLIB = -lpthread
1605 GNATLIB_SHARED = gnatlib-shared-dual
1606 GMEM_LIB = gmemlib
1607 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1608 LIBRARY_VERSION := $(LIB_VERSION)
1609endif
1610
1611ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1612 LIBGNAT_TARGET_PAIRS = \
1613 a-intnam.ads<a-intnam-linux.ads \
1614 a-numaux.ads<a-numaux-libc-x86.ads \
a1ab4c31
AC
1615 s-inmaop.adb<s-inmaop-posix.adb \
1616 s-intman.adb<s-intman-posix.adb \
1617 s-linux.ads<s-linux.ads \
1618 s-osinte.ads<s-osinte-linux.ads \
1619 s-osinte.adb<s-osinte-posix.adb \
1620 s-osprim.adb<s-osprim-posix.adb \
1621 s-taprop.adb<s-taprop-linux.adb \
1622 s-tasinf.ads<s-tasinf-linux.ads \
1623 s-tasinf.adb<s-tasinf-linux.adb \
1624 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1625 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1626 g-sercom.adb<g-sercom-linux.adb \
1627 system.ads<system-linux-ia64.ads
1628
1629 TOOLS_TARGET_PAIRS = \
1630 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1631 indepsw.adb<indepsw-gnu.adb
1632
1633 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1634 EH_MECHANISM=-gcc
1635 MISCLIB=
1636 THREADSLIB=-lpthread
1637 GNATLIB_SHARED=gnatlib-shared-dual
1638 GMEM_LIB = gmemlib
1639 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1640 LIBRARY_VERSION := $(LIB_VERSION)
1641endif
1642
1643ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
1644 LIBGNAT_TARGET_PAIRS = \
1645 a-intnam.ads<a-intnam-linux.ads \
1646 s-inmaop.adb<s-inmaop-posix.adb \
1647 s-intman.adb<s-intman-posix.adb \
1648 s-linux.ads<s-linux-alpha.ads \
1649 s-osinte.ads<s-osinte-linux.ads \
1650 s-osinte.adb<s-osinte-posix.adb \
1651 s-osprim.adb<s-osprim-posix.adb \
1652 s-taprop.adb<s-taprop-linux.adb \
1653 s-tasinf.ads<s-tasinf-linux.ads \
1654 s-tasinf.adb<s-tasinf-linux.adb \
1655 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1656 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1657 system.ads<system-linux-alpha.ads
1658
1659 TOOLS_TARGET_PAIRS = \
1660 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1661 indepsw.adb<indepsw-gnu.adb
1662
1663 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1664 EH_MECHANISM=-gcc
1665 MISCLIB=
1666 THREADSLIB=-lpthread
1667 GNATLIB_SHARED=gnatlib-shared-dual
1668 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1669 LIBRARY_VERSION := $(LIB_VERSION)
1670endif
1671
1672ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
1673 LIBGNAT_TARGET_PAIRS = \
1674 a-intnam.ads<a-intnam-linux.ads \
1675 a-numaux.adb<a-numaux-x86.adb \
1676 a-numaux.ads<a-numaux-x86.ads \
a1ab4c31
AC
1677 s-inmaop.adb<s-inmaop-posix.adb \
1678 s-intman.adb<s-intman-posix.adb \
1679 s-linux.ads<s-linux.ads \
1680 s-osinte.ads<s-osinte-linux.ads \
1681 s-osinte.adb<s-osinte-posix.adb \
1682 s-osprim.adb<s-osprim-posix.adb \
1683 s-taprop.adb<s-taprop-linux.adb \
1684 s-tasinf.ads<s-tasinf-linux.ads \
1685 s-tasinf.adb<s-tasinf-linux.adb \
1686 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1687 s-taspri.ads<s-taspri-posix.ads \
1688 g-sercom.adb<g-sercom-linux.adb \
1689 system.ads<system-linux-x86_64.ads
1690
1691 TOOLS_TARGET_PAIRS = \
1692 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1693 indepsw.adb<indepsw-gnu.adb
1694
1695 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1696 EH_MECHANISM=-gcc
1697 THREADSLIB=-lpthread
1698 GNATLIB_SHARED=gnatlib-shared-dual
1699 GMEM_LIB = gmemlib
1700 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1701 LIBRARY_VERSION := $(LIB_VERSION)
1702endif
1703
1704ifeq ($(strip $(filter-out darwin%,$(osys))),)
1705 ifeq ($(strip $(filter-out %86,$(arch))),)
1706 LIBGNAT_TARGET_PAIRS = \
1707 a-intnam.ads<a-intnam-darwin.ads \
1708 s-inmaop.adb<s-inmaop-posix.adb \
1709 s-intman.adb<s-intman-posix.adb \
1710 s-osinte.adb<s-osinte-darwin.adb \
1711 s-osinte.ads<s-osinte-darwin.ads \
1712 s-osprim.adb<s-osprim-posix.adb \
1713 s-taprop.adb<s-taprop-posix.adb \
1714 s-taspri.ads<s-taspri-posix.ads \
1715 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
a1ab4c31
AC
1716 a-numaux.ads<a-numaux-x86.ads \
1717 a-numaux.adb<a-numaux-x86.adb \
1718 system.ads<system-darwin-x86.ads
1719 else
1720 LIBGNAT_TARGET_PAIRS = \
1721 a-intnam.ads<a-intnam-darwin.ads \
1722 s-inmaop.adb<s-inmaop-posix.adb \
1723 s-intman.adb<s-intman-posix.adb \
1724 s-osinte.adb<s-osinte-darwin.adb \
1725 s-osinte.ads<s-osinte-darwin.ads \
1726 s-osprim.adb<s-osprim-posix.adb \
1727 s-taprop.adb<s-taprop-posix.adb \
1728 s-taspri.ads<s-taspri-posix.ads \
1729 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
a1ab4c31
AC
1730 a-numaux.ads<a-numaux-darwin.ads \
1731 a-numaux.adb<a-numaux-darwin.adb \
1732 system.ads<system-darwin-ppc.ads
1733 endif
1734
1735 TOOLS_TARGET_PAIRS = \
1736 mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb
1737
1738 EH_MECHANISM=-gcc
1739 GNATLIB_SHARED = gnatlib-shared-darwin
1740 SO_OPTS = -Wl,-flat_namespace -shared-libgcc
1741 RANLIB = ranlib -c
1742 GMEM_LIB = gmemlib
1743 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1744 LIBRARY_VERSION := $(LIB_VERSION)
1745 soext = .dylib
1746endif
1747
1748ifneq ($(EH_MECHANISM),)
1749 LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
1750 EXTRA_LIBGNAT_SRCS+=raise$(EH_MECHANISM).c
1751 EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
1752endif
1753
1754# Use the Ada 2005 version of Ada.Exceptions by default, unless specified
1755# explicitly already. The base files (a-except.ad?) are used only for building
1756# the compiler and other basic tools.
1757# These base versions lack Ada 2005 additions which would cause bootstrap
1758# problems if included in the compiler and other basic tools.
1759
1760ifeq ($(filter-out a-except%,$(LIBGNAT_TARGET_PAIRS)),$(LIBGNAT_TARGET_PAIRS))
1761 LIBGNAT_TARGET_PAIRS += \
1762 a-except.ads<a-except-2005.ads \
1763 a-except.adb<a-except-2005.adb
1764endif
1765
1766# The runtime library for gnat comprises two directories. One contains the
1767# Ada source files that the compiler (gnat1) needs -- these files are listed
1768# by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1769# corresponding .ali files for the parts written in Ada, libgnat.a for
1770# the parts of the runtime written in C, and libgthreads.a for the pthreads
1771# emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1772# while GNATRTL_OBJS lists the object files compiled from Ada sources that
1773# go into the directory. The pthreads emulation is built in the threads
1774# subdirectory and copied.
f921a1cd 1775LIBGNAT_SRCS = adaint.c adaint.h argv.c cio.c cstreams.c \
b666e568 1776 errno.c exit.c cal.c ctrl_c.c env.c env.h arit64.c \
a1ab4c31
AC
1777 raise.h raise.c sysdep.c aux-io.c init.c initialize.c seh_init.c \
1778 final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c expect.c mkdir.c \
1779 socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
1780
1781LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o env.o \
b666e568 1782 raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o arit64.o \
a1ab4c31
AC
1783 final.o tracebak.o expect.o mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
1784
1785# NOTE ??? - when the -I option for compiling Ada code is made to work,
1786# the library installation will change and there will be a
1787# GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1788# from ADA_INCLUDE_SRCS.
1789
1790# GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
1791# the following include file:
1792
1793include $(fsrcdir)/Makefile.rtl
1794
1795GNATRTL_LINEARALGEBRA_OBJS = a-nlcoar.o a-nllcar.o a-nllrar.o a-nlrear.o \
1796 a-nucoar.o a-nurear.o i-forbla.o i-forlap.o s-gearop.o
1797
1798GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
1799 $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
1800
1801# Default run time files
1802
1803ADA_INCLUDE_SRCS =\
1804 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1805 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1806 sequenio.ads system.ads memtrack.adb \
1807 a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
1808 s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
1809
a7dafa20 1810LIBGNAT=../$(RTSDIR)/libgnat.a
a1ab4c31
AC
1811
1812GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
1813
1814# when compiling the tools, the runtime has to be first on the path so that
1815# it hides the runtime files lying with the rest of the sources
1816ifeq ($(TOOLSCASE),native)
a7dafa20
LG
1817 vpath %.ads ../$(RTSDIR) ../
1818 vpath %.adb ../$(RTSDIR) ../
1819 vpath %.c ../$(RTSDIR) ../
1820 vpath %.h ../$(RTSDIR) ../
a1ab4c31
AC
1821endif
1822
1823# in the cross tools case, everything is compiled with the native
1824# gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1825ifeq ($(TOOLSCASE),cross)
1826 vpath %.ads ../
1827 vpath %.adb ../
1828 vpath %.c ../
1829 vpath %.h ../
1830endif
1831
1832common-tools:
1833 $(GNATMAKE) -c -b $(ADA_INCLUDES) \
1834 --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
1835 gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
1836 gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
1837 $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
1838 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1839 $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
1840 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1841 $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
1842 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1843 $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
1844 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1845 $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
1846 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1847 $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
1848 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1849 $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
1850 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1851 $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
1852 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1853 $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
1854 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1855
1856../../gnatsym$(exeext):
1857 $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
1858 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
1859 $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1860
1861../../gnatdll$(exeext):
1862 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1863 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
1864 $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1865
1866../../vxaddr2line$(exeext): targext.o
1867 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
1868 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
1869 $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
1870
1871gnatmake-re: link.o targext.o
1872 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1873 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1874 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
1875 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1876 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1877
1878# Note the use of the "mv" command in order to allow gnatlink to be linked with
1879# with the former version of gnatlink itself which cannot override itself.
1880gnatlink-re: link.o targext.o
1881 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1882 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
1883 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1884 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1885 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
1886
1887# Needs to be built with CC=gcc
1888# Since the RTL should be built with the latest compiler, remove the
1889# stamp target in the parent directory whenever gnat1 is rebuilt
1890
1891# Likewise for the tools
1892../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
1893 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1894 $(TOOLS_LIBS)
1895
1896../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
1897 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1898 $(TOOLS_LIBS)
1899
a7dafa20
LG
1900../stamp-gnatlib-$(RTSDIR):
1901 @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
a1ab4c31
AC
1902 then \
1903 $(ECHO) You must first build the GNAT library: make gnatlib; \
1904 false; \
1905 else \
1906 true; \
1907 fi
1908
a7dafa20 1909install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
a1ab4c31
AC
1910# Create the directory before deleting it, in case the directory is
1911# a list of directories (as it may be on VMS). This ensures we are
1912# deleting the right one.
1913 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1914 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1915 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1916 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1917 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1918 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
a7dafa20 1919 for file in $(RTSDIR)/*.ali; do \
a1ab4c31
AC
1920 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1921 done
a7dafa20
LG
1922 -$(INSTALL_DATA) $(RTSDIR)/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1923 -cd $(RTSDIR); for file in *$(arext);do \
a1ab4c31
AC
1924 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1925 $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
1926 done
1927 -$(foreach file, $(EXTRA_ADALIB_FILES), \
a7dafa20 1928 $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
a1ab4c31
AC
1929 ) true
1930# Install the shared libraries, if any, using $(INSTALL) instead
1931# of $(INSTALL_DATA). The latter may force a mode inappropriate
1932# for shared libraries on some targets, e.g. on HP-UX where the x
1933# permission is required.
1934 for file in gnat gnarl; do \
a7dafa20
LG
1935 if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
1936 $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
a1ab4c31
AC
1937 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1938 fi; \
a7dafa20 1939 if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
a1ab4c31
AC
1940 $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1941 $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
1942 fi; \
1943 done
1944# This copy must be done preserving the date on the original file.
a7dafa20 1945 for file in $(RTSDIR)/*.ad?; do \
a1ab4c31
AC
1946 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
1947 done
1948 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1949 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1950
a7dafa20
LG
1951../stamp-gnatlib2-$(RTSDIR):
1952 $(RM) $(RTSDIR)/s-*.ali
1953 $(RM) $(RTSDIR)/s-*$(objext)
1954 $(RM) $(RTSDIR)/a-*.ali
1955 $(RM) $(RTSDIR)/a-*$(objext)
1956 $(RM) $(RTSDIR)/*.ali
1957 $(RM) $(RTSDIR)/*$(objext)
1958 $(RM) $(RTSDIR)/*$(arext)
1959 $(RM) $(RTSDIR)/*$(soext)
1960 touch ../stamp-gnatlib2-$(RTSDIR)
1961 $(RM) ../stamp-gnatlib-$(RTSDIR)
a1ab4c31
AC
1962
1963# NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1964# successive target commands. Although the Gnu make documentation
1965# implies this is true on all systems, I suspect it may not be, So care
1966# has been taken to allow a sed script to look for ";)" and substitue
1967# for ";" the appropriate character in the range of lines below
1968# beginning with "GNULLI Begin" and ending with "GNULLI End"
1969
1970# GNULLI Begin ###########################################################
1971
a7dafa20
LG
1972../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
1973 $(RMDIR) $(RTSDIR)
1974 $(MKDIR) $(RTSDIR)
1975 $(CHMOD) u+w $(RTSDIR)
a1ab4c31
AC
1976# Copy target independent sources
1977 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
a7dafa20 1978 $(LN_S) $(fsrcpfx)$(f) $(RTSDIR) ;) true
a1ab4c31
AC
1979# Remove files to be replaced by target dependent sources
1980 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
a7dafa20
LG
1981 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
1982 $(RM) $(RTSDIR)/*-*-*.ads $(RTSDIR)/*-*-*.adb
a1ab4c31
AC
1983# Copy new target dependent sources
1984 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1985 $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
a7dafa20 1986 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
2d4d7e29
TQ
1987# Copy generated target dependent sources
1988 $(RM) $(RTSDIR)/s-oscons.ads
15d2e2d4 1989 (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
a7dafa20
LG
1990 $(RM) ../stamp-gnatlib-$(RTSDIR)
1991 touch ../stamp-gnatlib1-$(RTSDIR)
a1ab4c31
AC
1992
1993# GNULLI End #############################################################
1994
1995# Don't use semicolon separated shell commands that involve list expansions.
1996# The semicolon triggers a call to DCL on VMS and DCL can't handle command
1997# line lengths in excess of 256 characters.
a7dafa20 1998# Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
a1ab4c31
AC
1999# is guaranteed to overflow the buffer.
2000
a7dafa20
LG
2001gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
2002 $(MAKE) -C $(RTSDIR) \
a1ab4c31
AC
2003 CC="`echo \"$(GCC_FOR_TARGET)\" \
2004 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2005 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
2006 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
2007 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2008 srcdir=$(fsrcdir) \
2009 -f ../Makefile $(LIBGNAT_OBJS)
a7dafa20 2010 $(MAKE) -C $(RTSDIR) \
a1ab4c31
AC
2011 CC="`echo \"$(GCC_FOR_TARGET)\" \
2012 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2013 ADA_INCLUDES="" \
2014 CFLAGS="$(GNATLIBCFLAGS)" \
2015 ADAFLAGS="$(GNATLIBFLAGS)" \
2016 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2017 srcdir=$(fsrcdir) \
2018 -f ../Makefile \
2019 $(GNATRTL_OBJS)
a7dafa20
LG
2020 $(RM) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnarl$(arext)
2021 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat$(arext) \
2022 $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
a1ab4c31 2023 ifneq ($(PREFIX_OBJS),)
a7dafa20 2024 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgccprefix$(arext) \
a1ab4c31 2025 $(PREFIX_OBJS);
a7dafa20 2026 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgccprefix$(arext)
a1ab4c31 2027 endif
a7dafa20
LG
2028 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat$(arext)
2029 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \
2030 $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
2031 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext)
2032 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnala$(arext) \
2033 $(addprefix $(RTSDIR)/,$(GNATRTL_LINEARALGEBRA_OBJS))
2034 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnala$(arext)
a1ab4c31 2035 ifeq ($(GMEM_LIB),gmemlib)
a7dafa20
LG
2036 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \
2037 $(RTSDIR)/memtrack.o
2038 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
a1ab4c31 2039 endif
a7dafa20
LG
2040 $(CHMOD) a-wx $(RTSDIR)/*.ali
2041 touch ../stamp-gnatlib-$(RTSDIR)
a1ab4c31
AC
2042
2043# Warning: this target assumes that LIBRARY_VERSION has been set correctly.
2044gnatlib-shared-default:
2045 $(MAKE) $(FLAGS_TO_PASS) \
2046 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2047 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
a7dafa20 2048 MULTISUBDIR="$(MULTISUBDIR)" \
a1ab4c31
AC
2049 THREAD_KIND="$(THREAD_KIND)" \
2050 gnatlib
a7dafa20
LG
2051 $(RM) $(RTSDIR)/libgna*$(soext)
2052 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
a1ab4c31
AC
2053 $(TARGET_LIBGCC2_CFLAGS) \
2054 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2055 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2056 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2057 $(MISCLIB) -lm
a7dafa20 2058 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
a1ab4c31
AC
2059 $(TARGET_LIBGCC2_CFLAGS) \
2060 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2061 $(GNATRTL_TASKING_OBJS) \
2062 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2063 $(THREADSLIB)
a7dafa20 2064 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
a1ab4c31 2065 libgnat$(soext)
a7dafa20 2066 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
a1ab4c31
AC
2067 libgnarl$(soext)
2068
2069gnatlib-shared-dual:
2070 $(MAKE) $(FLAGS_TO_PASS) \
2071 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2072 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
a7dafa20 2073 MULTISUBDIR="$(MULTISUBDIR)" \
a1ab4c31
AC
2074 THREAD_KIND="$(THREAD_KIND)" \
2075 gnatlib-shared-default
a7dafa20
LG
2076 $(MV) $(RTSDIR)/libgna*$(soext) .
2077 $(RM) ../stamp-gnatlib2-$(RTSDIR)
a1ab4c31
AC
2078 $(MAKE) $(FLAGS_TO_PASS) \
2079 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2080 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
a7dafa20 2081 MULTISUBDIR="$(MULTISUBDIR)" \
a1ab4c31
AC
2082 THREAD_KIND="$(THREAD_KIND)" \
2083 gnatlib
a7dafa20 2084 $(MV) libgna*$(soext) $(RTSDIR)
a1ab4c31
AC
2085
2086gnatlib-shared-dual-win32:
2087 $(MAKE) $(FLAGS_TO_PASS) \
2088 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2089 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
a7dafa20 2090 MULTISUBDIR="$(MULTISUBDIR)" \
a1ab4c31
AC
2091 THREAD_KIND="$(THREAD_KIND)" \
2092 gnatlib-shared-win32
a7dafa20
LG
2093 $(MV) $(RTSDIR)/libgna*$(soext) .
2094 $(RM) ../stamp-gnatlib2-$(RTSDIR)
a1ab4c31
AC
2095 $(MAKE) $(FLAGS_TO_PASS) \
2096 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2097 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
a7dafa20 2098 MULTISUBDIR="$(MULTISUBDIR)" \
a1ab4c31
AC
2099 THREAD_KIND="$(THREAD_KIND)" \
2100 gnatlib
a7dafa20 2101 $(MV) libgna*$(soext) $(RTSDIR)
a1ab4c31
AC
2102
2103# ??? we need to add the option to support auto-import of arrays/records to
2104# the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
2105# use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
2106# Windows.
2107gnatlib-shared-win32:
2108 $(MAKE) $(FLAGS_TO_PASS) \
2109 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2110 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
a7dafa20 2111 MULTISUBDIR="$(MULTISUBDIR)" \
a1ab4c31
AC
2112 THREAD_KIND="$(THREAD_KIND)" \
2113 gnatlib
a7dafa20
LG
2114 $(RM) $(RTSDIR)/libgna*$(soext)
2115 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
a1ab4c31
AC
2116 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2117 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2118 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
a7dafa20 2119 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
a1ab4c31
AC
2120 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2121 $(GNATRTL_TASKING_OBJS) \
2122 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2123 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2124
2125gnatlib-shared-darwin:
2126 $(MAKE) $(FLAGS_TO_PASS) \
2127 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2128 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
2129 -fno-common" \
a7dafa20 2130 MULTISUBDIR="$(MULTISUBDIR)" \
a1ab4c31
AC
2131 THREAD_KIND="$(THREAD_KIND)" \
2132 gnatlib
a7dafa20
LG
2133 $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
2134 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
a1ab4c31
AC
2135 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2136 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2137 $(SO_OPTS) \
2138 $(MISCLIB) -lm
a7dafa20 2139 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
a1ab4c31
AC
2140 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2141 $(GNATRTL_TASKING_OBJS) \
2142 $(SO_OPTS) \
2143 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
a7dafa20 2144 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
a1ab4c31 2145 libgnat$(soext)
a7dafa20 2146 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
a1ab4c31
AC
2147 libgnarl$(soext)
2148
2149gnatlib-shared-vms:
2150 $(MAKE) $(FLAGS_TO_PASS) \
2151 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2152 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
a7dafa20 2153 MULTISUBDIR="$(MULTISUBDIR)" \
a1ab4c31
AC
2154 THREAD_KIND="$(THREAD_KIND)" \
2155 gnatlib
a7dafa20
LG
2156 $(RM) $(RTSDIR)/libgna*$(soext)
2157 cd $(RTSDIR) && \
a1ab4c31
AC
2158 ../../gnatsym -s SYMVEC_$$$$.opt \
2159 $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \
2160 ../../xgcc -g -B../../ -shared -shared-libgcc \
2161 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
2162 sys\$$library:trace.exe \
2163 --for-linker=/noinform \
2164 --for-linker=SYMVEC_$$$$.opt \
2165 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
a7dafa20 2166 cd $(RTSDIR) && \
a1ab4c31
AC
2167 ../../gnatsym -s SYMVEC_$$$$.opt \
2168 $(GNATRTL_TASKING_OBJS) && \
2169 ../../xgcc -g -B../../ -shared -shared-libgcc \
2170 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2171 libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2172 sys\$$library:trace.exe \
2173 --for-linker=/noinform \
2174 --for-linker=SYMVEC_$$$$.opt \
2175 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2176
2177gnatlib-shared:
2178 $(MAKE) $(FLAGS_TO_PASS) \
2179 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2180 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
a7dafa20 2181 MULTISUBDIR="$(MULTISUBDIR)" \
a1ab4c31
AC
2182 THREAD_KIND="$(THREAD_KIND)" \
2183 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
2184 $(GNATLIB_SHARED)
2185
2186gnatlib-sjlj:
a7dafa20
LG
2187 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1-$(RTSDIR)
2188 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2189 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
a1ab4c31
AC
2190 $(MAKE) $(FLAGS_TO_PASS) \
2191 EH_MECHANISM="" \
2192 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2193 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
a7dafa20 2194 MULTISUBDIR="$(MULTISUBDIR)" \
a1ab4c31
AC
2195 THREAD_KIND="$(THREAD_KIND)" \
2196 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2197
2198gnatlib-zcx:
a7dafa20
LG
2199 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1-$(RTSDIR)
2200 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2201 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
a1ab4c31
AC
2202 $(MAKE) $(FLAGS_TO_PASS) \
2203 EH_MECHANISM="-gcc" \
2204 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2205 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
a7dafa20 2206 MULTISUBDIR="$(MULTISUBDIR)" \
a1ab4c31
AC
2207 THREAD_KIND="$(THREAD_KIND)" \
2208 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2209
2210# .s files for cross-building
2211gnat-cross: force
2212 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
2213
2214# Compiling object files from source files.
2215
2216# Note that dependencies on obstack.h are not written
2217# because that file is not part of GCC.
2218# Dependencies on gvarargs.h are not written
2219# because all that file does, when not compiling with GCC,
2220# is include the system varargs.h.
2221
2222b_gnatl.c : $(GNATLINK_OBJS)
2223 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2224b_gnatl.o : b_gnatl.c
2225
2226b_gnatm.c : $(GNATMAKE_OBJS)
2227 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2228b_gnatm.o : b_gnatm.c
2229
2230ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2231ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2232
2233# force no sibling call optimization on s-traceb.o so the number of stack
2234# frames to be skipped when computing a call chain is not modified by
2235# optimization. However we can do that only when building the runtime
2236# (not the compiler) because the -fno-optimize-sibling-calls option exists
2237# only in GCC 3 and above.
2238
2239ifneq (,$(findstring xgcc,$(CC)))
2240NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2241else
2242NO_SIBLING_ADAFLAGS=
2243endif
2244
2245s-traceb.o : s-traceb.adb
2246 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2247 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2248 $< $(OUTPUT_OPTION)
2249
2250# force debugging information on s-tasdeb.o so that it is always
2251# possible to set conditional breakpoints on tasks.
2252
2253s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
2254 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2255 $< $(OUTPUT_OPTION)
2256
2257# force no function reordering on a-except.o because of the exclusion bounds
2258# mechanism (see the source file for more detailed information). However we
2259# can do that only when building the runtime (not the compiler) because the
2260# -fno-toplevel-reorder option exists only in GCC 4.2 and above.
2261
2262ifneq (,$(findstring xgcc,$(CC)))
2263NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
2264else
2265NO_REORDER_ADAFLAGS=
2266endif
2267
2268# force debugging information on a-except.o so that it is always
2269# possible to set conditional breakpoints on exceptions.
2270# use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2271
2272a-except.o : a-except.adb a-except.ads
2273 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2274 $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2275
2276# compile s-except.o without optimization and with debug info to let the
2277# debugger set breakpoints and inspect subprogram parameters on exception
2278# related events.
2279
2280s-except.o : s-except.adb s-except.ads
2281 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2282 $< $(OUTPUT_OPTION)
2283
2284# force debugging information on s-assert.o so that it is always
2285# possible to set breakpoint on assert failures.
2286
2287s-assert.o : s-assert.adb s-assert.ads a-except.ads
2288 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
2289 $< $(OUTPUT_OPTION)
2290
2291adadecode.o : adadecode.c adadecode.h
2292aux-io.o : aux-io.c
2293argv.o : argv.c
2294cal.o : cal.c
2295deftarg.o : deftarg.c
2296errno.o : errno.c
2297exit.o : adaint.h exit.c
2298expect.o : expect.c
2299final.o : final.c
2300gmem.o : gmem.c
2301link.o : link.c
2302mkdir.o : mkdir.c
2303socket.o : socket.c gsocket.h
2304sysdep.o : sysdep.c
2305raise-gcc.o : raise-gcc.c raise.h
2306raise.o : raise.c raise.h
2307vx_stack_info.o : vx_stack_info.c
2308
a1ab4c31
AC
2309cio.o : cio.c
2310 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
00afcaa0 2311 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
a1ab4c31
AC
2312
2313init.o : init.c adaint.h raise.h
2314 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
00afcaa0 2315 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
a1ab4c31
AC
2316
2317initialize.o : initialize.c raise.h
2318 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
00afcaa0 2319 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
a1ab4c31
AC
2320
2321targext.o : targext.c
2322 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2323 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2324 $< $(OUTPUT_OPTION)
2325
2326# No optimization to compile this file as optimizations (-O1 or above) breaks
2327# the SEH handling on Windows. The reasons are not clear.
2328seh_init.o : seh_init.c raise.h
2329 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) -O0 \
00afcaa0 2330 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
a1ab4c31
AC
2331
2332# Need to keep the frame pointer in this file to pop the stack properly on
2333# some targets.
2334tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
2335 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2336 -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2337
2338# In GNU Make, ignore whether `stage*' exists.
2339.PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2340.PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2341
2342force:
2343
2344# Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
2345
2346../../gnatlbr$(exeext): ../../prefix.o
2347 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2348 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2349 $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2350
2351../../vms_help$(exeext):
2352 $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
2353 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
2354 $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2355
2356../../gnat.hlp: ../../vms_help$(exeext)
2357 ../../vms_help$(exeext) $(fsrcdir)/gnat.help_in \
2358 $(fsrcdir)/vms_data.ads ../../gnat.hlp