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