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)
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
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:
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.
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.
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.
64 # Suppress smart makes who think they know how to automake Yacc files
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.
77 BOOT_CFLAGS = -O $(CFLAGS)
78 # These exists to be overridden by the x-* and t-* files, respectively.
109 RANLIB_FLAGS = @ranlib_flags@
112 PWD_COMMAND = $${PWDCMD-pwd}
113 # How to copy preserving the date
114 INSTALL_DATA_DATE = cp -p
117 GNATBIND = $(STAGE_PREFIX)gnatbind
118 GNATBIND_FLAGS = -static -x
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 \
127 ALL_ADA_CFLAGS = $(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
128 ALL_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \
130 MOST_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \
136 SYMDEPS = $(LIBINTL_DEP)
137 OUTPUT_OPTION = @OUTPUT_OPTION@
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 =
166 target_alias=@target_alias@
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.
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.
186 # Internationalization library.
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
199 # Type of tools build we are doing; default is not compiling tools.
202 # End of variables for you to override.
206 # This tells GNU Make version 3 not to put all variables in the environment.
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.
215 ifneq ($(tmake_file),)
216 include $(subst /config,/../config,$(tmake_file))
220 ifneq ($(xmake_file),)
221 include $(subst /config,/../config,$(xmake_file))
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_COMPILE if we are building a cross compiler.
231 INTERNAL_CFLAGS = @CROSS@ -DIN_GCC
233 # This is the variable actually used when we compile.
234 LOOSE_CFLAGS = `echo $(CFLAGS) $(WARN2_CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`
235 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS) \
239 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
241 # This is where we get libiberty.a from.
242 LIBIBERTY = ../../libiberty/libiberty.a
244 # How to link with both our special library facilities
245 # and the system's installed libraries.
246 LIBS = $(LIBINTL) $(LIBIBERTY) $(SYSLIBS)
247 LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY)
248 # Default is no TGT_LIB; one might be passed down or something
250 TOOLS_LIBS = $(LIBGNAT) $(EXTRA_GNATTOOLS_OBJS) link.o ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB)
252 # Specify the directories to be searched for header files.
253 # Both . and srcdir are used, in that order,
254 # so that tm.h and config.h will be found in the compilation
255 # subdirectory rather than in the source directory.
256 INCLUDES = -I- -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config \
257 -I$(srcdir)/../../include
259 ADA_INCLUDES = -I- -I. -I$(srcdir)
261 INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir) -I$(fsrcdir)/../config \
262 -I$(fsrcdir)/../../include -I$(fsrcdir)/..
263 ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)
265 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
268 # Say how to compile Ada programs.
269 .SUFFIXES: .ada .adb .ads .asm
271 # Always use -I$(srcdir)/config when compiling.
273 $(CC) -c -x assembler $< $(OUTPUT_OPTION)
276 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
280 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
283 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
285 # how to regenerate this file
286 Makefile: ../config.status $(srcdir)/Makefile.in $(srcdir)/../version.c
288 LANGUAGES="$(CONFIG_LANGUAGES)" \
290 CONFIG_FILES=ada/Makefile $(SHELL) config.status
292 # This tells GNU make version 3 not to export all the variables
293 # defined in this file into the environment.
296 # Lists of files for various purposes.
298 GNATLINK_OBJS = gnatlink.o \
299 a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o gnatvsn.o \
300 hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o osint.o output.o rident.o \
301 s-exctab.o s-secsta.o s-stalib.o s-stoele.o sdefault.o stylesw.o switch.o system.o \
302 table.o tree_io.o types.o validsw.o widechar.o
304 GNATMAKE_OBJS = a-except.o ctrl_c.o ali.o ali-util.o s-casuti.o \
305 alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\
306 erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
307 gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
308 make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-utl.o \
309 namet.o nlists.o opt.o osint.o osint-m.o output.o \
310 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 \
311 prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \
312 rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
313 scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o \
314 sinfo.o sinput.o sinput-c.o sinput-p.o \
315 snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o switch.o switch-m.o \
316 table.o targparm.o tempdir.o tree_io.o types.o \
317 uintp.o uname.o urealp.o usage.o widechar.o \
318 $(EXTRA_GNATMAKE_OBJS)
320 # Convert the target variable into a space separated list of architecture,
321 # manufacturer, and operating system and assign each of those to its own
324 host:=$(subst -, ,$(host_canonical))
325 targ:=$(subst -, ,$(target))
326 arch:=$(word 1,$(targ))
327 ifeq ($(words $(targ)),2)
329 osys:=$(word 2,$(targ))
331 manu:=$(word 2,$(targ))
332 osys:=$(word 3,$(targ))
335 # LIBGNAT_TARGET_PAIRS is a list of pairs of filenames.
336 # The members of each pair must be separated by a '<' and no whitespace.
337 # Each pair must be separated by some amount of whitespace from the following
342 LIBGNAT_TARGET_PAIRS = \
343 a-intnam.ads<a-intnam-dummy.ads \
344 s-inmaop.adb<s-inmaop-dummy.adb \
345 s-intman.adb<s-intman-dummy.adb \
346 s-osinte.ads<s-osinte-dummy.ads \
347 s-osprim.adb<s-osprim-posix.adb \
348 s-taprop.adb<s-taprop-dummy.adb \
349 s-taspri.ads<s-taspri-dummy.ads
351 # When using the GCC exception handling mechanism, we need to use an
352 # alternate body for a-exexpr.adb (a-exexpr-gcc.adb)
356 # Default shared object option. Note that we rely on the fact that the "soname"
357 # option will always be present and last in this flag, so that we can have
358 # $(SO_OPTS)libgnat-x.xx
360 SO_OPTS = -Wl,-soname,
362 # Default gnatlib-shared target.
363 # By default, equivalent to gnatlib.
364 # Set to gnatlib-shared-default, gnatlib-shared-dual, or a platform specific
365 # target when supported.
366 GNATLIB_SHARED = gnatlib
368 # default value for gnatmake's target dependent file
371 # By default, do not distribute prefix.o (in libgccprefix), since it is only
372 # needed by external GNAT tools such as gnatdist and Glide.
373 # Override this variable on native platforms when needed.
376 # To avoid duplicate code, use this variable to set PREFIX_OBJS when needed:
377 PREFIX_REAL_OBJS = ../prefix.o \
378 ../../libiberty/concat.o \
379 ../../libiberty/xmalloc.o \
380 ../../libiberty/xstrdup.o \
381 ../../libiberty/xexit.o
383 LIB_VERSION = $(strip $(shell grep ' Library_Version :' $(fsrcpfx)gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/'))
385 # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
386 # $(strip STRING) removes leading and trailing spaces from STRING.
387 # If what's left is null then it's a match.
389 ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
390 LIBGNAT_TARGET_PAIRS = \
391 a-intnam.ads<a-intnam-vxworks.ads \
392 a-numaux.ads<a-numaux-vxworks.ads \
393 s-inmaop.adb<s-inmaop-posix.adb \
394 s-interr.adb<s-interr-vxworks.adb \
395 s-intman.ads<s-intman-vxworks.ads \
396 s-intman.adb<s-intman-vxworks.adb \
397 s-osinte.adb<s-osinte-vxworks.adb \
398 s-osinte.ads<s-osinte-vxworks.ads \
399 s-osprim.adb<s-osprim-vxworks.adb \
400 s-parame.ads<s-parame-vxworks.ads \
401 s-stchop.adb<s-stchop-vxworks.adb \
402 s-taprop.adb<s-taprop-vxworks.adb \
403 s-taspri.ads<s-taspri-vxworks.ads \
404 s-tpopsp.adb<s-tpopsp-vxworks.adb \
405 s-vxwork.ads<s-vxwork-m68k.ads \
406 g-soccon.ads<g-soccon-vxworks.ads \
407 g-socthi.ads<g-socthi-vxworks.ads \
408 g-socthi.adb<g-socthi-vxworks.adb \
409 system.ads<system-vxworks-m68k.ads
411 TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-vxworks.adb
413 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
414 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
416 ifeq ($(strip $(filter-out yes,$(TRACE))),)
417 LIBGNAT_TARGET_PAIRS += \
418 s-traces.adb<s-traces-default.adb \
419 s-tratas.adb<s-tratas-default.adb \
420 s-trafor.adb<s-trafor-default.adb \
421 s-trafor.ads<s-trafor-default.ads \
422 s-tfsetr.adb<s-tfsetr-vxworks.adb
426 ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
427 LIBGNAT_TARGET_PAIRS = \
428 a-intnam.ads<a-intnam-vxworks.ads \
429 a-numaux.ads<a-numaux-vxworks.ads \
430 s-inmaop.adb<s-inmaop-posix.adb \
431 s-interr.adb<s-interr-vxworks.adb \
432 s-intman.ads<s-intman-vxworks.ads \
433 s-intman.adb<s-intman-vxworks.adb \
434 s-osinte.ads<s-osinte-vxworks.ads \
435 s-osprim.adb<s-osprim-vxworks.adb \
436 s-parame.ads<s-parame-vxworks.ads \
437 s-stchop.adb<s-stchop-vxworks.adb \
438 s-taprop.adb<s-taprop-vxworks.adb \
439 s-taspri.ads<s-taspri-vxworks.ads \
440 s-vxwork.ads<s-vxwork-ppc.ads \
441 g-soccon.ads<g-soccon-vxworks.ads \
442 g-socthi.ads<g-socthi-vxworks.ads \
443 g-socthi.adb<g-socthi-vxworks.adb
445 TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-vxworks.adb
447 ifeq ($(strip $(filter-out yes,$(TRACE))),)
448 LIBGNAT_TARGET_PAIRS += \
449 s-traces.adb<s-traces-default.adb \
450 s-trafor.adb<s-trafor-default.adb \
451 s-trafor.ads<s-trafor-default.ads \
452 s-tratas.adb<s-tratas-default.adb \
453 s-tfsetr.adb<s-tfsetr-vxworks.adb
456 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
457 LIBGNAT_TARGET_PAIRS += \
458 s-osinte.adb<s-osinte-vxworks-rtp.adb \
459 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
460 system.ads<system-vxworks-ppc-rtp.ads
462 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
464 LIBGNAT_TARGET_PAIRS += \
465 s-osinte.adb<s-osinte-vxworks.adb \
466 s-tpopsp.adb<s-tpopsp-vxworks.adb \
467 system.ads<system-vxworks-ppc.ads
469 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
472 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
475 ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
476 LIBGNAT_TARGET_PAIRS = \
477 a-intnam.ads<a-intnam-vxworks.ads \
478 a-numaux.ads<a-numaux-vxworks.ads \
479 s-inmaop.adb<s-inmaop-posix.adb \
480 s-interr.adb<s-interr-vxworks.adb \
481 s-intman.ads<s-intman-vxworks.ads \
482 s-intman.adb<s-intman-vxworks.adb \
483 s-osinte.adb<s-osinte-vxworks.adb \
484 s-osinte.ads<s-osinte-vxworks.ads \
485 s-osprim.adb<s-osprim-vxworks.adb \
486 s-parame.ads<s-parame-vxworks.ads \
487 s-stchop.adb<s-stchop-vxworks.adb \
488 s-taprop.adb<s-taprop-vxworks.adb \
489 s-taspri.ads<s-taspri-vxworks.ads \
490 s-tpopsp.adb<s-tpopsp-vxworks.adb \
491 s-vxwork.ads<s-vxwork-sparcv9.ads \
492 g-soccon.ads<g-soccon-vxworks.ads \
493 g-socthi.ads<g-socthi-vxworks.ads \
494 g-socthi.adb<g-socthi-vxworks.adb \
495 system.ads<system-vxworks-sparcv9.ads \
497 TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-vxworks.adb
499 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
500 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
503 ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
504 LIBGNAT_TARGET_PAIRS = \
505 a-intnam.ads<a-intnam-vxworks.ads \
506 i-vxwork.ads<i-vxwork-x86.ads \
507 s-inmaop.adb<s-inmaop-posix.adb \
508 s-interr.adb<s-interr-vxworks.adb \
509 s-intman.ads<s-intman-vxworks.ads \
510 s-intman.adb<s-intman-vxworks.adb \
511 a-numaux.adb<a-numaux-x86.adb \
512 a-numaux.ads<a-numaux-x86.ads \
513 s-osinte.adb<s-osinte-vxworks.adb \
514 s-osinte.ads<s-osinte-vxworks.ads \
515 s-osprim.adb<s-osprim-vxworks.adb \
516 s-parame.ads<s-parame-vxworks.ads \
517 s-stchop.adb<s-stchop-vxworks.adb \
518 s-taprop.adb<s-taprop-vxworks.adb \
519 s-taspri.ads<s-taspri-vxworks.ads \
520 s-tpopsp.adb<s-tpopsp-vxworks.adb \
521 s-vxwork.ads<s-vxwork-x86.ads \
522 g-soccon.ads<g-soccon-vxworks.ads \
523 g-socthi.ads<g-socthi-vxworks.ads \
524 g-socthi.adb<g-socthi-vxworks.adb \
525 system.ads<system-vxworks-x86.ads
527 TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-vxworks.adb
529 ifeq ($(strip $(filter-out yes,$(TRACE))),)
530 LIBGNAT_TARGET_PAIRS += \
531 s-traces.adb<s-traces-default.adb \
532 s-trafor.adb<s-trafor-default.adb \
533 s-trafor.ads<s-trafor-default.ads \
534 s-tratas.adb<s-tratas-default.adb \
535 s-tfsetr.adb<s-tfsetr-vxworks.adb
538 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
539 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
542 ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
543 LIBGNAT_TARGET_PAIRS = \
544 a-intnam.ads<a-intnam-vxworks.ads \
545 a-numaux.ads<a-numaux-vxworks.ads \
546 s-inmaop.adb<s-inmaop-posix.adb \
547 s-interr.adb<s-interr-vxworks.adb \
548 s-intman.ads<s-intman-vxworks.ads \
549 s-intman.adb<s-intman-vxworks.adb \
550 s-osinte.adb<s-osinte-vxworks.adb \
551 s-osinte.ads<s-osinte-vxworks.ads \
552 s-osprim.adb<s-osprim-vxworks.adb \
553 s-parame.ads<s-parame-vxworks.ads \
554 s-stchop.adb<s-stchop-vxworks.adb \
555 s-taprop.adb<s-taprop-vxworks.adb \
556 s-taspri.ads<s-taspri-vxworks.ads \
557 s-tpopsp.adb<s-tpopsp-vxworks.adb \
558 s-vxwork.ads<s-vxwork-arm.ads \
559 g-soccon.ads<g-soccon-vxworks.ads \
560 g-socthi.ads<g-socthi-vxworks.ads \
561 g-socthi.adb<g-socthi-vxworks.adb \
562 system.ads<system-vxworks-arm.ads
564 TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-vxworks.adb
566 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
567 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
570 ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
571 LIBGNAT_TARGET_PAIRS = \
572 a-intnam.ads<a-intnam-vxworks.ads \
573 a-numaux.ads<a-numaux-vxworks.ads \
574 s-inmaop.adb<s-inmaop-posix.adb \
575 s-interr.adb<s-interr-vxworks.adb \
576 s-intman.ads<s-intman-vxworks.ads \
577 s-intman.adb<s-intman-vxworks.adb \
578 s-osinte.adb<s-osinte-vxworks.adb \
579 s-osinte.ads<s-osinte-vxworks.ads \
580 s-osprim.adb<s-osprim-vxworks.adb \
581 s-parame.ads<s-parame-vxworks.ads \
582 s-stchop.adb<s-stchop-vxworks.adb \
583 s-taprop.adb<s-taprop-vxworks.adb \
584 s-taspri.ads<s-taspri-vxworks.ads \
585 s-tpopsp.adb<s-tpopsp-vxworks.adb \
586 s-vxwork.ads<s-vxwork-mips.ads \
587 g-soccon.ads<g-soccon-vxworks.ads \
588 g-socthi.ads<g-socthi-vxworks.ads \
589 g-socthi.adb<g-socthi-vxworks.adb \
590 system.ads<system-vxworks-mips.ads
592 TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-vxworks.adb
594 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
595 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
598 ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
599 LIBGNAT_TARGET_PAIRS = \
600 a-intnam.ads<a-intnam-solaris.ads \
601 s-inmaop.adb<s-inmaop-posix.adb \
602 s-intman.adb<s-intman-solaris.adb \
603 s-osinte.adb<s-osinte-solaris.adb \
604 s-osinte.ads<s-osinte-solaris.ads \
605 s-osprim.adb<s-osprim-solaris.adb \
606 s-parame.adb<s-parame-solaris.adb \
607 s-taprop.adb<s-taprop-solaris.adb \
608 s-tasinf.adb<s-tasinf-solaris.adb \
609 s-tasinf.ads<s-tasinf-solaris.ads \
610 s-taspri.ads<s-taspri-solaris.ads \
611 s-tpopsp.adb<s-tpopsp-solaris.adb \
612 g-soccon.ads<g-soccon-solaris.ads \
613 g-soliop.ads<g-soliop-solaris.ads \
614 system.ads<system-solaris-sparc.ads
616 TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-solaris.adb
619 THREADSLIB = -lposix4 -lthread
620 MISCLIB = -lposix4 -lnsl -lsocket
622 GNATLIB_SHARED = gnatlib-shared-dual
624 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
625 LIBRARY_VERSION := $(LIB_VERSION)
627 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
628 LIBGNAT_TARGET_PAIRS = \
629 a-intnam.ads<a-intnam-solaris.ads \
630 s-inmaop.adb<s-inmaop-posix.adb \
631 s-intman.adb<s-intman-posix.adb \
632 s-osinte.adb<s-osinte-posix.adb \
633 s-osinte.ads<s-osinte-solaris-posix.ads \
634 s-osprim.adb<s-osprim-solaris.adb \
635 s-taprop.adb<s-taprop-posix.adb \
636 s-taspri.ads<s-taspri-posix.ads \
637 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
638 g-soccon.ads<g-soccon-solaris.ads \
639 g-soliop.ads<g-soliop-solaris.ads \
640 system.ads<system-solaris-sparc.ads
642 THREADSLIB = -lposix4 -lpthread
645 ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),)
646 LIBGNAT_TARGET_PAIRS = \
647 a-intnam.ads<a-intnam-solaris.ads \
648 s-inmaop.adb<s-inmaop-posix.adb \
649 s-intman.adb<s-intman-solaris.adb \
650 s-osinte.adb<s-osinte-solaris.adb \
651 s-osinte.ads<s-osinte-solaris.ads \
652 s-osprim.adb<s-osprim-solaris.adb \
653 s-parame.adb<s-parame-solaris.adb \
654 s-taprop.adb<s-taprop-solaris.adb \
655 s-tasinf.adb<s-tasinf-solaris.adb \
656 s-tasinf.ads<s-tasinf-solaris.ads \
657 s-taspri.ads<s-taspri-solaris.ads \
658 s-tpopsp.adb<s-tpopsp-solaris.adb \
659 g-soccon.ads<g-soccon-solaris-64.ads \
660 g-soliop.ads<g-soliop-solaris.ads \
661 system.ads<system-solaris-sparcv9.ads
665 ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
666 LIBGNAT_TARGET_PAIRS = \
667 a-numaux.adb<a-numaux-x86.adb \
668 a-numaux.ads<a-numaux-x86.ads \
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-parame.adb<s-parame-solaris.adb \
676 s-taprop.adb<s-taprop-solaris.adb \
677 s-tasinf.adb<s-tasinf-solaris.adb \
678 s-tasinf.ads<s-tasinf-solaris.ads \
679 s-taspri.ads<s-taspri-solaris.ads \
680 s-tpopsp.adb<s-tpopsp-solaris.adb \
681 g-soccon.ads<g-soccon-solaris.ads \
682 g-soliop.ads<g-soliop-solaris.ads \
683 system.ads<system-solaris-x86.ads
685 TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-solaris.adb
687 THREADSLIB = -lposix4 -lthread
688 MISCLIB = -lposix4 -lnsl -lsocket
690 GNATLIB_SHARED = gnatlib-shared-dual
692 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
693 LIBRARY_VERSION := $(LIB_VERSION)
696 ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
697 LIBGNAT_TARGET_PAIRS = \
698 a-intnam.ads<a-intnam-linux.ads \
699 a-numaux.adb<a-numaux-x86.adb \
700 a-numaux.ads<a-numaux-x86.ads \
701 g-soccon.ads<g-soccon-linux-x86.ads \
702 s-inmaop.adb<s-inmaop-posix.adb \
703 s-intman.adb<s-intman-posix.adb \
704 s-osinte.adb<s-osinte-posix.adb \
705 s-osinte.ads<s-osinte-linux.ads \
706 s-osprim.adb<s-osprim-posix.adb \
707 s-taprop.adb<s-taprop-linux.adb \
708 s-taspri.ads<s-taspri-posix.ads \
709 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
710 s-parame.adb<s-parame-linux.adb \
711 system.ads<system-linux-x86.ads
713 TOOLS_TARGET_PAIRS = \
714 mlib-tgt.adb<mlib-tgt-linux.adb \
715 indepsw.adb<indepsw-gnu.adb
718 THREADSLIB = -lpthread
719 GNATLIB_SHARED = gnatlib-shared-dual
721 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
722 LIBRARY_VERSION := $(LIB_VERSION)
725 ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
726 LIBGNAT_TARGET_PAIRS = \
727 a-intnam.ads<a-intnam-freebsd.ads \
728 a-numaux.adb<a-numaux-x86.adb \
729 a-numaux.ads<a-numaux-x86.ads \
730 g-soccon.ads<g-soccon-freebsd.ads \
731 s-inmaop.adb<s-inmaop-posix.adb \
732 s-intman.adb<s-intman-posix.adb \
733 s-osinte.adb<s-osinte-freebsd.adb \
734 s-osinte.ads<s-osinte-freebsd.ads \
735 s-osprim.adb<s-osprim-posix.adb \
736 s-taprop.adb<s-taprop-posix.adb \
737 s-taspri.ads<s-taspri-posix.ads \
738 s-tpopsp.adb<s-tpopsp-posix.adb \
739 system.ads<system-freebsd-x86.ads
741 TOOLS_TARGET_PAIRS = \
742 mlib-tgt.adb<mlib-tgt-linux.adb
743 GNATLIB_SHARED = gnatlib-shared-dual
747 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
748 LIBRARY_VERSION := $(LIB_VERSION)
751 ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
752 ifeq ($(strip $(filter-out s390x,$(arch))),)
753 LIBGNAT_TARGET_PAIRS = \
754 a-intnam.ads<a-intnam-linux.ads \
755 s-inmaop.adb<s-inmaop-posix.adb \
756 s-intman.adb<s-intman-posix.adb \
757 s-osinte.adb<s-osinte-posix.adb \
758 s-osinte.ads<s-osinte-linux.ads \
759 s-osprim.adb<s-osprim-posix.adb \
760 s-taprop.adb<s-taprop-linux.adb \
761 s-taspri.ads<s-taspri-posix.ads \
762 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
763 s-parame.adb<s-parame-linux.adb \
764 system.ads<system-linux-s390x.ads
766 LIBGNAT_TARGET_PAIRS = \
767 a-intnam.ads<a-intnam-linux.ads \
768 s-inmaop.adb<s-inmaop-posix.adb \
769 s-intman.adb<s-intman-posix.adb \
770 s-osinte.adb<s-osinte-posix.adb \
771 s-osinte.ads<s-osinte-linux.ads \
772 s-osprim.adb<s-osprim-posix.adb \
773 s-taprop.adb<s-taprop-linux.adb \
774 s-taspri.ads<s-taspri-posix.ads \
775 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
776 s-parame.adb<s-parame-linux.adb \
777 system.ads<system-linux-s390.ads
780 TOOLS_TARGET_PAIRS = \
781 mlib-tgt.adb<mlib-tgt-linux.adb
783 THREADSLIB = -lpthread
784 GNATLIB_SHARED = gnatlib-shared-dual
785 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
786 LIBRARY_VERSION := $(LIB_VERSION)
789 ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
790 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
791 LIBGNAT_TARGET_PAIRS = \
792 a-intnam.ads<a-intnam-irix.ads \
793 s-inmaop.adb<s-inmaop-posix.adb \
794 s-intman.adb<s-intman-irix.adb \
795 s-mastop.adb<s-mastop-irix.adb \
796 s-osinte.adb<s-osinte-irix.adb \
797 s-osinte.ads<s-osinte-irix.ads \
798 s-osprim.adb<s-osprim-posix.adb \
799 s-proinf.adb<s-proinf-irix-athread.adb \
800 s-proinf.ads<s-proinf-irix-athread.ads \
801 s-taprop.adb<s-taprop-irix.adb \
802 s-tasinf.ads<s-tasinf-irix.ads \
803 s-taspri.ads<s-taspri-posix.ads \
804 s-tpopsp.adb<s-tpopsp-posix.adb \
805 s-traceb.adb<s-traceb-mastop.adb \
806 g-soccon.ads<g-soccon-irix.ads \
807 system.ads<system-irix-n32.ads
809 THREADSLIB = -lpthread
810 GNATLIB_SHARED = gnatlib-shared-default
813 LIBGNAT_TARGET_PAIRS += \
814 s-mastop.adb<s-mastop-irix.adb \
815 s-osprim.adb<s-osprim-posix.adb \
816 s-traceb.adb<s-traceb-mastop.adb \
817 g-soccon.ads<g-soccon-irix.ads \
818 system.ads<system-irix-o32.ads
822 TOOLS_TARGET_PAIRS = mlib-tgt.adb<mlib-tgt-irix.adb
825 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
826 LIBRARY_VERSION := $(LIB_VERSION)
829 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
830 LIBGNAT_TARGET_PAIRS = \
831 a-excpol.adb<a-excpol-abort.adb \
832 a-intnam.ads<a-intnam-hpux.ads \
833 s-inmaop.adb<s-inmaop-posix.adb \
834 s-interr.adb<s-interr-sigaction.adb \
835 s-intman.adb<s-intman-posix.adb \
836 s-osinte.adb<s-osinte-hpux-dce.adb \
837 s-osinte.ads<s-osinte-hpux-dce.ads \
838 s-parame.ads<s-parame-hpux.ads \
839 s-osprim.adb<s-osprim-posix.adb \
840 s-taprop.adb<s-taprop-hpux-dce.adb \
841 s-taspri.ads<s-taspri-hpux-dce.ads \
842 s-tpopsp.adb<s-tpopsp-posix.adb \
843 g-soccon.ads<g-soccon-hpux.ads \
844 system.ads<system-hpux.ads
847 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
850 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
851 LIBGNAT_TARGET_PAIRS = \
852 a-intnam.ads<a-intnam-hpux.ads \
853 s-inmaop.adb<s-inmaop-posix.adb \
854 s-intman.adb<s-intman-posix.adb \
855 s-osinte.adb<s-osinte-posix.adb \
856 s-osinte.ads<s-osinte-hpux.ads \
857 s-parame.ads<s-parame-hpux.ads \
858 s-osprim.adb<s-osprim-posix.adb \
859 s-traceb.adb<s-traceb-hpux.adb \
860 s-taprop.adb<s-taprop-posix.adb \
861 s-taspri.ads<s-taspri-posix.ads \
862 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
863 g-soccon.ads<g-soccon-hpux.ads \
864 system.ads<system-hpux.ads
866 TOOLS_TARGET_PAIRS = mlib-tgt.adb<mlib-tgt-hpux.adb
868 TGT_LIB = /usr/lib/libcl.a
869 THREADSLIB = -lpthread
873 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
874 GNATLIB_SHARED = gnatlib-shared-dual
875 LIBRARY_VERSION := $(LIB_VERSION)
878 ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
879 LIBGNAT_TARGET_PAIRS = \
880 a-intnam.ads<a-intnam-aix.ads \
881 s-inmaop.adb<s-inmaop-posix.adb \
882 s-intman.adb<s-intman-posix.adb \
883 s-osinte.adb<s-osinte-aix.adb \
884 s-osinte.ads<s-osinte-aix.ads \
885 s-osprim.adb<s-osprim-posix.adb \
886 s-taprop.adb<s-taprop-posix.adb \
887 s-taspri.ads<s-taspri-posix.ads \
888 s-tpopsp.adb<s-tpopsp-posix.adb \
889 g-soccon.ads<g-soccon-aix.ads \
890 system.ads<system-aix.ads
892 THREADSLIB = -lpthreads
893 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
895 TOOLS_TARGET_PAIRS = \
896 mlib-tgt.adb<mlib-tgt-aix.adb \
897 indepsw.adb<indepsw-aix.adb
902 ifeq ($(strip $(filter-out lynxos,$(osys))),)
903 TOOLS_TARGET_PAIRS = \
904 mlib-tgt.adb<mlib-tgt-lynxos.adb \
905 indepsw.adb<indepsw-gnu.adb
907 ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
908 LIBGNAT_TARGET_PAIRS = \
909 a-numaux.adb<a-numaux-x86.adb \
910 a-numaux.ads<a-numaux-x86.ads \
911 a-intnam.ads<a-intnam-lynxos.ads \
912 s-inmaop.adb<s-inmaop-posix.adb \
913 s-intman.adb<s-intman-posix.adb \
914 s-osinte.adb<s-osinte-lynxos.adb \
915 s-osinte.ads<s-osinte-lynxos.ads \
916 s-osprim.adb<s-osprim-posix.adb \
917 s-taprop.adb<s-taprop-lynxos.adb \
918 s-taspri.ads<s-taspri-lynxos.ads \
919 s-tpopsp.adb<s-tpopsp-lynxos.adb \
920 system.ads<system-lynxos-x86.ads
922 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
925 LIBGNAT_TARGET_PAIRS = \
926 a-intnam.ads<a-intnam-lynxos.ads \
927 s-inmaop.adb<s-inmaop-posix.adb \
928 s-intman.adb<s-intman-posix.adb \
929 s-osinte.adb<s-osinte-lynxos.adb \
930 s-osinte.ads<s-osinte-lynxos.ads \
931 s-osprim.adb<s-osprim-posix.adb \
932 s-taprop.adb<s-taprop-lynxos.adb \
933 s-taspri.ads<s-taspri-lynxos.ads \
934 s-tpopsp.adb<s-tpopsp-lynxos.adb \
935 system.ads<system-lynxos-ppc.ads
939 ifeq ($(strip $(filter-out rtems%,$(osys))),)
940 LIBGNAT_TARGET_PAIRS = \
941 a-intnam.ads<a-intnam-rtems.ads \
942 s-inmaop.adb<s-inmaop-posix.adb \
943 s-intman.adb<s-intman-posix.adb \
944 s-osinte.adb<s-osinte-rtems.adb \
945 s-osinte.ads<s-osinte-rtems.ads \
946 s-osprim.adb<s-osprim-posix.adb \
947 s-parame.adb<s-parame-rtems.adb \
948 s-taprop.adb<s-taprop-posix.adb \
949 s-taspri.ads<s-taspri-posix.ads \
950 s-tpopsp.adb<s-tpopsp-rtems.adb
953 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
954 LIBGNAT_TARGET_PAIRS = \
955 a-intnam.ads<a-intnam-tru64.ads \
956 s-inmaop.adb<s-inmaop-posix.adb \
957 s-intman.adb<s-intman-posix.adb \
958 s-mastop.adb<s-mastop-tru64.adb \
959 s-osinte.adb<s-osinte-tru64.adb \
960 s-osinte.ads<s-osinte-tru64.ads \
961 s-osprim.adb<s-osprim-unix.adb \
962 s-taprop.adb<s-taprop-tru64.adb \
963 s-tasinf.ads<s-tasinf-tru64.ads \
964 s-taspri.ads<s-taspri-tru64.ads \
965 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
966 s-traceb.adb<s-traceb-mastop.adb \
967 g-soccon.ads<g-soccon-tru64.ads \
968 system.ads<system-tru64.ads
970 TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-tru64.adb
974 THREADSLIB = -lpthread -lmach -lexc -lrt
975 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
976 GNATLIB_SHARED = gnatlib-shared-default
977 LIBRARY_VERSION := $(LIB_VERSION)
980 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
990 @ gnu:[bin]vmssymvec $<
993 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
994 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
995 LIBGNAT_TARGET_PAIRS_AUX1 = \
996 g-enblsp.adb<g-enblsp-vms-ia64.adb \
997 g-trasym.adb<g-trasym-vms-ia64.adb \
998 s-auxdec.ads<s-auxdec-vms_64.ads \
999 s-crtl.ads<s-crtl-vms64.ads \
1000 s-osinte.adb<s-osinte-vms-ia64.adb \
1001 s-osinte.ads<s-osinte-vms-ia64.ads \
1002 s-vaflop.adb<s-vaflop-vms-ia64.adb \
1003 system.ads<system-vms_64.ads
1005 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1006 LIBGNAT_TARGET_PAIRS_AUX1 = \
1007 g-enblsp.adb<g-enblsp-vms-alpha.adb \
1008 g-trasym.adb<g-trasym-vms-alpha.adb \
1009 s-asthan.adb<s-asthan-vms-alpha.adb \
1010 s-auxdec.ads<s-auxdec-vms_64.ads \
1011 s-crtl.ads<s-crtl-vms64.ads \
1012 s-osinte.adb<s-osinte-vms.adb \
1013 s-osinte.ads<s-osinte-vms.ads \
1014 s-vaflop.adb<s-vaflop-vms-alpha.adb \
1015 system.ads<system-vms_64.ads
1018 ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1019 LIBGNAT_TARGET_PAIRS_AUX2 = \
1020 s-parame.ads<s-parame-vms-restrict.ads
1022 LIBGNAT_TARGET_PAIRS_AUX2 = \
1023 s-parame.ads<s-parame-vms.ads
1026 LIBGNAT_TARGET_PAIRS = \
1027 a-caldel.adb<a-caldel-vms.adb \
1028 a-calend.adb<a-calend-vms.adb \
1029 a-calend.ads<a-calend-vms.ads \
1030 a-dirval.adb<a-dirval-vms.adb \
1031 a-excpol.adb<a-excpol-abort.adb \
1032 a-intnam.ads<a-intnam-vms.ads \
1033 a-numaux.ads<a-numaux-vms.ads \
1034 g-expect.adb<g-expect-vms.adb \
1035 g-soccon.ads<g-soccon-vms.ads \
1036 g-socthi.ads<g-socthi-vms.ads \
1037 g-socthi.adb<g-socthi-vms.adb \
1038 i-cstrea.adb<i-cstrea-vms.adb \
1039 s-inmaop.adb<s-inmaop-vms.adb \
1040 s-interr.adb<s-interr-vms.adb \
1041 s-intman.adb<s-intman-vms.adb \
1042 s-intman.ads<s-intman-vms.ads \
1043 s-osprim.adb<s-osprim-vms.adb \
1044 s-osprim.ads<s-osprim-vms.ads \
1045 s-taprop.adb<s-taprop-vms.adb \
1046 s-taspri.ads<s-taspri-vms.ads \
1047 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1048 s-tpopde.adb<s-tpopde-vms.adb \
1049 s-tpopde.ads<s-tpopde-vms.ads \
1050 s-traent.adb<s-traent-vms.adb \
1051 s-traent.ads<s-traent-vms.ads \
1052 $(LIBGNAT_TARGET_PAIRS_AUX1) \
1053 $(LIBGNAT_TARGET_PAIRS_AUX2)
1055 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1056 TOOLS_TARGET_PAIRS= \
1057 mlib-tgt.adb<mlib-tgt-vms-ia64.adb \
1058 symbols.adb<symbols-vms.adb \
1059 symbols-processing.adb<symbols-processing-vms-ia64.adb
1061 TOOLS_TARGET_PAIRS= \
1062 mlib-tgt.adb<mlib-tgt-vms-alpha.adb \
1063 symbols.adb<symbols-vms.adb \
1064 symbols-processing.adb<symbols-processing-vms-alpha.adb
1068 GNATLIB_SHARED=gnatlib-shared-vms
1069 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1070 EXTRA_LIBGNAT_SRCS=vmshandler.asm
1071 EXTRA_LIBGNAT_OBJS=vmshandler.o
1073 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1075 ../../gnatlbr$(exeext) \
1076 ../../gnatsym$(exeext) \
1077 ../../vms_help$(exeext) \
1079 # This command transforms (YYYYMMDD) into YY,MMDD
1080 GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\)/\2,\3/')
1081 TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1082 LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1085 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1086 LIBGNAT_TARGET_PAIRS = \
1087 a-calend.adb<a-calend-mingw.adb \
1088 a-dirval.adb<a-dirval-mingw.adb \
1089 a-excpol.adb<a-excpol-abort.adb \
1090 a-intnam.ads<a-intnam-mingw.ads \
1091 a-numaux.adb<a-numaux-x86.adb \
1092 a-numaux.ads<a-numaux-x86.ads \
1093 s-gloloc.adb<s-gloloc-mingw.adb \
1094 s-inmaop.adb<s-inmaop-dummy.adb \
1095 s-interr.adb<s-interr-sigaction.adb \
1096 s-intman.adb<s-intman-mingw.adb \
1097 s-memory.adb<s-memory-mingw.adb \
1098 s-osinte.ads<s-osinte-mingw.ads \
1099 s-osprim.adb<s-osprim-mingw.adb \
1100 s-taprop.adb<s-taprop-mingw.adb \
1101 s-taspri.ads<s-taspri-mingw.ads \
1102 s-parame.adb<s-parame-mingw.adb \
1103 g-socthi.ads<g-socthi-mingw.ads \
1104 g-socthi.adb<g-socthi-mingw.adb \
1105 g-soccon.ads<g-soccon-mingw.ads \
1106 g-soliop.ads<g-soliop-mingw.ads \
1107 system.ads<system-mingw.ads
1109 TOOLS_TARGET_PAIRS= \
1110 mlib-tgt.adb<mlib-tgt-mingw.adb \
1111 indepsw.adb<indepsw-mingw.adb
1116 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1117 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1118 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1119 EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o
1121 # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT auto-import
1122 # support for array/record will be done.
1123 GNATLIB_SHARED = gnatlib-shared-win32
1124 LIBRARY_VERSION := $(LIB_VERSION)
1127 ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
1128 LIBGNAT_TARGET_PAIRS = \
1129 a-intnam.ads<a-intnam-linux.ads \
1130 g-soccon.ads<g-soccon-linux-ppc.ads \
1131 s-inmaop.adb<s-inmaop-posix.adb \
1132 s-intman.adb<s-intman-posix.adb \
1133 s-osinte.adb<s-osinte-posix.adb \
1134 s-osinte.ads<s-osinte-linux.ads \
1135 s-osprim.adb<s-osprim-posix.adb \
1136 s-taprop.adb<s-taprop-linux.adb \
1137 s-taspri.ads<s-taspri-posix.ads \
1138 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1139 s-parame.adb<s-parame-linux.adb \
1140 system.ads<system-linux-ppc.ads
1142 TOOLS_TARGET_PAIRS = \
1143 mlib-tgt.adb<mlib-tgt-linux.adb \
1144 indepsw.adb<indepsw-gnu.adb
1147 THREADSLIB = -lpthread
1148 GNATLIB_SHARED = gnatlib-shared-dual
1150 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1151 LIBRARY_VERSION := $(LIB_VERSION)
1154 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
1155 LIBGNAT_TARGET_PAIRS = \
1156 a-intnam.ads<a-intnam-linux.ads \
1157 s-inmaop.adb<s-inmaop-posix.adb \
1158 s-intman.adb<s-intman-posix.adb \
1159 s-osinte.adb<s-osinte-posix.adb \
1160 s-osinte.ads<s-osinte-linux.ads \
1161 s-osprim.adb<s-osprim-posix.adb \
1162 s-taprop.adb<s-taprop-linux.adb \
1163 s-taspri.ads<s-taspri-posix.ads \
1164 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1165 s-parame.adb<s-parame-linux.adb \
1166 system.ads<system-linux-sparc.ads
1168 TOOLS_TARGET_PAIRS = \
1169 mlib-tgt.adb<mlib-tgt-linux.adb \
1170 indepsw.adb<indepsw-gnu.adb
1173 THREADSLIB = -lpthread
1174 GNATLIB_SHARED = gnatlib-shared-dual
1176 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1177 LIBRARY_VERSION := $(LIB_VERSION)
1180 ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1181 LIBGNAT_TARGET_PAIRS = \
1182 a-intnam.ads<a-intnam-linux.ads \
1183 s-inmaop.adb<s-inmaop-posix.adb \
1184 s-intman.adb<s-intman-posix.adb \
1185 s-osinte.adb<s-osinte-posix.adb \
1186 s-osinte.ads<s-osinte-linux-hppa.ads \
1187 s-osprim.adb<s-osprim-posix.adb \
1188 s-taprop.adb<s-taprop-linux.adb \
1189 s-taspri.ads<s-taspri-posix.ads \
1190 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1191 s-parame.adb<s-parame-linux.adb \
1192 system.ads<system-linux-hppa.ads
1194 TOOLS_TARGET_PAIRS = \
1195 mlib-tgt.adb<mlib-tgt-linux.adb \
1196 indepsw.adb<indepsw-gnu.adb
1199 THREADSLIB = -lpthread
1200 GNATLIB_SHARED = gnatlib-shared-dual
1202 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1203 LIBRARY_VERSION := $(LIB_VERSION)
1206 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1207 LIBGNAT_TARGET_PAIRS = \
1208 a-intnam.ads<a-intnam-linux.ads \
1209 a-numaux.ads<a-numaux-libc-x86.ads \
1210 g-soccon.ads<g-soccon-linux-64.ads \
1211 s-inmaop.adb<s-inmaop-posix.adb \
1212 s-intman.adb<s-intman-posix.adb \
1213 s-osinte.ads<s-osinte-linux.ads \
1214 s-osinte.adb<s-osinte-posix.adb \
1215 s-osprim.adb<s-osprim-posix.adb \
1216 s-taprop.adb<s-taprop-linux.adb \
1217 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1218 s-taspri.ads<s-taspri-posix.ads \
1219 system.ads<system-linux-ia64.ads
1221 TOOLS_TARGET_PAIRS = \
1222 mlib-tgt.adb<mlib-tgt-linux.adb \
1223 indepsw.adb<indepsw-gnu.adb
1227 THREADSLIB=-lpthread
1228 GNATLIB_SHARED=gnatlib-shared-dual
1230 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1231 LIBRARY_VERSION := $(LIB_VERSION)
1234 ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
1235 LIBGNAT_TARGET_PAIRS = \
1236 a-intnam.ads<a-intnam-linux.ads \
1237 s-inmaop.adb<s-inmaop-posix.adb \
1238 s-intman.adb<s-intman-posix.adb \
1239 s-osinte.ads<s-osinte-linux-alpha.ads \
1240 s-osinte.adb<s-osinte-posix.adb \
1241 s-osprim.adb<s-osprim-posix.adb \
1242 s-taprop.adb<s-taprop-linux.adb \
1243 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1244 s-taspri.ads<s-taspri-posix.ads \
1245 system.ads<system-linux-alpha.ads
1247 TOOLS_TARGET_PAIRS = \
1248 mlib-tgt.adb<mlib-tgt-linux.adb \
1249 indepsw.adb<indepsw-gnu.adb
1253 THREADSLIB=-lpthread
1254 GNATLIB_SHARED=gnatlib-shared-dual
1255 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1256 LIBRARY_VERSION := $(LIB_VERSION)
1259 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
1260 LIBGNAT_TARGET_PAIRS = \
1261 a-intnam.ads<a-intnam-linux.ads \
1262 a-numaux.adb<a-numaux-x86.adb \
1263 a-numaux.ads<a-numaux-x86.ads \
1264 g-soccon.ads<g-soccon-linux-64.ads \
1265 s-inmaop.adb<s-inmaop-posix.adb \
1266 s-intman.adb<s-intman-posix.adb \
1267 s-osinte.ads<s-osinte-linux.ads \
1268 s-osinte.adb<s-osinte-posix.adb \
1269 s-osprim.adb<s-osprim-posix.adb \
1270 s-taprop.adb<s-taprop-linux.adb \
1271 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1272 s-taspri.ads<s-taspri-posix.ads \
1273 system.ads<system-linux-x86_64.ads
1275 TOOLS_TARGET_PAIRS = \
1276 mlib-tgt.adb<mlib-tgt-linux.adb \
1277 indepsw.adb<indepsw-gnu.adb
1280 THREADSLIB=-lpthread
1281 GNATLIB_SHARED=gnatlib-shared-dual
1283 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1284 LIBRARY_VERSION := $(LIB_VERSION)
1287 ifeq ($(strip $(filter-out powerpc darwin%,$(arch) $(osys))),)
1288 LIBGNAT_TARGET_PAIRS = \
1289 a-intnam.ads<a-intnam-darwin.ads \
1290 s-inmaop.adb<s-inmaop-posix.adb \
1291 s-intman.adb<s-intman-posix.adb \
1292 s-osinte.adb<s-osinte-darwin.adb \
1293 s-osinte.ads<s-osinte-darwin.ads \
1294 s-osprim.adb<s-osprim-posix.adb \
1295 s-taprop.adb<s-taprop-posix.adb \
1296 s-taspri.ads<s-taspri-posix.ads \
1297 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1298 g-soccon.ads<g-soccon-darwin.ads \
1299 a-numaux.ads<a-numaux-darwin.ads \
1300 a-numaux.adb<a-numaux-darwin.adb \
1301 system.ads<system-darwin-ppc.ads
1303 TOOLS_TARGET_PAIRS = \
1304 mlib-tgt.adb<mlib-tgt-darwin.adb
1307 GNATLIB_SHARED = gnatlib-shared-darwin
1308 SO_OPTS = -Wl,-flat_namespace
1311 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1312 LIBRARY_VERSION := $(LIB_VERSION)
1316 ifneq ($(EH_MECHANISM),)
1317 LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
1318 EXTRA_LIBGNAT_SRCS+=raise$(EH_MECHANISM).c
1319 EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
1322 # The runtime library for gnat comprises two directories. One contains the
1323 # Ada source files that the compiler (gnat1) needs -- these files are listed
1324 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1325 # corresponding .ali files for the parts written in Ada, libgnat.a for
1326 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1327 # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1328 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1329 # go into the directory. The pthreads emulation is built in the threads
1330 # subdirectory and copied.
1331 LIBGNAT_SRCS = ada.h adaint.c adaint.h argv.c cio.c cstreams.c \
1332 errno.c exit.c cal.c ctrl_c.c \
1333 raise.h raise.c sysdep.c aux-io.c init.c initialize.c seh_init.c \
1334 final.c tracebak.c tb-alvms.c tb-alvxw.c expect.c mkdir.c socket.c gsocket.h \
1335 $(EXTRA_LIBGNAT_SRCS)
1337 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o \
1338 raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o \
1339 final.o tracebak.o expect.o mkdir.o socket.o $(EXTRA_LIBGNAT_OBJS)
1341 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1342 # the library installation will change and there will be a
1343 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1344 # from ADA_INCLUDE_SRCS.
1346 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
1347 # the following include file:
1349 include $(fsrcdir)/Makefile.rtl
1351 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
1352 g-trasym.o memtrack.o
1354 # Default run time files
1357 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1358 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1359 sequenio.ads system.ads memtrack.adb \
1360 a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
1361 s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
1363 LIBGNAT=../rts/libgnat.a
1364 GCC_LINK="$(CC) -static-libgcc $(ADA_INCLUDES)"
1366 # when compiling the tools, the runtime has to be first on the path so that
1367 # it hides the runtime files lying with the rest of the sources
1368 ifeq ($(TOOLSCASE),native)
1369 vpath %.ads ../rts ../
1370 vpath %.adb ../rts ../
1371 vpath %.c ../rts ../
1372 vpath %.h ../rts ../
1375 # in the cross tools case, everything is compiled with the native
1376 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1377 ifeq ($(TOOLSCASE),cross)
1385 ../../gnatchop$(exeext):
1386 $(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)"
1387 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatchop
1388 $(GNATLINK) -v gnatchop -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1390 ../../gnat$(exeext):
1391 $(GNATMAKE) -c $(ADA_INCLUDES) gnatcmd --GCC="$(CC) $(ALL_ADAFLAGS)"
1392 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatcmd
1393 $(GNATLINK) -v gnatcmd -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1395 ../../gnatkr$(exeext):
1396 $(GNATMAKE) -c $(ADA_INCLUDES) gnatkr --GCC="$(CC) $(ALL_ADAFLAGS)"
1397 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatkr
1398 $(GNATLINK) -v gnatkr -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1400 ../../gnatls$(exeext):
1401 $(GNATMAKE) -c $(ADA_INCLUDES) gnatls --GCC="$(CC) $(ALL_ADAFLAGS)"
1402 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatls
1403 $(GNATLINK) -v gnatls -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1405 ../../gnatname$(exeext):
1406 $(GNATMAKE) -c $(ADA_INCLUDES) gnatname --GCC="$(CC) $(ALL_ADAFLAGS)"
1407 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatname
1408 $(GNATLINK) -v gnatname -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1410 ../../gprmake$(exeext):
1411 $(GNATMAKE) -c $(ADA_INCLUDES) gprmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1412 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gprmake
1413 $(GNATLINK) -v gprmake -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1415 ../../gnatprep$(exeext):
1416 $(GNATMAKE) -c $(ADA_INCLUDES) gnatprep --GCC="$(CC) $(ALL_ADAFLAGS)"
1417 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatprep
1418 $(GNATLINK) -v gnatprep -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1420 ../../gnatxref$(exeext):
1421 $(GNATMAKE) -c $(ADA_INCLUDES) gnatxref --GCC="$(CC) $(ALL_ADAFLAGS)"
1422 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatxref
1423 $(GNATLINK) -v gnatxref -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1425 ../../gnatfind$(exeext):
1426 $(GNATMAKE) -c $(ADA_INCLUDES) gnatfind --GCC="$(CC) $(ALL_ADAFLAGS)"
1427 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatfind
1428 $(GNATLINK) -v gnatfind -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1430 ../../gnatclean$(exeext):
1431 $(GNATMAKE) -c $(ADA_INCLUDES) gnatclean --GCC="$(CC) $(ALL_ADAFLAGS)"
1432 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatclean
1433 $(GNATLINK) -v gnatclean -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1435 ../../gnatsym$(exeext):
1436 $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
1437 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
1438 $(GNATLINK) -v gnatsym -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1440 ../../gnatdll$(exeext):
1441 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1442 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) $(GNATBIND_FLAGS) gnatdll
1443 $(GNATLINK) -v gnatdll -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1445 ../../vxaddr2line$(exeext):
1446 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
1447 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
1448 $(GNATLINK) -v vxaddr2line -o $@ --GCC=$(GCC_LINK) $(CLIB)
1451 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1452 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1453 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
1454 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1455 --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1457 # Note the use of the "mv" command in order to allow gnatlink to be linked with
1458 # with the former version of gnatlink itself which cannot override itself.
1460 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1461 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
1462 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1463 --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1464 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
1466 # Needs to be built with CC=gcc
1467 # Since the RTL should be built with the latest compiler, remove the
1468 # stamp target in the parent directory whenever gnat1 is rebuilt
1470 # Likewise for the tools
1471 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o $(GNATMAKE_OBJS)
1472 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1475 ../../gnatlink$(exeext): $(P) b_gnatl.o link.o $(GNATLINK_OBJS)
1476 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1479 ../../gnatbl$(exeext): gnatbl.o
1480 $(CC) -o $@ $(ALL_CFLAGS) $(LDFLAGS) gnatbl.o $(TOOLS_LIBS)
1482 gnatbl.o: gnatbl.c adaint.h
1483 $(CC) $(ALL_CFLAGS) $(INCLUDES) -c $< $(OUTPUT_OPTION)
1486 @if [ ! -f stamp-gnatlib ] ; \
1488 $(ECHO) You must first build the GNAT library: make gnatlib; \
1494 install-gnatlib: ../stamp-gnatlib
1495 # Create the directory before deleting it, in case the directory is
1496 # a list of directories (as it may be on VMS). This ensures we are
1497 # deleting the right one.
1498 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1499 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1500 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1501 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1502 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1503 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1504 for file in rts/*.ali; do \
1505 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1507 -$(INSTALL_DATA) rts/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1508 -cd rts; for file in *$(arext);do \
1509 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1510 $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
1512 -$(foreach file, $(EXTRA_ADALIB_FILES), \
1513 $(INSTALL_DATA_DATE) rts/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
1515 # Install the shared libraries, if any, using $(INSTALL) instead
1516 # of $(INSTALL_DATA). The latter may force a mode inappropriate
1517 # for shared libraries on some targets, e.g. on HP-UX where the x
1518 # permission is required.
1519 for file in gnat gnarl; do \
1520 if [ -f rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
1521 $(INSTALL) rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1522 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1524 if [ -f rts/lib$${file}$(soext) ]; then \
1525 $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1526 $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
1529 # This copy must be done preserving the date on the original file.
1530 for file in rts/*.adb rts/*.ads; do \
1531 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
1533 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1534 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1538 $(RM) rts/s-*$(objext)
1540 $(RM) rts/a-*$(objext)
1542 $(RM) rts/*$(objext)
1545 touch ../stamp-gnatlib2
1546 $(RM) ../stamp-gnatlib
1548 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1549 # successive target commands. Although the Gnu make documentation
1550 # implies this is true on all systems, I suspect it may not be, So care
1551 # has been taken to allow a sed script to look for ";)" and substitue
1552 # for ";" the appropriate character in the range of lines below
1553 # beginning with "GNULLI Begin" and ending with "GNULLI End"
1555 # GNULLI Begin ###########################################################
1557 ../stamp-gnatlib1: Makefile ../stamp-gnatlib2
1561 # Copy target independent sources
1562 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
1563 $(LN_S) $(fsrcpfx)$(f) rts ;) true
1564 # Remove files to be replaced by target dependent sources
1565 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1566 rts/$(word 1,$(subst <, ,$(PAIR))))
1567 $(RM) rts/*-*-*.ads rts/*-*-*.adb
1568 # Copy new target dependent sources
1569 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1570 $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1571 rts/$(word 1,$(subst <, ,$(PAIR)));)
1572 $(RM) ../stamp-gnatlib
1573 touch ../stamp-gnatlib1
1575 # GNULLI End #############################################################
1577 # Don't use semicolon separated shell commands that involve list expansions.
1578 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
1579 # line lengths in excess of 256 characters.
1580 # Example: cd rts; ar rc libfoo.a $(LONG_LIST_OF_OBJS)
1581 # is guaranteed to overflow the buffer.
1583 # ??? GCC_FOR_TARGET is supposed to be passed from the top level
1584 # Makefile, but this is not the case from e.g. libada, so provide a suitable
1586 GCC_FOR_TARGET=./xgcc -B./ $(FLAGS_FOR_TARGET)
1588 gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
1590 CC="`echo \"$(GCC_FOR_TARGET)\" \
1591 | sed -e 's^./xgcc^../../xgcc^' -e 's^-B./^-B../../^'`" \
1592 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
1593 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
1595 -f ../Makefile $(LIBGNAT_OBJS)
1597 CC="`echo \"$(GCC_FOR_TARGET)\" \
1598 | sed -e 's^\./xgcc^../../xgcc^' -e 's^-B./^-B../../^'`" \
1600 CFLAGS="$(GNATLIBCFLAGS)" \
1601 ADAFLAGS="$(GNATLIBFLAGS)" \
1605 $(RM) rts/libgnat$(arext) rts/libgnarl$(arext)
1606 $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgnat$(arext) \
1607 $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
1608 ifneq ($(PREFIX_OBJS),)
1609 $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgccprefix$(arext) \
1611 $(RANLIB_FOR_TARGET) rts/libgccprefix$(arext)
1613 $(RANLIB_FOR_TARGET) rts/libgnat$(arext)
1614 $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgnarl$(arext) \
1615 $(addprefix rts/,$(GNATRTL_TASKING_OBJS))
1616 $(RANLIB_FOR_TARGET) rts/libgnarl$(arext)
1617 ifeq ($(GMEM_LIB),gmemlib)
1618 $(AR_FOR_TARGET) $(AR_FLAGS) rts/libgmem$(arext) \
1620 $(RANLIB_FOR_TARGET) rts/libgmem$(arext)
1622 $(CHMOD) a-wx rts/*.ali
1623 touch ../stamp-gnatlib
1625 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
1626 gnatlib-shared-default:
1627 $(MAKE) $(FLAGS_TO_PASS) \
1628 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1629 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1630 THREAD_KIND="$(THREAD_KIND)" \
1632 $(RM) rts/libgna*$(soext)
1633 cd rts; ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
1634 $(TARGET_LIBGCC2_CFLAGS) \
1635 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1636 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
1637 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1639 cd rts; ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
1640 $(TARGET_LIBGCC2_CFLAGS) \
1641 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1642 $(GNATRTL_TASKING_OBJS) \
1643 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1645 cd rts; $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1647 cd rts; $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1650 gnatlib-shared-dual:
1651 $(MAKE) $(FLAGS_TO_PASS) \
1652 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1653 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1654 THREAD_KIND="$(THREAD_KIND)" \
1655 gnatlib-shared-default
1656 $(MV) rts/libgna*$(soext) .
1657 $(RM) ../stamp-gnatlib2
1658 $(MAKE) $(FLAGS_TO_PASS) \
1659 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1660 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1661 THREAD_KIND="$(THREAD_KIND)" \
1663 $(MV) libgna*$(soext) rts
1665 gnatlib-shared-dual-win32:
1666 $(MAKE) $(FLAGS_TO_PASS) \
1667 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1668 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1669 THREAD_KIND="$(THREAD_KIND)" \
1670 gnatlib-shared-win32
1671 $(MV) rts/libgna*$(soext) .
1672 $(RM) ../stamp-gnatlib2
1673 $(MAKE) $(FLAGS_TO_PASS) \
1674 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1675 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1676 THREAD_KIND="$(THREAD_KIND)" \
1678 $(MV) libgna*$(soext) rts
1680 # ??? we need to add the option to support auto-import of arrays/records to
1681 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
1682 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
1684 gnatlib-shared-win32:
1685 $(MAKE) $(FLAGS_TO_PASS) \
1686 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1687 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1688 THREAD_KIND="$(THREAD_KIND)" \
1690 $(RM) rts/libgna*$(soext)
1691 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1692 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1693 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
1694 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
1695 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1696 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1697 $(GNATRTL_TASKING_OBJS) \
1698 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1699 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
1701 gnatlib-shared-darwin:
1702 $(MAKE) $(FLAGS_TO_PASS) \
1703 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1704 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
1706 THREAD_KIND="$(THREAD_KIND)" \
1708 $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
1709 cd rts; ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
1710 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1711 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
1714 cd rts; ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
1715 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1716 $(GNATRTL_TASKING_OBJS) \
1718 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
1719 cd rts; $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1721 cd rts; $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1725 $(MAKE) $(FLAGS_TO_PASS) \
1726 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1727 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1728 THREAD_KIND="$(THREAD_KIND)" \
1730 $(RM) rts/libgna*$(soext)
1731 cd rts && echo "case_sensitive=yes" > SYMVEC_$$$$.opt && \
1732 objdump --syms $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) | \
1733 $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt && \
1734 echo "case_sensitive=NO" >> SYMVEC_$$$$.opt && \
1735 ../../xgcc -g -B../../ -nostartfiles -shared -shared-libgcc \
1736 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
1737 sys\$$library:trace.exe \
1738 --for-linker=/noinform \
1739 --for-linker=SYMVEC_$$$$.opt \
1740 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
1741 cd rts && echo "case_sensitive=yes" > SYMVEC_$$$$.opt && \
1742 objdump --syms $(GNATRTL_TASKING_OBJS) | \
1743 $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt && \
1744 echo "case_sensitive=NO" >> SYMVEC_$$$$.opt && \
1745 ../../xgcc -g -B../../ -nostartfiles -shared -shared-libgcc \
1746 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
1747 libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1748 sys\$$library:trace.exe \
1749 --for-linker=/noinform \
1750 --for-linker=SYMVEC_$$$$.opt \
1751 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
1754 $(MAKE) $(FLAGS_TO_PASS) \
1755 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1756 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1757 THREAD_KIND="$(THREAD_KIND)" \
1758 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
1762 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1
1763 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' rts/system.ads > rts/s.ads
1764 $(MV) rts/s.ads rts/system.ads
1765 $(MAKE) $(FLAGS_TO_PASS) \
1766 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1767 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1768 THREAD_KIND="$(THREAD_KIND)" \
1769 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
1772 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1
1773 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' rts/system.ads > rts/s.ads
1774 $(MV) rts/s.ads rts/system.ads
1775 $(MAKE) $(FLAGS_TO_PASS) \
1776 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1777 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1778 THREAD_KIND="$(THREAD_KIND)" \
1779 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
1781 # .s files for cross-building
1783 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
1785 # Compiling object files from source files.
1787 # Note that dependencies on obstack.h are not written
1788 # because that file is not part of GCC.
1789 # Dependencies on gvarargs.h are not written
1790 # because all that file does, when not compiling with GCC,
1791 # is include the system varargs.h.
1793 b_gnatl.c : $(GNATLINK_OBJS)
1794 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
1795 b_gnatl.o : b_gnatl.c
1797 b_gnatm.c : $(GNATMAKE_OBJS)
1798 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
1799 b_gnatm.o : b_gnatm.c
1801 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
1802 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
1804 # force no sibling call optimization on s-traceb.o so the number of stack
1805 # frames to be skipped when computing a call chain is not modified by
1806 # optimization. However we can do that only when building the runtime
1807 # (not the compiler) because the -fno-optimize-sibling-calls exists
1810 ifneq (,$(findstring xgcc,$(CC)))
1811 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
1813 NO_SIBLING_ADAFLAGS=
1816 s-traceb.o : s-traceb.adb
1817 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
1818 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
1821 # force debugging information on s-tasdeb.o so that it is always
1822 # possible to set conditional breakpoints on tasks.
1824 s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
1825 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
1828 # force debugging information on a-except.o so that it is always
1829 # possible to set conditional breakpoints on exceptions.
1830 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
1832 a-except.o : a-except.adb a-except.ads
1833 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
1834 $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
1836 # force debugging information on s-assert.o so that it is always
1837 # possible to set breakpoint on assert failures.
1839 s-assert.o : s-assert.adb s-assert.ads a-except.ads
1840 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
1843 adadecode.o : adadecode.c adadecode.h
1847 deftarg.o : deftarg.c
1849 exit.o : adaint.h exit.c
1855 socket.o : socket.c gsocket.h
1857 raise-gcc.o : raise-gcc.c raise.h
1858 raise.o : raise.c raise.h
1860 gen-soccon: gen-soccon.c gsocket.h
1861 $(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1862 -UIN_GCC -DTARGET=\"$(target_alias)\" \
1866 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
1867 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
1869 init.o : init.c ada.h types.h raise.h
1870 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
1871 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
1873 initialize.o : initialize.c
1874 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
1875 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
1877 # No optimization to compile this file as optimizations (-O1 or above) breaks
1878 # the SEH handling on Windows. The reasons are not clear.
1879 seh_init.o : seh_init.c raise.h
1880 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) -O0 \
1881 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
1883 # Need to keep the frame pointer in this file to pop the stack properly on
1885 tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c
1886 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1887 -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
1889 # In GNU Make, ignore whether `stage*' exists.
1890 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
1891 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
1895 # Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
1897 ../../gnatlbr$(exeext): ../../prefix.o
1898 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
1899 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
1900 $(GNATLINK) -v gnatlbr -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1902 ../../vms_help$(exeext):
1903 $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
1904 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
1905 $(GNATLINK) -v vms_help -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
1907 ../../gnat.hlp: ../../vms_help$(exeext)
1908 ../../vms_help$(exeext) $(fsrcdir)/gnat.help_in \
1909 $(fsrcdir)/vms_data.ads ../../gnat.hlp