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 # It's 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.
92 # Let the configure setting prevail only if CC hasn't been overridden
93 # to xgcc by the top level Makefile (in a later stage of bootstrap).
94 ifeq ($(findstring xgcc, $(CC)),)
113 # How to invoke ranlib.
115 # Test to use to see whether ranlib exists on the system.
116 RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
118 PWD_COMMAND = $${PWDCMD-pwd}
119 # How to copy preserving the date
120 INSTALL_DATA_DATE = cp -p
123 GNATBIND = $(STAGE_PREFIX)gnatbind -C
124 GNATBIND_FLAGS = -static -x
126 ADAFLAGS = -W -Wall -gnatpg -gnata
127 SOME_ADAFLAGS =-gnata
128 FORCE_DEBUG_ADAFLAGS = -g
129 GNATLIBFLAGS = -gnatpg
130 GNATLIBCFLAGS = -g -O2
131 GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
133 ALL_ADA_CFLAGS = $(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
134 ALL_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \
136 MOST_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \
150 HOST_CFLAGS=$(ALL_CFLAGS)
152 HOST_LDFLAGS=$(LDFLAGS)
153 HOST_CPPFLAGS=$(ALL_CPPFLAGS)
154 HOST_ALLOCA=$(ALLOCA)
155 HOST_MALLOC=$(MALLOC)
156 HOST_OBSTACK=$(OBSTACK)
158 # Define this as & to perform parallel make on a Sequent.
159 # Note that this has some bugs, and it seems currently necessary
160 # to compile all the gen* files first by hand to avoid erroneous results.
163 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
164 # It omits XCFLAGS, and specifies -B./.
165 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
166 GCC_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
168 # Tools to use when building a cross-compiler.
169 # These are used because `configure' appends `cross-make'
170 # to the makefile when making a cross-compiler.
172 # We don't use cross-make. Instead we use the tools from the build tree,
173 # if they are available.
174 # program_transform_name and objdir are set by configure.in.
175 program_transform_name =
179 target_alias=@target_alias@
180 xmake_file = @xmake_file@
181 tmake_file = @tmake_file@
182 host_canonical=@host@
183 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
184 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
186 # Directory where sources are, from where we are.
190 fsrcdir := $(shell cd $(srcdir);${PWD_COMMAND})
191 fsrcpfx := $(shell cd $(srcdir);${PWD_COMMAND})/
192 fcurdir := $(shell ${PWD_COMMAND})
193 fcurpfx := $(shell ${PWD_COMMAND})/
195 # Top build directory, relative to here.
198 # Internationalization library.
199 INTLLIBS = @INTLLIBS@
200 INTLDEPS = @INTLDEPS@
202 # Any system libraries needed just for GNAT.
203 SYSLIBS = @GNAT_LIBEXC@
205 # List of extra object files linked in with various programs.
206 EXTRA_GNATTOOLS_OBJS = ../prefix.o
208 # List extra gnattools
211 # End of variables for you to override.
213 # Definition of `all' is here so that new rules inserted by sed
214 # do not specify the default target.
217 # This tells GNU Make version 3 not to put all variables in the environment.
220 # tmake_file and xmake_file expand to lists with entries of the form
221 # $(srcdir)/config/... but here $(srcdir) is the ada subdirectory so we
222 # need to adjust the paths. There can't be spaces in the subst arguments
223 # or we get spurious spaces in the actual list of files to include.
226 ifneq ($(tmake_file),)
227 include $(subst /config,/../config,$(tmake_file))
231 ifneq ($(xmake_file),)
232 include $(subst /config,/../config,$(xmake_file))
235 # Now figure out from those variables how to compile and link.
237 all.indirect: Makefile ../gnat1$(exeext)
239 # IN_GCC distinguishes between code compiled into GCC itself and other
240 # programs built during a bootstrap.
241 # autoconf inserts -DCROSS_COMPILE if we are building a cross compiler.
242 INTERNAL_CFLAGS = @CROSS@ -DIN_GCC
244 # This is the variable actually used when we compile.
245 LOOSE_CFLAGS = `echo $(CFLAGS) $(WARN2_CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`
246 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS) \
250 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
252 # This is where we get libiberty.a from.
253 LIBIBERTY = ../../libiberty/libiberty.a
255 # How to link with both our special library facilities
256 # and the system's installed libraries.
257 LIBS = $(INTLLIBS) $(LIBIBERTY) $(SYSLIBS)
258 LIBDEPS = $(INTLDEPS) $(LIBIBERTY)
259 TOOLS_LIBS = ../../prefix.o ../../version.o $(LIBGNAT) \
260 ../../../libiberty/libiberty.a $(SYSLIBS)
262 # Specify the directories to be searched for header files.
263 # Both . and srcdir are used, in that order,
264 # so that tm.h and config.h will be found in the compilation
265 # subdirectory rather than in the source directory.
266 INCLUDES = -I- -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config \
267 -I$(srcdir)/../../include
269 ADA_INCLUDES = -I- -I. -I$(srcdir)
271 INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir) \
272 -I$(fsrcdir)/.. -I$(fsrcdir)/../config -I$(fsrcdir)/../../include
273 ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)
275 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
278 # Say how to compile Ada programs.
279 .SUFFIXES: .ada .adb .ads
281 # Always use -I$(srcdir)/config when compiling.
283 $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
285 $(ADAC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $<
287 $(ADAC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $<
289 # how to regenerate this file
290 Makefile: ../config.status $(srcdir)/Makefile.in $(srcdir)/../version.c
292 LANGUAGES="$(CONFIG_LANGUAGES)" \
294 CONFIG_FILES=ada/Makefile $(SHELL) config.status
296 # This tells GNU make version 3 not to export all the variables
297 # defined in this file into the environment.
300 # Lists of files for various purposes.
302 # Object files for gnat executables
303 GNATLINK_OBJS = gnatlink.o link.o \
304 ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o gnatvsn.o \
305 hostparm.o namet.o opt.o osint.o output.o rident.o sdefault.o stylesw.o \
306 switch.o table.o tree_io.o types.o validsw.o widechar.o
308 GNATMAKE_OBJS = ali.o ali-util.o \
309 alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o einfo.o elists.o \
310 errout.o fmap.o fname.o fname-uf.o fname-sf.o \
311 gnatmake.o gnatvsn.o hostparm.o krunch.o lib.o make.o makeusg.o \
312 mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-utl.o \
313 namet.o nlists.o opt.o osint.o osint-m.o output.o \
314 prj.o prj-attr.o prj-com.o prj-dect.o prj-env.o prj-ext.o prj-nmsc.o \
315 prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \
316 rident.o scans.o scn.o sdefault.o sfn_scan.o sinfo.o sinfo-cn.o \
317 sinput.o sinput-l.o sinput-p.o \
318 snames.o stand.o stringt.o style.o stylesw.o validsw.o switch.o switch-m.o \
319 switch-c.o table.o targparm.o tree_io.o types.o \
320 uintp.o uname.o urealp.o usage.o widechar.o
322 # Convert the target variable into a space separated list of architecture,
323 # manufacturer, and operating system and assign each of those to its own
326 host:=$(subst -, ,$(host_canonical))
327 targ:=$(subst -, ,$(target))
328 arch:=$(word 1,$(targ))
329 ifeq ($(words $(targ)),2)
331 osys:=$(word 2,$(targ))
333 manu:=$(word 2,$(targ))
334 osys:=$(word 3,$(targ))
337 # LIBGNAT_TARGET_PAIRS is a list of pairs of filenames.
338 # The members of each pair must be separated by a '<' and no whitespace.
339 # Each pair must be separated by some amount of whitespace from the following
344 LIBGNAT_TARGET_PAIRS = \
345 a-intnam.ads<4nintnam.ads \
346 s-inmaop.adb<5ninmaop.adb \
347 s-intman.adb<5nintman.adb \
348 s-osinte.ads<5nosinte.ads \
349 s-osprim.adb<7sosprim.adb \
350 s-taprop.adb<5ntaprop.adb \
351 s-taspri.ads<5ntaspri.ads
353 # Default shared object option. Note that we rely on the fact that the "soname"
354 # option will always be present and last in this flag, so that we can have
355 # $(SO_OPTS)libgnat-x.xx
357 SO_OPTS = -Wl,-soname,
359 # Default gnatlib-shared target.
360 # This is needed on some targets to use a different gnatlib-shared target, e.g
361 # gnatlib-shared-dual
362 GNATLIB_SHARED = gnatlib-shared-default
364 # default value for gnatmake's target dependent file
367 # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
368 # $(strip STRING) removes leading and trailing spaces from STRING.
369 # If what's left is null then it's a match.
371 ifeq ($(strip $(filter-out %86 os2 OS2 os2_emx,$(arch) $(osys))),)
372 LIBGNAT_TARGET_PAIRS = \
373 a-excpol.adb<4wexcpol.adb \
374 a-intnam.ads<4nintnam.ads \
375 a-numaux.adb<86numaux.adb \
376 a-numaux.ads<86numaux.ads \
377 s-inmaop.adb<5ninmaop.adb \
378 s-interr.adb<5ointerr.adb \
379 s-intman.adb<5nintman.adb \
380 s-mastop.adb<5omastop.adb \
381 s-osinte.adb<5oosinte.adb \
382 s-osinte.ads<5oosinte.ads \
383 s-osprim.adb<5oosprim.adb \
384 s-parame.adb<5oparame.adb \
385 system.ads<5osystem.ads \
386 s-taprop.adb<5otaprop.adb \
387 s-taspri.ads<5otaspri.ads
389 EXTRA_GNATRTL_NONTASKING_OBJS = \
396 ifeq ($(strip $(filter-out %86 interix%,$(arch) $(osys))),)
397 LIBGNAT_TARGET_PAIRS = \
398 a-excpol.adb<4hexcpol.adb \
399 a-intnam.ads<4pintnam.ads \
400 a-numaux.adb<86numaux.adb \
401 a-numaux.ads<86numaux.ads \
402 g-soccon.ads<3psoccon.ads \
403 s-inmaop.adb<7sinmaop.adb \
404 s-intman.adb<7sintman.adb \
405 s-mastop.adb<5omastop.adb \
406 s-osinte.adb<7sosinte.adb \
407 s-osinte.ads<5posinte.ads \
408 s-osprim.adb<5posprim.adb \
409 s-taprop.adb<7staprop.adb \
410 system.ads<5psystem.ads \
411 s-taspri.ads<7staspri.ads \
412 s-tpopsp.adb<7stpopsp.adb
414 THREADSLIB = -lgthreads -lmalloc
417 # sysv5uw is SCO UnixWare 7
418 ifeq ($(strip $(filter-out %86 sysv5uw%,$(arch) $(osys))),)
419 LIBGNAT_TARGET_PAIRS = \
420 a-excpol.adb<4wexcpol.adb \
421 a-intnam.ads<41intnam.ads \
422 a-numaux.adb<86numaux.adb \
423 a-numaux.ads<86numaux.ads \
424 s-inmaop.adb<7sinmaop.adb \
425 s-intman.adb<7sintman.adb \
426 s-mastop.adb<5omastop.adb \
427 s-osinte.ads<51osinte.ads \
428 s-osinte.adb<51osinte.adb \
429 s-osprim.adb<5posprim.adb \
430 s-taprop.adb<7staprop.adb \
431 s-taspri.ads<7staspri.ads \
432 s-tpopsp.adb<5atpopsp.adb \
433 system.ads<51system.ads \
434 g-soccon.ads<31soccon.ads \
435 g-soliop.ads<31soliop.ads
437 THREADSLIB = -lthread
439 GNATLIB_SHARED = gnatlib-shared-dual
440 LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
443 ifeq ($(strip $(filter-out alpha% dec vx%,$(targ))),)
444 LIBGNAT_TARGET_PAIRS = \
445 a-sytaco.ads<4zsytaco.ads \
446 a-sytaco.adb<4zsytaco.adb \
447 a-intnam.ads<4zintnam.ads \
448 a-numaux.ads<4znumaux.ads \
449 s-inmaop.adb<7sinmaop.adb \
450 s-interr.adb<5zinterr.adb \
451 s-intman.adb<5zintman.adb \
452 s-osinte.adb<5zosinte.adb \
453 s-osinte.ads<5zosinte.ads \
454 s-osprim.adb<5zosprim.adb \
455 s-taprop.adb<5ztaprop.adb \
456 s-taspri.ads<5ztaspri.ads \
457 s-vxwork.ads<5avxwork.ads \
458 g-soccon.ads<3zsoccon.ads \
459 g-socthi.ads<3zsocthi.ads \
460 g-socthi.adb<3zsocthi.adb \
461 system.ads<5zsystem.ads
463 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
464 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
467 ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
468 LIBGNAT_TARGET_PAIRS = \
469 a-sytaco.ads<4zsytaco.ads \
470 a-sytaco.adb<4zsytaco.adb \
471 a-intnam.ads<4zintnam.ads \
472 a-numaux.ads<4znumaux.ads \
473 s-inmaop.adb<7sinmaop.adb \
474 s-interr.adb<5zinterr.adb \
475 s-intman.adb<5zintman.adb \
476 s-osinte.adb<5zosinte.adb \
477 s-osinte.ads<5zosinte.ads \
478 s-osprim.adb<5zosprim.adb \
479 s-taprop.adb<5ztaprop.adb \
480 s-taspri.ads<5ztaspri.ads \
481 s-vxwork.ads<5kvxwork.ads \
482 g-soccon.ads<3zsoccon.ads \
483 g-socthi.ads<3zsocthi.ads \
484 g-socthi.adb<3zsocthi.adb \
485 system.ads<5ksystem.ads
487 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
488 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
490 ifeq ($(strip $(filter-out yes,$(TRACE))),)
491 LIBGNAT_TARGET_PAIRS += \
492 s-traces.adb<7straces.adb \
493 s-tratas.adb<7stratas.adb \
494 s-trafor.adb<7strafor.adb \
495 s-trafor.ads<7strafor.ads \
496 s-tfsetr.adb<5ztfsetr.adb
500 ifeq ($(strip $(filter-out powerpc% wrs vx%,$(targ))),)
501 LIBGNAT_TARGET_PAIRS = \
502 a-sytaco.ads<4zsytaco.ads \
503 a-sytaco.adb<4zsytaco.adb \
504 a-intnam.ads<4zintnam.ads \
505 a-numaux.ads<4znumaux.ads \
506 s-inmaop.adb<7sinmaop.adb \
507 s-interr.adb<5zinterr.adb \
508 s-intman.adb<5zintman.adb \
509 s-osinte.adb<5zosinte.adb \
510 s-osinte.ads<5zosinte.ads \
511 s-osprim.adb<5zosprim.adb \
512 s-taprop.adb<5ztaprop.adb \
513 s-taspri.ads<5ztaspri.ads \
514 s-vxwork.ads<5pvxwork.ads \
515 g-soccon.ads<3zsoccon.ads \
516 g-socthi.ads<3zsocthi.ads \
517 g-socthi.adb<3zsocthi.adb \
518 system.ads<5ysystem.ads
520 EXTRA_RAVEN_SOURCES=i-vxwork.ads s-vxwork.ads
521 EXTRA_RAVEN_OBJS=i-vxwork.o s-vxwork.o
522 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o
523 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
526 ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
527 LIBGNAT_TARGET_PAIRS = \
528 a-sytaco.ads<4zsytaco.ads \
529 a-sytaco.adb<4zsytaco.adb \
530 a-intnam.ads<4zintnam.ads \
531 a-numaux.ads<4znumaux.ads \
532 s-inmaop.adb<7sinmaop.adb \
533 s-interr.adb<5zinterr.adb \
534 s-intman.adb<5zintman.adb \
535 s-osinte.adb<5zosinte.adb \
536 s-osinte.ads<5zosinte.ads \
537 s-osprim.adb<5zosprim.adb \
538 s-taprop.adb<5ztaprop.adb \
539 s-taspri.ads<7staspri.ads \
540 s-vxwork.ads<5svxwork.ads \
541 system.ads<5ysystem.ads
543 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o
544 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
547 ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
548 LIBGNAT_TARGET_PAIRS = \
549 a-sytaco.ads<4zsytaco.ads \
550 a-sytaco.adb<4zsytaco.adb \
551 a-intnam.ads<4zintnam.ads \
552 a-numaux.ads<4znumaux.ads \
553 s-inmaop.adb<7sinmaop.adb \
554 s-interr.adb<5zinterr.adb \
555 s-intman.adb<5zintman.adb \
556 s-osinte.adb<5zosinte.adb \
557 s-osinte.ads<5zosinte.ads \
558 s-osprim.adb<5zosprim.adb \
559 s-taprop.adb<5ztaprop.adb \
560 s-taspri.ads<7staspri.ads \
561 s-vxwork.ads<5mvxwork.ads \
562 system.ads<5zsystem.ads
564 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o
565 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
568 ifeq ($(strip $(filter-out sparc sun solaris2% sunos5%,$(targ))),)
569 LIBGNAT_TARGET_PAIRS = \
570 a-intnam.ads<4sintnam.ads \
571 s-inmaop.adb<7sinmaop.adb \
572 s-intman.adb<5sintman.adb \
573 s-osinte.adb<5sosinte.adb \
574 s-osinte.ads<5sosinte.ads \
575 s-osprim.adb<5posprim.adb \
576 s-parame.adb<5sparame.adb \
577 s-taprop.adb<5staprop.adb \
578 s-tasinf.adb<5stasinf.adb \
579 s-tasinf.ads<5stasinf.ads \
580 s-taspri.ads<5staspri.ads \
581 s-tpopse.adb<5stpopse.adb \
582 g-soccon.ads<3ssoccon.ads \
583 g-soliop.ads<3ssoliop.ads \
584 system.ads<5ssystem.ads
586 THREADSLIB = -lposix4 -lthread
587 MISCLIB = -lposix4 -lnsl -lsocket
588 SYMLIB = -laddr2line -lbfd $(INTLLIBS)
590 GNATLIB_SHARED = gnatlib-shared-dual
592 LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
594 ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),)
595 LIBGNAT_TARGET_PAIRS = \
596 a-intnam.ads<4sintnam.ads \
597 s-inmaop.adb<7sinmaop.adb \
598 s-intman.adb<5sintman.adb \
599 s-osinte.adb<7sosinte.adb \
600 s-osinte.ads<5tosinte.ads \
601 s-osprim.adb<5posprim.adb \
602 s-taprop.adb<7staprop.adb \
603 s-taspri.ads<7staspri.ads \
604 s-tpopsp.adb<7stpopsp.adb \
605 g-soccon.ads<3ssoccon.ads \
606 g-soliop.ads<3ssoliop.ads \
607 system.ads<5ssystem.ads
609 THREADSLIB = -lgthreads -lmalloc
612 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
613 LIBGNAT_TARGET_PAIRS = \
614 a-intnam.ads<4sintnam.ads \
615 s-inmaop.adb<7sinmaop.adb \
616 s-intman.adb<7sintman.adb \
617 s-osinte.adb<5iosinte.adb \
618 s-osinte.ads<54osinte.ads \
619 s-osprim.adb<5posprim.adb \
620 s-taprop.adb<7staprop.adb \
621 s-taspri.ads<7staspri.ads \
622 s-tpopsp.adb<5atpopsp.adb \
623 g-soccon.ads<3ssoccon.ads \
624 g-soliop.ads<3ssoliop.ads \
625 system.ads<5ssystem.ads
627 THREADSLIB = -lposix4 -lpthread
631 ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
632 LIBGNAT_TARGET_PAIRS = \
633 a-numaux.adb<86numaux.adb \
634 a-numaux.ads<86numaux.ads \
635 a-intnam.ads<4sintnam.ads \
636 s-inmaop.adb<7sinmaop.adb \
637 s-intman.adb<5sintman.adb \
638 s-mastop.adb<5omastop.adb \
639 s-osinte.adb<5sosinte.adb \
640 s-osinte.ads<5sosinte.ads \
641 s-osprim.adb<5posprim.adb \
642 s-parame.adb<5sparame.adb \
643 s-taprop.adb<5staprop.adb \
644 s-tasinf.adb<5stasinf.adb \
645 s-tasinf.ads<5stasinf.ads \
646 s-taspri.ads<5staspri.ads \
647 s-tpopse.adb<5etpopse.adb \
648 g-soccon.ads<3ssoccon.ads \
649 g-soliop.ads<3ssoliop.ads \
650 system.ads<5esystem.ads
652 THREADSLIB = -lposix4 -lthread
653 MISCLIB = -lposix4 -lnsl -lsocket
655 GNATLIB_SHARED = gnatlib-shared-dual
656 LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
659 ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
660 LIBGNAT_TARGET_PAIRS = \
661 a-intnam.ads<4lintnam.ads \
662 a-numaux.adb<86numaux.adb \
663 a-numaux.ads<86numaux.ads \
664 s-inmaop.adb<7sinmaop.adb \
665 s-intman.adb<5lintman.adb \
666 s-mastop.adb<5omastop.adb \
667 s-osinte.adb<5iosinte.adb \
668 s-osinte.ads<5iosinte.ads \
669 s-osprim.adb<7sosprim.adb \
670 s-taprop.adb<5itaprop.adb \
671 s-taspri.ads<5itaspri.ads \
672 s-tpopsp.adb<5atpopsp.adb \
673 system.ads<5lsystem.ads
675 TOOLS_TARGET_PAIRS = mlib-tgt.adb<5lml-tgt.adb
676 SYMLIB = -laddr2line -lbfd $(INTLLIBS)
677 THREADSLIB = -lpthread
678 GNATLIB_SHARED = gnatlib-shared-dual
680 LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
682 ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),)
683 LIBGNAT_TARGET_PAIRS = \
684 a-intnam.ads<4lintnam.ads \
685 a-numaux.adb<86numaux.adb \
686 a-numaux.ads<86numaux.ads \
687 s-inmaop.adb<7sinmaop.adb \
688 s-intman.adb<5lintman.adb \
689 s-mastop.adb<5omastop.adb \
690 s-osinte.adb<7sosinte.adb \
691 s-osinte.ads<5losinte.ads \
692 s-osprim.adb<7sosprim.adb \
693 s-taprop.adb<7staprop.adb \
694 s-taspri.ads<7staspri.ads \
695 s-tpopsp.adb<7stpopsp.adb \
696 system.ads<5lsystem.ads
698 THREADSLIB = -lgthreads -lmalloc
701 ifeq ($(strip $(filter-out rt-linux RT-LINUX,$(THREAD_KIND))),)
702 LIBGNAT_TARGET_PAIRS = \
703 a-intnam.ads<4nintnam.ads \
704 s-inmaop.adb<5ninmaop.adb \
705 s-intman.adb<5nintman.adb \
706 s-osinte.adb<5qosinte.adb \
707 s-osinte.ads<5qosinte.ads \
708 s-osprim.adb<5qosprim.adb \
709 s-stache.adb<5qstache.adb \
710 s-taprop.adb<5qtaprop.adb \
711 s-taspri.ads<5qtaspri.ads \
712 system.ads<5lsystem.ads
718 ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
719 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
720 LIBGNAT_TARGET_PAIRS = \
721 a-intnam.ads<4gintnam.ads \
722 s-inmaop.adb<7sinmaop.adb \
723 s-intman.adb<5fintman.adb \
724 s-mastop.adb<5gmastop.adb \
725 s-osinte.adb<5aosinte.adb \
726 s-osinte.ads<5fosinte.ads \
727 s-osprim.adb<7sosprim.adb \
728 s-proinf.adb<5gproinf.adb \
729 s-proinf.ads<5gproinf.ads \
730 s-taprop.adb<5ftaprop.adb \
731 s-tasinf.ads<5ftasinf.ads \
732 s-taspri.ads<7staspri.ads \
733 s-traceb.adb<7straceb.adb \
734 g-soccon.ads<3gsoccon.ads \
735 system.ads<5gsystem.ads
737 THREADSLIB = -lpthread
740 LIBGNAT_TARGET_PAIRS = \
741 a-intnam.ads<4gintnam.ads \
742 s-inmaop.adb<5ninmaop.adb \
743 s-interr.adb<5ginterr.adb \
744 s-intman.adb<5gintman.adb \
745 s-mastop.adb<5gmastop.adb \
746 s-osinte.adb<5aosinte.adb \
747 s-osinte.ads<5gosinte.ads \
748 s-osprim.adb<7sosprim.adb \
749 s-proinf.adb<5gproinf.adb \
750 s-proinf.ads<5gproinf.ads \
751 s-taprop.adb<5gtaprop.adb \
752 s-tasinf.adb<5gtasinf.adb \
753 s-tasinf.ads<5gtasinf.ads \
754 s-taspri.ads<7staspri.ads \
755 s-traceb.adb<7straceb.adb \
756 g-soccon.ads<3gsoccon.ads \
757 system.ads<5fsystem.ads
759 THREADSLIB = -lathread
764 SO_OPTS = -Wl,-all,-set_version,sgi1.0,-update_registry,../so_locations,-soname,
765 LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
768 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
769 LIBGNAT_TARGET_PAIRS = \
770 a-excpol.adb<4wexcpol.adb \
771 a-intnam.ads<4hintnam.ads \
772 s-inmaop.adb<7sinmaop.adb \
773 s-interr.adb<5ginterr.adb \
774 s-intman.adb<7sintman.adb \
775 s-osinte.adb<5hosinte.adb \
776 s-osinte.ads<5hosinte.ads \
777 s-parame.ads<5hparame.ads \
778 s-osprim.adb<7sosprim.adb \
779 s-taprop.adb<5htaprop.adb \
780 s-taspri.ads<5htaspri.ads \
781 s-tpopsp.adb<7stpopsp.adb \
782 g-soccon.ads<3hsoccon.ads \
783 system.ads<5hsystem.ads
786 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
787 LIBGNAT_TARGET_PAIRS = \
788 a-intnam.ads<4hintnam.ads \
789 s-inmaop.adb<7sinmaop.adb \
790 s-intman.adb<7sintman.adb \
791 s-osinte.adb<5iosinte.adb \
792 s-osinte.ads<53osinte.ads \
793 s-parame.ads<5hparame.ads \
794 s-osprim.adb<7sosprim.adb \
795 s-traceb.adb<5htraceb.adb \
796 s-taprop.adb<7staprop.adb \
797 s-taspri.ads<7staspri.ads \
798 s-tpopsp.adb<5atpopsp.adb \
799 g-soccon.ads<3hsoccon.ads \
800 system.ads<5hsystem.ads
802 TGT_LIB = /usr/lib/libcl.a
803 THREADSLIB = -lpthread -lc_r
804 SYMLIB = -laddr2line -lbfd $(INTLLIBS)
807 GNATLIB_SHARED = gnatlib-shared-dual
809 ifeq ($(strip $(filter-out dce DCE,$(THREAD_KIND))),)
810 LIBGNAT_TARGET_PAIRS = \
811 a-excpol.adb<4wexcpol.adb \
812 a-intnam.ads<4hintnam.ads \
813 s-inmaop.adb<7sinmaop.adb \
814 s-interr.adb<5ginterr.adb \
815 s-intman.adb<7sintman.adb \
816 s-osinte.adb<5hosinte.adb \
817 s-osinte.ads<5hosinte.ads \
818 s-parame.ads<5hparame.ads \
819 s-osprim.adb<7sosprim.adb \
820 s-taprop.adb<5htaprop.adb \
821 s-taspri.ads<5htaspri.ads \
822 g-soccon.ads<3hsoccon.ads \
823 system.ads<5hsystem.ads
830 ifeq ($(strip $(filter-out ibm aix4%,$(manu) $(osys))),)
831 LIBGNAT_TARGET_PAIRS = \
832 a-intnam.ads<4cintnam.ads \
833 s-inmaop.adb<7sinmaop.adb \
834 s-intman.adb<7sintman.adb \
835 s-osinte.adb<5bosinte.adb \
836 s-osinte.ads<5bosinte.ads \
837 s-osprim.adb<7sosprim.adb \
838 s-taprop.adb<7staprop.adb \
839 s-taspri.ads<7staspri.ads \
840 s-tpopsp.adb<7stpopsp.adb \
841 g-soccon.ads<3bsoccon.ads \
842 system.ads<5bsystem.ads
844 THREADSLIB = -lpthreads
845 ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),)
846 LIBGNAT_TARGET_PAIRS = \
847 a-intnam.ads<4cintnam.ads \
848 s-inmaop.adb<7sinmaop.adb \
849 s-intman.adb<7sintman.adb \
850 s-osinte.adb<7sosinte.adb \
851 s-osinte.ads<5cosinte.ads \
852 s-osprim.adb<7sosprim.adb \
853 s-taprop.adb<7staprop.adb \
854 s-taspri.ads<7staspri.ads \
855 s-tpopsp.adb<7stpopsp.adb \
856 g-soccon.ads<3bsoccon.ads \
857 system.ads<5bsystem.ads
859 THREADSLIB = -lgthreads -lmalloc
863 ifeq ($(strip $(filter-out lynxos,$(osys))),)
864 ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
865 LIBGNAT_TARGET_PAIRS = \
866 a-numaux.adb<86numaux.adb \
867 a-numaux.ads<86numaux.ads \
868 a-intnam.ads<42intnam.ads \
869 s-mastop.adb<5omastop.adb \
870 s-inmaop.adb<7sinmaop.adb \
871 s-intman.adb<7sintman.adb \
872 s-osinte.adb<52osinte.adb \
873 s-osinte.ads<52osinte.ads \
874 s-osprim.adb<7sosprim.adb \
875 s-taprop.adb<7staprop.adb \
876 s-taspri.ads<7staspri.ads \
877 s-tpopsp.adb<7stpopsp.adb \
878 system.ads<52system.ads
880 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
881 LIBGNAT_TARGET_PAIRS = \
882 a-numaux.adb<86numaux.adb \
883 a-numaux.ads<86numaux.ads \
884 a-intnam.ads<42intnam.ads \
885 s-mastop.adb<5omastop.adb \
886 s-inmaop.adb<7sinmaop.adb \
887 s-intman.adb<7sintman.adb \
888 s-osinte.adb<56osinte.adb \
889 s-osinte.ads<56osinte.ads \
890 s-osprim.adb<7sosprim.adb \
891 s-taprop.adb<56taprop.adb \
892 s-taspri.ads<56taspri.ads \
893 s-tpopsp.adb<5atpopsp.adb \
894 system.ads<52system.ads
898 LIBGNAT_TARGET_PAIRS = \
899 a-intnam.ads<42intnam.ads \
900 s-inmaop.adb<7sinmaop.adb \
901 s-intman.adb<7sintman.adb \
902 s-osinte.adb<56osinte.adb \
903 s-osinte.ads<56osinte.ads \
904 s-osprim.adb<7sosprim.adb \
905 s-taprop.adb<56taprop.adb \
906 s-taspri.ads<56taspri.ads \
907 s-tpopsp.adb<5atpopsp.adb \
908 system.ads<52system.ads
912 ifeq ($(strip $(filter-out rtems rtemself rtemsaout rtemscoff,$(osys))),)
913 LIBGNAT_TARGET_PAIRS = \
914 a-intnam.ads<4rintnam.ads \
915 s-inmaop.adb<7sinmaop.adb \
916 s-intman.adb<7sintman.adb \
917 s-osinte.adb<5rosinte.adb \
918 s-osinte.ads<5rosinte.ads \
919 s-osprim.adb<7sosprim.adb \
920 s-parame.adb<5rparame.adb \
921 s-taprop.adb<7staprop.adb \
922 s-taspri.ads<7staspri.ads \
923 s-tpopsp.adb<5rtpopsp.adb
926 ifeq ($(strip $(filter-out go32 msdos,$(osys))),)
927 LIBGNAT_TARGET_PAIRS = \
928 a-intnam.ads<4dintnam.ads \
929 s-inmaop.adb<7sinmaop.adb \
930 s-intman.adb<7sintman.adb \
931 s-osinte.adb<7sosinte.adb \
932 s-osinte.ads<5dosinte.ads \
933 s-osprim.adb<7sosprim.adb \
934 s-taprop.adb<7staprop.adb \
935 s-taspri.ads<7staspri.ads \
936 s-tpopsp.adb<7stpopsp.adb
939 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
940 LIBGNAT_TARGET_PAIRS = \
941 a-intnam.ads<4aintnam.ads \
942 s-inmaop.adb<7sinmaop.adb \
943 s-intman.adb<7sintman.adb \
944 s-mastop.adb<5amastop.adb \
945 s-osinte.adb<5aosinte.adb \
946 s-osinte.ads<5aosinte.ads \
947 s-osprim.adb<5posprim.adb \
948 s-taprop.adb<5ataprop.adb \
949 s-tasinf.ads<5atasinf.ads \
950 s-taspri.ads<5ataspri.ads \
951 s-tpopsp.adb<5atpopsp.adb \
952 s-traceb.adb<7straceb.adb \
953 g-soccon.ads<3asoccon.ads \
954 system.ads<5asystem.ads
956 THREADSLIB = -lpthread -lmach -lexc -lrt
957 SYMLIB = -laddr2line -lbfd $(INTLLIBS)
958 LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
961 ifeq ($(strip $(filter-out alpha% dec vms% openvms% alphavms%,$(host))),)
963 EXTRA_GNAT1_OBJS = ../prefix.o vmshandler.o
964 EXTRA_GNATBIND_OBJS = ../prefix.o vmshandler.o
968 ifeq ($(strip $(filter-out alpha% dec vms% openvms% alphavms%,$(targ))),)
970 ifeq ($(strip $(filter-out alpha64% dec vms% openvms% alphavms%,$(targ))),)
971 LIBGNAT_TARGET_PAIRS_AUX =
973 ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
974 LIBGNAT_TARGET_PAIRS_AUX = \
975 s-parame.ads<5xparame.ads
977 LIBGNAT_TARGET_PAIRS_AUX = \
978 s-parame.ads<5vparame.ads
982 LIBGNAT_TARGET_PAIRS = \
983 a-caldel.adb<4vcaldel.adb \
984 a-calend.adb<4vcalend.adb \
985 a-calend.ads<4vcalend.ads \
986 a-excpol.adb<4wexcpol.adb \
987 a-intnam.ads<4vintnam.ads \
988 g-enblsp.adb<3venblsp.adb \
989 i-cstrea.adb<6vcstrea.adb \
990 i-cpp.adb<6vcpp.adb \
991 interfac.ads<6vinterf.ads \
992 s-asthan.adb<5vasthan.adb \
993 s-inmaop.adb<5vinmaop.adb \
994 s-interr.adb<5vinterr.adb \
995 s-intman.adb<5vintman.adb \
996 s-intman.ads<5vintman.ads \
997 s-osinte.adb<5vosinte.adb \
998 s-osinte.ads<5vosinte.ads \
999 s-osprim.adb<5vosprim.adb \
1000 s-osprim.ads<5vosprim.ads \
1001 s-taprop.adb<5vtaprop.adb \
1002 s-taspri.ads<5vtaspri.ads \
1003 s-tpopde.adb<5vtpopde.adb \
1004 s-tpopde.ads<5vtpopde.ads \
1005 s-vaflop.adb<5vvaflop.adb \
1006 system.ads<5xsystem.ads \
1007 $(LIBGNAT_TARGET_PAIRS_AUX)
1009 GNATLIB_SHARED=gnatlib-shared-vms
1010 EXTRA_LIBGNAT_SRCS=vmshandler.asm
1011 EXTRA_LIBGNAT_OBJS=vmshandler.o
1012 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1013 EXTRA_GNATTOOLS_OBJS = ../prefix.o vmshandler.o
1016 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1017 LIBGNAT_TARGET_PAIRS = \
1018 a-calend.adb<4wcalend.adb \
1019 a-excpol.adb<4wexcpol.adb \
1020 a-intnam.ads<4wintnam.ads \
1021 a-numaux.adb<86numaux.adb \
1022 a-numaux.ads<86numaux.ads \
1023 s-gloloc.adb<5wgloloc.adb \
1024 s-inmaop.adb<5ninmaop.adb \
1025 s-interr.adb<5ginterr.adb \
1026 s-intman.adb<5wintman.adb \
1027 s-mastop.adb<5omastop.adb \
1028 s-memory.adb<5wmemory.adb \
1029 s-osinte.ads<5wosinte.ads \
1030 s-osprim.adb<5wosprim.adb \
1031 s-taprop.adb<5wtaprop.adb \
1032 s-taspri.ads<5wtaspri.ads \
1033 g-socthi.ads<3wsocthi.ads \
1034 g-socthi.adb<3wsocthi.adb \
1035 g-soccon.ads<3wsoccon.ads \
1036 g-soliop.ads<3wsoliop.ads \
1037 system.ads<5wsystem.ads
1040 SYMLIB = -laddr2line -lbfd $(INTLLIBS)
1042 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1043 EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o
1046 # The runtime library for gnat comprises two directories. One contains the
1047 # Ada source files that the compiler (gnat1) needs -- these files are listed
1048 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1049 # corresponding .ali files for the parts written in Ada, libgnat.a for
1050 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1051 # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1052 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1053 # go into the directory. The pthreads emulation is built in the threads
1054 # subdirectory and copied.
1055 LIBGNAT_SRCS = ada.h adaint.c adaint.h argv.c cio.c cstreams.c \
1056 errno.c exit.c cal.c \
1057 raise.h raise.c sysdep.c types.h aux-io.c init.c \
1058 adafinal.c tracebak.c expect.c mkdir.c $(EXTRA_LIBGNAT_SRCS)
1060 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o errno.o exit.o \
1061 raise.o sysdep.o aux-io.o init.o cal.o adafinal.o \
1062 tracebak.o expect.o mkdir.o $(EXTRA_LIBGNAT_OBJS)
1064 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1065 # the library installation will change and there will be a
1066 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1067 # from ADA_INCLUDE_SRCS.
1069 # Objects needed only for tasking
1070 GNATRTL_TASKING_OBJS= \
1108 s-tratas.o $(EXTRA_GNATRTL_TASKING_OBJS)
1110 # Objects needed for non-tasking.
1111 GNATRTL_NONTASKING_OBJS= \
1437 text_io.o $(EXTRA_GNATRTL_NONTASKING_OBJS)
1439 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) g-trasym.o
1441 # Files which are suitable in no run time/hi integrity mode
1466 a-tags.adb $(EXTRA_HIE_SOURCES)
1483 a-tags.o $(EXTRA_HIE_OBJS)
1485 # Files which are needed in ravenscar mode
1516 s-tarest.adb $(EXTRA_RAVEN_SOURCES)
1518 # Objects to generate for the ravenscar run time
1537 s-tarest.o $(EXTRA_RAVEN_OBJS)
1539 # Default run time files
1541 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
1542 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
1545 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1546 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1547 sequenio.ads system.ads Makefile.adalib memtrack.adb \
1548 a-*.adb a-*.ads g-*.ad? i-*.ad? \
1549 s-[a-o]*.adb s-[p-z]*.adb \
1550 s-[a-o]*.ads s-[p-z]*.ads
1552 # Language-independent object files.
1553 LIBGNAT=../rts/libgnat.a
1554 TOOLS_FLAGS_TO_PASS= \
1556 "CFLAGS=$(CFLAGS)" \
1557 "LDFLAGS=$(LDFLAGS)" \
1558 "ADAFLAGS=$(ADAFLAGS)" \
1559 "INCLUDES=$(INCLUDES_FOR_SUBDIR)"\
1560 "ADA_INCLUDES=$(ADA_INCLUDES) $(ADA_INCLUDES_FOR_SUBDIR)"\
1561 "libsubdir=$(libsubdir)" \
1562 "exeext=$(exeext)" \
1563 "srcdir=$(fsrcdir)" \
1564 "VPATH=$(fsrcdir)" \
1565 "TOOLS_LIBS=$(TOOLS_LIBS) $(TGT_LIB)" \
1566 "GNATMAKE=$(GNATMAKE)" \
1567 "GNATLINK=$(GNATLINK)" \
1568 "GNATBIND=$(GNATBIND)"
1570 # Build directory for the tools. Let's copy the target dependent
1571 # sources using the same mechanism as for gnatlib. The other sources are
1572 # accessed using the vpath directive below
1578 -(cd tools; $(LN_S) ../sdefault.adb .)
1579 -$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
1580 $(RM) tools/$(word 1,$(subst <, ,$(PAIR)));\
1581 $(LN_S) $(fsrcdir)/$(word 2,$(subst <, ,$(PAIR))) \
1582 tools/$(word 1,$(subst <, ,$(PAIR)));)
1583 touch ../stamp-tools
1585 # when compiling the tools, the runtime has to be first on the path so that
1586 # it hides the runtime files lying with the rest of the sources
1587 ifeq ($(TOOLSCASE),native)
1588 vpath %.ads ../rts ../
1589 vpath %.adb ../rts ../
1590 vpath %.c ../rts ../
1591 vpath %.h ../rts ../
1594 # in the cross tools case, everything is compiled with the native
1595 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1596 ifeq ($(TOOLSCASE),cross)
1603 # gnatmake/link tools cannot always be built with gnatmake/link for bootstrap
1604 # reasons: gnatmake should be built with a recent compiler, a recent compiler
1605 # may not generate ALI files compatible with an old gnatmake so it is important
1606 # to be able to build gnatmake without a version of gnatmake around. Once
1607 # everything has been compiled once, gnatmake can be recompiled with itself
1608 # (see target gnattools1-re)
1609 gnattools1: ../stamp-tools ../stamp-gnatlib
1610 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1612 ../../gnatmake$(exeext) ../../gnatlink$(exeext) ../../gnatbl$(exeext)
1614 # gnatmake/link can be build with recent gnatmake/link if they are available.
1615 # This is especially convenient for building cross tools or for rebuilding
1616 # the tools when the original bootstrap has already be done.
1617 gnattools1-re: ../stamp-tools
1618 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1619 TOOLSCASE=cross INCLUDES="" gnatmake-re gnatlink-re
1621 # these tools are built with gnatmake & are common to native and cross
1622 gnattools2: ../stamp-tools
1623 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1625 ../../gnatchop$(exeext) ../../gnat$(exeext) ../../gnatkr$(exeext) \
1626 ../../gnatls$(exeext) ../../gnatprep$(exeext) \
1627 ../../gnatpsta$(exeext) ../../gnatxref$(exeext) \
1628 ../../gnatfind$(exeext) ../../gnatname$(exeext)
1630 # These tools are only built for the native version.
1631 gnattools3: ../stamp-tools
1632 # $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1633 # TOOLSCASE=native \
1634 # top_builddir=../.. ../../gnatmem$(exeext) $(EXTRA_GNATTOOLS)
1636 ../../gnatchop$(exeext):
1637 $(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)"
1638 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatchop
1639 $(GNATLINK) -v gnatchop -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1642 ../../gnat$(exeext):
1643 $(GNATMAKE) -c $(ADA_INCLUDES) gnatcmd --GCC="$(CC) $(ALL_ADAFLAGS)"
1644 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatcmd
1645 $(GNATLINK) -v gnatcmd -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1648 ../../gnatkr$(exeext):
1649 $(GNATMAKE) -c $(ADA_INCLUDES) gnatkr --GCC="$(CC) $(ALL_ADAFLAGS)"
1650 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatkr
1651 $(GNATLINK) -v gnatkr -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1653 ../../gnatls$(exeext):
1654 $(GNATMAKE) -c $(ADA_INCLUDES) gnatls --GCC="$(CC) $(ALL_ADAFLAGS)"
1655 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatls
1656 $(GNATLINK) -v gnatls -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1658 ../../gnatname$(exeext):
1659 $(GNATMAKE) -c $(ADA_INCLUDES) gnatname --GCC="$(CC) $(ALL_ADAFLAGS)"
1660 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatname
1661 $(GNATLINK) -v gnatname -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1664 ../../gnatprep$(exeext):
1665 $(GNATMAKE) -c $(ADA_INCLUDES) gnatprep --GCC="$(CC) $(ALL_ADAFLAGS)"
1666 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatprep
1667 $(GNATLINK) -v gnatprep -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1670 ../../gnatpsta$(exeext): deftarg.o
1671 $(GNATMAKE) -c $(ADA_INCLUDES) gnatpsta --GCC="$(CC) $(ALL_ADAFLAGS)"
1672 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatpsta
1673 $(GNATLINK) -v gnatpsta -o $@ --GCC="$(CC) $(ADA_INCLUDES)"\
1674 ../targtyps.o deftarg.o $(TOOLS_LIBS)
1676 ../../gnatxref$(exeext):
1677 $(GNATMAKE) -c $(ADA_INCLUDES) gnatxref --GCC="$(CC) $(ALL_ADAFLAGS)"
1678 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatxref
1679 $(GNATLINK) -v gnatxref -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1682 ../../gnatfind$(exeext):
1683 $(GNATMAKE) -c $(ADA_INCLUDES) gnatfind --GCC="$(CC) $(ALL_ADAFLAGS)"
1684 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatfind
1685 $(GNATLINK) -v gnatfind -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1688 ../../gnatmem$(exeext): gmem.o $(SYMDEPS)
1689 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmem --GCC="$(CC) $(ALL_ADAFLAGS)"
1690 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmem
1691 $(GNATLINK) -v gnatmem -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1692 gmem.o $(SYMLIB) $(TOOLS_LIBS)
1694 ../../gnatdll$(exeext):
1695 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1696 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) $(GNATBIND_FLAGS) gnatdll
1697 $(GNATLINK) -v gnatdll -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1701 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1702 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1703 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
1704 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1705 --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1707 # Note the use of the "mv" command in order to allow gnatlink to be linked with
1708 # with the former version of gnatlink itself which cannot override itself.
1710 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1711 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
1712 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1713 --GCC="$(CC) $(ADA_INCLUDES)" link.o $(TOOLS_LIBS)
1714 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
1717 # Needs to be built with CC=gcc
1718 # Since the RTL should be built with the latest compiler, remove the
1719 # stamp target in the parent directory whenever gnat1 is rebuilt
1720 # Likewise for the tools
1721 ../../gnatmake$(exeext): $(P) b_gnatm.o $(GNATMAKE_OBJS)
1722 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1725 ../../gnatlink$(exeext): $(P) b_gnatl.o $(GNATLINK_OBJS)
1726 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1729 ../../gnatbl$(exeext): gnatbl.o
1730 $(CC) -o $@ $(ALL_CFLAGS) $(LDFLAGS) gnatbl.o $(TOOLS_LIBS)
1732 gnatbl.o: gnatbl.c adaint.h
1733 $(CC) $(ALL_CFLAGS) $(INCLUDES) -c $<
1736 @if [ ! -f stamp-gnatlib ] ; \
1738 $(ECHO) You must first build the GNAT library: make gnatlib; \
1744 install-gnatlib: ../stamp-gnatlib
1745 # Create the directory before deleting it, in case the directory is
1746 # a list of directories (as it may be on VMS). This ensures we are
1747 # deleting the right one.
1748 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1749 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1750 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1751 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1752 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1753 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1754 -$(INSTALL_DATA) rts/Makefile.adalib $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1755 for file in rts/*.ali; do \
1756 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1758 -for file in rts/*$(arext);do \
1759 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1761 ifeq ($(strip $(filter-out alpha% dec vms% openvms% alphavms%,$(targ))),)
1762 -for file in rts/lib*$(soext);do \
1763 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1766 -for file in rts/lib*-**$(soext);do \
1767 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1770 -( cd $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
1771 $(LN_S) libgnat-*$(soext) libgnat$(soext) )
1772 -( cd $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
1773 $(LN_S) libgnarl-*$(soext) libgnarl$(soext) )
1774 # This copy must be done preserving the date on the original file.
1775 for file in rts/*.adb rts/*.ads; do \
1776 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
1778 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1779 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1783 $(RM) rts/s-*$(objext)
1785 $(RM) rts/a-*$(objext)
1787 $(RM) rts/*$(objext)
1790 touch ../stamp-gnatlib2
1791 $(RM) ../stamp-gnatlib
1793 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1794 # successive target commands. Although the Gnu make documentation
1795 # implies this is true on all systems, I suspect it may not be, So care
1796 # has been taken to allow a sed script to look for ";)" and substitue
1797 # for ";" the appropriate character in the range of lines below
1798 # beginning with "GNULLI Begin" and ending with "GNULLI End"
1800 # GNULLI Begin ###########################################################
1802 ../stamp-gnatlib1: Makefile ../stamp-gnatlib2
1806 # Copy target independent sources
1807 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
1808 $(LN_S) $(fsrcpfx)$(f) rts ;) true
1809 # Remove files to be replaced by target dependent sources
1810 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1811 rts/$(word 1,$(subst <, ,$(PAIR))))
1812 # Copy new target dependent sources
1813 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1814 $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1815 rts/$(word 1,$(subst <, ,$(PAIR)));)
1816 $(RM) ../stamp-gnatlib
1817 touch ../stamp-gnatlib1
1819 # GNULLI End #############################################################
1821 # Don't use semicolon separated shell commands that involve list expansions.
1822 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
1823 # line lengths in excess of 256 characters.
1824 # Example: cd rts; ar rc libfoo.a $(LONG_LIST_OF_OBJS)
1825 # is guaranteed to overflow the buffer.
1827 gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
1828 # ../xgcc -B../ -dD -E ../tconfig.h $(INCLUDES) > rts/tconfig.h
1829 $(MAKE) -C rts CC="../../xgcc -B../../" \
1830 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
1831 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
1832 srcdir=$(fsrcdir) VPATH=$(fsrcdir) \
1833 -f ../Makefile $(LIBGNAT_OBJS) prefix.o
1834 $(MAKE) -C rts CC="../../xgcc -B../../" \
1835 ADA_INCLUDES="$(ADA_INCLUDES_FOR_SUBDIR)" \
1836 CFLAGS="$(GNATLIBCFLAGS)" ADA_CFLAGS="$(GNATLIBCFLAGS)" \
1837 ADAFLAGS="$(GNATLIBFLAGS)" \
1838 srcdir=$(fsrcdir) VPATH=$(fsrcdir) \
1841 $(RM) rts/libgnat$(arext) rts/libgnarl$(arext)
1842 $(AR) $(AR_FLAGS) rts/libgnat$(arext) \
1843 $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) prefix.o)
1844 if $(RANLIB_TEST) ; then $(RANLIB) rts/libgnat$(arext); else true; fi
1845 $(AR) $(AR_FLAGS) rts/libgnarl$(arext) \
1846 $(addprefix rts/,$(GNATRTL_TASKING_OBJS))
1847 if $(RANLIB_TEST) ; then $(RANLIB) rts/libgnarl$(arext); else true; fi
1848 ifeq ($(GMEM_LIB),gmemlib)
1849 $(AR) $(AR_FLAGS) rts/libgmem$(arext) rts/memtrack.o;
1851 $(CHMOD) a-wx rts/*.ali
1852 touch ../stamp-gnatlib
1854 HIE_NONE_TARGET_PAIRS=\
1855 a-except.ads<1aexcept.ads \
1856 a-except.adb<1aexcept.adb \
1857 a-tags.adb<1atags.adb \
1858 s-secsta.ads<1ssecsta.ads \
1859 s-secsta.adb<1ssecsta.adb \
1862 HIE_SUBST:='s/High_Integrity_Mode.*/High_Integrity_Mode : constant Boolean := True;/'
1863 # This target needs RTS_NAME, RTS_SRCS, RTS_TARGET_PAIRS to be set properly
1864 # it creates a rts with the proper structure and the right target dependent srcs
1866 $(RMDIR) rts-$(RTS_NAME)
1867 $(MKDIR) rts-$(RTS_NAME)
1868 $(CHMOD) u+w rts-$(RTS_NAME)
1869 $(MKDIR) rts-$(RTS_NAME)/adalib
1870 $(MKDIR) rts-$(RTS_NAME)/adainclude
1871 $(CHMOD) u+w rts-$(RTS_NAME)/*
1872 $(LN) $(fsrcpfx)$(RTS_NAME).gpr rts-$(RTS_NAME)
1873 # Copy target independent sources
1874 $(foreach f,$(RTS_SRCS), \
1875 $(LN) $(fsrcpfx)$(f) rts-$(RTS_NAME)/adainclude ;) true
1876 # Remove files to be replaced by target dependent sources
1877 $(RM) $(foreach PAIR,$(RTS_TARGET_PAIRS), \
1878 rts-$(RTS_NAME)/adainclude/$(word 1,$(subst <, ,$(PAIR))))
1879 # Copy new target dependent sources
1880 $(foreach PAIR,$(RTS_TARGET_PAIRS), \
1881 $(LN) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1882 rts-$(RTS_NAME)/adainclude/$(word 1,$(subst <, ,$(PAIR)));)
1883 # change system.High_Integrity_Mode to true for the none & ravenscar rts
1884 ifeq ($(filter-out none ravenscar,$(RTS_NAME)),)
1885 sed -e $(HIE_SUBST) rts-$(RTS_NAME)/adainclude/system.ads \
1887 $(MV) dummy rts-$(RTS_NAME)/adainclude/system.ads
1891 $(CP) -r rts-$(RTS_NAME) $(DESTDIR)$(libsubdir)/
1894 $(MAKE) $(FLAGS_TO_PASS) prepare-rts \
1895 RTS_NAME=none RTS_SRCS="$(HIE_SOURCES)" \
1896 RTS_TARGET_PAIRS="$(HIE_NONE_TARGET_PAIRS)"
1897 -$(GNATMAKE) -Prts-none/none.gpr
1898 $(RM) rts-none/adalib/*.o
1899 $(CHMOD) a-wx rts-none/adalib/*.ali
1901 rts-ravenscar: force
1902 $(MAKE) $(FLAGS_TO_PASS) prepare-rts \
1903 RTS_NAME=ravenscar RTS_SRCS="$(RAVEN_SOURCES)" \
1904 RTS_TARGET_PAIRS="$(HIE_RAVEN_TARGET_PAIRS)"
1905 -$(GNATMAKE) -Prts-ravenscar/none.gpr
1906 $(CHMOD) a-wx rts-ravenscar/adalib/*.ali
1908 internal-hielib: ../stamp-gnatlib1
1909 sed -e 's/High_Integrity_Mode.*/High_Integrity_Mode : constant Boolean := True;/' rts/system.ads > rts/s.ads
1910 $(MV) rts/s.ads rts/system.ads
1911 $(MAKE) -C rts CC="../../xgcc -B../../" \
1912 ADA_INCLUDES="$(ADA_INCLUDES_FOR_SUBDIR)" \
1913 CFLAGS="$(GNATLIBCFLAGS)" \
1914 ADAFLAGS="$(GNATLIBFLAGS)" \
1915 srcdir=$(fsrcdir) VPATH=$(fsrcdir) \
1918 $(CHMOD) a-wx rts/*.ali
1919 $(RM) $(addprefix rts/,$(HIE_OBJS))
1920 touch ../stamp-gnatlib
1923 $(MAKE) ADA_INCLUDE_SRCS="$(HIE_SOURCES)" LIBGNAT_SRCS="" \
1924 LIBGNAT_TARGET_PAIRS="a-except.ads<1aexcept.ads \
1925 a-except.adb<1aexcept.adb \
1926 a-tags.adb<1atags.adb \
1927 s-secsta.ads<1ssecsta.ads \
1928 s-secsta.adb<1ssecsta.adb \
1929 i-c.ads<1ic.ads" internal-hielib
1931 internal-ravenlib: ../stamp-gnatlib1
1932 sed -e 's/High_Integrity_Mode.*/High_Integrity_Mode : constant Boolean := True;/' rts/system.ads > rts/s.ads
1933 $(MV) rts/s.ads rts/system.ads
1934 $(MAKE) -C rts CC="../../xgcc -B../../" \
1935 ADA_INCLUDES="$(ADA_INCLUDES_FOR_SUBDIR)" \
1936 CFLAGS="$(GNATLIBCFLAGS)" \
1937 ADAFLAGS="$(GNATLIBFLAGS)" \
1938 srcdir=$(fsrcdir) VPATH=$(fsrcdir) \
1941 $(CHMOD) a-wx rts/*.ali
1942 touch ../stamp-gnatlib
1944 # Target for building a ravenscar run time for VxWorks/Cert PPC
1946 $(MAKE) ADA_INCLUDE_SRCS="$(RAVEN_SOURCES)" LIBGNAT_SRCS="" \
1947 LIBGNAT_TARGET_PAIRS="a-except.ads<1aexcept.ads \
1948 a-except.adb<1aexcept.adb \
1949 a-tags.adb<1atags.adb \
1950 s-secsta.ads<1ssecsta.ads \
1951 s-secsta.adb<1ssecsta.adb \
1953 a-reatim.ads<1areatim.ads \
1954 a-reatim.adb<1areatim.adb \
1955 a-retide.adb<1aretide.adb \
1956 a-interr.adb<1ainterr.adb \
1957 s-interr.ads<1sinterr.ads \
1958 s-interr.adb<1sinterr.adb \
1959 s-taskin.ads<1staskin.ads \
1960 s-taskin.adb<1staskin.adb \
1961 s-tarest.adb<1starest.adb \
1962 s-tposen.ads<1stposen.ads \
1963 s-tposen.adb<1stposen.adb \
1964 s-osinte.adb<1sosinte.adb \
1965 s-taprop.ads<1staprop.ads \
1966 s-taprop.adb<1staprop.adb \
1967 a-sytaco.ads<1asytaco.ads \
1968 a-sytaco.adb<1asytaco.adb \
1969 a-intnam.ads<4zintnam.ads \
1970 s-osinte.adb<5zosinte.adb \
1971 s-osinte.ads<5zosinte.ads \
1972 s-taspri.ads<5ztaspri.ads \
1973 s-vxwork.ads<5pvxwork.ads \
1974 system.ads<5ysystem.ads" internal-ravenlib
1976 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
1977 gnatlib-shared-default:
1978 $(MAKE) $(FLAGS_TO_PASS) \
1979 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1980 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1981 THREAD_KIND="$(THREAD_KIND)" \
1983 $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
1984 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1985 -o libgnat-$(LIBRARY_VERSION)$(soext) \
1986 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
1987 $(SO_OPTS)libgnat-$(LIBRARY_VERSION)$(soext) $(MISCLIB) -lm
1988 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1989 -o libgnarl-$(LIBRARY_VERSION)$(soext) \
1990 $(GNATRTL_TASKING_OBJS) \
1991 $(SO_OPTS)libgnarl-$(LIBRARY_VERSION)$(soext) $(THREADSLIB)
1992 cd rts; $(LN_S) libgnat-$(LIBRARY_VERSION)$(soext) libgnat$(soext)
1993 cd rts; $(LN_S) libgnarl-$(LIBRARY_VERSION)$(soext) libgnarl$(soext)
1995 gnatlib-shared-dual:
1996 $(MAKE) $(FLAGS_TO_PASS) \
1997 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1998 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1999 THREAD_KIND="$(THREAD_KIND)" \
2001 $(MV) rts/libgnat$(arext) rts/libgnarl$(arext) .
2002 $(RM) ../stamp-gnatlib2
2003 $(MAKE) $(FLAGS_TO_PASS) \
2004 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2005 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2006 THREAD_KIND="$(THREAD_KIND)" \
2007 gnatlib-shared-default
2008 $(MV) libgnat$(arext) libgnarl$(arext) rts
2011 $(MAKE) $(FLAGS_TO_PASS) \
2012 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2013 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2014 THREAD_KIND="$(THREAD_KIND)" \
2016 $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
2017 rm -f rts/*.sym rts/gnatlib_symvec.opt
2018 make -C rts -f ../Makefile.vms \
2019 $(patsubst %.obj,%.sym,$(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS))
2020 append /new [.rts]*.sym [.rts]gnatlib_symvec.opt
2021 ../xgcc.exe -g -B../ -nostartfiles -shared --for-linker=/noinform \
2022 -o rts/libgnat.exe rts/libgnat.olb \
2023 --for-linker=rts/gnatlib_symvec.opt \
2024 --for-linker=gsmatch=equal,YY,MMDD
2025 rm -f rts/*.sym rts/gnatlib_symvec.opt
2026 make -C rts -f ../Makefile.vms \
2027 $(patsubst %.obj,%.sym,$(GNATRTL_TASKING_OBJS))
2028 append /new [.rts]*.sym [.rts]gnatlib_symvec.opt
2029 ../xgcc.exe -g -B../ -nostartfiles -shared --for-linker=/noinform \
2030 -o rts/libgnarl.exe rts/libgnarl.olb rts/libgnat.exe \
2031 --for-linker=rts/gnatlib_symvec.opt \
2032 --for-linker=gsmatch=equal,YY,MMDD
2035 $(MAKE) $(FLAGS_TO_PASS) \
2036 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2037 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2038 THREAD_KIND="$(THREAD_KIND)" \
2039 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
2042 # .s files for cross-building
2044 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp" \
2045 HOST_CFLAGS= HOST_CC=cc
2047 # Compiling object files from source files.
2049 # Ada language specific files.
2051 b_gnatl.c : $(GNATLINK_OBJS)
2052 $(GNATBIND) $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2053 b_gnatl.o : b_gnatl.c
2055 b_gnatm.c : $(GNATMAKE_OBJS)
2056 $(GNATBIND) $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2057 b_gnatm.o : b_gnatm.c
2059 # force debugging information on s-tasdeb.o so that it is always
2060 # possible to set conditional breakpoints on tasks.
2062 s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
2063 $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) $<
2065 # force debugging information on s-vaflop.o so that it is always
2066 # possible to call the VAX float debug print routines.
2067 # force at least -O so that the inline assembly works.
2069 s-vaflop.o : s-vaflop.adb s-vaflop.ads
2070 $(ADAC) -c -O $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2073 # force debugging information on a-except.o so that it is always
2074 # possible to set conditional breakpoints on exceptions.
2075 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2077 a-except.o : a-except.adb a-except.ads
2078 $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2081 # force debugging information on s-assert.o so that it is always
2082 # possible to set breakpoint on assert failures.
2084 s-assert.o : s-assert.adb s-assert.ads a-except.ads
2085 $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 \
2088 mdll.o : mdll.adb mdll.ads mdll-file.ads mdll-utl.ads
2089 $(CC) -c $(ALL_ADAFLAGS) -O2 $(ADA_INCLUDES) $<
2091 mdll-fil.o : mdll-fil.adb mdll.ads mdll-fil.ads
2092 $(CC) -c $(ALL_ADAFLAGS) -O2 $(ADA_INCLUDES) $<
2094 mdll-utl.o : mdll-utl.adb mdll.ads mdll-utl.ads sdefault.ads types.ads
2095 $(CC) -c $(ALL_ADAFLAGS) -O2 $(ADA_INCLUDES) $<
2097 # force debugging information and no optimization on s-memory.o so that it
2098 # is always possible to set breakpoint on __gnat_malloc and __gnat_free
2099 # this is important for gnatmem using GDB. memtrack.o is built from
2100 # memtrack.adb, and used by the post-mortem analysis with gnatmem.
2102 s-memory.o : s-memory.adb s-memory.ads memtrack.o
2103 $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
2106 memtrack.o : memtrack.adb s-memory.ads
2107 $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
2110 # Need to keep the frame pointer in this file to pop the stack properly on
2114 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2121 deftarg.o : deftarg.c
2123 exit.o : raise.h exit.c
2125 adafinal.o : raise.h adafinal.c
2132 $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(RT_FLAGS) \
2133 $(ALL_CPPFLAGS) $(INCLUDES) $<
2135 init.o : init.c ada.h types.h raise.h
2136 $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(RT_FLAGS) \
2137 $(ALL_CPPFLAGS) $(INCLUDES) $<
2139 raise.o : raise.c raise.h
2140 $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(RT_FLAGS) \
2141 $(ALL_CPPFLAGS) $(INCLUDES) $<
2143 # Need to keep the frame pointer in this file to pop the stack properly on
2145 tracebak.o : tracebak.c
2146 $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2147 -fno-omit-frame-pointer $<
2149 targtyps.o : targtyps.c $(CONFIG_H) ada.h types.h atree.h nlists.h elists.h \
2150 uintp.h sinfo.h einfo.h namet.h snames.h stringt.h urealp.h fe.h \
2151 $(ADA_TREE_H) gigi.h
2153 # Rule to compile prefix.o for the run-time.
2155 prefix.o : $(srcdir)/../prefix.c
2156 $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(RT_FLAGS) \
2157 $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/../.. -I../.. \
2158 -DPREFIX=\"$(prefix)\" $<
2160 # In GNU Make, ignore whether `stage*' exists.
2161 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2162 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2166 # Gnatlbr is only used on VMS
2168 GNATLBR_RTL_C_OBJS = adaint.o argv.o cio.o cstreams.o exit.o adafinal.o init.o \
2169 raise.o sysdep.o tracebak.o
2170 GNATLBR_C_OBJS = $(GNATLBR_RTL_C_OBJS)
2172 ../gnatlbr$(exeext):: sdefault.o $(GNATLBR_C_OBJS) $(EXTRA_GNATTOOLS_OBJS)
2174 ../gnatlbr$(exeext):: force
2175 $(GNATMAKE) -a --GCC="$(CC)" $(ALL_ADAFLAGS) $(ADA_INCLUDES) \
2176 --GNATBIND="$(GNATBIND)" --GNATLINK="$(GNATLINK)" \
2177 -nostdlib $(fsrcpfx)gnatlbr -o $@ \
2178 -largs --GCC="$(CC) $(ALL_CFLAGS) $(LDFLAGS)" \
2179 $(GNATLBR_C_OBJS) $(EXTRA_GNATTOOLS_OBJS)