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