1 # Makefile for GNU Ada Compiler (GNAT).
2 # Copyright (C) 1994-2003 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, 59 Temple Place - Suite 330,
19 #Boston, MA 02111-1307, 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.
108 # How to invoke ranlib.
110 # Test to use to see whether ranlib exists on the system.
111 RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
114 PWD_COMMAND = $${PWDCMD-pwd}
115 # How to copy preserving the date
116 INSTALL_DATA_DATE = cp -p
119 GNATBIND = $(STAGE_PREFIX)gnatbind
120 GNATBIND_FLAGS = -static -x
122 ADAFLAGS = -W -Wall -gnatpg -gnata
123 SOME_ADAFLAGS =-gnata
124 FORCE_DEBUG_ADAFLAGS = -g
125 GNATLIBFLAGS = -gnatpg
126 GNATLIBCFLAGS = -g -O2
127 GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
129 ALL_ADA_CFLAGS = $(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
130 ALL_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \
132 MOST_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \
139 SYMDEPS = $(LIBINTL_DEP)
140 OUTPUT_OPTION = @OUTPUT_OPTION@
148 # Define this as & to perform parallel make on a Sequent.
149 # Note that this has some bugs, and it seems currently necessary
150 # to compile all the gen* files first by hand to avoid erroneous results.
153 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
154 # It omits XCFLAGS, and specifies -B./.
155 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
156 GCC_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
158 # Tools to use when building a cross-compiler.
159 # These are used because `configure' appends `cross-make'
160 # to the makefile when making a cross-compiler.
162 # We don't use cross-make. Instead we use the tools from the build tree,
163 # if they are available.
164 # program_transform_name and objdir are set by configure.in.
165 program_transform_name =
169 xmake_file = @xmake_file@
170 tmake_file = @tmake_file@
171 host_canonical=@host@
172 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
173 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
175 # Directory where sources are, from where we are.
179 fsrcdir := $(shell cd $(srcdir);${PWD_COMMAND})
180 fsrcpfx := $(shell cd $(srcdir);${PWD_COMMAND})/
181 fcurdir := $(shell ${PWD_COMMAND})
182 fcurpfx := $(shell ${PWD_COMMAND})/
184 # Top build directory, relative to here.
187 # Internationalization library.
189 LIBINTL_DEP = @LIBINTL_DEP@
191 # Any system libraries needed just for GNAT.
192 SYSLIBS = @GNAT_LIBEXC@
194 # List of extra object files linked in with various programs.
195 EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o
197 # List extra gnattools
200 # List of target dependent sources, overridden below as necessary
203 # Type of tools build we are doing; default is not compiling tools.
206 # End of variables for you to override.
210 # This tells GNU Make version 3 not to put all variables in the environment.
213 # tmake_file and xmake_file expand to lists with entries of the form
214 # $(srcdir)/config/... but here $(srcdir) is the ada subdirectory so we
215 # need to adjust the paths. There can't be spaces in the subst arguments
216 # or we get spurious spaces in the actual list of files to include.
219 ifneq ($(tmake_file),)
220 include $(subst /config,/../config,$(tmake_file))
224 ifneq ($(xmake_file),)
225 include $(subst /config,/../config,$(xmake_file))
228 # Now figure out from those variables how to compile and link.
230 all.indirect: Makefile ../gnat1$(exeext)
232 # IN_GCC distinguishes between code compiled into GCC itself and other
233 # programs built during a bootstrap.
234 # autoconf inserts -DCROSS_COMPILE if we are building a cross compiler.
235 INTERNAL_CFLAGS = @CROSS@ -DIN_GCC
237 # This is the variable actually used when we compile.
238 LOOSE_CFLAGS = `echo $(CFLAGS) $(WARN2_CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`
239 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS) \
243 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
245 # This is where we get libiberty.a from.
246 LIBIBERTY = ../../libiberty/libiberty.a
248 # How to link with both our special library facilities
249 # and the system's installed libraries.
250 LIBS = $(LIBINTL) $(LIBIBERTY) $(SYSLIBS)
251 LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY)
252 TOOLS_LIBS = $(LIBGNAT) $(EXTRA_GNATTOOLS_OBJS) ../../../libiberty/libiberty.a $(SYSLIBS)
254 # Specify the directories to be searched for header files.
255 # Both . and srcdir are used, in that order,
256 # so that tm.h and config.h will be found in the compilation
257 # subdirectory rather than in the source directory.
258 INCLUDES = -I- -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config \
259 -I$(srcdir)/../../include
261 ADA_INCLUDES = -I- -I. -I$(srcdir)
263 INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir) -I$(fsrcdir)/../config \
264 -I$(fsrcdir)/../../include -I$(fsrcdir)/..
265 ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)
267 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
270 # Say how to compile Ada programs.
271 .SUFFIXES: .ada .adb .ads .asm
273 # Always use -I$(srcdir)/config when compiling.
275 $(CC) -c -x assembler $< $(OUTPUT_OPTION)
278 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
282 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
285 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
287 # how to regenerate this file
288 Makefile: ../config.status $(srcdir)/Makefile.in $(srcdir)/../version.c
290 LANGUAGES="$(CONFIG_LANGUAGES)" \
292 CONFIG_FILES=ada/Makefile $(SHELL) config.status
294 # This tells GNU make version 3 not to export all the variables
295 # defined in this file into the environment.
298 # Lists of files for various purposes.
300 GNATLINK_OBJS = gnatlink.o link.o \
301 ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o gnatvsn.o \
302 hostparm.o namet.o opt.o osint.o output.o rident.o sdefault.o \
303 stylesw.o switch.o table.o tree_io.o types.o validsw.o widechar.o
305 GNATMAKE_OBJS = ctrl_c.o ali.o ali-util.o s-casuti.o \
306 alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\
307 erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
308 gnatmake.o gnatvsn.o hostparm.o krunch.o lib.o make.o makeusg.o \
309 mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-utl.o \
310 namet.o nlists.o opt.o osint.o osint-m.o output.o \
311 prj.o prj-attr.o prj-com.o prj-dect.o prj-env.o prj-err.o prj-ext.o prj-nmsc.o \
312 prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \
313 rident.o 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 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<4nintnam.ads \
344 s-inmaop.adb<5ninmaop.adb \
345 s-intman.adb<5nintman.adb \
346 s-osinte.ads<5nosinte.ads \
347 s-osprim.adb<7sosprim.adb \
348 s-taprop.adb<5ntaprop.adb \
349 s-taspri.ads<5ntaspri.ads
351 # Default shared object option. Note that we rely on the fact that the "soname"
352 # option will always be present and last in this flag, so that we can have
353 # $(SO_OPTS)libgnat-x.xx
355 SO_OPTS = -Wl,-soname,
357 # Default gnatlib-shared target.
358 # By default, equivalent to gnatlib.
359 # Set to gnatlib-shared-default, gnatlib-shared-dual, or a platform specific
360 # target when supported.
361 GNATLIB_SHARED = gnatlib
363 # default value for gnatmake's target dependent file
366 # By default, do not distribute prefix.o (in libgccprefix), since it is only
367 # needed by external GNAT tools such as gnatdist and Glide.
368 # Override this variable on native platforms when needed.
371 # To avoid duplicate code, use this variable to set PREFIX_OBJS when needed:
372 PREFIX_REAL_OBJS = ../prefix.o \
373 ../../libiberty/concat.o \
374 ../../libiberty/xmalloc.o \
375 ../../libiberty/xstrdup.o \
376 ../../libiberty/xexit.o
378 LIB_VERSION = $(strip $(shell grep ' Library_Version :' $(fsrcpfx)gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/'))
380 # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
381 # $(strip STRING) removes leading and trailing spaces from STRING.
382 # If what's left is null then it's a match.
384 ifeq ($(strip $(filter-out %86 os2 OS2 os2_emx,$(arch) $(osys))),)
385 LIBGNAT_TARGET_PAIRS = \
386 a-excpol.adb<4wexcpol.adb \
387 a-intnam.ads<4nintnam.ads \
388 a-numaux.adb<86numaux.adb \
389 a-numaux.ads<86numaux.ads \
390 s-inmaop.adb<5ninmaop.adb \
391 s-interr.adb<5ointerr.adb \
392 s-intman.adb<5nintman.adb \
393 s-mastop.adb<5omastop.adb \
394 s-osinte.adb<5oosinte.adb \
395 s-osinte.ads<5oosinte.ads \
396 s-osprim.adb<5oosprim.adb \
397 s-parame.adb<5oparame.adb \
398 system.ads<5osystem.ads \
399 s-taprop.adb<5otaprop.adb \
400 s-taspri.ads<5otaspri.ads
402 EXTRA_GNATRTL_NONTASKING_OBJS = \
409 ifeq ($(strip $(filter-out %86 interix%,$(arch) $(osys))),)
410 LIBGNAT_TARGET_PAIRS = \
411 a-excpol.adb<4hexcpol.adb \
412 a-intnam.ads<4pintnam.ads \
413 a-numaux.adb<86numaux.adb \
414 a-numaux.ads<86numaux.ads \
415 g-soccon.ads<3psoccon.ads \
416 s-inmaop.adb<7sinmaop.adb \
417 s-intman.adb<7sintman.adb \
418 s-mastop.adb<5omastop.adb \
419 s-osinte.adb<7sosinte.adb \
420 s-osinte.ads<5posinte.ads \
421 s-osprim.adb<5posprim.adb \
422 s-taprop.adb<7staprop.adb \
423 system.ads<5psystem.ads \
424 s-taspri.ads<7staspri.ads \
425 s-tpopsp.adb<7stpopsp.adb
427 THREADSLIB = -lgthreads -lmalloc
428 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
431 # sysv5uw is SCO UnixWare 7
432 ifeq ($(strip $(filter-out %86 sysv5uw%,$(arch) $(osys))),)
433 LIBGNAT_TARGET_PAIRS = \
434 a-excpol.adb<4wexcpol.adb \
435 a-intnam.ads<41intnam.ads \
436 a-numaux.adb<86numaux.adb \
437 a-numaux.ads<86numaux.ads \
438 s-inmaop.adb<7sinmaop.adb \
439 s-intman.adb<7sintman.adb \
440 s-mastop.adb<5omastop.adb \
441 s-osinte.ads<51osinte.ads \
442 s-osinte.adb<51osinte.adb \
443 s-osprim.adb<5posprim.adb \
444 s-taprop.adb<7staprop.adb \
445 s-taspri.ads<7staspri.ads \
446 s-tpopsp.adb<5atpopsp.adb \
447 system.ads<51system.ads \
448 g-soccon.ads<31soccon.ads \
449 g-soliop.ads<31soliop.ads
451 THREADSLIB = -lthread
452 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
454 GNATLIB_SHARED = gnatlib-shared-dual
455 LIBRARY_VERSION := $(LIB_VERSION)
458 ifeq ($(strip $(filter-out alpha% dec vx%,$(targ))),)
459 LIBGNAT_TARGET_PAIRS = \
460 a-sytaco.ads<4zsytaco.ads \
461 a-sytaco.adb<4zsytaco.adb \
462 a-intnam.ads<4zintnam.ads \
463 a-numaux.ads<4znumaux.ads \
464 s-inmaop.adb<7sinmaop.adb \
465 s-interr.adb<5zinterr.adb \
466 s-intman.ads<5zintman.ads \
467 s-intman.adb<5zintman.adb \
468 s-osinte.adb<5zosinte.adb \
469 s-osinte.ads<5zosinte.ads \
470 s-osprim.adb<5zosprim.adb \
471 s-parame.ads<5zparame.ads \
472 s-taprop.adb<5ztaprop.adb \
473 s-tpopsp.adb<5ztpopsp.adb \
474 s-taspri.ads<5ztaspri.ads \
475 s-vxwork.ads<5avxwork.ads \
476 g-soccon.ads<3zsoccon.ads \
477 g-socthi.ads<3zsocthi.ads \
478 g-socthi.adb<3zsocthi.adb \
479 system.ads<5zsystem.ads
481 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
482 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
485 ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
486 LIBGNAT_TARGET_PAIRS = \
487 a-sytaco.ads<4zsytaco.ads \
488 a-sytaco.adb<4zsytaco.adb \
489 a-intnam.ads<4zintnam.ads \
490 a-numaux.ads<4znumaux.ads \
491 s-inmaop.adb<7sinmaop.adb \
492 s-interr.adb<5zinterr.adb \
493 s-intman.ads<5zintman.ads \
494 s-intman.adb<5zintman.adb \
495 s-osinte.adb<5zosinte.adb \
496 s-osinte.ads<5zosinte.ads \
497 s-osprim.adb<5zosprim.adb \
498 s-parame.ads<5zparame.ads \
499 s-taprop.adb<5ztaprop.adb \
500 s-taspri.ads<5ztaspri.ads \
501 s-tpopsp.adb<5ztpopsp.adb \
502 s-vxwork.ads<5kvxwork.ads \
503 g-soccon.ads<3zsoccon.ads \
504 g-socthi.ads<3zsocthi.ads \
505 g-socthi.adb<3zsocthi.adb \
506 system.ads<5ksystem.ads
508 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5zml-tgt.adb
510 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
511 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
513 ifeq ($(strip $(filter-out yes,$(TRACE))),)
514 LIBGNAT_TARGET_PAIRS += \
515 s-traces.adb<7straces.adb \
516 s-tratas.adb<7stratas.adb \
517 s-trafor.adb<7strafor.adb \
518 s-trafor.ads<7strafor.ads \
519 s-tfsetr.adb<5ztfsetr.adb
523 ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
524 LIBGNAT_TARGET_PAIRS = \
525 a-sytaco.ads<4zsytaco.ads \
526 a-sytaco.adb<4zsytaco.adb \
527 a-intnam.ads<4zintnam.ads \
528 a-numaux.ads<4znumaux.ads \
529 s-inmaop.adb<7sinmaop.adb \
530 s-interr.adb<5zinterr.adb \
531 s-intman.ads<5zintman.ads \
532 s-intman.adb<5zintman.adb \
533 s-osinte.adb<5zosinte.adb \
534 s-osinte.ads<5zosinte.ads \
535 s-osprim.adb<5zosprim.adb \
536 s-parame.ads<5zparame.ads \
537 s-taprop.adb<5ztaprop.adb \
538 s-taspri.ads<5ztaspri.ads \
539 s-tpopsp.adb<5ztpopsp.adb \
540 s-vxwork.ads<5pvxwork.ads \
541 g-soccon.ads<3zsoccon.ads \
542 g-socthi.ads<3zsocthi.ads \
543 g-socthi.adb<3zsocthi.adb \
544 system.ads<5ysystem.ads
546 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5zml-tgt.adb
548 EXTRA_HIE_NONE_TARGET_PAIRS= \
549 system.ads<50system.ads
551 EXTRA_RAVEN_SOURCES=i-vxwork.ads s-vxwork.ads
552 EXTRA_RAVEN_OBJS=i-vxwork.o s-vxwork.o
553 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
554 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
555 HIE_RAVEN_TARGET_PAIRS=\
556 $(HIE_NONE_TARGET_PAIRS) \
557 a-reatim.ads<1areatim.ads \
558 a-reatim.adb<1areatim.adb \
559 a-retide.adb<1aretide.adb \
560 a-interr.adb<1ainterr.adb \
561 s-interr.ads<1sinterr.ads \
562 s-interr.adb<1sinterr.adb \
563 s-taskin.ads<1staskin.ads \
564 s-taskin.adb<1staskin.adb \
565 s-tarest.adb<1starest.adb \
566 s-tposen.ads<1stposen.ads \
567 s-tposen.adb<1stposen.adb \
568 s-osinte.adb<1sosinte.adb \
569 s-taprop.ads<1staprop.ads \
570 s-taprop.adb<1staprop.adb \
571 s-taprob.ads<1staprob.ads \
572 s-taprob.adb<1staprob.adb \
573 a-sytaco.ads<1asytaco.ads \
574 a-sytaco.adb<1asytaco.adb \
575 a-intnam.ads<4zintnam.ads \
576 s-osinte.ads<5zosinte.ads \
577 s-parame.ads<5zparame.ads \
578 s-taspri.ads<5ztaspri.ads \
579 s-vxwork.ads<5pvxwork.ads \
580 a-taside.adb<1ataside.adb \
582 ifeq ($(strip $(filter-out yes,$(TRACE))),)
583 LIBGNAT_TARGET_PAIRS += \
584 s-traces.adb<7straces.adb \
585 s-trafor.adb<7strafor.adb \
586 s-trafor.ads<7strafor.ads \
587 s-tratas.adb<7stratas.adb \
588 s-tfsetr.adb<5ztfsetr.adb
592 ifeq ($(strip $(filter-out powerpc% unknown elf,$(targ))),)
593 EXTRA_HIE_NONE_TARGET_PAIRS= \
594 system.ads<59system.ads
596 LIBGNAT_TARGET_PAIRS = \
597 $(HIE_NONE_TARGET_PAIRS)
600 ifeq ($(strip $(filter-out sparc% unknown elf,$(targ))),)
601 EXTRA_HIE_NONE_TARGET_PAIRS= \
602 system.ads<5rsystem.ads
604 LIBGNAT_TARGET_PAIRS = \
605 $(HIE_NONE_TARGET_PAIRS)
608 ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
609 LIBGNAT_TARGET_PAIRS = \
610 a-sytaco.ads<4zsytaco.ads \
611 a-sytaco.adb<4zsytaco.adb \
612 a-intnam.ads<4zintnam.ads \
613 a-numaux.ads<4znumaux.ads \
614 s-inmaop.adb<7sinmaop.adb \
615 s-interr.adb<5zinterr.adb \
616 s-intman.ads<5zintman.ads \
617 s-intman.adb<5zintman.adb \
618 s-osinte.adb<5zosinte.adb \
619 s-osinte.ads<5zosinte.ads \
620 s-osprim.adb<5zosprim.adb \
621 s-parame.ads<5zparame.ads \
622 s-taprop.adb<5ztaprop.adb \
623 s-taspri.ads<5ztaspri.ads \
624 s-tpopsp.adb<5ztpopsp.adb \
625 s-vxwork.ads<5svxwork.ads \
626 g-soccon.ads<3zsoccon.ads \
627 g-socthi.ads<3zsocthi.ads \
628 g-socthi.adb<3zsocthi.adb \
629 system.ads<5csystem.ads \
631 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5zml-tgt.adb
633 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
634 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
637 ifeq ($(strip $(filter-out xscale% coff wrs vx%,$(targ))),)
638 LIBGNAT_TARGET_PAIRS = \
639 a-sytaco.ads<4zsytaco.ads \
640 a-sytaco.adb<4zsytaco.adb \
641 a-intnam.ads<4zintnam.ads \
642 a-numaux.ads<4znumaux.ads \
643 s-inmaop.adb<7sinmaop.adb \
644 s-interr.adb<5zinterr.adb \
645 s-intman.ads<5zintman.ads \
646 s-intman.adb<5zintman.adb \
647 s-osinte.adb<5zosinte.adb \
648 s-osinte.ads<5zosinte.ads \
649 s-osprim.adb<5zosprim.adb \
650 s-parame.ads<5zparame.ads \
651 s-taprop.adb<5ztaprop.adb \
652 s-taspri.ads<5ztaspri.ads \
653 s-tpopsp.adb<5ztpopsp.adb \
654 s-vxwork.ads<5xvxwork.ads \
655 g-soccon.ads<3zsoccon.ads \
656 g-socthi.ads<3zsocthi.ads \
657 g-socthi.adb<3zsocthi.adb \
658 system.ads<5rsystem.ads
660 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5zml-tgt.adb
662 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
663 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
666 ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
667 LIBGNAT_TARGET_PAIRS = \
668 a-sytaco.ads<4zsytaco.ads \
669 a-sytaco.adb<4zsytaco.adb \
670 a-intnam.ads<4zintnam.ads \
671 a-numaux.ads<4znumaux.ads \
672 s-inmaop.adb<7sinmaop.adb \
673 s-interr.adb<5zinterr.adb \
674 s-intman.ads<5zintman.ads \
675 s-intman.adb<5zintman.adb \
676 s-osinte.adb<5zosinte.adb \
677 s-osinte.ads<5zosinte.ads \
678 s-osprim.adb<5zosprim.adb \
679 s-parame.ads<5zparame.ads \
680 s-taprop.adb<5ztaprop.adb \
681 s-taspri.ads<5ztaspri.ads \
682 s-tpopsp.adb<5ztpopsp.adb \
683 s-vxwork.ads<5mvxwork.ads \
684 g-soccon.ads<3zsoccon.ads \
685 g-socthi.ads<3zsocthi.ads \
686 g-socthi.adb<3zsocthi.adb \
687 system.ads<5msystem.ads
689 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5zml-tgt.adb
691 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
692 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
695 ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
696 LIBGNAT_TARGET_PAIRS = \
697 a-intnam.ads<4sintnam.ads \
698 s-inmaop.adb<7sinmaop.adb \
699 s-intman.adb<5sintman.adb \
700 s-osinte.adb<5sosinte.adb \
701 s-osinte.ads<5sosinte.ads \
702 s-osprim.adb<5sosprim.adb \
703 s-parame.adb<5sparame.adb \
704 s-taprop.adb<5staprop.adb \
705 s-tasinf.adb<5stasinf.adb \
706 s-tasinf.ads<5stasinf.ads \
707 s-taspri.ads<5staspri.ads \
708 s-tpopsp.adb<5stpopsp.adb \
709 g-soccon.ads<3ssoccon.ads \
710 g-soliop.ads<3ssoliop.ads \
711 system.ads<5ssystem.ads
713 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5sml-tgt.adb
715 THREADSLIB = -lposix4 -lthread
716 MISCLIB = -lposix4 -lnsl -lsocket
717 SYMLIB = -laddr2line -lbfd $(LIBINTL)
719 GNATLIB_SHARED = gnatlib-shared-dual
721 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
722 LIBRARY_VERSION := $(LIB_VERSION)
724 ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),)
725 LIBGNAT_TARGET_PAIRS = \
726 a-intnam.ads<4sintnam.ads \
727 s-inmaop.adb<7sinmaop.adb \
728 s-intman.adb<5sintman.adb \
729 s-osinte.adb<7sosinte.adb \
730 s-osinte.ads<5tosinte.ads \
731 s-osprim.adb<5sosprim.adb \
732 s-taprop.adb<7staprop.adb \
733 s-taspri.ads<7staspri.ads \
734 s-tpopsp.adb<7stpopsp.adb \
735 g-soccon.ads<3ssoccon.ads \
736 g-soliop.ads<3ssoliop.ads \
737 system.ads<5ssystem.ads
739 THREADSLIB = -lgthreads -lmalloc
742 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
743 LIBGNAT_TARGET_PAIRS = \
744 a-intnam.ads<4sintnam.ads \
745 s-inmaop.adb<7sinmaop.adb \
746 s-intman.adb<7sintman.adb \
747 s-osinte.adb<5iosinte.adb \
748 s-osinte.ads<54osinte.ads \
749 s-osprim.adb<5sosprim.adb \
750 s-taprop.adb<7staprop.adb \
751 s-taspri.ads<7staspri.ads \
752 s-tpopsp.adb<5atpopsp.adb \
753 g-soccon.ads<3ssoccon.ads \
754 g-soliop.ads<3ssoliop.ads \
755 system.ads<5ssystem.ads
757 THREADSLIB = -lposix4 -lpthread
760 ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),)
761 LIBGNAT_TARGET_PAIRS = \
762 a-intnam.ads<4sintnam.ads \
763 s-inmaop.adb<7sinmaop.adb \
764 s-intman.adb<5sintman.adb \
765 s-osinte.adb<5sosinte.adb \
766 s-osinte.ads<5sosinte.ads \
767 s-osprim.adb<5sosprim.adb \
768 s-parame.adb<5sparame.adb \
769 s-taprop.adb<5staprop.adb \
770 s-tasinf.adb<5stasinf.adb \
771 s-tasinf.ads<5stasinf.ads \
772 s-taspri.ads<5staspri.ads \
773 s-tpopsp.adb<5stpopsp.adb \
774 g-soccon.ads<3ssoccon.ads \
775 g-soliop.ads<3ssoliop.ads \
776 system.ads<5usystem.ads
780 ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
781 LIBGNAT_TARGET_PAIRS = \
782 a-numaux.adb<86numaux.adb \
783 a-numaux.ads<86numaux.ads \
784 a-intnam.ads<4sintnam.ads \
785 s-inmaop.adb<7sinmaop.adb \
786 s-intman.adb<5sintman.adb \
787 s-mastop.adb<5omastop.adb \
788 s-osinte.adb<5sosinte.adb \
789 s-osinte.ads<5sosinte.ads \
790 s-osprim.adb<5sosprim.adb \
791 s-parame.adb<5sparame.adb \
792 s-taprop.adb<5staprop.adb \
793 s-tasinf.adb<5stasinf.adb \
794 s-tasinf.ads<5stasinf.ads \
795 s-taspri.ads<5staspri.ads \
796 s-tpopsp.adb<5stpopsp.adb \
797 g-soccon.ads<3ssoccon.ads \
798 g-soliop.ads<3ssoliop.ads \
799 system.ads<5esystem.ads
801 THREADSLIB = -lposix4 -lthread
802 MISCLIB = -lposix4 -lnsl -lsocket
804 GNATLIB_SHARED = gnatlib-shared-dual
805 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
806 LIBRARY_VERSION := $(LIB_VERSION)
809 ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
810 LIBGNAT_TARGET_PAIRS = \
811 a-intnam.ads<4lintnam.ads \
812 a-numaux.adb<86numaux.adb \
813 a-numaux.ads<86numaux.ads \
814 s-inmaop.adb<7sinmaop.adb \
815 s-intman.adb<7sintman.adb \
816 s-mastop.adb<5omastop.adb \
817 s-osinte.adb<5iosinte.adb \
818 s-osinte.ads<5iosinte.ads \
819 s-osprim.adb<7sosprim.adb \
820 s-taprop.adb<5itaprop.adb \
821 s-taspri.ads<5itaspri.ads \
822 s-tpopsp.adb<5atpopsp.adb \
823 s-parame.adb<5lparame.adb \
824 system.ads<5lsystem.ads
826 TOOLS_TARGET_PAIRS = mlib-tgt.adb<5lml-tgt.adb
827 SYMLIB = -laddr2line -lbfd -liberty $(LIBINTL)
828 THREADSLIB = -lpthread
829 GNATLIB_SHARED = gnatlib-shared-dual
831 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
832 LIBRARY_VERSION := $(LIB_VERSION)
834 ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),)
835 LIBGNAT_TARGET_PAIRS = \
836 a-intnam.ads<4lintnam.ads \
837 a-numaux.adb<86numaux.adb \
838 a-numaux.ads<86numaux.ads \
839 s-inmaop.adb<7sinmaop.adb \
840 s-intman.adb<7sintman.adb \
841 s-mastop.adb<5omastop.adb \
842 s-osinte.adb<7sosinte.adb \
843 s-osinte.ads<5losinte.ads \
844 s-osprim.adb<7sosprim.adb \
845 s-taprop.adb<7staprop.adb \
846 s-taspri.ads<7staspri.ads \
847 s-tpopsp.adb<7stpopsp.adb \
848 system.ads<5lsystem.ads
850 THREADSLIB = -lgthreads -lmalloc
854 ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
855 LIBGNAT_TARGET_PAIRS = \
856 a-intnam.ads<45intnam.ads \
857 g-soccon.ads<35soccon.ads \
858 s-inmaop.adb<7sinmaop.adb \
859 s-intman.adb<7sintman.adb \
860 s-mastop.adb<5omastop.adb \
861 s-osinte.adb<55osinte.adb \
862 s-osinte.ads<55osinte.ads \
863 s-osprim.adb<7sosprim.adb \
864 s-taprop.adb<7staprop.adb \
865 s-taspri.ads<7staspri.ads \
866 s-tpopsp.adb<7stpopsp.adb \
867 system.ads<56system.ads
870 LIBRARY_VERSION := $(LIB_VERSION)
873 ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
874 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
875 LIBGNAT_TARGET_PAIRS = \
876 a-intnam.ads<4gintnam.ads \
877 s-inmaop.adb<7sinmaop.adb \
878 s-intman.adb<5fintman.adb \
879 s-mastop.adb<5gmastop.adb \
880 s-osinte.adb<5fosinte.adb \
881 s-osinte.ads<5fosinte.ads \
882 s-osprim.adb<7sosprim.adb \
883 s-proinf.adb<5gproinf.adb \
884 s-proinf.ads<5gproinf.ads \
885 s-taprop.adb<5ftaprop.adb \
886 s-tasinf.ads<5ftasinf.ads \
887 s-taspri.ads<7staspri.ads \
888 s-tpopsp.adb<7stpopsp.adb \
889 s-traceb.adb<7straceb.adb \
890 g-soccon.ads<3gsoccon.ads \
891 system.ads<5gsystem.ads
893 THREADSLIB = -lpthread
894 GNATLIB_SHARED = gnatlib-shared-default
897 LIBGNAT_TARGET_PAIRS = \
898 a-intnam.ads<4gintnam.ads \
899 s-inmaop.adb<5ninmaop.adb \
900 s-interr.adb<5ginterr.adb \
901 s-intman.adb<5gintman.adb \
902 s-mastop.adb<5gmastop.adb \
903 s-osinte.adb<5fosinte.adb \
904 s-osinte.ads<5gosinte.ads \
905 s-osprim.adb<7sosprim.adb \
906 s-proinf.adb<5gproinf.adb \
907 s-proinf.ads<5gproinf.ads \
908 s-taprop.adb<5gtaprop.adb \
909 s-tasinf.adb<5gtasinf.adb \
910 s-tasinf.ads<5gtasinf.ads \
911 s-taspri.ads<7staspri.ads \
912 s-traceb.adb<7straceb.adb \
913 g-soccon.ads<3gsoccon.ads \
914 system.ads<5fsystem.ads
916 THREADSLIB = -lathread
919 TOOLS_TARGET_PAIRS = mlib-tgt.adb<5gml-tgt.adb
922 SO_OPTS = -Wl,-all,-set_version,sgi1.0,-update_registry,../so_locations,-soname,
923 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
924 LIBRARY_VERSION := $(LIB_VERSION)
927 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
928 LIBGNAT_TARGET_PAIRS = \
929 a-excpol.adb<4wexcpol.adb \
930 a-intnam.ads<4hintnam.ads \
931 s-inmaop.adb<7sinmaop.adb \
932 s-interr.adb<5ginterr.adb \
933 s-intman.adb<7sintman.adb \
934 s-osinte.adb<5hosinte.adb \
935 s-osinte.ads<5hosinte.ads \
936 s-parame.ads<5hparame.ads \
937 s-osprim.adb<7sosprim.adb \
938 s-taprop.adb<5htaprop.adb \
939 s-taspri.ads<5htaspri.ads \
940 s-tpopsp.adb<7stpopsp.adb \
941 g-soccon.ads<3hsoccon.ads \
942 system.ads<5hsystem.ads
944 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
947 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
948 LIBGNAT_TARGET_PAIRS = \
949 a-intnam.ads<4hintnam.ads \
950 s-inmaop.adb<7sinmaop.adb \
951 s-intman.adb<7sintman.adb \
952 s-osinte.adb<5iosinte.adb \
953 s-osinte.ads<53osinte.ads \
954 s-parame.ads<5hparame.ads \
955 s-osprim.adb<7sosprim.adb \
956 s-traceb.adb<5htraceb.adb \
957 s-taprop.adb<7staprop.adb \
958 s-taspri.ads<7staspri.ads \
959 s-tpopsp.adb<5atpopsp.adb \
960 g-soccon.ads<3hsoccon.ads \
961 system.ads<5hsystem.ads
963 TOOLS_TARGET_PAIRS = mlib-tgt.adb<5hml-tgt.adb
964 TGT_LIB = /usr/lib/libcl.a
965 THREADSLIB = -lpthread
966 SYMLIB = -laddr2line -lbfd $(LIBINTL)
970 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
971 GNATLIB_SHARED = gnatlib-shared-dual
972 LIBRARY_VERSION := $(LIB_VERSION)
974 ifeq ($(strip $(filter-out dce DCE,$(THREAD_KIND))),)
975 LIBGNAT_TARGET_PAIRS = \
976 a-excpol.adb<4wexcpol.adb \
977 a-intnam.ads<4hintnam.ads \
978 s-inmaop.adb<7sinmaop.adb \
979 s-interr.adb<5ginterr.adb \
980 s-intman.adb<7sintman.adb \
981 s-osinte.adb<5hosinte.adb \
982 s-osinte.ads<5hosinte.ads \
983 s-parame.ads<5hparame.ads \
984 s-osprim.adb<7sosprim.adb \
985 s-taprop.adb<5htaprop.adb \
986 s-taspri.ads<5htaspri.ads \
987 s-tpopsp.adb<7stpopsp.adb \
988 g-soccon.ads<3hsoccon.ads \
989 system.ads<5hsystem.ads
996 ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
997 LIBGNAT_TARGET_PAIRS = \
998 a-intnam.ads<4cintnam.ads \
999 s-inmaop.adb<7sinmaop.adb \
1000 s-intman.adb<7sintman.adb \
1001 s-osinte.adb<5bosinte.adb \
1002 s-osinte.ads<5bosinte.ads \
1003 s-osprim.adb<7sosprim.adb \
1004 s-taprop.adb<7staprop.adb \
1005 s-taspri.ads<7staspri.ads \
1006 s-tpopsp.adb<7stpopsp.adb \
1007 g-soccon.ads<3bsoccon.ads \
1008 system.ads<5bsystem.ads
1010 THREADSLIB = -lpthreads
1011 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1013 ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),)
1014 LIBGNAT_TARGET_PAIRS = \
1015 a-intnam.ads<4cintnam.ads \
1016 s-inmaop.adb<7sinmaop.adb \
1017 s-intman.adb<7sintman.adb \
1018 s-osinte.adb<7sosinte.adb \
1019 s-osinte.ads<5cosinte.ads \
1020 s-osprim.adb<7sosprim.adb \
1021 s-taprop.adb<7staprop.adb \
1022 s-taspri.ads<7staspri.ads \
1023 s-tpopsp.adb<7stpopsp.adb \
1024 g-soccon.ads<3bsoccon.ads \
1025 system.ads<5bsystem.ads
1027 THREADSLIB = -lgthreads -lmalloc
1030 TOOLS_TARGET_PAIRS = mlib-tgt.adb<5bml-tgt.adb
1032 SYMLIB = -laddr2line -lbfd -liberty $(LIBINTL)
1036 ifeq ($(strip $(filter-out lynxos,$(osys))),)
1037 ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
1038 LIBGNAT_TARGET_PAIRS = \
1039 a-numaux.adb<86numaux.adb \
1040 a-numaux.ads<86numaux.ads \
1041 a-intnam.ads<42intnam.ads \
1042 s-mastop.adb<5omastop.adb \
1043 s-inmaop.adb<7sinmaop.adb \
1044 s-intman.adb<7sintman.adb \
1045 s-osinte.adb<56osinte.adb \
1046 s-osinte.ads<56osinte.ads \
1047 s-osprim.adb<7sosprim.adb \
1048 s-taprop.adb<56taprop.adb \
1049 s-taspri.ads<56taspri.ads \
1050 s-tpopsp.adb<56tpopsp.adb \
1051 system.ads<58system.ads
1053 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1056 LIBGNAT_TARGET_PAIRS = \
1057 a-intnam.ads<42intnam.ads \
1058 s-inmaop.adb<7sinmaop.adb \
1059 s-intman.adb<7sintman.adb \
1060 s-osinte.adb<52osinte.adb \
1061 s-osinte.ads<52osinte.ads \
1062 s-osprim.adb<7sosprim.adb \
1063 s-taprop.adb<7staprop.adb \
1064 s-taspri.ads<7staspri.ads \
1065 s-tpopsp.adb<7stpopsp.adb \
1066 system.ads<57system.ads
1068 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
1069 LIBGNAT_TARGET_PAIRS = \
1070 a-intnam.ads<42intnam.ads \
1071 s-inmaop.adb<7sinmaop.adb \
1072 s-intman.adb<7sintman.adb \
1073 s-osinte.adb<56osinte.adb \
1074 s-osinte.ads<56osinte.ads \
1075 s-osprim.adb<7sosprim.adb \
1076 s-taprop.adb<56taprop.adb \
1077 s-taspri.ads<56taspri.ads \
1078 s-tpopsp.adb<56tpopsp.adb \
1079 system.ads<57system.ads
1085 ifeq ($(strip $(filter-out rtems%,$(osys))),)
1086 LIBGNAT_TARGET_PAIRS = \
1087 a-intnam.ads<4rintnam.ads \
1088 s-inmaop.adb<7sinmaop.adb \
1089 s-intman.adb<7sintman.adb \
1090 s-osinte.adb<5rosinte.adb \
1091 s-osinte.ads<5rosinte.ads \
1092 s-osprim.adb<7sosprim.adb \
1093 s-parame.adb<5rparame.adb \
1094 s-taprop.adb<7staprop.adb \
1095 s-taspri.ads<7staspri.ads \
1096 s-tpopsp.adb<5rtpopsp.adb
1099 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
1100 LIBGNAT_TARGET_PAIRS = \
1101 a-intnam.ads<4aintnam.ads \
1102 s-inmaop.adb<7sinmaop.adb \
1103 s-intman.adb<7sintman.adb \
1104 s-mastop.adb<5amastop.adb \
1105 s-osinte.adb<5aosinte.adb \
1106 s-osinte.ads<5aosinte.ads \
1107 s-osprim.adb<5posprim.adb \
1108 s-taprop.adb<5ataprop.adb \
1109 s-tasinf.ads<5atasinf.ads \
1110 s-taspri.ads<5ataspri.ads \
1111 s-tpopsp.adb<5atpopsp.adb \
1112 s-traceb.adb<7straceb.adb \
1113 g-soccon.ads<3asoccon.ads \
1114 system.ads<5asystem.ads
1116 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5aml-tgt.adb
1119 SYMLIB = -laddr2line -lbfd $(LIBINTL)
1120 THREADSLIB = -lpthread -lmach -lexc -lrt
1121 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1122 GNATLIB_SHARED = gnatlib-shared-default
1123 LIBRARY_VERSION := $(LIB_VERSION)
1126 ifeq ($(strip $(filter-out alpha% ia64 dec vms% openvms% alphavms%,$(host))),)
1133 @ gnu:[bin]vmssymvec $<
1136 ifeq ($(strip $(filter-out alpha% ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1138 ifeq ($(strip $(filter-out ia64% hp vms% openvms%,$(targ))),)
1139 LIBGNAT_TARGET_PAIRS_AUX = \
1140 s-osinte.adb<5xosinte.adb \
1141 s-osinte.ads<5xosinte.ads \
1142 s-parame.ads<5vparame.ads
1144 ifeq ($(strip $(filter-out alpha64% dec hp vms% openvms% alphavms%,$(targ))),)
1145 LIBGNAT_TARGET_PAIRS_AUX = \
1146 s-osinte.adb<5vosinte.adb \
1147 s-osinte.ads<5vosinte.ads \
1148 s-parame.ads<5vparame.ads
1150 ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1151 LIBGNAT_TARGET_PAIRS_AUX = \
1152 s-osinte.adb<5vosinte.adb \
1153 s-osinte.ads<5vosinte.ads \
1154 s-parame.ads<5xparame.ads
1156 LIBGNAT_TARGET_PAIRS_AUX = \
1157 s-osinte.adb<5vosinte.adb \
1158 s-osinte.ads<5vosinte.ads \
1159 s-parame.ads<5vparame.ads
1164 LIBGNAT_TARGET_PAIRS = \
1165 a-caldel.adb<4vcaldel.adb \
1166 a-calend.adb<4vcalend.adb \
1167 a-calend.ads<4vcalend.ads \
1168 a-excpol.adb<4wexcpol.adb \
1169 a-intnam.ads<4vintnam.ads \
1170 a-numaux.ads<4vnumaux.ads \
1171 g-expect.adb<3vexpect.adb \
1172 g-soccon.ads<3vsoccon.ads \
1173 g-socthi.ads<3vsocthi.ads \
1174 g-socthi.adb<3vsocthi.adb \
1175 g-trasym.adb<3vtrasym.adb \
1176 i-cstrea.adb<6vcstrea.adb \
1177 i-cpp.adb<6vcpp.adb \
1178 interfac.ads<6vinterf.ads \
1179 s-asthan.adb<5vasthan.adb \
1180 s-crtl.ads<5vcrtl.ads \
1181 s-inmaop.adb<5vinmaop.adb \
1182 s-interr.adb<5vinterr.adb \
1183 s-intman.adb<5vintman.adb \
1184 s-intman.ads<5vintman.ads \
1185 s-osprim.adb<5vosprim.adb \
1186 s-osprim.ads<5vosprim.ads \
1187 s-taprop.adb<5vtaprop.adb \
1188 s-taspri.ads<5vtaspri.ads \
1189 s-tpopsp.adb<7stpopsp.adb \
1190 s-tpopde.adb<5vtpopde.adb \
1191 s-tpopde.ads<5vtpopde.ads \
1192 s-traent.adb<5vtraent.adb \
1193 s-traent.ads<5vtraent.ads \
1194 s-vaflop.adb<5vvaflop.adb \
1195 system.ads<5xsystem.ads \
1196 $(LIBGNAT_TARGET_PAIRS_AUX)
1198 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5vml-tgt.adb
1200 GNATLIB_SHARED=gnatlib-shared-vms
1201 EXTRA_LIBGNAT_SRCS=vmshandler.asm
1202 EXTRA_LIBGNAT_OBJS=vmshandler.o
1203 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1205 ../../gnatlbr$(exeext) \
1206 ,,/../gnatsym$(exeext)
1207 # This command transforms (YYYYMMDD) into YY,MMDD
1208 GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\)/\2,\3/')
1209 TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1210 LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1213 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1214 LIBGNAT_TARGET_PAIRS = \
1215 a-calend.adb<4wcalend.adb \
1216 a-excpol.adb<4wexcpol.adb \
1217 a-intnam.ads<4wintnam.ads \
1218 a-numaux.adb<86numaux.adb \
1219 a-numaux.ads<86numaux.ads \
1220 s-gloloc.adb<5wgloloc.adb \
1221 s-inmaop.adb<5ninmaop.adb \
1222 s-interr.adb<5ginterr.adb \
1223 s-intman.adb<5wintman.adb \
1224 s-mastop.adb<5omastop.adb \
1225 s-memory.adb<5wmemory.adb \
1226 s-osinte.ads<5wosinte.ads \
1227 s-osprim.adb<5wosprim.adb \
1228 s-taprop.adb<5wtaprop.adb \
1229 s-taspri.ads<5wtaspri.ads \
1230 g-socthi.ads<3wsocthi.ads \
1231 g-socthi.adb<3wsocthi.adb \
1232 g-soccon.ads<3wsoccon.ads \
1233 g-soliop.ads<3wsoliop.ads \
1234 system.ads<5wsystem.ads
1236 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5wml-tgt.adb
1238 SYMLIB = -laddr2line -lbfd -liberty $(LIBINTL)
1240 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1241 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1242 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1243 EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o
1245 # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT auto-import
1246 # support for array/record will be done.
1247 GNATLIB_SHARED = gnatlib-shared-win32
1248 LIBRARY_VERSION := $(LIB_VERSION)
1251 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1252 LIBGNAT_TARGET_PAIRS = \
1253 a-intnam.ads<4lintnam.ads \
1254 s-inmaop.adb<7sinmaop.adb \
1255 s-intman.adb<7sintman.adb \
1256 s-osinte.ads<5iosinte.ads \
1257 s-osinte.adb<5iosinte.adb \
1258 s-osprim.adb<7sosprim.adb \
1259 s-taprop.adb<5itaprop.adb \
1260 s-tpopsp.adb<5atpopsp.adb \
1261 s-taspri.ads<5itaspri.ads \
1262 system.ads<55system.ads
1264 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
1266 THREADSLIB=-lpthread
1267 GNATLIB_SHARED=gnatlib-shared-dual
1268 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1269 LIBRARY_VERSION := $(LIB_VERSION)
1272 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
1273 LIBGNAT_TARGET_PAIRS = \
1274 a-intnam.ads<4lintnam.ads \
1275 s-inmaop.adb<7sinmaop.adb \
1276 s-intman.adb<7sintman.adb \
1277 s-osinte.ads<5iosinte.ads \
1278 s-osinte.adb<5iosinte.adb \
1279 s-osprim.adb<7sosprim.adb \
1280 s-taprop.adb<5itaprop.adb \
1281 s-tpopsp.adb<5atpopsp.adb \
1282 s-taspri.ads<5itaspri.ads \
1283 system.ads<5nsystem.ads
1285 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
1287 THREADSLIB=-lpthread
1288 GNATLIB_SHARED=gnatlib-shared-dual
1289 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1290 LIBRARY_VERSION := $(LIB_VERSION)
1293 # The runtime library for gnat comprises two directories. One contains the
1294 # Ada source files that the compiler (gnat1) needs -- these files are listed
1295 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1296 # corresponding .ali files for the parts written in Ada, libgnat.a for
1297 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1298 # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1299 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1300 # go into the directory. The pthreads emulation is built in the threads
1301 # subdirectory and copied.
1302 LIBGNAT_SRCS = ada.h adaint.c adaint.h argv.c cio.c cstreams.c \
1303 errno.c exit.c cal.c ctrl_c.c \
1304 raise.h raise.c sysdep.c types.h aux-io.c init.c \
1305 final.c tracebak.c tb-alvms.c tb-alvxw.c expect.c mkdir.c socket.c \
1306 $(EXTRA_LIBGNAT_SRCS)
1308 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o \
1309 raise.o sysdep.o aux-io.o init.o cal.o final.o \
1310 tracebak.o expect.o mkdir.o socket.o $(EXTRA_LIBGNAT_OBJS)
1312 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1313 # the library installation will change and there will be a
1314 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1315 # from ADA_INCLUDE_SRCS.
1317 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
1318 # the following include file:
1320 include $(fsrcdir)/Makefile.rtl
1322 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
1323 g-trasym.o memtrack.o
1325 # Files which are suitable in no run time/hi integrity mode
1327 COMPILABLE_HIE_SOURCES= \
1347 a-except.adb $(EXTRA_HIE_SOURCES)
1349 NON_COMPILABLE_HIE_SOURCES= \
1360 HIE_SOURCES = $(NON_COMPILABLE_HIE_SOURCES) $(COMPILABLE_HIE_SOURCES)
1362 # Object to generate for the HI run time
1379 a-tags.o $(EXTRA_HIE_OBJS)
1381 # Files which are needed in ravenscar mode
1383 COMPILABLE_RAVEN_SOURCES = \
1384 $(COMPILABLE_HIE_SOURCES) \
1416 a-taside.adb $(EXTRA_RAVEN_SOURCES)
1418 NON_COMPILABLE_RAVEN_SOURCES= $(NON_COMPILABLE_HIE_SOURCES)
1420 RAVEN_SOURCES = $(NON_COMPILABLE_RAVEN_SOURCES) $(COMPILABLE_RAVEN_SOURCES)
1422 # Objects to generate for the ravenscar run time
1443 a-taside.o $(EXTRA_RAVEN_OBJS)
1445 # Default run time files
1448 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1449 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1450 sequenio.ads system.ads Makefile.adalib Makefile.prolog Makefile.generic \
1452 a-*.adb a-*.ads g-*.ad? i-*.ad? \
1453 s-[a-o]*.adb s-[p-z]*.adb \
1454 s-[a-o]*.ads s-[p-z]*.ads
1456 LIBGNAT=../rts/libgnat.a
1457 TOOLS_FLAGS_TO_PASS= \
1459 "CFLAGS=$(CFLAGS)" \
1460 "LDFLAGS=$(LDFLAGS)" \
1461 "ADAFLAGS=$(ADAFLAGS)" \
1462 "INCLUDES=$(INCLUDES_FOR_SUBDIR)"\
1463 "ADA_INCLUDES=$(ADA_INCLUDES) $(ADA_INCLUDES_FOR_SUBDIR)"\
1464 "libsubdir=$(libsubdir)" \
1465 "exeext=$(exeext)" \
1466 "fsrcdir=$(fsrcdir)" \
1467 "srcdir=$(fsrcdir)" \
1468 "TOOLS_LIBS=$(TOOLS_LIBS) $(TGT_LIB)" \
1469 "GNATMAKE=$(GNATMAKE)" \
1470 "GNATLINK=$(GNATLINK)" \
1471 "GNATBIND=$(GNATBIND)"
1473 # Build directory for the tools. Let's copy the target-dependent
1474 # sources using the same mechanism as for gnatlib. The other sources are
1475 # accessed using the vpath directive below
1481 -(cd tools; $(LN_S) ../sdefault.adb .)
1482 -$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
1483 $(RM) tools/$(word 1,$(subst <, ,$(PAIR)));\
1484 $(LN_S) $(fsrcdir)/$(word 2,$(subst <, ,$(PAIR))) \
1485 tools/$(word 1,$(subst <, ,$(PAIR)));)
1486 touch ../stamp-tools
1488 # when compiling the tools, the runtime has to be first on the path so that
1489 # it hides the runtime files lying with the rest of the sources
1490 ifeq ($(TOOLSCASE),native)
1491 vpath %.ads ../rts ../
1492 vpath %.adb ../rts ../
1493 vpath %.c ../rts ../
1494 vpath %.h ../rts ../
1497 # in the cross tools case, everything is compiled with the native
1498 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1499 ifeq ($(TOOLSCASE),cross)
1506 # gnatmake/link tools cannot always be built with gnatmake/link for bootstrap
1507 # reasons: gnatmake should be built with a recent compiler, a recent compiler
1508 # may not generate ALI files compatible with an old gnatmake so it is important
1509 # to be able to build gnatmake without a version of gnatmake around. Once
1510 # everything has been compiled once, gnatmake can be recompiled with itself
1511 # (see target gnattools1-re)
1512 gnattools1: ../stamp-tools ../stamp-gnatlib
1513 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1515 ../../gnatmake$(exeext) ../../gnatlink$(exeext) ../../gnatbl$(exeext)
1517 # gnatmake/link can be built with recent gnatmake/link if they are available.
1518 # This is especially convenient for building cross tools or for rebuilding
1519 # the tools when the original bootstrap has already be done.
1520 gnattools1-re: ../stamp-tools
1521 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1522 TOOLSCASE=cross INCLUDES="" gnatmake-re gnatlink-re
1524 # these tools are built with gnatmake & are common to native and cross
1525 gnattools2: ../stamp-tools
1526 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1528 ../../gnatchop$(exeext) ../../gnat$(exeext) ../../gnatkr$(exeext) \
1529 ../../gnatls$(exeext) ../../gnatprep$(exeext) \
1530 ../../gnatxref$(exeext) \
1531 ../../gnatfind$(exeext) ../../gnatname$(exeext) \
1532 ../../gnatclean$(exeext) \
1533 ../../gprcmd$(exeext) ../../gpr2make$(exeext)
1535 # These tools are only built for the native version.
1536 gnattools3: ../stamp-tools
1537 # $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1538 # TOOLSCASE=native top_builddir=../../.. \
1539 # ../../gnatmem$(exeext) $(EXTRA_GNATTOOLS)
1541 # those tools are only built for the cross version
1542 gnattools4: ../stamp-tools
1543 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1544 TOOLSCASE=cross top_buildir=../../.. \
1545 ../../vxaddr2line$(exeext)
1547 ../../gnatchop$(exeext): ../stamp-tools
1548 $(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)"
1549 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatchop
1550 $(GNATLINK) -v gnatchop -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1553 ../../gnat$(exeext): ../stamp-tools
1554 $(GNATMAKE) -c $(ADA_INCLUDES) gnatcmd --GCC="$(CC) $(ALL_ADAFLAGS)"
1555 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatcmd
1556 $(GNATLINK) -v gnatcmd -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1558 ../../gnatkr$(exeext): ../stamp-tools
1559 $(GNATMAKE) -c $(ADA_INCLUDES) gnatkr --GCC="$(CC) $(ALL_ADAFLAGS)"
1560 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatkr
1561 $(GNATLINK) -v gnatkr -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1563 ../../gnatls$(exeext): ../stamp-tools
1564 $(GNATMAKE) -c $(ADA_INCLUDES) gnatls --GCC="$(CC) $(ALL_ADAFLAGS)"
1565 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatls
1566 $(GNATLINK) -v gnatls -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1568 ../../gnatname$(exeext): ../stamp-tools
1569 $(GNATMAKE) -c $(ADA_INCLUDES) gnatname --GCC="$(CC) $(ALL_ADAFLAGS)"
1570 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatname
1571 $(GNATLINK) -v gnatname -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1574 ../../gpr2make$(exeext): ../stamp-tools
1575 $(GNATMAKE) -c $(ADA_INCLUDES) gpr2make --GCC="$(CC) $(ALL_ADAFLAGS)"
1576 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gpr2make
1577 $(GNATLINK) -v gpr2make -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1580 ../../gnatprep$(exeext): ../stamp-tools
1581 $(GNATMAKE) -c $(ADA_INCLUDES) gnatprep --GCC="$(CC) $(ALL_ADAFLAGS)"
1582 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatprep
1583 $(GNATLINK) -v gnatprep -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1586 ../../gnatxref$(exeext): ../stamp-tools
1587 $(GNATMAKE) -c $(ADA_INCLUDES) gnatxref --GCC="$(CC) $(ALL_ADAFLAGS)"
1588 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatxref
1589 $(GNATLINK) -v gnatxref -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1592 ../../gnatfind$(exeext): ../stamp-tools
1593 $(GNATMAKE) -c $(ADA_INCLUDES) gnatfind --GCC="$(CC) $(ALL_ADAFLAGS)"
1594 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatfind
1595 $(GNATLINK) -v gnatfind -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1598 ../../gnatclean$(exeext): ../stamp-tools
1599 $(GNATMAKE) -c $(ADA_INCLUDES) gnatclean --GCC="$(CC) $(ALL_ADAFLAGS)"
1600 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatclean
1601 $(GNATLINK) -v gnatclean -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1604 ../../gnatsym$(exeext): ../stamp-tools
1605 $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
1606 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
1607 $(GNATLINK) -v gnatsym -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1610 ../../gnatmem$(exeext): ../stamp-tools gmem.o $(SYMDEPS)
1611 ifeq ($(GMEM_LIB),gmemlib)
1612 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmem --GCC="$(CC) $(ALL_ADAFLAGS)"
1613 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmem
1614 $(GNATLINK) -v gnatmem -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1615 gmem.o $(SYMLIB) $(TOOLS_LIBS)
1618 ../../gnatdll$(exeext): ../stamp-tools
1619 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1620 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) $(GNATBIND_FLAGS) gnatdll
1621 $(GNATLINK) -v gnatdll -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1624 ../../gprcmd$(exeext): ../stamp-tools
1625 $(GNATMAKE) -c $(ADA_INCLUDES) gprcmd --GCC="$(CC) $(ALL_ADAFLAGS)"
1626 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gprcmd
1627 $(GNATLINK) -v gprcmd -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1629 ../../vxaddr2line$(exeext): ../stamp-tools
1630 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
1631 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
1632 $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(CLIB)
1634 gnatmake-re: ../stamp-tools
1635 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1636 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1637 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
1638 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1639 --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1641 # Note the use of the "mv" command in order to allow gnatlink to be linked with
1642 # with the former version of gnatlink itself which cannot override itself.
1643 gnatlink-re: ../stamp-tools link.o
1644 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1645 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
1646 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1647 --GCC="$(CC) $(ADA_INCLUDES)" link.o $(TOOLS_LIBS)
1648 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
1650 # Needs to be built with CC=gcc
1651 # Since the RTL should be built with the latest compiler, remove the
1652 # stamp target in the parent directory whenever gnat1 is rebuilt
1654 # Likewise for the tools
1655 ../../gnatmake$(exeext): $(P) b_gnatm.o $(GNATMAKE_OBJS)
1656 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1659 ../../gnatlink$(exeext): $(P) b_gnatl.o $(GNATLINK_OBJS)
1660 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1663 ../../gnatbl$(exeext): gnatbl.o
1664 $(CC) -o $@ $(ALL_CFLAGS) $(LDFLAGS) gnatbl.o $(TOOLS_LIBS)
1666 gnatbl.o: gnatbl.c adaint.h
1667 $(CC) $(ALL_CFLAGS) $(INCLUDES) -c $< $(OUTPUT_OPTION)
1670 @if [ ! -f stamp-gnatlib ] ; \
1672 $(ECHO) You must first build the GNAT library: make gnatlib; \
1678 install-gnatlib: ../stamp-gnatlib
1679 # Create the directory before deleting it, in case the directory is
1680 # a list of directories (as it may be on VMS). This ensures we are
1681 # deleting the right one.
1682 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1683 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1684 -$(MKDIR) $(DESTDIR)$(ADA_SHARE_MAKE_DIR)
1685 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1686 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1687 $(RMDIR) $(DESTDIR)$(ADA_SHARE_MAKE_DIR)
1688 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1689 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1690 -$(MKDIR) $(DESTDIR)$(ADA_SHARE_MAKE_DIR)
1691 -$(INSTALL_DATA) rts/Makefile.prolog $(DESTDIR)$(ADA_SHARE_MAKE_DIR)
1692 -$(INSTALL_DATA) rts/Makefile.generic $(DESTDIR)$(ADA_SHARE_MAKE_DIR)
1693 for file in rts/*.ali; do \
1694 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1696 -$(INSTALL_DATA) rts/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1697 -for file in rts/*$(arext);do \
1698 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1700 # Install the shared libraries, if any, using $(INSTALL) instead
1701 # of $(INSTALL_DATA). The latter may force a mode inappropriate
1702 # for shared libraries on some targets, e.g. on HP-UX where the x
1703 # permission is required.
1704 ifeq ($(strip $(filter-out alpha% dec vms% openvms% alphavms%,$(targ))),)
1705 -for file in rts/lib*$(soext);do \
1706 $(INSTALL) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1709 -for file in rts/lib*-*$(soext);do \
1710 $(INSTALL) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1713 # This copy must be done preserving the date on the original file.
1714 for file in rts/*.adb rts/*.ads; do \
1715 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
1717 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1718 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1722 $(RM) rts/s-*$(objext)
1724 $(RM) rts/a-*$(objext)
1726 $(RM) rts/*$(objext)
1729 touch ../stamp-gnatlib2
1730 $(RM) ../stamp-gnatlib
1732 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1733 # successive target commands. Although the Gnu make documentation
1734 # implies this is true on all systems, I suspect it may not be, So care
1735 # has been taken to allow a sed script to look for ";)" and substitue
1736 # for ";" the appropriate character in the range of lines below
1737 # beginning with "GNULLI Begin" and ending with "GNULLI End"
1739 # GNULLI Begin ###########################################################
1741 ../stamp-gnatlib1: Makefile ../stamp-gnatlib2
1745 # Copy target independent sources
1746 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
1747 $(LN_S) $(fsrcpfx)$(f) rts ;) true
1748 # Remove files to be replaced by target dependent sources
1749 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1750 rts/$(word 1,$(subst <, ,$(PAIR))))
1751 # Copy new target dependent sources
1752 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1753 $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1754 rts/$(word 1,$(subst <, ,$(PAIR)));)
1755 $(RM) ../stamp-gnatlib
1756 touch ../stamp-gnatlib1
1758 # GNULLI End #############################################################
1760 # Don't use semicolon separated shell commands that involve list expansions.
1761 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
1762 # line lengths in excess of 256 characters.
1763 # Example: cd rts; ar rc libfoo.a $(LONG_LIST_OF_OBJS)
1764 # is guaranteed to overflow the buffer.
1766 gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
1767 $(MAKE) -C rts CC="../../xgcc -B../../" \
1768 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
1769 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
1771 -f ../Makefile $(LIBGNAT_OBJS)
1772 $(MAKE) -C rts CC="../../xgcc -B../../" \
1774 CFLAGS="$(GNATLIBCFLAGS)" \
1775 ADAFLAGS="$(GNATLIBFLAGS)" \
1779 $(RM) rts/libgnat$(arext) rts/libgnarl$(arext)
1780 $(AR) $(AR_FLAGS) rts/libgnat$(arext) \
1781 $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
1782 ifneq ($(PREFIX_OBJS),)
1783 $(AR) $(AR_FLAGS) rts/libgccprefix$(arext) $(PREFIX_OBJS);
1785 if $(RANLIB_TEST) ; then $(RANLIB) rts/libgnat$(arext); else true; fi
1786 $(AR) $(AR_FLAGS) rts/libgnarl$(arext) \
1787 $(addprefix rts/,$(GNATRTL_TASKING_OBJS))
1788 if $(RANLIB_TEST) ; then $(RANLIB) rts/libgnarl$(arext); else true; fi
1789 ifeq ($(GMEM_LIB),gmemlib)
1790 $(AR) $(AR_FLAGS) rts/libgmem$(arext) rts/memtrack.o;
1792 $(CHMOD) a-wx rts/*.ali
1793 touch ../stamp-gnatlib
1795 HIE_NONE_TARGET_PAIRS=\
1796 a-except.ads<1aexcept.ads \
1797 a-except.adb<1aexcept.adb \
1798 a-tags.ads<1atags.ads \
1799 a-tags.adb<1atags.adb \
1800 s-secsta.ads<1ssecsta.ads \
1801 s-secsta.adb<1ssecsta.adb \
1802 i-c.ads<1ic.ads $(EXTRA_HIE_NONE_TARGET_PAIRS)
1804 # This target needs RTS_NAME, RTS_SRCS, RTS_TARGET_PAIRS to be set properly
1805 # it creates a rts with the proper structure and the right target
1808 $(RMDIR) rts-$(RTS_NAME)
1809 $(MKDIR) rts-$(RTS_NAME)
1810 $(CHMOD) u+w rts-$(RTS_NAME)
1811 $(MKDIR) rts-$(RTS_NAME)/adalib
1812 $(MKDIR) rts-$(RTS_NAME)/adainclude
1813 $(CHMOD) u+w rts-$(RTS_NAME)/*
1814 # Generate the project file
1815 $(ECHO) "project $(RTS_NAME) is" > rts-$(RTS_NAME)/$(RTS_NAME).gpr
1816 $(ECHO) " for Source_Dirs use (\"adainclude\");" \
1817 >> rts-$(RTS_NAME)/$(RTS_NAME).gpr
1818 $(ECHO) " for Object_Dir use \"adalib\";" \
1819 >> rts-$(RTS_NAME)/$(RTS_NAME).gpr
1820 $(ECHO) " for Source_List_File use " \
1821 >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1822 $(ECHO) " \"rts-$(RTS_NAME)_source_list.txt\";" \
1823 >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1824 $(ECHO) " package Builder is" >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1825 $(ECHO) " for Default_Switches (\"Ada\") use (\"-a\");" \
1826 >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1827 $(ECHO) " end Builder;" >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1828 $(ECHO) " package Compiler is" >> rts-$(RTS_NAME)/$(RTS_NAME).gpr
1829 $(ECHO) " for Default_Switches (\"Ada\") use (\"-nostdinc\");" \
1830 >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1831 $(ECHO) " end Compiler;" >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1832 $(ECHO) "end $(RTS_NAME);" >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1834 $(foreach f, $(COMPILABLE_SOURCES), \
1836 rts-$(RTS_NAME)/rts-$(RTS_NAME)_source_list.txt ;) true
1837 # Copy target independent sources
1838 $(foreach f,$(RTS_SRCS), \
1839 $(CP) $(fsrcpfx)$(f) rts-$(RTS_NAME)/adainclude/ ;) true
1840 # Remove files to be replaced by target dependent sources
1841 $(RM) $(foreach PAIR,$(RTS_TARGET_PAIRS), \
1842 rts-$(RTS_NAME)/adainclude/$(word 1,$(subst <, ,$(PAIR))))
1843 # Copy new target dependent sources
1844 $(foreach PAIR,$(RTS_TARGET_PAIRS), \
1845 $(CP) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1846 rts-$(RTS_NAME)/adainclude/$(word 1,$(subst <, ,$(PAIR)));)
1849 $(CP) -r rts-$(RTS_NAME) $(DESTDIR)$(libsubdir)/
1852 $(MAKE) $(FLAGS_TO_PASS) prepare-rts \
1853 RTS_NAME=zfp RTS_SRCS="$(HIE_SOURCES)" \
1854 RTS_TARGET_PAIRS="$(HIE_NONE_TARGET_PAIRS)" \
1855 COMPILABLE_SOURCES="$(COMPILABLE_HIE_SOURCES)"
1856 -$(GNATMAKE) -Prts-zfp/zfp.gpr --GCC="../../../xgcc -B../../../"
1857 cd rts-zfp/adalib/ ; $(AR) r libgnat.a *.o
1858 $(RM) rts-zfp/adalib/*.o
1859 $(CHMOD) a-wx rts-zfp/adalib/*.ali
1860 $(CHMOD) a-wx rts-zfp/adalib/libgnat.a
1863 $(MAKE) $(FLAGS_TO_PASS) prepare-rts \
1864 RTS_NAME=none RTS_SRCS="$(HIE_SOURCES)" \
1865 RTS_TARGET_PAIRS="$(HIE_NONE_TARGET_PAIRS)" \
1866 COMPILABLE_SOURCES="$(COMPILABLE_HIE_SOURCES)"
1867 -$(GNATMAKE) -Prts-none/none.gpr --GCC="../../../xgcc -B../../../"
1868 $(RM) rts-none/adalib/*.o
1869 $(CHMOD) a-wx rts-none/adalib/*.ali
1871 rts-ravenscar: force
1872 $(MAKE) $(FLAGS_TO_PASS) prepare-rts \
1873 RTS_NAME=ravenscar RTS_SRCS="$(RAVEN_SOURCES)" \
1874 RTS_TARGET_PAIRS="$(HIE_RAVEN_TARGET_PAIRS)" \
1875 COMPILABLE_SOURCES="$(COMPILABLE_RAVEN_SOURCES)"
1876 -$(GNATMAKE) -Prts-ravenscar/ravenscar.gpr \
1877 --GCC="../../../xgcc -B../../../"
1878 cd rts-ravenscar/adalib/ ; $(AR) r libgnat.a *.o
1879 $(RM) rts-ravenscar/adalib/*.o
1880 $(CHMOD) a-wx rts-ravenscar/adalib/*.ali
1881 $(CHMOD) a-wx rts-ravenscar/adalib/libgnat.a
1883 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
1884 gnatlib-shared-default:
1885 $(MAKE) $(FLAGS_TO_PASS) \
1886 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1887 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1888 THREAD_KIND="$(THREAD_KIND)" \
1890 $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
1891 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1892 -o libgnat-$(LIBRARY_VERSION)$(soext) \
1893 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
1894 $(SO_OPTS)libgnat-$(LIBRARY_VERSION)$(soext) $(MISCLIB) -lm
1895 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1896 -o libgnarl-$(LIBRARY_VERSION)$(soext) \
1897 $(GNATRTL_TASKING_OBJS) \
1898 $(SO_OPTS)libgnarl-$(LIBRARY_VERSION)$(soext) $(THREADSLIB)
1900 gnatlib-shared-dual:
1901 $(MAKE) $(FLAGS_TO_PASS) \
1902 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1903 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1904 THREAD_KIND="$(THREAD_KIND)" \
1905 gnatlib-shared-default
1906 $(MV) rts/libgna*$(soext) .
1907 $(RM) ../stamp-gnatlib2
1908 $(MAKE) $(FLAGS_TO_PASS) \
1909 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1910 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1911 THREAD_KIND="$(THREAD_KIND)" \
1913 $(MV) libgna*$(soext) rts
1915 gnatlib-shared-dual-win32:
1916 $(MAKE) $(FLAGS_TO_PASS) \
1917 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1918 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1919 THREAD_KIND="$(THREAD_KIND)" \
1920 gnatlib-shared-win32
1921 $(MV) rts/libgna*$(soext) .
1922 $(RM) ../stamp-gnatlib2
1923 $(MAKE) $(FLAGS_TO_PASS) \
1924 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1925 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1926 THREAD_KIND="$(THREAD_KIND)" \
1928 $(MV) libgna*$(soext) rts
1930 # ??? we need to add the option to support auto-import of arrays/records to
1931 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
1932 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
1934 gnatlib-shared-win32:
1935 $(MAKE) $(FLAGS_TO_PASS) \
1936 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1937 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1938 THREAD_KIND="$(THREAD_KIND)" \
1940 $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
1941 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1942 -o libgnat-$(LIBRARY_VERSION)$(soext) \
1943 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
1944 $(SO_OPTS)libgnat-$(LIBRARY_VERSION)$(soext) $(MISCLIB)
1945 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1946 -o libgnarl-$(LIBRARY_VERSION)$(soext) \
1947 $(GNATRTL_TASKING_OBJS) \
1948 $(SO_OPTS)libgnarl-$(LIBRARY_VERSION)$(soext) \
1949 $(THREADSLIB) -Wl,libgnat-$(LIBRARY_VERSION)$(soext)
1952 $(MAKE) $(FLAGS_TO_PASS) \
1953 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1954 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1955 THREAD_KIND="$(THREAD_KIND)" \
1957 $(RM) rts/libgnat*$(soext) rts/libgnarl*$(soext)
1958 cd rts && echo "case_sensitive=yes" > SYMVEC_$$$$.opt && \
1959 objdump --syms $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) | \
1960 $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt && \
1961 echo "case_sensitive=NO" >> SYMVEC_$$$$.opt && \
1962 ../../xgcc -g -B../../ -nostartfiles -shared -shared-libgcc \
1963 -o libgnat_$(LIBRARY_VERSION)$(soext) libgnat.a \
1964 sys\$$library:trace.exe \
1965 --for-linker=/noinform \
1966 --for-linker=SYMVEC_$$$$.opt \
1967 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
1968 cd rts && echo "case_sensitive=yes" > SYMVEC_$$$$.opt && \
1969 objdump --syms $(GNATRTL_TASKING_OBJS) | \
1970 $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt && \
1971 echo "case_sensitive=NO" >> SYMVEC_$$$$.opt && \
1972 ../../xgcc -g -B../../ -nostartfiles -shared -shared-libgcc \
1973 -o libgnarl_$(LIBRARY_VERSION)$(soext) \
1974 libgnarl.a libgnat_$(LIBRARY_VERSION)$(soext) \
1975 sys\$$library:trace.exe \
1976 --for-linker=/noinform \
1977 --for-linker=SYMVEC_$$$$.opt \
1978 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
1981 $(MAKE) $(FLAGS_TO_PASS) \
1982 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1983 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1984 THREAD_KIND="$(THREAD_KIND)" \
1985 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
1988 gnatlib-sjlj: ../stamp-gnatlib1
1989 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' rts/system.ads > rts/s.ads
1990 $(MV) rts/s.ads rts/system.ads
1991 $(MAKE) $(FLAGS_TO_PASS) \
1992 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1993 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1994 THREAD_KIND="$(THREAD_KIND)" \
1995 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
1997 # .s files for cross-building
1999 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
2001 # Compiling object files from source files.
2003 # Note that dependencies on obstack.h are not written
2004 # because that file is not part of GCC.
2005 # Dependencies on gvarargs.h are not written
2006 # because all that file does, when not compiling with GCC,
2007 # is include the system varargs.h.
2009 b_gnatl.c : $(GNATLINK_OBJS)
2010 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2011 b_gnatl.o : b_gnatl.c
2013 b_gnatm.c : $(GNATMAKE_OBJS)
2014 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2015 b_gnatm.o : b_gnatm.c
2017 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2018 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2019 ADA_SHARE_MAKE_DIR = $(prefix)/share/make
2021 # force no sibling call optimization on s-traceb.o so the number of stack
2022 # frames to be skipped when computing a call chain is not modified by
2023 # optimization. However we can do that only when building the runtime
2024 # (not the compiler) because the -fno-optimize-sibling-calls exists
2027 ifneq (,$(findstring xgcc,$(CC)))
2028 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2030 NO_SIBLING_ADAFLAGS=
2033 s-traceb.o : s-traceb.adb
2034 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2035 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2038 adadecode.o : adadecode.c adadecode.h
2042 deftarg.o : deftarg.c
2044 exit.o : raise.h exit.c
2046 final.o : raise.h final.c
2054 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \
2055 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2057 init.o : init.c ada.h types.h raise.h
2058 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \
2059 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2061 raise.o : raise.c raise.h
2062 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \
2063 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2065 # Need to keep the frame pointer in this file to pop the stack properly on
2067 tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c
2068 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2069 -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2071 # In GNU Make, ignore whether `stage*' exists.
2072 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2073 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2077 # Gnatlbr is only used on VMS
2079 ../../gnatlbr$(exeext): ../../prefix.o
2080 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2081 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2082 $(GNATLINK) -v gnatlbr -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \