1 # Makefile for GNU Ada Compiler (GNAT).
2 # Copyright (C) 1994-2009 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 3, or (at your option)
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 COPYING3. If not see
18 #<http://www.gnu.org/licenses/>.
20 # The makefile built from this file lives in the language subdirectory.
21 # Its purpose is to provide support for:
23 # 1) recursion where necessary, and only then (building .o's), and
24 # 2) building and debugging cc1 from the language subdirectory, and
27 # The parent makefile handles all other chores, with help from the
28 # language makefile fragment, of course.
30 # The targets for external use are:
31 # all, TAGS, ???mostlyclean, ???clean.
33 # This makefile will only work with Gnu make.
34 # The rules are written assuming a minimum subset of tools are available:
37 # MAKE: Only Gnu make will work.
38 # MV: Must accept (at least) one, maybe wildcard, source argument,
39 # a file or directory destination, and support creation/
40 # modification date preservation. Gnu mv -f works.
41 # RM: Must accept an arbitrary number of space separated file
42 # arguments, or one wildcard argument. Gnu rm works.
43 # RMDIR: Must delete a directory and all its contents. Gnu rm -rf works.
44 # ECHO: Must support command line redirection. Any Unix-like
45 # shell will typically provide this, otherwise a custom version
46 # is trivial to write.
48 # MKDIR: Gnu mkdir works.
49 # CHMOD: Gnu chmod works.
50 # true: Does nothing and returns a normal successful return code.
51 # pwd: Prints the current directory on stdout.
52 # cd: Change directory.
55 # BISON: Gnu bison works.
56 # FLEX: Gnu flex works.
57 # Other miscellaneous tools for obscure targets.
59 # Suppress smart makes who think they know how to automake Yacc files
62 # Variables that exist for you to override.
63 # See below for how to change them for certain systems.
65 # Various ways of specifying flags for compilations:
66 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
67 # BOOT_CFLAGS is the value of CFLAGS to pass
68 # to the stage2 and stage3 compilations
70 BOOT_CFLAGS = -O $(CFLAGS)
71 # These exists to be overridden by the t-* files, respectively.
92 RANLIB_FLAGS = @ranlib_flags@
95 PWD_COMMAND = $${PWDCMD-pwd}
96 # How to copy preserving the date
97 INSTALL_DATA_DATE = cp -p
101 GNATBIND_FLAGS = -static -x
103 ADAFLAGS = -W -Wall -gnatpg -gnata
104 SOME_ADAFLAGS =-gnata
105 FORCE_DEBUG_ADAFLAGS = -g
106 GNATLIBFLAGS = -gnatpg -nostdinc
107 GNATLIBCFLAGS = -g -O2
108 GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
110 ALL_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS)
111 MOST_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(SOME_ADAFLAGS)
116 SYMDEPS = $(LIBINTL_DEP)
117 OUTPUT_OPTION = @OUTPUT_OPTION@
126 # Define this as & to perform parallel make on a Sequent.
127 # Note that this has some bugs, and it seems currently necessary
128 # to compile all the gen* files first by hand to avoid erroneous results.
131 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
133 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
134 GCC_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS)
136 # Tools to use when building a cross-compiler.
137 # These are used because `configure' appends `cross-make'
138 # to the makefile when making a cross-compiler.
140 # We don't use cross-make. Instead we use the tools from the build tree,
141 # if they are available.
142 # program_transform_name and objdir are set by configure.in.
143 program_transform_name =
146 target_alias=@target_alias@
148 xmake_file = @xmake_file@
149 tmake_file = @tmake_file@
150 host_canonical=@host@
151 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
152 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
154 # Directory where sources are, from where we are.
157 fsrcdir := $(shell cd $(srcdir);${PWD_COMMAND})
158 fsrcpfx := $(shell cd $(srcdir);${PWD_COMMAND})/
159 fcurdir := $(shell ${PWD_COMMAND})
160 fcurpfx := $(shell ${PWD_COMMAND})/
162 # Top build directory, relative to here.
165 # Internationalization library.
167 LIBINTL_DEP = @LIBINTL_DEP@
169 # Any system libraries needed just for GNAT.
170 SYSLIBS = @GNAT_LIBEXC@
172 # List of extra object files linked in with various programs.
173 EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o
175 # List of target dependent sources, overridden below as necessary
178 # Type of tools build we are doing; default is not compiling tools.
183 RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
185 # End of variables for you to override.
189 # This tells GNU Make version 3 not to put all variables in the environment.
192 # tmake_file and xmake_file expand to lists with entries of the form
193 # $(srcdir)/config/... but here $(srcdir) is the ada subdirectory so we
194 # need to adjust the paths. There can't be spaces in the subst arguments
195 # or we get spurious spaces in the actual list of files to include.
198 ifneq ($(tmake_file),)
199 include $(subst /config,/../config,$(tmake_file))
203 ifneq ($(xmake_file),)
204 include $(subst /config,/../config,$(xmake_file))
207 # Now figure out from those variables how to compile and link.
209 all.indirect: Makefile ../gnat1$(exeext)
211 # IN_GCC distinguishes between code compiled into GCC itself and other
212 # programs built during a bootstrap.
213 # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a cross
214 # compiler which does not use the native libraries and headers.
215 INTERNAL_CFLAGS = @CROSS@ -DIN_GCC
217 # This is the variable actually used when we compile.
218 LOOSE_CFLAGS = `echo $(CFLAGS) $(WARN2_CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`
219 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS)
222 ALL_CPPFLAGS = $(CPPFLAGS)
224 # This is where we get libiberty.a from.
225 LIBIBERTY = ../../libiberty/libiberty.a
227 # How to link with both our special library facilities
228 # and the system's installed libraries.
229 LIBS = $(LIBINTL) $(LIBIBERTY) $(SYSLIBS)
230 LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY)
231 # Default is no TGT_LIB; one might be passed down or something
233 TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB)
235 # Specify the directories to be searched for header files.
236 # Both . and srcdir are used, in that order,
237 # so that tm.h and config.h will be found in the compilation
238 # subdirectory rather than in the source directory.
239 INCLUDES = -I- -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config \
240 -I$(srcdir)/../../include
242 ADA_INCLUDES = -I- -I. -I$(srcdir)
244 INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir) -I$(fsrcdir)/../config \
245 -I$(fsrcdir)/../../include -I$(fsrcdir)/..
246 ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir) -I$(fsrcdir)/gcc
248 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
251 # Say how to compile Ada programs.
252 .SUFFIXES: .ada .adb .ads .asm
254 # Always use -I$(srcdir)/config when compiling.
256 $(CC) -c -x assembler $< $(OUTPUT_OPTION)
259 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
263 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
266 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
268 # how to regenerate this file
269 Makefile: ../config.status $(srcdir)/gcc-interface/Makefile.in $(srcdir)/Makefile.in $(srcdir)/../version.c
271 LANGUAGES="$(CONFIG_LANGUAGES)" \
273 CONFIG_FILES="ada/gcc-interface/Makefile ada/Makefile" $(SHELL) config.status
275 # This tells GNU make version 3 not to export all the variables
276 # defined in this file into the environment.
279 # Lists of files for various purposes.
281 GNATLINK_OBJS = gnatlink.o \
282 a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \
283 gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \
284 osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
285 sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \
286 types.o validsw.o widechar.o
288 GNATMAKE_OBJS = a-except.o ali.o ali-util.o s-casuti.o \
289 alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\
290 erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
291 gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
292 make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o \
293 mlib-tgt-specific.o mlib-utl.o namet.o nlists.o opt.o osint.o osint-m.o output.o \
294 prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o prj-err.o prj-ext.o prj-nmsc.o \
295 prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \
296 rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
297 scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o \
298 sinfo.o sinput.o sinput-c.o sinput-p.o \
299 snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o switch.o switch-m.o \
300 table.o targparm.o tempdir.o tree_io.o types.o \
301 uintp.o uname.o urealp.o usage.o widechar.o \
302 $(EXTRA_GNATMAKE_OBJS)
304 # Convert the target variable into a space separated list of architecture,
305 # manufacturer, and operating system and assign each of those to its own
308 host:=$(subst -, ,$(host_canonical))
309 targ:=$(subst -, ,$(target))
310 arch:=$(word 1,$(targ))
311 ifeq ($(words $(targ)),2)
313 osys:=$(word 2,$(targ))
315 manu:=$(word 2,$(targ))
316 osys:=$(word 3,$(targ))
319 # Make arch match the current multilib so that the RTS selection code
320 # picks up the right files. For a given target this must be coherent
321 # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
323 ifeq ($(strip $(filter-out %x86_64, $(arch))),)
324 ifeq ($(strip $(MULTISUBDIR)),/32)
329 # ???: handle more multilib targets
331 # LIBGNAT_TARGET_PAIRS is a list of pairs of filenames.
332 # The members of each pair must be separated by a '<' and no whitespace.
333 # Each pair must be separated by some amount of whitespace from the following
338 LIBGNAT_TARGET_PAIRS = \
339 a-intnam.ads<a-intnam-dummy.ads \
340 s-inmaop.adb<s-inmaop-dummy.adb \
341 s-intman.adb<s-intman-dummy.adb \
342 s-osinte.ads<s-osinte-dummy.ads \
343 s-osprim.adb<s-osprim-posix.adb \
344 s-taprop.adb<s-taprop-dummy.adb \
345 s-taspri.ads<s-taspri-dummy.ads
347 # When using the GCC exception handling mechanism, we need to use an
348 # alternate body for a-exexpr.adb (a-exexpr-gcc.adb)
352 # Default shared object option. Note that we rely on the fact that the "soname"
353 # option will always be present and last in this flag, so that we can have
354 # $(SO_OPTS)libgnat-x.xx
356 SO_OPTS = -Wl,-soname,
358 # Default gnatlib-shared target.
359 # By default, equivalent to gnatlib.
360 # Set to gnatlib-shared-default, gnatlib-shared-dual, or a platform specific
361 # target when supported.
362 GNATLIB_SHARED = gnatlib
364 # default value for gnatmake's target dependent file
367 # By default, do not distribute prefix.o (in libgccprefix), since it is only
368 # needed by external GNAT tools such as gnatdist and Glide.
369 # Override this variable on native platforms when needed.
372 # To avoid duplicate code, use this variable to set PREFIX_OBJS when needed:
373 PREFIX_REAL_OBJS = ../prefix.o \
374 ../../libiberty/concat.o \
375 ../../libiberty/xmalloc.o \
376 ../../libiberty/xstrdup.o \
377 ../../libiberty/xexit.o
379 # By default, build socket support units. On platforms that do not support
380 # sockets, reset this variable to empty and add DUMMY_SOCKETS_TARGET_PAIRS
381 # to LIBGNAT_TARGET_PAIRS.
383 GNATRTL_SOCKETS_OBJS = g-soccon$(objext) g-socket$(objext) g-socthi$(objext) \
384 g-soliop$(objext) g-sothco$(objext) g-sttsne$(objext)
386 DUMMY_SOCKETS_TARGET_PAIRS = \
387 g-socket.adb<g-socket-dummy.adb \
388 g-socket.ads<g-socket-dummy.ads \
389 g-socthi.adb<g-socthi-dummy.adb \
390 g-socthi.ads<g-socthi-dummy.ads \
391 g-sothco.adb<g-sothco-dummy.adb \
392 g-sothco.ads<g-sothco-dummy.ads \
393 g-sttsne.ads<g-sttsne-dummy.ads
395 LIB_VERSION = $(strip $(shell grep ' Library_Version :' $(fsrcpfx)gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/'))
397 # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
398 # $(strip STRING) removes leading and trailing spaces from STRING.
399 # If what's left is null then it's a match.
401 ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
402 LIBGNAT_TARGET_PAIRS = \
403 a-intnam.ads<a-intnam-vxworks.ads \
404 a-numaux.ads<a-numaux-vxworks.ads \
405 s-inmaop.adb<s-inmaop-posix.adb \
406 s-interr.adb<s-interr-hwint.adb \
407 s-intman.ads<s-intman-vxworks.ads \
408 s-intman.adb<s-intman-vxworks.adb \
409 s-osinte.adb<s-osinte-vxworks-kernel.adb \
410 s-osinte.ads<s-osinte-vxworks.ads \
411 s-osprim.adb<s-osprim-vxworks.adb \
412 s-parame.ads<s-parame-vxworks.ads \
413 s-parame.adb<s-parame-vxworks.adb \
414 s-stchop.ads<s-stchop-limit.ads \
415 s-stchop.adb<s-stchop-vxworks.adb \
416 s-taprop.adb<s-taprop-vxworks.adb \
417 s-taspri.ads<s-taspri-vxworks.ads \
418 s-tpopsp.adb<s-tpopsp-vxworks.adb \
419 s-vxwork.ads<s-vxwork-m68k.ads \
420 g-socthi.ads<g-socthi-vxworks.ads \
421 g-socthi.adb<g-socthi-vxworks.adb \
422 g-stsifd.adb<g-stsifd-sockets.adb \
423 g-sttsne.adb<g-sttsne-vxworks.adb \
424 g-sttsne.ads<g-sttsne-locking.ads \
425 system.ads<system-vxworks-m68k.ads
427 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
429 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
430 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
432 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
433 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
435 ifeq ($(strip $(filter-out yes,$(TRACE))),)
436 LIBGNAT_TARGET_PAIRS += \
437 s-traces.adb<s-traces-default.adb \
438 s-tratas.adb<s-tratas-default.adb \
439 s-trafor.adb<s-trafor-default.adb \
440 s-trafor.ads<s-trafor-default.ads \
441 s-tfsetr.adb<s-tfsetr-vxworks.adb
445 ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
446 LIBGNAT_TARGET_PAIRS = \
447 a-intnam.ads<a-intnam-vxworks.ads \
448 a-numaux.ads<a-numaux-vxworks.ads \
449 s-inmaop.adb<s-inmaop-posix.adb \
450 s-intman.ads<s-intman-vxworks.ads \
451 s-intman.adb<s-intman-vxworks.adb \
452 s-osprim.adb<s-osprim-vxworks.adb \
453 s-parame.ads<s-parame-vxworks.ads \
454 s-parame.adb<s-parame-vxworks.adb \
455 s-stchop.ads<s-stchop-limit.ads \
456 s-stchop.adb<s-stchop-vxworks.adb \
457 s-taprop.adb<s-taprop-vxworks.adb \
458 s-taspri.ads<s-taspri-vxworks.ads \
459 s-vxwork.ads<s-vxwork-ppc.ads \
460 g-socthi.ads<g-socthi-vxworks.ads \
461 g-socthi.adb<g-socthi-vxworks.adb \
462 g-stsifd.adb<g-stsifd-sockets.adb \
463 g-sttsne.adb<g-sttsne-vxworks.adb \
464 g-sttsne.ads<g-sttsne-locking.ads
466 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
468 ifeq ($(strip $(filter-out yes,$(TRACE))),)
469 LIBGNAT_TARGET_PAIRS += \
470 s-traces.adb<s-traces-default.adb \
471 s-trafor.adb<s-trafor-default.adb \
472 s-trafor.ads<s-trafor-default.ads \
473 s-tratas.adb<s-tratas-default.adb \
474 s-tfsetr.adb<s-tfsetr-vxworks.adb
477 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
478 LIBGNAT_TARGET_PAIRS += \
479 s-osinte.adb<s-osinte-vxworks-rtp.adb \
480 s-osinte.ads<s-osinte-vxworks6.ads \
481 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
482 system.ads<system-vxworks-ppc-rtp.ads
484 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
486 LIBGNAT_TARGET_PAIRS += \
487 s-interr.adb<s-interr-hwint.adb \
488 s-tpopsp.adb<s-tpopsp-vxworks.adb \
489 system.ads<system-vxworks-ppc.ads
491 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
492 LIBGNAT_TARGET_PAIRS += \
493 s-osinte.ads<s-osinte-vxworks6.ads \
494 s-osinte.adb<s-osinte-vxworks-kernel.adb
496 LIBGNAT_TARGET_PAIRS += \
497 s-osinte.ads<s-osinte-vxworks.ads \
498 s-osinte.adb<s-osinte-vxworks.adb
501 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
504 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
506 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
507 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
510 # vxworksae / vxworks 653
511 ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(targ))),)
512 # target pairs for kernel + vthreads runtime
513 LIBGNAT_TARGET_PAIRS = \
514 a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
515 a-intnam.ads<a-intnam-vxworks.ads \
516 a-numaux.ads<a-numaux-vxworks.ads \
517 g-io.adb<g-io-vxworks-ppc-cert.adb \
518 g-io.ads<g-io-vxworks-ppc-cert.ads \
519 s-inmaop.adb<s-inmaop-posix.adb \
520 s-interr.adb<s-interr-hwint.adb \
521 s-intman.ads<s-intman-vxworks.ads \
522 s-intman.adb<s-intman-vxworks.adb \
523 s-osinte.adb<s-osinte-vxworks-kernel.adb \
524 s-osinte.ads<s-osinte-vxworks.ads \
525 s-osprim.adb<s-osprim-vxworks.adb \
526 s-parame.ads<s-parame-ae653.ads \
527 s-parame.adb<s-parame-vxworks.adb \
528 s-taprop.adb<s-taprop-vxworks.adb \
529 s-taspri.ads<s-taspri-vxworks.ads \
530 s-tpopsp.adb<s-tpopsp-vxworks.adb \
531 s-vxwork.ads<s-vxwork-ppc.ads \
532 g-socthi.ads<g-socthi-vxworks.ads \
533 g-socthi.adb<g-socthi-vxworks.adb \
534 g-stsifd.adb<g-stsifd-sockets.adb \
535 g-sttsne.adb<g-sttsne-vxworks.adb \
536 g-sttsne.ads<g-sttsne-locking.ads \
537 system.ads<system-vxworks-ppc-vthread.ads
539 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
541 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
542 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
544 # Extra pairs for the vthreads runtime
545 ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
546 LIBGNAT_TARGET_PAIRS += \
547 s-thread.adb<s-thread-ae653.adb
548 EXTRA_GNATRTL_NONTASKING_OBJS += s-thread.o
551 ifeq ($(strip $(filter-out yes,$(TRACE))),)
552 LIBGNAT_TARGET_PAIRS += \
553 s-traces.adb<s-traces-default.adb \
554 s-trafor.adb<s-trafor-default.adb \
555 s-trafor.ads<s-trafor-default.ads \
556 s-tratas.adb<s-tratas-default.adb \
557 s-tfsetr.adb<s-tfsetr-vxworks.adb
561 ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
562 LIBGNAT_TARGET_PAIRS = \
563 a-intnam.ads<a-intnam-vxworks.ads \
564 a-numaux.ads<a-numaux-vxworks.ads \
565 s-inmaop.adb<s-inmaop-posix.adb \
566 s-interr.adb<s-interr-hwint.adb \
567 s-intman.ads<s-intman-vxworks.ads \
568 s-intman.adb<s-intman-vxworks.adb \
569 s-osinte.adb<s-osinte-vxworks-kernel.adb \
570 s-osinte.ads<s-osinte-vxworks.ads \
571 s-osprim.adb<s-osprim-vxworks.adb \
572 s-parame.ads<s-parame-vxworks.ads \
573 s-parame.adb<s-parame-vxworks.adb \
574 s-stchop.ads<s-stchop-limit.ads \
575 s-stchop.adb<s-stchop-vxworks.adb \
576 s-taprop.adb<s-taprop-vxworks.adb \
577 s-taspri.ads<s-taspri-vxworks.ads \
578 s-tpopsp.adb<s-tpopsp-vxworks.adb \
579 s-vxwork.ads<s-vxwork-sparcv9.ads \
580 g-socthi.ads<g-socthi-vxworks.ads \
581 g-socthi.adb<g-socthi-vxworks.adb \
582 g-stsifd.adb<g-stsifd-sockets.adb \
583 g-sttsne.adb<g-sttsne-vxworks.adb \
584 g-sttsne.ads<g-sttsne-locking.ads \
585 system.ads<system-vxworks-sparcv9.ads \
587 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
589 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
590 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
592 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
593 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
596 ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
597 LIBGNAT_TARGET_PAIRS = \
598 a-intnam.ads<a-intnam-vxworks.ads \
599 i-vxwork.ads<i-vxwork-x86.ads \
600 s-inmaop.adb<s-inmaop-posix.adb \
601 s-intman.ads<s-intman-vxworks.ads \
602 s-intman.adb<s-intman-vxworks.adb \
603 a-numaux.adb<a-numaux-x86.adb \
604 a-numaux.ads<a-numaux-x86.ads \
605 s-osprim.adb<s-osprim-vxworks.adb \
606 s-parame.ads<s-parame-vxworks.ads \
607 s-parame.adb<s-parame-vxworks.adb \
608 s-stchop.ads<s-stchop-limit.ads \
609 s-stchop.adb<s-stchop-vxworks.adb \
610 s-taprop.adb<s-taprop-vxworks.adb \
611 s-taspri.ads<s-taspri-vxworks.ads \
612 s-vxwork.ads<s-vxwork-x86.ads \
613 g-bytswa.adb<g-bytswa-x86.adb \
614 g-socthi.ads<g-socthi-vxworks.ads \
615 g-socthi.adb<g-socthi-vxworks.adb \
616 g-stsifd.adb<g-stsifd-sockets.adb \
617 g-sttsne.adb<g-sttsne-vxworks.adb \
618 g-sttsne.ads<g-sttsne-locking.ads
620 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
622 ifeq ($(strip $(filter-out yes,$(TRACE))),)
623 LIBGNAT_TARGET_PAIRS += \
624 s-traces.adb<s-traces-default.adb \
625 s-trafor.adb<s-trafor-default.adb \
626 s-trafor.ads<s-trafor-default.ads \
627 s-tratas.adb<s-tratas-default.adb \
628 s-tfsetr.adb<s-tfsetr-vxworks.adb
631 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
632 LIBGNAT_TARGET_PAIRS += \
633 s-osinte.adb<s-osinte-vxworks-rtp.adb \
634 s-osinte.ads<s-osinte-vxworks6.ads \
635 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
636 system.ads<system-vxworks-x86-rtp.ads
638 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
640 LIBGNAT_TARGET_PAIRS += \
641 s-interr.adb<s-interr-hwint.adb \
642 s-tpopsp.adb<s-tpopsp-vxworks.adb \
643 system.ads<system-vxworks-x86.ads
645 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
646 LIBGNAT_TARGET_PAIRS += \
647 s-osinte.ads<s-osinte-vxworks6.ads \
648 s-osinte.adb<s-osinte-vxworks-kernel.adb
650 LIBGNAT_TARGET_PAIRS += \
651 s-osinte.ads<s-osinte-vxworks.ads \
652 s-osinte.adb<s-osinte-vxworks.adb
655 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
658 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
660 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
661 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
664 ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
665 LIBGNAT_TARGET_PAIRS = \
666 a-intnam.ads<a-intnam-vxworks.ads \
667 a-numaux.ads<a-numaux-vxworks.ads \
668 s-inmaop.adb<s-inmaop-posix.adb \
669 s-interr.adb<s-interr-hwint.adb \
670 s-intman.ads<s-intman-vxworks.ads \
671 s-intman.adb<s-intman-vxworks.adb \
672 s-osinte.adb<s-osinte-vxworks-kernel.adb \
673 s-osinte.ads<s-osinte-vxworks.ads \
674 s-osprim.adb<s-osprim-vxworks.adb \
675 s-parame.ads<s-parame-vxworks.ads \
676 s-parame.adb<s-parame-vxworks.adb \
677 s-stchop.ads<s-stchop-limit.ads \
678 s-stchop.adb<s-stchop-vxworks.adb \
679 s-taprop.adb<s-taprop-vxworks.adb \
680 s-taspri.ads<s-taspri-vxworks.ads \
681 s-tpopsp.adb<s-tpopsp-vxworks.adb \
682 s-vxwork.ads<s-vxwork-arm.ads \
683 g-socthi.ads<g-socthi-vxworks.ads \
684 g-socthi.adb<g-socthi-vxworks.adb \
685 g-stsifd.adb<g-stsifd-sockets.adb \
686 g-sttsne.adb<g-sttsne-vxworks.adb \
687 g-sttsne.ads<g-sttsne-locking.ads \
688 system.ads<system-vxworks-arm.ads
690 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
692 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
693 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
695 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
696 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
699 ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
700 LIBGNAT_TARGET_PAIRS = \
701 a-intnam.ads<a-intnam-vxworks.ads \
702 a-numaux.ads<a-numaux-vxworks.ads \
703 s-inmaop.adb<s-inmaop-posix.adb \
704 s-interr.adb<s-interr-hwint.adb \
705 s-intman.ads<s-intman-vxworks.ads \
706 s-intman.adb<s-intman-vxworks.adb \
707 s-osinte.adb<s-osinte-vxworks-kernel.adb \
708 s-osinte.ads<s-osinte-vxworks.ads \
709 s-osprim.adb<s-osprim-vxworks.adb \
710 s-parame.ads<s-parame-vxworks.ads \
711 s-parame.adb<s-parame-vxworks.adb \
712 s-stchop.ads<s-stchop-limit.ads \
713 s-stchop.adb<s-stchop-vxworks.adb \
714 s-taprop.adb<s-taprop-vxworks.adb \
715 s-taspri.ads<s-taspri-vxworks.ads \
716 s-tpopsp.adb<s-tpopsp-vxworks.adb \
717 s-vxwork.ads<s-vxwork-mips.ads \
718 g-socthi.ads<g-socthi-vxworks.ads \
719 g-socthi.adb<g-socthi-vxworks.adb \
720 g-stsifd.adb<g-stsifd-sockets.adb \
721 g-sttsne.adb<g-sttsne-vxworks.adb \
722 g-sttsne.ads<g-sttsne-locking.ads \
723 system.ads<system-vxworks-mips.ads
725 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
727 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
728 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
730 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
731 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
734 ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
735 LIBGNAT_TARGET_PAIRS_COMMON = \
736 a-intnam.ads<a-intnam-solaris.ads \
737 s-inmaop.adb<s-inmaop-posix.adb \
738 s-intman.adb<s-intman-solaris.adb \
739 s-osinte.adb<s-osinte-solaris.adb \
740 s-osinte.ads<s-osinte-solaris.ads \
741 s-osprim.adb<s-osprim-solaris.adb \
742 s-taprop.adb<s-taprop-solaris.adb \
743 s-tasinf.adb<s-tasinf-solaris.adb \
744 s-tasinf.ads<s-tasinf-solaris.ads \
745 s-taspri.ads<s-taspri-solaris.ads \
746 s-tpopsp.adb<s-tpopsp-solaris.adb \
747 g-soliop.ads<g-soliop-solaris.ads
749 LIBGNAT_TARGET_PAIRS_32 = \
750 system.ads<system-solaris-sparc.ads
752 LIBGNAT_TARGET_PAIRS_64 = \
753 system.ads<system-solaris-sparcv9.ads
755 ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
756 ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
757 LIBGNAT_TARGET_PAIRS = \
758 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
760 LIBGNAT_TARGET_PAIRS = \
761 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
764 ifeq ($(strip $(MULTISUBDIR)),/sparcv7)
765 LIBGNAT_TARGET_PAIRS = \
766 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
768 LIBGNAT_TARGET_PAIRS = \
769 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
773 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
776 THREADSLIB = -lposix4 -lthread
777 MISCLIB = -lposix4 -lnsl -lsocket
779 GNATLIB_SHARED = gnatlib-shared-dual
781 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
782 LIBRARY_VERSION := $(LIB_VERSION)
784 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
785 LIBGNAT_TARGET_PAIRS = \
786 a-intnam.ads<a-intnam-solaris.ads \
787 s-inmaop.adb<s-inmaop-posix.adb \
788 s-intman.adb<s-intman-posix.adb \
789 s-osinte.adb<s-osinte-posix.adb \
790 s-osinte.ads<s-osinte-solaris-posix.ads \
791 s-osprim.adb<s-osprim-solaris.adb \
792 s-taprop.adb<s-taprop-posix.adb \
793 s-taspri.ads<s-taspri-posix.ads \
794 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
795 g-soliop.ads<g-soliop-solaris.ads \
796 system.ads<system-solaris-sparc.ads
798 THREADSLIB = -lposix4 -lpthread
801 ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),)
802 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
806 ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
807 LIBGNAT_TARGET_PAIRS = \
808 a-numaux.adb<a-numaux-x86.adb \
809 a-numaux.ads<a-numaux-x86.ads \
810 a-intnam.ads<a-intnam-solaris.ads \
811 s-inmaop.adb<s-inmaop-posix.adb \
812 s-intman.adb<s-intman-solaris.adb \
813 s-osinte.adb<s-osinte-solaris.adb \
814 s-osinte.ads<s-osinte-solaris.ads \
815 s-osprim.adb<s-osprim-solaris.adb \
816 s-taprop.adb<s-taprop-solaris.adb \
817 s-tasinf.adb<s-tasinf-solaris.adb \
818 s-tasinf.ads<s-tasinf-solaris.ads \
819 s-taspri.ads<s-taspri-solaris.ads \
820 s-tpopsp.adb<s-tpopsp-solaris.adb \
821 g-soliop.ads<g-soliop-solaris.ads
823 ifeq ($(strip $(MULTISUBDIR)),/amd64)
824 LIBGNAT_TARGET_PAIRS += \
825 system.ads<system-solaris-x86_64.ads
827 LIBGNAT_TARGET_PAIRS += \
828 g-bytswa.adb<g-bytswa-x86.adb \
829 system.ads<system-solaris-x86.ads
832 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
835 THREADSLIB = -lposix4 -lthread
836 MISCLIB = -lposix4 -lnsl -lsocket
838 GNATLIB_SHARED = gnatlib-shared-dual
840 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
841 LIBRARY_VERSION := $(LIB_VERSION)
844 ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
845 LIBGNAT_TARGET_PAIRS = \
846 a-intnam.ads<a-intnam-linux.ads \
847 a-numaux.adb<a-numaux-x86.adb \
848 a-numaux.ads<a-numaux-x86.ads \
849 g-bytswa.adb<g-bytswa-x86.adb \
850 s-inmaop.adb<s-inmaop-posix.adb \
851 s-intman.adb<s-intman-posix.adb \
852 s-osprim.adb<s-osprim-posix.adb \
853 s-taspri.ads<s-taspri-posix.ads \
854 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
855 g-sercom.adb<g-sercom-linux.adb \
856 system.ads<system-linux-x86.ads
858 ifeq ($(strip $(filter-out marte,$(THREAD_KIND))),)
859 LIBGNAT_TARGET_PAIRS += \
860 a-exetim.adb<a-exetim-linux-marte.adb \
861 a-exetim.ads<a-exetim-linux-marte.ads \
862 a-extiti.adb<a-extiti-linux-marte.adb \
863 a-extiti.ads<a-extiti-linux-marte.ads \
864 a-rttiev.adb<a-rttiev-linux-marte.adb \
865 a-rttiev.ads<a-rttiev-linux-marte.ads \
866 s-osinte.adb<s-osinte-linux-marte.adb \
867 s-osinte.ads<s-osinte-linux-marte.ads \
868 s-taprop.adb<s-taprop-linux-marte.adb
870 EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o a-extiti.o
875 LIBGNAT_TARGET_PAIRS += \
876 s-linux.ads<s-linux.ads \
877 s-osinte.adb<s-osinte-posix.adb
879 ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
880 LIBGNAT_TARGET_PAIRS += \
881 s-osinte.ads<s-osinte-linux-xenomai.ads \
882 s-taprop.adb<s-taprop-linux-xenomai.adb
886 LIBGNAT_TARGET_PAIRS += \
887 s-osinte.ads<s-osinte-linux.ads \
888 s-taprop.adb<s-taprop-linux.adb \
889 s-tasinf.ads<s-tasinf-linux.ads \
890 s-tasinf.adb<s-tasinf-linux.adb
895 THREADSLIB = -lpthread
896 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
899 TOOLS_TARGET_PAIRS = \
900 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
901 indepsw.adb<indepsw-gnu.adb
903 GNATLIB_SHARED = gnatlib-shared-dual
905 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
906 LIBRARY_VERSION := $(LIB_VERSION)
909 ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
910 LIBGNAT_TARGET_PAIRS = \
911 a-intnam.ads<a-intnam-freebsd.ads \
912 a-numaux.adb<a-numaux-x86.adb \
913 a-numaux.ads<a-numaux-x86.ads \
914 s-inmaop.adb<s-inmaop-posix.adb \
915 s-intman.adb<s-intman-posix.adb \
916 s-osinte.adb<s-osinte-posix.adb \
917 s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
918 s-osprim.adb<s-osprim-posix.adb \
919 s-taprop.adb<s-taprop-linux.adb \
920 s-tasinf.ads<s-tasinf-linux.ads \
921 s-tasinf.adb<s-tasinf-linux.adb \
922 s-taspri.ads<s-taspri-posix.ads \
923 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
924 system.ads<system-freebsd-x86.ads
926 TOOLS_TARGET_PAIRS = \
927 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
928 indepsw.adb<indepsw-gnu.adb
931 THREADSLIB = -lpthread
932 GNATLIB_SHARED = gnatlib-shared-dual
934 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
935 LIBRARY_VERSION := $(LIB_VERSION)
938 ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
939 LIBGNAT_TARGET_PAIRS = \
940 a-intnam.ads<a-intnam-freebsd.ads \
941 a-numaux.adb<a-numaux-x86.adb \
942 a-numaux.ads<a-numaux-x86.ads \
943 g-bytswa.adb<g-bytswa-x86.adb \
944 s-inmaop.adb<s-inmaop-posix.adb \
945 s-intman.adb<s-intman-posix.adb \
946 s-osinte.adb<s-osinte-freebsd.adb \
947 s-osinte.ads<s-osinte-freebsd.ads \
948 s-osprim.adb<s-osprim-posix.adb \
949 s-taprop.adb<s-taprop-posix.adb \
950 s-taspri.ads<s-taspri-posix.ads \
951 s-tpopsp.adb<s-tpopsp-posix.adb \
952 system.ads<system-freebsd-x86.ads
954 TOOLS_TARGET_PAIRS = \
955 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
956 GNATLIB_SHARED = gnatlib-shared-dual
959 THREADSLIB= -lpthread
961 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
962 LIBRARY_VERSION := $(LIB_VERSION)
965 ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
966 LIBGNAT_TARGET_PAIRS_COMMON = \
967 a-intnam.ads<a-intnam-linux.ads \
968 s-inmaop.adb<s-inmaop-posix.adb \
969 s-intman.adb<s-intman-posix.adb \
970 s-linux.ads<s-linux.ads \
971 s-osinte.adb<s-osinte-posix.adb \
972 s-osinte.ads<s-osinte-linux.ads \
973 s-osprim.adb<s-osprim-posix.adb \
974 s-taprop.adb<s-taprop-linux.adb \
975 s-tasinf.ads<s-tasinf-linux.ads \
976 s-tasinf.adb<s-tasinf-linux.adb \
977 s-taspri.ads<s-taspri-posix-noaltstack.ads \
978 s-tpopsp.adb<s-tpopsp-posix-foreign.adb
980 LIBGNAT_TARGET_PAIRS_32 = \
981 system.ads<system-linux-s390.ads
983 LIBGNAT_TARGET_PAIRS_64 = \
984 system.ads<system-linux-s390x.ads
986 ifeq ($(strip $(filter-out s390x,$(arch))),)
987 ifeq ($(strip $(MULTISUBDIR)),/32)
988 LIBGNAT_TARGET_PAIRS = \
989 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
991 LIBGNAT_TARGET_PAIRS = \
992 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
995 LIBGNAT_TARGET_PAIRS = \
996 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
999 TOOLS_TARGET_PAIRS = \
1000 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
1002 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1004 THREADSLIB = -lpthread
1005 GNATLIB_SHARED = gnatlib-shared-dual
1006 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1007 LIBRARY_VERSION := $(LIB_VERSION)
1010 ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
1011 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
1012 LIBGNAT_TARGET_PAIRS = \
1013 a-intnam.ads<a-intnam-irix.ads \
1014 s-inmaop.adb<s-inmaop-posix.adb \
1015 s-intman.adb<s-intman-irix.adb \
1016 s-mastop.adb<s-mastop-irix.adb \
1017 s-osinte.adb<s-osinte-irix.adb \
1018 s-osinte.ads<s-osinte-irix.ads \
1019 s-osprim.adb<s-osprim-posix.adb \
1020 s-proinf.adb<s-proinf-irix-athread.adb \
1021 s-proinf.ads<s-proinf-irix-athread.ads \
1022 s-taprop.adb<s-taprop-irix.adb \
1023 s-tasinf.ads<s-tasinf-irix.ads \
1024 s-taspri.ads<s-taspri-posix.ads \
1025 s-tpopsp.adb<s-tpopsp-posix.adb \
1026 s-traceb.adb<s-traceb-mastop.adb
1028 ifeq ($(strip $(MULTISUBDIR)),/64)
1029 LIBGNAT_TARGET_PAIRS += \
1030 system.ads<system-irix-n64.ads
1032 ifeq ($(strip $(MULTISUBDIR)),/32)
1033 LIBGNAT_TARGET_PAIRS += \
1034 system.ads<system-irix-o32.ads
1036 LIBGNAT_TARGET_PAIRS += \
1037 system.ads<system-irix-n32.ads
1041 THREADSLIB = -lpthread
1042 GNATLIB_SHARED = gnatlib-shared-default
1045 LIBGNAT_TARGET_PAIRS += \
1046 s-mastop.adb<s-mastop-irix.adb \
1047 s-osprim.adb<s-osprim-posix.adb \
1048 s-traceb.adb<s-traceb-mastop.adb \
1049 system.ads<system-irix-o32.ads
1053 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-irix.adb
1056 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1057 LIBRARY_VERSION := $(LIB_VERSION)
1061 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
1062 LIBGNAT_TARGET_PAIRS = \
1063 a-excpol.adb<a-excpol-abort.adb \
1064 a-intnam.ads<a-intnam-hpux.ads \
1065 s-inmaop.adb<s-inmaop-posix.adb \
1066 s-interr.adb<s-interr-sigaction.adb \
1067 s-intman.adb<s-intman-posix.adb \
1068 s-osinte.adb<s-osinte-hpux-dce.adb \
1069 s-osinte.ads<s-osinte-hpux-dce.ads \
1070 s-parame.ads<s-parame-hpux.ads \
1071 s-osprim.adb<s-osprim-posix.adb \
1072 s-taprop.adb<s-taprop-hpux-dce.adb \
1073 s-taspri.ads<s-taspri-hpux-dce.ads \
1074 s-tpopsp.adb<s-tpopsp-posix.adb \
1075 system.ads<system-hpux.ads
1078 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1081 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
1082 LIBGNAT_TARGET_PAIRS = \
1083 a-intnam.ads<a-intnam-hpux.ads \
1084 s-inmaop.adb<s-inmaop-posix.adb \
1085 s-intman.adb<s-intman-posix.adb \
1086 s-osinte.adb<s-osinte-posix.adb \
1087 s-osinte.ads<s-osinte-hpux.ads \
1088 s-parame.ads<s-parame-hpux.ads \
1089 s-osprim.adb<s-osprim-posix.adb \
1090 s-traceb.adb<s-traceb-hpux.adb \
1091 s-taprop.adb<s-taprop-posix.adb \
1092 s-taspri.ads<s-taspri-posix.ads \
1093 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1094 system.ads<system-hpux.ads
1096 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb
1098 TGT_LIB = /usr/lib/libcl.a
1099 THREADSLIB = -lpthread
1103 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1104 GNATLIB_SHARED = gnatlib-shared-dual
1105 LIBRARY_VERSION := $(LIB_VERSION)
1108 ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
1109 LIBGNAT_TARGET_PAIRS = \
1110 a-intnam.ads<a-intnam-aix.ads \
1111 s-inmaop.adb<s-inmaop-posix.adb \
1112 s-intman.adb<s-intman-posix.adb \
1113 s-osinte.adb<s-osinte-aix.adb \
1114 s-osinte.ads<s-osinte-aix.ads \
1115 s-osprim.adb<s-osprim-posix.adb \
1116 s-taprop.adb<s-taprop-posix.adb \
1117 s-taspri.ads<s-taspri-posix.ads \
1118 s-tpopsp.adb<s-tpopsp-posix.adb \
1119 system.ads<system-aix.ads
1121 THREADSLIB = -lpthreads
1122 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1124 TOOLS_TARGET_PAIRS = \
1125 mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
1126 indepsw.adb<indepsw-aix.adb
1131 ifeq ($(strip $(filter-out lynxos,$(osys))),)
1132 TOOLS_TARGET_PAIRS = \
1133 mlib-tgt-specific.adb<mlib-tgt-specific-lynxos.adb \
1134 indepsw.adb<indepsw-gnu.adb
1136 ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
1137 LIBGNAT_TARGET_PAIRS = \
1138 a-numaux.adb<a-numaux-x86.adb \
1139 a-numaux.ads<a-numaux-x86.ads \
1140 a-intnam.ads<a-intnam-lynxos.ads \
1141 g-bytswa.adb<g-bytswa-x86.adb \
1142 g-sttsne.adb<g-sttsne-locking.adb \
1143 g-sttsne.ads<g-sttsne-locking.ads \
1144 s-inmaop.adb<s-inmaop-posix.adb \
1145 s-intman.adb<s-intman-posix.adb \
1146 s-osinte.adb<s-osinte-lynxos.adb \
1147 s-osinte.ads<s-osinte-lynxos.ads \
1148 s-osprim.adb<s-osprim-posix.adb \
1149 s-taprop.adb<s-taprop-lynxos.adb \
1150 s-taspri.ads<s-taspri-lynxos.ads \
1151 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1152 system.ads<system-lynxos-x86.ads
1154 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1157 LIBGNAT_TARGET_PAIRS = \
1158 a-intnam.ads<a-intnam-lynxos.ads \
1159 g-sttsne.adb<g-sttsne-locking.adb \
1160 g-sttsne.ads<g-sttsne-locking.ads \
1161 s-inmaop.adb<s-inmaop-posix.adb \
1162 s-intman.adb<s-intman-posix.adb \
1163 s-osinte.adb<s-osinte-lynxos.adb \
1164 s-osinte.ads<s-osinte-lynxos.ads \
1165 s-osprim.adb<s-osprim-posix.adb \
1166 s-taprop.adb<s-taprop-lynxos.adb \
1167 s-taspri.ads<s-taspri-lynxos.ads \
1168 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1169 system.ads<system-lynxos-ppc.ads
1173 ifeq ($(strip $(filter-out rtems%,$(osys))),)
1174 LIBGNAT_TARGET_PAIRS = \
1175 system.ads<system-rtems.ads \
1176 a-intnam.ads<a-intnam-rtems.ads \
1177 s-inmaop.adb<s-inmaop-posix.adb \
1178 s-intman.adb<s-intman-posix.adb \
1179 s-osinte.adb<s-osinte-rtems.adb \
1180 s-osinte.ads<s-osinte-rtems.ads \
1181 s-osprim.adb<s-osprim-posix.adb \
1182 s-parame.adb<s-parame-rtems.adb \
1183 s-taprop.adb<s-taprop-posix.adb \
1184 s-taspri.ads<s-taspri-posix.ads \
1185 s-tpopsp.adb<s-tpopsp-rtems.adb \
1186 s-stchop.adb<s-stchop-rtems.adb \
1187 s-interr.adb<s-interr-hwint.adb
1190 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
1191 LIBGNAT_TARGET_PAIRS = \
1192 a-intnam.ads<a-intnam-tru64.ads \
1193 s-inmaop.adb<s-inmaop-posix.adb \
1194 s-intman.adb<s-intman-posix.adb \
1195 s-mastop.adb<s-mastop-tru64.adb \
1196 s-osinte.adb<s-osinte-tru64.adb \
1197 s-osinte.ads<s-osinte-tru64.ads \
1198 s-osprim.adb<s-osprim-unix.adb \
1199 s-taprop.adb<s-taprop-tru64.adb \
1200 s-tasinf.ads<s-tasinf-tru64.ads \
1201 s-taspri.ads<s-taspri-tru64.ads \
1202 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1203 s-traceb.adb<s-traceb-mastop.adb \
1204 system.ads<system-tru64.ads
1206 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb
1210 THREADSLIB = -lpthread -lmach -lexc -lrt
1211 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1212 GNATLIB_SHARED = gnatlib-shared-default
1213 LIBRARY_VERSION := $(LIB_VERSION)
1216 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
1226 @ gnu:[bin]vmssymvec $<
1229 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1230 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1231 LIBGNAT_TARGET_PAIRS_AUX1 = \
1232 g-enblsp.adb<g-enblsp-vms-ia64.adb \
1233 g-trasym.adb<g-trasym-vms-ia64.adb \
1234 s-asthan.adb<s-asthan-vms-ia64.adb \
1235 s-osinte.adb<s-osinte-vms-ia64.adb \
1236 s-osinte.ads<s-osinte-vms-ia64.ads \
1237 s-vaflop.adb<s-vaflop-vms-ia64.adb \
1238 system.ads<system-vms-ia64.ads
1240 LIBGNAT_TARGET_PAIRS_AUX2 = \
1241 s-parame.ads<s-parame-vms-ia64.ads
1243 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1244 LIBGNAT_TARGET_PAIRS_AUX1 = \
1245 g-enblsp.adb<g-enblsp-vms-alpha.adb \
1246 g-trasym.adb<g-trasym-vms-alpha.adb \
1247 s-traent.adb<s-traent-vms.adb \
1248 s-traent.ads<s-traent-vms.ads \
1249 s-asthan.adb<s-asthan-vms-alpha.adb \
1250 s-osinte.adb<s-osinte-vms.adb \
1251 s-osinte.ads<s-osinte-vms.ads \
1252 s-vaflop.adb<s-vaflop-vms-alpha.adb \
1253 system.ads<system-vms_64.ads
1255 ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1256 LIBGNAT_TARGET_PAIRS_AUX2 = \
1257 s-parame.ads<s-parame-vms-restrict.ads
1259 LIBGNAT_TARGET_PAIRS_AUX2 = \
1260 s-parame.ads<s-parame-vms-alpha.ads
1265 LIBGNAT_TARGET_PAIRS = \
1266 a-caldel.adb<a-caldel-vms.adb \
1267 a-calend.adb<a-calend-vms.adb \
1268 a-calend.ads<a-calend-vms.ads \
1269 a-dirval.adb<a-dirval-vms.adb \
1270 a-excpol.adb<a-excpol-abort.adb \
1271 a-intnam.ads<a-intnam-vms.ads \
1272 a-numaux.ads<a-numaux-vms.ads \
1273 g-expect.adb<g-expect-vms.adb \
1274 g-socthi.ads<g-socthi-vms.ads \
1275 g-socthi.adb<g-socthi-vms.adb \
1276 g-stsifd.adb<g-stsifd-sockets.adb \
1277 g-sttsne.adb<g-sttsne-locking.adb \
1278 g-sttsne.ads<g-sttsne-locking.ads \
1279 i-c.ads<i-c-vms_64.ads \
1280 i-cstrin.ads<i-cstrin-vms_64.ads \
1281 i-cstrin.adb<i-cstrin-vms_64.adb \
1282 i-cpoint.ads<i-cpoint-vms_64.ads \
1283 i-cpoint.adb<i-cpoint-vms_64.adb \
1284 i-cstrea.adb<i-cstrea-vms.adb \
1285 memtrack.adb<memtrack-vms_64.adb \
1286 s-auxdec.ads<s-auxdec-vms_64.ads \
1287 s-crtl.ads<s-crtl-vms_64.ads \
1288 s-inmaop.adb<s-inmaop-vms.adb \
1289 s-interr.adb<s-interr-vms.adb \
1290 s-intman.adb<s-intman-vms.adb \
1291 s-intman.ads<s-intman-vms.ads \
1292 s-memory.adb<s-memory-vms_64.adb \
1293 s-memory.ads<s-memory-vms_64.ads \
1294 s-osprim.adb<s-osprim-vms.adb \
1295 s-osprim.ads<s-osprim-vms.ads \
1296 s-taprop.adb<s-taprop-vms.adb \
1297 s-taspri.ads<s-taspri-vms.ads \
1298 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1299 s-tpopde.adb<s-tpopde-vms.adb \
1300 s-tpopde.ads<s-tpopde-vms.ads \
1301 $(LIBGNAT_TARGET_PAIRS_AUX1) \
1302 $(LIBGNAT_TARGET_PAIRS_AUX2)
1304 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1305 TOOLS_TARGET_PAIRS= \
1306 mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
1307 symbols.adb<symbols-vms.adb \
1308 symbols-processing.adb<symbols-processing-vms-ia64.adb
1310 TOOLS_TARGET_PAIRS= \
1311 mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
1312 symbols.adb<symbols-vms.adb \
1313 symbols-processing.adb<symbols-processing-vms-alpha.adb
1316 adamsg.o: adamsg.msg
1317 -$(DECC) --cc=message adamsg.msg -o adamsg.o
1319 EXTRA_GNATMAKE_OBJS = mlib-tgt-vms_common.o
1323 GNATLIB_SHARED=gnatlib-shared-vms
1324 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1325 EXTRA_LIBGNAT_SRCS=vmshandler.asm
1326 EXTRA_LIBGNAT_OBJS=vmshandler.o
1328 EXTRA_LIBGNAT_SRCS+=adamsg.msg
1329 EXTRA_LIBGNAT_OBJS+=adamsg.o
1330 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1332 ../../gnatlbr$(exeext) \
1333 ../../gnatsym$(exeext) \
1334 ../../vms_help$(exeext) \
1336 # This command transforms (YYYYMMDD) into YY,MMDD
1337 GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\).*/\2,\3/')
1338 TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1339 LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1342 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1343 LIBGNAT_TARGET_PAIRS = \
1344 a-dirval.adb<a-dirval-mingw.adb \
1345 a-excpol.adb<a-excpol-abort.adb \
1346 a-numaux.adb<a-numaux-x86.adb \
1347 a-numaux.ads<a-numaux-x86.ads \
1348 s-gloloc.adb<s-gloloc-mingw.adb \
1349 s-inmaop.adb<s-inmaop-dummy.adb \
1350 s-memory.adb<s-memory-mingw.adb \
1351 s-taspri.ads<s-taspri-mingw.ads \
1352 s-tasinf.adb<s-tasinf-mingw.adb \
1353 s-tasinf.ads<s-tasinf-mingw.ads \
1354 g-bytswa.adb<g-bytswa-x86.adb \
1355 g-socthi.ads<g-socthi-mingw.ads \
1356 g-socthi.adb<g-socthi-mingw.adb \
1357 g-stsifd.adb<g-stsifd-sockets.adb \
1358 g-soliop.ads<g-soliop-mingw.ads
1360 ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
1361 LIBGNAT_TARGET_PAIRS += \
1362 s-intman.adb<s-intman-dummy.adb \
1363 s-osinte.ads<s-osinte-rtx.ads \
1364 s-osprim.adb<s-osprim-rtx.adb \
1365 s-taprop.adb<s-taprop-rtx.adb
1367 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o
1369 ifeq ($(strip $(filter-out rtx_w32,$(THREAD_KIND))),)
1370 LIBGNAT_TARGET_PAIRS += system.ads<system-rtx.ads
1374 LIBGNAT_TARGET_PAIRS += \
1375 system.ads<system-rtx-rtss.ads \
1376 s-parame.adb<s-parame-vxworks.adb
1382 LIBGNAT_TARGET_PAIRS += \
1383 a-exetim.adb<a-exetim-mingw.adb \
1384 a-exetim.ads<a-exetim-mingw.ads \
1385 a-intnam.ads<a-intnam-mingw.ads \
1386 g-sercom.adb<g-sercom-mingw.adb \
1387 s-interr.adb<s-interr-sigaction.adb \
1388 s-intman.adb<s-intman-mingw.adb \
1389 s-osinte.ads<s-osinte-mingw.ads \
1390 s-osprim.adb<s-osprim-mingw.adb \
1391 s-taprop.adb<s-taprop-mingw.adb
1393 ifeq ($(strip $(filter-out x86_64%,$(arch))),)
1394 LIBGNAT_TARGET_PAIRS += \
1395 system.ads<system-mingw-x86_64.ads
1397 LIBGNAT_TARGET_PAIRS += \
1398 system.ads<system-mingw.ads
1401 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o s-winext.o g-regist.o
1402 EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
1406 # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1407 # auto-import support for array/record will be done.
1408 GNATLIB_SHARED = gnatlib-shared-win32
1413 TOOLS_TARGET_PAIRS= \
1414 mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
1415 indepsw.adb<indepsw-mingw.adb
1418 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1419 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1420 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1422 LIBRARY_VERSION := $(LIB_VERSION)
1425 ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
1426 LIBGNAT_TARGET_PAIRS = \
1427 a-intnam.ads<a-intnam-linux.ads \
1428 s-inmaop.adb<s-inmaop-posix.adb \
1429 s-intman.adb<s-intman-posix.adb \
1430 s-linux.ads<s-linux.ads \
1431 s-osinte.adb<s-osinte-posix.adb \
1432 s-osinte.ads<s-osinte-linux.ads \
1433 s-osprim.adb<s-osprim-posix.adb \
1434 s-taprop.adb<s-taprop-linux.adb \
1435 s-tasinf.ads<s-tasinf-linux.ads \
1436 s-tasinf.adb<s-tasinf-linux.adb \
1437 s-taspri.ads<s-taspri-posix.ads \
1438 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1439 system.ads<system-linux-mips.ads
1442 THREADSLIB = -lpthread
1443 GNATLIB_SHARED = gnatlib-shared-dual
1445 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1446 LIBRARY_VERSION := $(LIB_VERSION)
1449 ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
1450 LIBGNAT_TARGET_PAIRS = \
1451 a-intnam.ads<a-intnam-linux.ads \
1452 s-inmaop.adb<s-inmaop-posix.adb \
1453 s-intman.adb<s-intman-posix.adb \
1454 s-linux.ads<s-linux.ads \
1455 s-osinte.adb<s-osinte-posix.adb \
1456 s-osinte.ads<s-osinte-linux.ads \
1457 s-osprim.adb<s-osprim-posix.adb \
1458 s-taprop.adb<s-taprop-linux.adb \
1459 s-tasinf.ads<s-tasinf-linux.ads \
1460 s-tasinf.adb<s-tasinf-linux.adb \
1461 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1462 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1463 g-sercom.adb<g-sercom-linux.adb \
1464 system.ads<system-linux-mipsel.ads
1466 TOOLS_TARGET_PAIRS = \
1467 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1468 indepsw.adb<indepsw-gnu.adb
1470 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1472 THREADSLIB = -lpthread
1473 GNATLIB_SHARED = gnatlib-shared-dual
1475 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1476 LIBRARY_VERSION := $(LIB_VERSION)
1479 ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
1480 LIBGNAT_TARGET_PAIRS_COMMON = \
1481 a-intnam.ads<a-intnam-linux.ads \
1482 s-inmaop.adb<s-inmaop-posix.adb \
1483 s-intman.adb<s-intman-posix.adb \
1484 s-linux.ads<s-linux.ads \
1485 s-osinte.adb<s-osinte-posix.adb \
1486 s-osinte.ads<s-osinte-linux.ads \
1487 s-osprim.adb<s-osprim-posix.adb \
1488 s-taprop.adb<s-taprop-linux.adb \
1489 s-tasinf.ads<s-tasinf-linux.ads \
1490 s-tasinf.adb<s-tasinf-linux.adb \
1491 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1492 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1493 g-sercom.adb<g-sercom-linux.adb
1495 LIBGNAT_TARGET_PAIRS_32 = \
1496 system.ads<system-linux-ppc.ads
1498 LIBGNAT_TARGET_PAIRS_64 = \
1499 system.ads<system-linux-ppc64.ads
1501 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1502 LIBGNAT_TARGET_PAIRS = \
1503 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1505 LIBGNAT_TARGET_PAIRS = \
1506 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1509 TOOLS_TARGET_PAIRS = \
1510 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1511 indepsw.adb<indepsw-gnu.adb
1513 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1515 THREADSLIB = -lpthread
1516 GNATLIB_SHARED = gnatlib-shared-dual
1518 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1519 LIBRARY_VERSION := $(LIB_VERSION)
1522 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
1523 LIBGNAT_TARGET_PAIRS_COMMON = \
1524 a-intnam.ads<a-intnam-linux.ads \
1525 s-inmaop.adb<s-inmaop-posix.adb \
1526 s-intman.adb<s-intman-posix.adb \
1527 s-linux.ads<s-linux.ads \
1528 s-osinte.adb<s-osinte-posix.adb \
1529 s-osinte.ads<s-osinte-linux.ads \
1530 s-osprim.adb<s-osprim-posix.adb \
1531 s-taprop.adb<s-taprop-linux.adb \
1532 s-tasinf.ads<s-tasinf-linux.ads \
1533 s-tasinf.adb<s-tasinf-linux.adb \
1534 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1535 s-tpopsp.adb<s-tpopsp-posix-foreign.adb
1537 LIBGNAT_TARGET_PAIRS_32 = \
1538 system.ads<system-linux-sparc.ads
1540 LIBGNAT_TARGET_PAIRS_64 = \
1541 system.ads<system-linux-sparcv9.ads
1543 ifeq ($(strip $(MULTISUBDIR)),/64)
1544 LIBGNAT_TARGET_PAIRS = \
1545 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1547 LIBGNAT_TARGET_PAIRS = \
1548 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1551 TOOLS_TARGET_PAIRS = \
1552 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1553 indepsw.adb<indepsw-gnu.adb
1555 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1557 THREADSLIB = -lpthread
1558 GNATLIB_SHARED = gnatlib-shared-dual
1560 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1561 LIBRARY_VERSION := $(LIB_VERSION)
1564 ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1565 LIBGNAT_TARGET_PAIRS = \
1566 a-intnam.ads<a-intnam-linux.ads \
1567 s-inmaop.adb<s-inmaop-posix.adb \
1568 s-intman.adb<s-intman-posix.adb \
1569 s-linux.ads<s-linux-hppa.ads \
1570 s-osinte.adb<s-osinte-posix.adb \
1571 s-osinte.ads<s-osinte-linux.ads \
1572 s-osprim.adb<s-osprim-posix.adb \
1573 s-taprop.adb<s-taprop-linux.adb \
1574 s-tasinf.ads<s-tasinf-linux.ads \
1575 s-tasinf.adb<s-tasinf-linux.adb \
1576 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1577 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1578 system.ads<system-linux-hppa.ads
1580 TOOLS_TARGET_PAIRS = \
1581 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1582 indepsw.adb<indepsw-gnu.adb
1584 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1586 THREADSLIB = -lpthread
1587 GNATLIB_SHARED = gnatlib-shared-dual
1589 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1590 LIBRARY_VERSION := $(LIB_VERSION)
1593 ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
1594 LIBGNAT_TARGET_PAIRS = \
1595 a-intnam.ads<a-intnam-linux.ads \
1596 s-inmaop.adb<s-inmaop-posix.adb \
1597 s-intman.adb<s-intman-posix.adb \
1598 s-linux.ads<s-linux.ads \
1599 s-osinte.adb<s-osinte-posix.adb \
1600 s-osinte.ads<s-osinte-linux.ads \
1601 s-osprim.adb<s-osprim-posix.adb \
1602 s-taprop.adb<s-taprop-linux.adb \
1603 s-tasinf.ads<s-tasinf-linux.ads \
1604 s-tasinf.adb<s-tasinf-linux.adb \
1605 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1606 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1607 system.ads<system-linux-sh4.ads
1609 TOOLS_TARGET_PAIRS = \
1610 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1611 indepsw.adb<indepsw-linux.adb
1613 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1616 THREADSLIB = -lpthread
1617 GNATLIB_SHARED = gnatlib-shared-dual
1619 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1620 LIBRARY_VERSION := $(LIB_VERSION)
1623 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1624 LIBGNAT_TARGET_PAIRS = \
1625 a-intnam.ads<a-intnam-linux.ads \
1626 a-numaux.ads<a-numaux-libc-x86.ads \
1627 s-inmaop.adb<s-inmaop-posix.adb \
1628 s-intman.adb<s-intman-posix.adb \
1629 s-linux.ads<s-linux.ads \
1630 s-osinte.ads<s-osinte-linux.ads \
1631 s-osinte.adb<s-osinte-posix.adb \
1632 s-osprim.adb<s-osprim-posix.adb \
1633 s-taprop.adb<s-taprop-linux.adb \
1634 s-tasinf.ads<s-tasinf-linux.ads \
1635 s-tasinf.adb<s-tasinf-linux.adb \
1636 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1637 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1638 g-sercom.adb<g-sercom-linux.adb \
1639 system.ads<system-linux-ia64.ads
1641 TOOLS_TARGET_PAIRS = \
1642 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1643 indepsw.adb<indepsw-gnu.adb
1645 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1648 THREADSLIB=-lpthread
1649 GNATLIB_SHARED=gnatlib-shared-dual
1651 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1652 LIBRARY_VERSION := $(LIB_VERSION)
1655 ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
1656 LIBGNAT_TARGET_PAIRS = \
1657 a-intnam.ads<a-intnam-linux.ads \
1658 s-inmaop.adb<s-inmaop-posix.adb \
1659 s-intman.adb<s-intman-posix.adb \
1660 s-linux.ads<s-linux-alpha.ads \
1661 s-osinte.ads<s-osinte-linux.ads \
1662 s-osinte.adb<s-osinte-posix.adb \
1663 s-osprim.adb<s-osprim-posix.adb \
1664 s-taprop.adb<s-taprop-linux.adb \
1665 s-tasinf.ads<s-tasinf-linux.ads \
1666 s-tasinf.adb<s-tasinf-linux.adb \
1667 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1668 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1669 system.ads<system-linux-alpha.ads
1671 TOOLS_TARGET_PAIRS = \
1672 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1673 indepsw.adb<indepsw-gnu.adb
1675 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1678 THREADSLIB=-lpthread
1679 GNATLIB_SHARED=gnatlib-shared-dual
1680 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1681 LIBRARY_VERSION := $(LIB_VERSION)
1684 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
1685 LIBGNAT_TARGET_PAIRS = \
1686 a-intnam.ads<a-intnam-linux.ads \
1687 a-numaux.adb<a-numaux-x86.adb \
1688 a-numaux.ads<a-numaux-x86.ads \
1689 s-inmaop.adb<s-inmaop-posix.adb \
1690 s-intman.adb<s-intman-posix.adb \
1691 s-linux.ads<s-linux.ads \
1692 s-osinte.ads<s-osinte-linux.ads \
1693 s-osinte.adb<s-osinte-posix.adb \
1694 s-osprim.adb<s-osprim-posix.adb \
1695 s-taprop.adb<s-taprop-linux.adb \
1696 s-tasinf.ads<s-tasinf-linux.ads \
1697 s-tasinf.adb<s-tasinf-linux.adb \
1698 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1699 s-taspri.ads<s-taspri-posix.ads \
1700 g-sercom.adb<g-sercom-linux.adb \
1701 system.ads<system-linux-x86_64.ads
1703 TOOLS_TARGET_PAIRS = \
1704 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1705 indepsw.adb<indepsw-gnu.adb
1707 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1709 THREADSLIB=-lpthread
1710 GNATLIB_SHARED=gnatlib-shared-dual
1712 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1713 LIBRARY_VERSION := $(LIB_VERSION)
1716 ifeq ($(strip $(filter-out darwin%,$(osys))),)
1717 ifeq ($(strip $(filter-out %86,$(arch))),)
1718 LIBGNAT_TARGET_PAIRS = \
1719 a-intnam.ads<a-intnam-darwin.ads \
1720 s-inmaop.adb<s-inmaop-posix.adb \
1721 s-intman.adb<s-intman-posix.adb \
1722 s-osinte.adb<s-osinte-darwin.adb \
1723 s-osinte.ads<s-osinte-darwin.ads \
1724 s-osprim.adb<s-osprim-posix.adb \
1725 s-taprop.adb<s-taprop-posix.adb \
1726 s-taspri.ads<s-taspri-posix.ads \
1727 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1728 a-numaux.ads<a-numaux-x86.ads \
1729 a-numaux.adb<a-numaux-x86.adb
1730 ifeq ($(strip $(MULTISUBDIR)),/x86_64)
1731 LIBGNAT_TARGET_PAIRS += \
1732 system.ads<system-darwin-x86_64.ads
1734 LIBGNAT_TARGET_PAIRS += \
1735 system.ads<system-darwin-x86.ads
1738 LIBGNAT_TARGET_PAIRS = \
1739 a-intnam.ads<a-intnam-darwin.ads \
1740 s-inmaop.adb<s-inmaop-posix.adb \
1741 s-intman.adb<s-intman-posix.adb \
1742 s-osinte.adb<s-osinte-darwin.adb \
1743 s-osinte.ads<s-osinte-darwin.ads \
1744 s-osprim.adb<s-osprim-posix.adb \
1745 s-taprop.adb<s-taprop-posix.adb \
1746 s-taspri.ads<s-taspri-posix.ads \
1747 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1748 a-numaux.ads<a-numaux-darwin.ads \
1749 a-numaux.adb<a-numaux-darwin.adb \
1750 system.ads<system-darwin-ppc.ads
1753 TOOLS_TARGET_PAIRS = \
1754 mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb
1757 GNATLIB_SHARED = gnatlib-shared-darwin
1758 SO_OPTS = -Wl,-flat_namespace -shared-libgcc
1761 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1762 LIBRARY_VERSION := $(LIB_VERSION)
1766 ifneq ($(EH_MECHANISM),)
1767 LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
1768 EXTRA_LIBGNAT_SRCS+=raise$(EH_MECHANISM).c
1769 EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
1772 # Use the Ada 2005 version of Ada.Exceptions by default, unless specified
1773 # explicitly already. The base files (a-except.ad?) are used only for building
1774 # the compiler and other basic tools.
1775 # These base versions lack Ada 2005 additions which would cause bootstrap
1776 # problems if included in the compiler and other basic tools.
1778 ifeq ($(filter-out a-except%,$(LIBGNAT_TARGET_PAIRS)),$(LIBGNAT_TARGET_PAIRS))
1779 LIBGNAT_TARGET_PAIRS += \
1780 a-except.ads<a-except-2005.ads \
1781 a-except.adb<a-except-2005.adb
1784 # The runtime library for gnat comprises two directories. One contains the
1785 # Ada source files that the compiler (gnat1) needs -- these files are listed
1786 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1787 # corresponding .ali files for the parts written in Ada, libgnat.a for
1788 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1789 # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1790 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1791 # go into the directory. The pthreads emulation is built in the threads
1792 # subdirectory and copied.
1793 LIBGNAT_SRCS = adaint.c adaint.h argv.c cio.c cstreams.c \
1794 errno.c exit.c cal.c ctrl_c.c env.c env.h arit64.c \
1795 raise.h raise.c sysdep.c aux-io.c init.c initialize.c seh_init.c \
1796 final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c expect.c mkdir.c \
1797 socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
1799 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o env.o \
1800 raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o arit64.o \
1801 final.o tracebak.o expect.o mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
1803 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1804 # the library installation will change and there will be a
1805 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1806 # from ADA_INCLUDE_SRCS.
1808 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
1809 # the following include file:
1811 include $(fsrcdir)/Makefile.rtl
1813 GNATRTL_LINEARALGEBRA_OBJS = a-nlcoar.o a-nllcar.o a-nllrar.o a-nlrear.o \
1814 a-nucoar.o a-nurear.o i-forbla.o i-forlap.o s-gearop.o
1816 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
1817 $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
1819 # Default run time files
1822 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1823 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1824 sequenio.ads system.ads memtrack.adb \
1825 a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
1826 s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
1828 LIBGNAT=../$(RTSDIR)/libgnat.a
1830 GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
1832 # when compiling the tools, the runtime has to be first on the path so that
1833 # it hides the runtime files lying with the rest of the sources
1834 ifeq ($(TOOLSCASE),native)
1835 vpath %.ads ../$(RTSDIR) ../
1836 vpath %.adb ../$(RTSDIR) ../
1837 vpath %.c ../$(RTSDIR) ../
1838 vpath %.h ../$(RTSDIR) ../
1841 # in the cross tools case, everything is compiled with the native
1842 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1843 ifeq ($(TOOLSCASE),cross)
1851 $(GNATMAKE) -c -b $(ADA_INCLUDES) \
1852 --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
1853 gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
1854 gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
1855 $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
1856 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1857 $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
1858 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1859 $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
1860 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1861 $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
1862 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1863 $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
1864 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1865 $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
1866 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1867 $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
1868 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1869 $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
1870 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1871 $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
1872 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1874 ../../gnatsym$(exeext):
1875 $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
1876 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
1877 $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1879 ../../gnatdll$(exeext):
1880 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1881 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
1882 $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1884 ../../vxaddr2line$(exeext): targext.o
1885 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
1886 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
1887 $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
1889 gnatmake-re: link.o targext.o
1890 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1891 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1892 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
1893 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1894 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1896 # Note the use of the "mv" command in order to allow gnatlink to be linked with
1897 # with the former version of gnatlink itself which cannot override itself.
1898 gnatlink-re: link.o targext.o
1899 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1900 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
1901 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1902 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1903 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
1905 # Needs to be built with CC=gcc
1906 # Since the RTL should be built with the latest compiler, remove the
1907 # stamp target in the parent directory whenever gnat1 is rebuilt
1909 # Likewise for the tools
1910 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
1911 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1914 ../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
1915 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1918 ../stamp-gnatlib-$(RTSDIR):
1919 @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
1921 $(ECHO) You must first build the GNAT library: make gnatlib; \
1927 install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
1928 # Create the directory before deleting it, in case the directory is
1929 # a list of directories (as it may be on VMS). This ensures we are
1930 # deleting the right one.
1931 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1932 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1933 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1934 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1935 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1936 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1937 for file in $(RTSDIR)/*.ali; do \
1938 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1940 -$(INSTALL_DATA) $(RTSDIR)/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1941 -cd $(RTSDIR); for file in *$(arext);do \
1942 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1943 $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
1945 -$(foreach file, $(EXTRA_ADALIB_FILES), \
1946 $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
1948 # Install the shared libraries, if any, using $(INSTALL) instead
1949 # of $(INSTALL_DATA). The latter may force a mode inappropriate
1950 # for shared libraries on some targets, e.g. on HP-UX where the x
1951 # permission is required.
1952 for file in gnat gnarl; do \
1953 if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
1954 $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1955 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1957 if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
1958 $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1959 $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
1962 # This copy must be done preserving the date on the original file.
1963 for file in $(RTSDIR)/*.ad?; do \
1964 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
1966 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1967 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1969 ../stamp-gnatlib2-$(RTSDIR):
1970 $(RM) $(RTSDIR)/s-*.ali
1971 $(RM) $(RTSDIR)/s-*$(objext)
1972 $(RM) $(RTSDIR)/a-*.ali
1973 $(RM) $(RTSDIR)/a-*$(objext)
1974 $(RM) $(RTSDIR)/*.ali
1975 $(RM) $(RTSDIR)/*$(objext)
1976 $(RM) $(RTSDIR)/*$(arext)
1977 $(RM) $(RTSDIR)/*$(soext)
1978 touch ../stamp-gnatlib2-$(RTSDIR)
1979 $(RM) ../stamp-gnatlib-$(RTSDIR)
1981 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1982 # successive target commands. Although the Gnu make documentation
1983 # implies this is true on all systems, I suspect it may not be, So care
1984 # has been taken to allow a sed script to look for ";)" and substitue
1985 # for ";" the appropriate character in the range of lines below
1986 # beginning with "GNULLI Begin" and ending with "GNULLI End"
1988 # GNULLI Begin ###########################################################
1990 ../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
1993 $(CHMOD) u+w $(RTSDIR)
1994 # Copy target independent sources
1995 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
1996 $(LN_S) $(fsrcpfx)$(f) $(RTSDIR) ;) true
1997 # Remove files to be replaced by target dependent sources
1998 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1999 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
2000 $(RM) $(RTSDIR)/*-*-*.ads $(RTSDIR)/*-*-*.adb
2001 # Copy new target dependent sources
2002 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
2003 $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
2004 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
2005 # Copy generated target dependent sources
2006 $(RM) $(RTSDIR)/s-oscons.ads
2007 (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
2008 $(RM) ../stamp-gnatlib-$(RTSDIR)
2009 touch ../stamp-gnatlib1-$(RTSDIR)
2011 # GNULLI End #############################################################
2013 # Don't use semicolon separated shell commands that involve list expansions.
2014 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
2015 # line lengths in excess of 256 characters.
2016 # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
2017 # is guaranteed to overflow the buffer.
2019 gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
2020 $(MAKE) -C $(RTSDIR) \
2021 CC="`echo \"$(GCC_FOR_TARGET)\" \
2022 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2023 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
2024 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
2025 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2027 -f ../Makefile $(LIBGNAT_OBJS)
2028 $(MAKE) -C $(RTSDIR) \
2029 CC="`echo \"$(GCC_FOR_TARGET)\" \
2030 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2032 CFLAGS="$(GNATLIBCFLAGS)" \
2033 ADAFLAGS="$(GNATLIBFLAGS)" \
2034 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2038 $(RM) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnarl$(arext)
2039 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat$(arext) \
2040 $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
2041 ifneq ($(PREFIX_OBJS),)
2042 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgccprefix$(arext) \
2044 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgccprefix$(arext)
2046 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat$(arext)
2047 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \
2048 $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
2049 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext)
2050 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnala$(arext) \
2051 $(addprefix $(RTSDIR)/,$(GNATRTL_LINEARALGEBRA_OBJS))
2052 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnala$(arext)
2053 ifeq ($(GMEM_LIB),gmemlib)
2054 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \
2055 $(RTSDIR)/memtrack.o
2056 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
2058 $(CHMOD) a-wx $(RTSDIR)/*.ali
2059 touch ../stamp-gnatlib-$(RTSDIR)
2061 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
2062 gnatlib-shared-default:
2063 $(MAKE) $(FLAGS_TO_PASS) \
2064 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2065 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2066 MULTISUBDIR="$(MULTISUBDIR)" \
2067 THREAD_KIND="$(THREAD_KIND)" \
2069 $(RM) $(RTSDIR)/libgna*$(soext)
2070 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2071 $(TARGET_LIBGCC2_CFLAGS) \
2072 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2073 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2074 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2076 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2077 $(TARGET_LIBGCC2_CFLAGS) \
2078 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2079 $(GNATRTL_TASKING_OBJS) \
2080 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2082 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2084 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2087 gnatlib-shared-dual:
2088 $(MAKE) $(FLAGS_TO_PASS) \
2089 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2090 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2091 MULTISUBDIR="$(MULTISUBDIR)" \
2092 THREAD_KIND="$(THREAD_KIND)" \
2093 gnatlib-shared-default
2094 $(MV) $(RTSDIR)/libgna*$(soext) .
2095 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2096 $(MAKE) $(FLAGS_TO_PASS) \
2097 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2098 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2099 MULTISUBDIR="$(MULTISUBDIR)" \
2100 THREAD_KIND="$(THREAD_KIND)" \
2102 $(MV) libgna*$(soext) $(RTSDIR)
2104 gnatlib-shared-dual-win32:
2105 $(MAKE) $(FLAGS_TO_PASS) \
2106 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2107 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2108 MULTISUBDIR="$(MULTISUBDIR)" \
2109 THREAD_KIND="$(THREAD_KIND)" \
2110 gnatlib-shared-win32
2111 $(MV) $(RTSDIR)/libgna*$(soext) .
2112 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2113 $(MAKE) $(FLAGS_TO_PASS) \
2114 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2115 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2116 MULTISUBDIR="$(MULTISUBDIR)" \
2117 THREAD_KIND="$(THREAD_KIND)" \
2119 $(MV) libgna*$(soext) $(RTSDIR)
2121 # ??? we need to add the option to support auto-import of arrays/records to
2122 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
2123 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
2125 gnatlib-shared-win32:
2126 $(MAKE) $(FLAGS_TO_PASS) \
2127 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2128 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2129 MULTISUBDIR="$(MULTISUBDIR)" \
2130 THREAD_KIND="$(THREAD_KIND)" \
2132 $(RM) $(RTSDIR)/libgna*$(soext)
2133 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2134 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2135 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2136 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
2137 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2138 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2139 $(GNATRTL_TASKING_OBJS) \
2140 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2141 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2143 gnatlib-shared-darwin:
2144 $(MAKE) $(FLAGS_TO_PASS) \
2145 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2146 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
2148 MULTISUBDIR="$(MULTISUBDIR)" \
2149 THREAD_KIND="$(THREAD_KIND)" \
2151 $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
2152 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2153 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2154 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2157 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2158 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2159 $(GNATRTL_TASKING_OBJS) \
2161 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2162 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2164 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2168 $(MAKE) $(FLAGS_TO_PASS) \
2169 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2170 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2171 MULTISUBDIR="$(MULTISUBDIR)" \
2172 THREAD_KIND="$(THREAD_KIND)" \
2174 $(RM) $(RTSDIR)/libgna*$(soext)
2176 ../../gnatsym -s SYMVEC_$$$$.opt \
2177 $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \
2178 ../../xgcc -g -B../../ -shared -shared-libgcc \
2179 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
2180 sys\$$library:trace.exe \
2181 --for-linker=/noinform \
2182 --for-linker=SYMVEC_$$$$.opt \
2183 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2185 ../../gnatsym -s SYMVEC_$$$$.opt \
2186 $(GNATRTL_TASKING_OBJS) && \
2187 ../../xgcc -g -B../../ -shared -shared-libgcc \
2188 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2189 libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2190 sys\$$library:trace.exe \
2191 --for-linker=/noinform \
2192 --for-linker=SYMVEC_$$$$.opt \
2193 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2196 $(MAKE) $(FLAGS_TO_PASS) \
2197 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2198 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2199 MULTISUBDIR="$(MULTISUBDIR)" \
2200 THREAD_KIND="$(THREAD_KIND)" \
2201 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
2205 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1-$(RTSDIR)
2206 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2207 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2208 $(MAKE) $(FLAGS_TO_PASS) \
2210 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2211 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2212 MULTISUBDIR="$(MULTISUBDIR)" \
2213 THREAD_KIND="$(THREAD_KIND)" \
2214 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2217 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1-$(RTSDIR)
2218 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2219 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2220 $(MAKE) $(FLAGS_TO_PASS) \
2221 EH_MECHANISM="-gcc" \
2222 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2223 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2224 MULTISUBDIR="$(MULTISUBDIR)" \
2225 THREAD_KIND="$(THREAD_KIND)" \
2226 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2228 # .s files for cross-building
2230 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
2232 # Compiling object files from source files.
2234 # Note that dependencies on obstack.h are not written
2235 # because that file is not part of GCC.
2236 # Dependencies on gvarargs.h are not written
2237 # because all that file does, when not compiling with GCC,
2238 # is include the system varargs.h.
2240 b_gnatl.c : $(GNATLINK_OBJS)
2241 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2242 b_gnatl.o : b_gnatl.c
2244 b_gnatm.c : $(GNATMAKE_OBJS)
2245 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2246 b_gnatm.o : b_gnatm.c
2248 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2249 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2251 # force no sibling call optimization on s-traceb.o so the number of stack
2252 # frames to be skipped when computing a call chain is not modified by
2253 # optimization. However we can do that only when building the runtime
2254 # (not the compiler) because the -fno-optimize-sibling-calls option exists
2255 # only in GCC 3 and above.
2257 ifneq (,$(findstring xgcc,$(CC)))
2258 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2260 NO_SIBLING_ADAFLAGS=
2263 s-traceb.o : s-traceb.adb
2264 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2265 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2268 # force debugging information on s-tasdeb.o so that it is always
2269 # possible to set conditional breakpoints on tasks.
2271 s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
2272 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2275 # force no function reordering on a-except.o because of the exclusion bounds
2276 # mechanism (see the source file for more detailed information). However we
2277 # can do that only when building the runtime (not the compiler) because the
2278 # -fno-toplevel-reorder option exists only in GCC 4.2 and above.
2280 ifneq (,$(findstring xgcc,$(CC)))
2281 NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
2283 NO_REORDER_ADAFLAGS=
2286 # force debugging information on a-except.o so that it is always
2287 # possible to set conditional breakpoints on exceptions.
2288 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2290 a-except.o : a-except.adb a-except.ads
2291 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2292 $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2294 # compile s-except.o without optimization and with debug info to let the
2295 # debugger set breakpoints and inspect subprogram parameters on exception
2298 s-except.o : s-except.adb s-except.ads
2299 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2302 # force debugging information on s-assert.o so that it is always
2303 # possible to set breakpoint on assert failures.
2305 s-assert.o : s-assert.adb s-assert.ads a-except.ads
2306 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
2309 adadecode.o : adadecode.c adadecode.h
2313 deftarg.o : deftarg.c
2315 exit.o : adaint.h exit.c
2321 socket.o : socket.c gsocket.h
2323 raise-gcc.o : raise-gcc.c raise.h
2324 raise.o : raise.c raise.h
2325 vx_stack_info.o : vx_stack_info.c
2328 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2329 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2331 init.o : init.c adaint.h raise.h
2332 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2333 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2335 initialize.o : initialize.c raise.h
2336 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2337 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2339 targext.o : targext.c
2340 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2341 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2344 # No optimization to compile this file as optimizations (-O1 or above) breaks
2345 # the SEH handling on Windows. The reasons are not clear.
2346 seh_init.o : seh_init.c raise.h
2347 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) -O0 \
2348 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2350 # Need to keep the frame pointer in this file to pop the stack properly on
2352 tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
2353 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2354 -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2356 # In GNU Make, ignore whether `stage*' exists.
2357 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2358 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2362 # Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
2364 ../../gnatlbr$(exeext): ../../prefix.o
2365 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2366 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2367 $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2369 ../../vms_help$(exeext):
2370 $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
2371 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
2372 $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2374 ../../gnat.hlp: ../../vms_help$(exeext)
2375 ../../vms_help$(exeext) $(fsrcdir)/gnat.help_in \
2376 $(fsrcdir)/vms_data.ads ../../gnat.hlp