1 # Makefile for GNU Ada Compiler (GNAT).
2 # Copyright (C) 1994-2003 Free Software Foundation, Inc.
4 #This file is part of GNU CC.
6 #GNU CC 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 #GNU CC 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 GNU CC; 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
]
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
=@dep_host_xmake_file@
181 tmake_file
=@dep_tmake_file@
182 host_canonical
=@host_canonical@
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})
191 fsrcpfx
:= $(shell cd
$(srcdir);${PWD})/
192 fcurdir
:= $(shell ${PWD})
193 fcurpfx
:= $(shell ${PWD})/
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 # sed inserts variable overrides after the following line.
227 # Now figure out from those variables how to compile and link.
229 all.indirect
: Makefile ..
/gnat1
$(exeext
)
231 # IN_GCC distinguishes between code compiled into GCC itself and other
232 # programs built during a bootstrap.
233 # autoconf inserts -DCROSS_COMPILE if we are building a cross compiler.
234 INTERNAL_CFLAGS
= @CROSS@
-DIN_GCC
236 # This is the variable actually used when we compile.
237 LOOSE_CFLAGS
= `echo $(CFLAGS) $(WARN2_CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`
238 ALL_CFLAGS
= $(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(LOOSE_CFLAGS
) \
242 ALL_CPPFLAGS
= $(CPPFLAGS
) $(X_CPPFLAGS
) $(T_CPPFLAGS
)
244 # This is where we get libiberty.a from.
245 LIBIBERTY
= ..
/..
/libiberty
/libiberty.a
247 # How to link with both our special library facilities
248 # and the system's installed libraries.
249 LIBS
= $(INTLLIBS
) $(LIBIBERTY
) $(SYSLIBS
)
250 LIBDEPS
= $(INTLDEPS
) $(LIBIBERTY
)
251 TOOLS_LIBS
= ..
/..
/prefix.o ..
/..
/version.o
$(LIBGNAT
) \
252 ..
/..
/..
/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
) \
264 -I
$(fsrcdir
)/..
-I
$(fsrcdir
)/..
/config
-I
$(fsrcdir
)/..
/..
/include
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
273 # Always use -I$(srcdir)/config when compiling.
275 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_ADA_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $<
277 $(ADAC
) -c
$(ALL_ADAFLAGS
) $(ADA_INCLUDES
) $<
279 $(ADAC
) -c
$(ALL_ADAFLAGS
) $(ADA_INCLUDES
) $<
281 # This tells GNU make version 3 not to export all the variables
282 # defined in this file into the environment.
285 # Lists of files for various purposes.
287 # Object files for gnat executables
288 GNATLINK_OBJS
= gnatlink.o link.o \
289 ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o gnatvsn.o \
290 hostparm.o namet.o opt.o osint.o output.o rident.o sdefault.o stylesw.o \
291 switch.o table.o tree_io.o types.o validsw.o widechar.o
293 GNATMAKE_OBJS
= ali.o ali-util.o \
294 alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o einfo.o elists.o \
295 errout.o fmap.o fname.o fname-uf.o fname-sf.o \
296 gnatmake.o gnatvsn.o hostparm.o krunch.o lib.o make.o makeusg.o \
297 mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-utl.o \
298 namet.o nlists.o opt.o osint.o osint-m.o output.o \
299 prj.o prj-attr.o prj-com.o prj-dect.o prj-env.o prj-ext.o prj-nmsc.o \
300 prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \
301 rident.o scans.o scn.o sdefault.o sfn_scan.o sinfo.o sinfo-cn.o \
302 sinput.o sinput-l.o sinput-p.o \
303 snames.o stand.o stringt.o style.o stylesw.o validsw.o switch.o switch-m.o \
304 switch-c.o table.o targparm.o tree_io.o types.o \
305 uintp.o uname.o urealp.o usage.o widechar.o
307 # Convert the target variable into a space separated list of architecture,
308 # manufacturer, and operating system and assign each of those to its own
311 host
:=$(subst -, ,$(host_canonical
))
312 targ
:=$(subst -, ,$(target
))
313 arch
:=$(word 1,$(targ
))
314 ifeq ($(words $(targ
)),2)
316 osys
:=$(word 2,$(targ
))
318 manu
:=$(word 2,$(targ
))
319 osys
:=$(word 3,$(targ
))
322 # LIBGNAT_TARGET_PAIRS is a list of pairs of filenames.
323 # The members of each pair must be separated by a '<' and no whitespace.
324 # Each pair must be separated by some amount of whitespace from the following
329 LIBGNAT_TARGET_PAIRS
= \
330 a-intnam.ads
<4nintnam.ads \
331 s-inmaop.adb
<5ninmaop.adb \
332 s-intman.adb
<5nintman.adb \
333 s-osinte.ads
<5nosinte.ads \
334 s-osprim.adb
<7sosprim.adb \
335 s-taprop.adb
<5ntaprop.adb \
336 s-taspri.ads
<5ntaspri.ads
338 # Default shared object option. Note that we rely on the fact that the "soname"
339 # option will always be present and last in this flag, so that we can have
340 # $(SO_OPTS)libgnat-x.xx
342 SO_OPTS
= -Wl
,-soname
,
344 # Default gnatlib-shared target.
345 # This is needed on some targets to use a different gnatlib-shared target, e.g
346 # gnatlib-shared-dual
347 GNATLIB_SHARED
= gnatlib-shared-default
349 # default value for gnatmake's target dependent file
352 # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
353 # $(strip STRING) removes leading and trailing spaces from STRING.
354 # If what's left is null then it's a match.
356 ifeq ($(strip $(filter-out %86 os2 OS2 os2_emx
,$(arch
) $(osys
))),)
357 LIBGNAT_TARGET_PAIRS
= \
358 a-excpol.adb
<4wexcpol.adb \
359 a-intnam.ads
<4nintnam.ads \
360 a-numaux.adb
<86numaux.adb \
361 a-numaux.ads
<86numaux.ads \
362 s-inmaop.adb
<5ninmaop.adb \
363 s-interr.adb
<5ointerr.adb \
364 s-intman.adb
<5nintman.adb \
365 s-mastop.adb
<5omastop.adb \
366 s-osinte.adb
<5oosinte.adb \
367 s-osinte.ads
<5oosinte.ads \
368 s-osprim.adb
<5oosprim.adb \
369 s-parame.adb
<5oparame.adb \
370 system.ads
<5osystem.ads \
371 s-taprop.adb
<5otaprop.adb \
372 s-taspri.ads
<5otaspri.ads
374 EXTRA_GNATRTL_NONTASKING_OBJS
= \
381 ifeq ($(strip $(filter-out %86 interix
%,$(arch
) $(osys
))),)
382 LIBGNAT_TARGET_PAIRS
= \
383 a-excpol.adb
<4hexcpol.adb \
384 a-intnam.ads
<4pintnam.ads \
385 a-numaux.adb
<86numaux.adb \
386 a-numaux.ads
<86numaux.ads \
387 g-soccon.ads
<3psoccon.ads \
388 s-inmaop.adb
<7sinmaop.adb \
389 s-intman.adb
<7sintman.adb \
390 s-mastop.adb
<5omastop.adb \
391 s-osinte.adb
<7sosinte.adb \
392 s-osinte.ads
<5posinte.ads \
393 s-osprim.adb
<5posprim.adb \
394 s-taprop.adb
<7staprop.adb \
395 system.ads
<5psystem.ads \
396 s-taspri.ads
<7staspri.ads \
397 s-tpopsp.adb
<7stpopsp.adb
399 THREADSLIB
= -lgthreads
-lmalloc
402 # sysv5uw is SCO UnixWare 7
403 ifeq ($(strip $(filter-out %86 sysv5uw
%,$(arch
) $(osys
))),)
404 LIBGNAT_TARGET_PAIRS
= \
405 a-excpol.adb
<4wexcpol.adb \
406 a-intnam.ads
<41intnam.ads \
407 a-numaux.adb
<86numaux.adb \
408 a-numaux.ads
<86numaux.ads \
409 s-inmaop.adb
<7sinmaop.adb \
410 s-intman.adb
<7sintman.adb \
411 s-mastop.adb
<5omastop.adb \
412 s-osinte.ads
<51osinte.ads \
413 s-osinte.adb
<51osinte.adb \
414 s-osprim.adb
<5posprim.adb \
415 s-taprop.adb
<7staprop.adb \
416 s-taspri.ads
<7staspri.ads \
417 s-tpopsp.adb
<5atpopsp.adb \
418 system.ads
<51system.ads \
419 g-soccon.ads
<31soccon.ads \
420 g-soliop.ads
<31soliop.ads
422 THREADSLIB
= -lthread
424 GNATLIB_SHARED
= gnatlib-shared-dual
425 LIBRARY_VERSION
:= $(strip $(shell grep Library_Version
$(fsrcpfx
)gnatvsn.ads | sed
-e
's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
428 ifeq ($(strip $(filter-out alpha
% dec vx
%,$(targ
))),)
429 LIBGNAT_TARGET_PAIRS
= \
430 a-sytaco.ads
<4zsytaco.ads \
431 a-sytaco.adb
<4zsytaco.adb \
432 a-intnam.ads
<4zintnam.ads \
433 a-numaux.ads
<4znumaux.ads \
434 s-inmaop.adb
<7sinmaop.adb \
435 s-interr.adb
<5zinterr.adb \
436 s-intman.adb
<5zintman.adb \
437 s-osinte.adb
<5zosinte.adb \
438 s-osinte.ads
<5zosinte.ads \
439 s-osprim.adb
<5zosprim.adb \
440 s-taprop.adb
<5ztaprop.adb \
441 s-taspri.ads
<5ztaspri.ads \
442 s-vxwork.ads
<5avxwork.ads \
443 g-soccon.ads
<3zsoccon.ads \
444 g-socthi.ads
<3zsocthi.ads \
445 g-socthi.adb
<3zsocthi.adb \
446 system.ads
<5zsystem.ads
448 EXTRA_GNATRTL_NONTASKING_OBJS
=i-vxwork.o i-vxwoio.o
449 EXTRA_GNATRTL_TASKING_OBJS
=s-vxwork.o
452 ifeq ($(strip $(filter-out m68k
% wrs vx
%,$(targ
))),)
453 LIBGNAT_TARGET_PAIRS
= \
454 a-sytaco.ads
<4zsytaco.ads \
455 a-sytaco.adb
<4zsytaco.adb \
456 a-intnam.ads
<4zintnam.ads \
457 a-numaux.ads
<4znumaux.ads \
458 s-inmaop.adb
<7sinmaop.adb \
459 s-interr.adb
<5zinterr.adb \
460 s-intman.adb
<5zintman.adb \
461 s-osinte.adb
<5zosinte.adb \
462 s-osinte.ads
<5zosinte.ads \
463 s-osprim.adb
<5zosprim.adb \
464 s-taprop.adb
<5ztaprop.adb \
465 s-taspri.ads
<5ztaspri.ads \
466 s-vxwork.ads
<5kvxwork.ads \
467 g-soccon.ads
<3zsoccon.ads \
468 g-socthi.ads
<3zsocthi.ads \
469 g-socthi.adb
<3zsocthi.adb \
470 system.ads
<5ksystem.ads
472 EXTRA_GNATRTL_NONTASKING_OBJS
=i-vxwork.o i-vxwoio.o
473 EXTRA_GNATRTL_TASKING_OBJS
=s-vxwork.o
475 ifeq ($(strip $(filter-out yes
,$(TRACE
))),)
476 LIBGNAT_TARGET_PAIRS
+= \
477 s-traces.adb
<7straces.adb \
478 s-tratas.adb
<7stratas.adb \
479 s-trafor.adb
<7strafor.adb \
480 s-trafor.ads
<7strafor.ads \
481 s-tfsetr.adb
<5ztfsetr.adb
485 ifeq ($(strip $(filter-out powerpc
% 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.adb
<5zintman.adb \
494 s-osinte.adb
<5zosinte.adb \
495 s-osinte.ads
<5zosinte.ads \
496 s-osprim.adb
<5zosprim.adb \
497 s-taprop.adb
<5ztaprop.adb \
498 s-taspri.ads
<5ztaspri.ads \
499 s-vxwork.ads
<5pvxwork.ads \
500 g-soccon.ads
<3zsoccon.ads \
501 g-socthi.ads
<3zsocthi.ads \
502 g-socthi.adb
<3zsocthi.adb \
503 system.ads
<5ysystem.ads
505 EXTRA_RAVEN_SOURCES
=i-vxwork.ads s-vxwork.ads
506 EXTRA_RAVEN_OBJS
=i-vxwork.o s-vxwork.o
507 EXTRA_GNATRTL_NONTASKING_OBJS
=i-vxwork.o
508 EXTRA_GNATRTL_TASKING_OBJS
=s-vxwork.o
511 ifeq ($(strip $(filter-out sparc
% wrs vx
%,$(targ
))),)
512 LIBGNAT_TARGET_PAIRS
= \
513 a-sytaco.ads
<4zsytaco.ads \
514 a-sytaco.adb
<4zsytaco.adb \
515 a-intnam.ads
<4zintnam.ads \
516 a-numaux.ads
<4znumaux.ads \
517 s-inmaop.adb
<7sinmaop.adb \
518 s-interr.adb
<5zinterr.adb \
519 s-intman.adb
<5zintman.adb \
520 s-osinte.adb
<5zosinte.adb \
521 s-osinte.ads
<5zosinte.ads \
522 s-osprim.adb
<5zosprim.adb \
523 s-taprop.adb
<5ztaprop.adb \
524 s-taspri.ads
<7staspri.ads \
525 s-vxwork.ads
<5svxwork.ads \
526 system.ads
<5ysystem.ads
528 EXTRA_GNATRTL_NONTASKING_OBJS
=i-vxwork.o
529 EXTRA_GNATRTL_TASKING_OBJS
=s-vxwork.o
532 ifeq ($(strip $(filter-out mips
% wrs vx
%,$(targ
))),)
533 LIBGNAT_TARGET_PAIRS
= \
534 a-sytaco.ads
<4zsytaco.ads \
535 a-sytaco.adb
<4zsytaco.adb \
536 a-intnam.ads
<4zintnam.ads \
537 a-numaux.ads
<4znumaux.ads \
538 s-inmaop.adb
<7sinmaop.adb \
539 s-interr.adb
<5zinterr.adb \
540 s-intman.adb
<5zintman.adb \
541 s-osinte.adb
<5zosinte.adb \
542 s-osinte.ads
<5zosinte.ads \
543 s-osprim.adb
<5zosprim.adb \
544 s-taprop.adb
<5ztaprop.adb \
545 s-taspri.ads
<7staspri.ads \
546 s-vxwork.ads
<5mvxwork.ads \
547 system.ads
<5zsystem.ads
549 EXTRA_GNATRTL_NONTASKING_OBJS
=i-vxwork.o
550 EXTRA_GNATRTL_TASKING_OBJS
=s-vxwork.o
553 ifeq ($(strip $(filter-out sparc sun solaris2
% sunos5
%,$(targ
))),)
554 LIBGNAT_TARGET_PAIRS
= \
555 a-intnam.ads
<4sintnam.ads \
556 s-inmaop.adb
<7sinmaop.adb \
557 s-intman.adb
<5sintman.adb \
558 s-osinte.adb
<5sosinte.adb \
559 s-osinte.ads
<5sosinte.ads \
560 s-osprim.adb
<5posprim.adb \
561 s-parame.adb
<5sparame.adb \
562 s-taprop.adb
<5staprop.adb \
563 s-tasinf.adb
<5stasinf.adb \
564 s-tasinf.ads
<5stasinf.ads \
565 s-taspri.ads
<5staspri.ads \
566 s-tpopse.adb
<5stpopse.adb \
567 g-soccon.ads
<3ssoccon.ads \
568 g-soliop.ads
<3ssoliop.ads \
569 system.ads
<5ssystem.ads
571 THREADSLIB
= -lposix4
-lthread
572 MISCLIB
= -lposix4
-lnsl
-lsocket
573 SYMLIB
= -laddr2line
-lbfd
$(INTLLIBS
)
575 GNATLIB_SHARED
= gnatlib-shared-dual
577 LIBRARY_VERSION
:= $(strip $(shell grep Library_Version
$(fsrcpfx
)gnatvsn.ads | sed
-e
's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
579 ifeq ($(strip $(filter-out fsu FSU
,$(THREAD_KIND
))),)
580 LIBGNAT_TARGET_PAIRS
= \
581 a-intnam.ads
<4sintnam.ads \
582 s-inmaop.adb
<7sinmaop.adb \
583 s-intman.adb
<5sintman.adb \
584 s-osinte.adb
<7sosinte.adb \
585 s-osinte.ads
<5tosinte.ads \
586 s-osprim.adb
<5posprim.adb \
587 s-taprop.adb
<7staprop.adb \
588 s-taspri.ads
<7staspri.ads \
589 s-tpopsp.adb
<7stpopsp.adb \
590 g-soccon.ads
<3ssoccon.ads \
591 g-soliop.ads
<3ssoliop.ads \
592 system.ads
<5ssystem.ads
594 THREADSLIB
= -lgthreads
-lmalloc
597 ifeq ($(strip $(filter-out pthread PTHREAD
,$(THREAD_KIND
))),)
598 LIBGNAT_TARGET_PAIRS
= \
599 a-intnam.ads
<4sintnam.ads \
600 s-inmaop.adb
<7sinmaop.adb \
601 s-intman.adb
<7sintman.adb \
602 s-osinte.adb
<5iosinte.adb \
603 s-osinte.ads
<54osinte.ads \
604 s-osprim.adb
<5posprim.adb \
605 s-taprop.adb
<7staprop.adb \
606 s-taspri.ads
<7staspri.ads \
607 s-tpopsp.adb
<5atpopsp.adb \
608 g-soccon.ads
<3ssoccon.ads \
609 g-soliop.ads
<3ssoliop.ads \
610 system.ads
<5ssystem.ads
612 THREADSLIB
= -lposix4
-lpthread
616 ifeq ($(strip $(filter-out %86 solaris2
%,$(arch
) $(osys
))),)
617 LIBGNAT_TARGET_PAIRS
= \
618 a-numaux.adb
<86numaux.adb \
619 a-numaux.ads
<86numaux.ads \
620 a-intnam.ads
<4sintnam.ads \
621 s-inmaop.adb
<7sinmaop.adb \
622 s-intman.adb
<5sintman.adb \
623 s-mastop.adb
<5omastop.adb \
624 s-osinte.adb
<5sosinte.adb \
625 s-osinte.ads
<5sosinte.ads \
626 s-osprim.adb
<5posprim.adb \
627 s-parame.adb
<5sparame.adb \
628 s-taprop.adb
<5staprop.adb \
629 s-tasinf.adb
<5stasinf.adb \
630 s-tasinf.ads
<5stasinf.ads \
631 s-taspri.ads
<5staspri.ads \
632 s-tpopse.adb
<5etpopse.adb \
633 g-soccon.ads
<3ssoccon.ads \
634 g-soliop.ads
<3ssoliop.ads \
635 system.ads
<5esystem.ads
637 THREADSLIB
= -lposix4
-lthread
638 MISCLIB
= -lposix4
-lnsl
-lsocket
640 GNATLIB_SHARED
= gnatlib-shared-dual
641 LIBRARY_VERSION
:= $(strip $(shell grep Library_Version
$(fsrcpfx
)gnatvsn.ads | sed
-e
's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
644 ifeq ($(strip $(filter-out %86 linux
%,$(arch
) $(osys
))),)
645 LIBGNAT_TARGET_PAIRS
= \
646 a-intnam.ads
<4lintnam.ads \
647 a-numaux.adb
<86numaux.adb \
648 a-numaux.ads
<86numaux.ads \
649 s-inmaop.adb
<7sinmaop.adb \
650 s-intman.adb
<5lintman.adb \
651 s-mastop.adb
<5omastop.adb \
652 s-osinte.adb
<5iosinte.adb \
653 s-osinte.ads
<5iosinte.ads \
654 s-osprim.adb
<7sosprim.adb \
655 s-taprop.adb
<5itaprop.adb \
656 s-taspri.ads
<5itaspri.ads \
657 s-tpopsp.adb
<5atpopsp.adb \
658 system.ads
<5lsystem.ads
660 TOOLS_TARGET_PAIRS
= mlib-tgt.adb
<5lml
-tgt.adb
661 SYMLIB
= -laddr2line
-lbfd
$(INTLLIBS
)
662 THREADSLIB
= -lpthread
663 GNATLIB_SHARED
= gnatlib-shared-dual
665 LIBRARY_VERSION
:= $(strip $(shell grep Library_Version
$(fsrcpfx
)gnatvsn.ads | sed
-e
's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
667 ifeq ($(strip $(filter-out fsu FSU
,$(THREAD_KIND
))),)
668 LIBGNAT_TARGET_PAIRS
= \
669 a-intnam.ads
<4lintnam.ads \
670 a-numaux.adb
<86numaux.adb \
671 a-numaux.ads
<86numaux.ads \
672 s-inmaop.adb
<7sinmaop.adb \
673 s-intman.adb
<5lintman.adb \
674 s-mastop.adb
<5omastop.adb \
675 s-osinte.adb
<7sosinte.adb \
676 s-osinte.ads
<5losinte.ads \
677 s-osprim.adb
<7sosprim.adb \
678 s-taprop.adb
<7staprop.adb \
679 s-taspri.ads
<7staspri.ads \
680 s-tpopsp.adb
<7stpopsp.adb \
681 system.ads
<5lsystem.ads
683 THREADSLIB
= -lgthreads
-lmalloc
686 ifeq ($(strip $(filter-out rt-linux RT-LINUX
,$(THREAD_KIND
))),)
687 LIBGNAT_TARGET_PAIRS
= \
688 a-intnam.ads
<4nintnam.ads \
689 s-inmaop.adb
<5ninmaop.adb \
690 s-intman.adb
<5nintman.adb \
691 s-osinte.adb
<5qosinte.adb \
692 s-osinte.ads
<5qosinte.ads \
693 s-osprim.adb
<5qosprim.adb \
694 s-stache.adb
<5qstache.adb \
695 s-taprop.adb
<5qtaprop.adb \
696 s-taspri.ads
<5qtaspri.ads \
697 system.ads
<5lsystem.ads
703 ifeq ($(strip $(filter-out mips sgi irix
%,$(targ
))),)
704 ifeq ($(strip $(filter-out mips sgi irix6
%,$(targ
))),)
705 LIBGNAT_TARGET_PAIRS
= \
706 a-intnam.ads
<4gintnam.ads \
707 s-inmaop.adb
<7sinmaop.adb \
708 s-intman.adb
<5fintman.adb \
709 s-mastop.adb
<5gmastop.adb \
710 s-osinte.adb
<5aosinte.adb \
711 s-osinte.ads
<5fosinte.ads \
712 s-osprim.adb
<7sosprim.adb \
713 s-proinf.adb
<5gproinf.adb \
714 s-proinf.ads
<5gproinf.ads \
715 s-taprop.adb
<5ftaprop.adb \
716 s-tasinf.ads
<5ftasinf.ads \
717 s-taspri.ads
<7staspri.ads \
718 s-traceb.adb
<7straceb.adb \
719 g-soccon.ads
<3gsoccon.ads \
720 system.ads
<5gsystem.ads
722 THREADSLIB
= -lpthread
725 LIBGNAT_TARGET_PAIRS
= \
726 a-intnam.ads
<4gintnam.ads \
727 s-inmaop.adb
<5ninmaop.adb \
728 s-interr.adb
<5ginterr.adb \
729 s-intman.adb
<5gintman.adb \
730 s-mastop.adb
<5gmastop.adb \
731 s-osinte.adb
<5aosinte.adb \
732 s-osinte.ads
<5gosinte.ads \
733 s-osprim.adb
<7sosprim.adb \
734 s-proinf.adb
<5gproinf.adb \
735 s-proinf.ads
<5gproinf.ads \
736 s-taprop.adb
<5gtaprop.adb \
737 s-tasinf.adb
<5gtasinf.adb \
738 s-tasinf.ads
<5gtasinf.ads \
739 s-taspri.ads
<7staspri.ads \
740 s-traceb.adb
<7straceb.adb \
741 g-soccon.ads
<3gsoccon.ads \
742 system.ads
<5fsystem.ads
744 THREADSLIB
= -lathread
749 SO_OPTS
= -Wl
,-all,-set_version
,sgi1.0
,-update_registry
,..
/so_locations
,-soname
,
750 LIBRARY_VERSION
:= $(strip $(shell grep Library_Version
$(fsrcpfx
)gnatvsn.ads | sed
-e
's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
753 ifeq ($(strip $(filter-out hppa
% hp hpux
%,$(targ
))),)
754 LIBGNAT_TARGET_PAIRS
= \
755 a-intnam.ads
<4hintnam.ads \
756 s-inmaop.adb
<7sinmaop.adb \
757 s-intman.adb
<7sintman.adb \
758 s-osinte.adb
<5iosinte.adb \
759 s-osinte.ads
<53osinte.ads \
760 s-parame.ads
<5hparame.ads \
761 s-osprim.adb
<7sosprim.adb \
762 s-traceb.adb
<5htraceb.adb \
763 s-taprop.adb
<7staprop.adb \
764 s-taspri.ads
<7staspri.ads \
765 s-tpopsp.adb
<5atpopsp.adb \
766 g-soccon.ads
<3hsoccon.ads \
767 system.ads
<5hsystem.ads
769 TGT_LIB
= /usr
/lib
/libcl.a
-lpthread
770 THREADSLIB
= -lpthread
-lc_r
771 SYMLIB
= -laddr2line
-lbfd
$(INTLLIBS
)
774 GNATLIB_SHARED
= gnatlib-shared-dual
776 ifeq ($(strip $(filter-out dce DCE
,$(THREAD_KIND
))),)
777 LIBGNAT_TARGET_PAIRS
= \
778 a-excpol.adb
<4wexcpol.adb \
779 a-intnam.ads
<4hintnam.ads \
780 s-inmaop.adb
<7sinmaop.adb \
781 s-interr.adb
<5ginterr.adb \
782 s-intman.adb
<7sintman.adb \
783 s-osinte.adb
<5hosinte.adb \
784 s-osinte.ads
<5hosinte.ads \
785 s-parame.ads
<5hparame.ads \
786 s-osprim.adb
<7sosprim.adb \
787 s-taprop.adb
<5htaprop.adb \
788 s-taspri.ads
<5htaspri.ads \
789 g-soccon.ads
<3hsoccon.ads \
790 system.ads
<5hsystem.ads
796 ifeq ($(strip $(filter-out ibm aix4
%,$(manu
) $(osys
))),)
797 LIBGNAT_TARGET_PAIRS
= \
798 a-intnam.ads
<4cintnam.ads \
799 s-inmaop.adb
<7sinmaop.adb \
800 s-intman.adb
<7sintman.adb \
801 s-osinte.adb
<5bosinte.adb \
802 s-osinte.ads
<5bosinte.ads \
803 s-osprim.adb
<7sosprim.adb \
804 s-taprop.adb
<7staprop.adb \
805 s-taspri.ads
<7staspri.ads \
806 s-tpopsp.adb
<7stpopsp.adb \
807 g-soccon.ads
<3bsoccon.ads \
808 system.ads
<5bsystem.ads
810 THREADSLIB
= -lpthreads
811 ifeq ($(strip $(filter-out fsu FSU
,$(THREAD_KIND
))),)
812 LIBGNAT_TARGET_PAIRS
= \
813 a-intnam.ads
<4cintnam.ads \
814 s-inmaop.adb
<7sinmaop.adb \
815 s-intman.adb
<7sintman.adb \
816 s-osinte.adb
<7sosinte.adb \
817 s-osinte.ads
<5cosinte.ads \
818 s-osprim.adb
<7sosprim.adb \
819 s-taprop.adb
<7staprop.adb \
820 s-taspri.ads
<7staspri.ads \
821 s-tpopsp.adb
<7stpopsp.adb \
822 g-soccon.ads
<3bsoccon.ads \
823 system.ads
<5bsystem.ads
825 THREADSLIB
= -lgthreads
-lmalloc
829 ifeq ($(strip $(filter-out lynxos
,$(osys
))),)
830 ifeq ($(strip $(filter-out %86 lynxos
,$(arch
) $(osys
))),)
831 LIBGNAT_TARGET_PAIRS
= \
832 a-numaux.adb
<86numaux.adb \
833 a-numaux.ads
<86numaux.ads \
834 a-intnam.ads
<42intnam.ads \
835 s-mastop.adb
<5omastop.adb \
836 s-inmaop.adb
<7sinmaop.adb \
837 s-intman.adb
<7sintman.adb \
838 s-osinte.adb
<52osinte.adb \
839 s-osinte.ads
<52osinte.ads \
840 s-osprim.adb
<7sosprim.adb \
841 s-taprop.adb
<7staprop.adb \
842 s-taspri.ads
<7staspri.ads \
843 s-tpopsp.adb
<7stpopsp.adb \
844 system.ads
<52system.ads
846 ifeq ($(strip $(filter-out pthread PTHREAD
,$(THREAD_KIND
))),)
847 LIBGNAT_TARGET_PAIRS
= \
848 a-numaux.adb
<86numaux.adb \
849 a-numaux.ads
<86numaux.ads \
850 a-intnam.ads
<42intnam.ads \
851 s-mastop.adb
<5omastop.adb \
852 s-inmaop.adb
<7sinmaop.adb \
853 s-intman.adb
<7sintman.adb \
854 s-osinte.adb
<56osinte.adb \
855 s-osinte.ads
<56osinte.ads \
856 s-osprim.adb
<7sosprim.adb \
857 s-taprop.adb
<56taprop.adb \
858 s-taspri.ads
<56taspri.ads \
859 s-tpopsp.adb
<5atpopsp.adb \
860 system.ads
<52system.ads
864 LIBGNAT_TARGET_PAIRS
= \
865 a-intnam.ads
<42intnam.ads \
866 s-inmaop.adb
<7sinmaop.adb \
867 s-intman.adb
<7sintman.adb \
868 s-osinte.adb
<56osinte.adb \
869 s-osinte.ads
<56osinte.ads \
870 s-osprim.adb
<7sosprim.adb \
871 s-taprop.adb
<56taprop.adb \
872 s-taspri.ads
<56taspri.ads \
873 s-tpopsp.adb
<5atpopsp.adb \
874 system.ads
<52system.ads
878 ifeq ($(strip $(filter-out rtems rtemself rtemsaout rtemscoff
,$(osys
))),)
879 LIBGNAT_TARGET_PAIRS
= \
880 a-intnam.ads
<4rintnam.ads \
881 s-inmaop.adb
<7sinmaop.adb \
882 s-intman.adb
<7sintman.adb \
883 s-osinte.adb
<5rosinte.adb \
884 s-osinte.ads
<5rosinte.ads \
885 s-osprim.adb
<7sosprim.adb \
886 s-parame.adb
<5rparame.adb \
887 s-taprop.adb
<7staprop.adb \
888 s-taspri.ads
<7staspri.ads \
889 s-tpopsp.adb
<5rtpopsp.adb
892 ifeq ($(strip $(filter-out go32 msdos
,$(osys
))),)
893 LIBGNAT_TARGET_PAIRS
= \
894 a-intnam.ads
<4dintnam.ads \
895 s-inmaop.adb
<7sinmaop.adb \
896 s-intman.adb
<7sintman.adb \
897 s-osinte.adb
<7sosinte.adb \
898 s-osinte.ads
<5dosinte.ads \
899 s-osprim.adb
<7sosprim.adb \
900 s-taprop.adb
<7staprop.adb \
901 s-taspri.ads
<7staspri.ads \
902 s-tpopsp.adb
<7stpopsp.adb
905 ifeq ($(strip $(filter-out alpha
% dec osf
%,$(targ
))),)
906 LIBGNAT_TARGET_PAIRS
= \
907 a-intnam.ads
<4aintnam.ads \
908 s-inmaop.adb
<7sinmaop.adb \
909 s-intman.adb
<7sintman.adb \
910 s-mastop.adb
<5amastop.adb \
911 s-osinte.adb
<5aosinte.adb \
912 s-osinte.ads
<5aosinte.ads \
913 s-osprim.adb
<5posprim.adb \
914 s-taprop.adb
<5ataprop.adb \
915 s-tasinf.ads
<5atasinf.ads \
916 s-taspri.ads
<5ataspri.ads \
917 s-tpopsp.adb
<5atpopsp.adb \
918 s-traceb.adb
<7straceb.adb \
919 g-soccon.ads
<3asoccon.ads \
920 system.ads
<5asystem.ads
922 THREADSLIB
= -lpthread
-lmach
-lexc
-lrt
923 SYMLIB
= -laddr2line
-lbfd
$(INTLLIBS
)
924 LIBRARY_VERSION
:= $(strip $(shell grep Library_Version
$(fsrcpfx
)gnatvsn.ads | sed
-e
's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
927 ifeq ($(strip $(filter-out alpha
% dec vms
% openvms
% alphavms
%,$(host
))),)
929 EXTRA_GNAT1_OBJS
= ..
/prefix.o vmshandler.o
930 EXTRA_GNATBIND_OBJS
= ..
/prefix.o vmshandler.o
934 ifeq ($(strip $(filter-out alpha
% dec vms
% openvms
% alphavms
%,$(targ
))),)
936 ifeq ($(strip $(filter-out alpha64
% dec vms
% openvms
% alphavms
%,$(targ
))),)
937 LIBGNAT_TARGET_PAIRS_AUX
=
939 ifeq ($(strip $(filter-out express EXPRESS
,$(THREAD_KIND
))),)
940 LIBGNAT_TARGET_PAIRS_AUX
= \
941 s-parame.ads
<5xparame.ads
943 LIBGNAT_TARGET_PAIRS_AUX
= \
944 s-parame.ads
<5vparame.ads
948 LIBGNAT_TARGET_PAIRS
= \
949 a-caldel.adb
<4vcaldel.adb \
950 a-calend.adb
<4vcalend.adb \
951 a-calend.ads
<4vcalend.ads \
952 a-excpol.adb
<4wexcpol.adb \
953 a-intnam.ads
<4vintnam.ads \
954 g-enblsp.adb
<3venblsp.adb \
955 i-cstrea.adb
<6vcstrea.adb \
956 i-cpp.adb
<6vcpp.adb \
957 interfac.ads
<6vinterf.ads \
958 s-asthan.adb
<5vasthan.adb \
959 s-inmaop.adb
<5vinmaop.adb \
960 s-interr.adb
<5vinterr.adb \
961 s-intman.adb
<5vintman.adb \
962 s-intman.ads
<5vintman.ads \
963 s-osinte.adb
<5vosinte.adb \
964 s-osinte.ads
<5vosinte.ads \
965 s-osprim.adb
<5vosprim.adb \
966 s-osprim.ads
<5vosprim.ads \
967 s-taprop.adb
<5vtaprop.adb \
968 s-taspri.ads
<5vtaspri.ads \
969 s-tpopde.adb
<5vtpopde.adb \
970 s-tpopde.ads
<5vtpopde.ads \
971 s-vaflop.adb
<5vvaflop.adb \
972 system.ads
<5xsystem.ads \
973 $(LIBGNAT_TARGET_PAIRS_AUX
)
975 GNATLIB_SHARED
=gnatlib-shared-vms
976 EXTRA_LIBGNAT_SRCS
=vmshandler.asm
977 EXTRA_LIBGNAT_OBJS
=vmshandler.o
978 EXTRA_GNATRTL_TASKING_OBJS
=s-tpopde.o
979 EXTRA_GNATTOOLS_OBJS
= ..
/prefix.o vmshandler.o
982 ifeq ($(strip $(filter-out cygwin32
% mingw32
% pe
,$(osys
))),)
983 LIBGNAT_TARGET_PAIRS
= \
984 a-calend.adb
<4wcalend.adb \
985 a-excpol.adb
<4wexcpol.adb \
986 a-intnam.ads
<4wintnam.ads \
987 a-numaux.adb
<86numaux.adb \
988 a-numaux.ads
<86numaux.ads \
989 s-gloloc.adb
<5wgloloc.adb \
990 s-inmaop.adb
<5ninmaop.adb \
991 s-interr.adb
<5ginterr.adb \
992 s-intman.adb
<5wintman.adb \
993 s-mastop.adb
<5omastop.adb \
994 s-memory.adb
<5wmemory.adb \
995 s-osinte.ads
<5wosinte.ads \
996 s-osprim.adb
<5wosprim.adb \
997 s-taprop.adb
<5wtaprop.adb \
998 s-taspri.ads
<5wtaspri.ads \
999 g-socthi.ads
<3wsocthi.ads \
1000 g-socthi.adb
<3wsocthi.adb \
1001 g-soccon.ads
<3wsoccon.ads \
1002 g-soliop.ads
<3wsoliop.ads \
1003 system.ads
<5wsystem.ads
1006 SYMLIB
= -laddr2line
-lbfd
$(INTLLIBS
)
1008 EXTRA_GNATTOOLS
= ..
/..
/gnatdll
$(exeext
)
1009 EXTRA_GNATRTL_NONTASKING_OBJS
= g-regist.o
1012 # The runtime library for gnat comprises two directories. One contains the
1013 # Ada source files that the compiler (gnat1) needs -- these files are listed
1014 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1015 # corresponding .ali files for the parts written in Ada, libgnat.a for
1016 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1017 # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1018 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1019 # go into the directory. The pthreads emulation is built in the threads
1020 # subdirectory and copied.
1021 LIBGNAT_SRCS
= ada.h adaint.c adaint.h argv.c cio.c cstreams.c \
1022 errno.c exit.c cal.c \
1023 raise.h raise.c sysdep.c types.h aux-io.c init.c \
1024 adafinal.c tracebak.c expect.c mkdir.c
$(EXTRA_LIBGNAT_SRCS
)
1026 LIBGNAT_OBJS
= adaint.o argv.o cio.o cstreams.o errno.o exit.o \
1027 raise.o sysdep.o aux-io.o init.o cal.o adafinal.o \
1028 tracebak.o expect.o mkdir.o
$(EXTRA_LIBGNAT_OBJS
)
1030 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1031 # the library installation will change and there will be a
1032 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1033 # from ADA_INCLUDE_SRCS.
1035 # Objects needed only for tasking
1036 GNATRTL_TASKING_OBJS
= \
1074 s-tratas.o
$(EXTRA_GNATRTL_TASKING_OBJS
)
1076 # Objects needed for non-tasking.
1077 GNATRTL_NONTASKING_OBJS
= \
1403 text_io.o
$(EXTRA_GNATRTL_NONTASKING_OBJS
)
1405 GNATRTL_OBJS
= $(GNATRTL_NONTASKING_OBJS
) $(GNATRTL_TASKING_OBJS
) g-trasym.o
1407 # Files which are suitable in no run time/hi integrity mode
1432 a-tags.adb
$(EXTRA_HIE_SOURCES
)
1449 a-tags.o
$(EXTRA_HIE_OBJS
)
1451 # Files which are needed in ravenscar mode
1482 s-tarest.adb
$(EXTRA_RAVEN_SOURCES
)
1484 # Objects to generate for the ravenscar run time
1503 s-tarest.o
$(EXTRA_RAVEN_OBJS
)
1505 # Default run time files
1507 ADA_INCLUDE_DIR
= $(libsubdir
)/adainclude
1508 ADA_RTL_OBJ_DIR
= $(libsubdir
)/adalib
1511 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1512 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1513 sequenio.ads system.ads Makefile.adalib memtrack.adb \
1514 a-
*.adb a-
*.ads g-
*.ad? i-
*.ad? \
1515 s-
[a-o
]*.adb s-
[p-z
]*.adb \
1516 s-
[a-o
]*.ads s-
[p-z
]*.ads
1518 # Language-independent object files.
1519 LIBGNAT
=..
/rts
/libgnat.a
1520 TOOLS_FLAGS_TO_PASS
= \
1522 "CFLAGS=$(CFLAGS)" \
1523 "LDFLAGS=$(LDFLAGS)" \
1524 "ADAFLAGS=$(ADAFLAGS)" \
1525 "INCLUDES=$(INCLUDES_FOR_SUBDIR)"\
1526 "ADA_INCLUDES=$(ADA_INCLUDES) $(ADA_INCLUDES_FOR_SUBDIR)"\
1527 "libsubdir=$(libsubdir)" \
1528 "exeext=$(exeext)" \
1529 "srcdir=$(fsrcdir)" \
1530 "VPATH=$(fsrcdir)" \
1531 "TOOLS_LIBS=$(TOOLS_LIBS) $(TGT_LIB)" \
1532 "GNATMAKE=$(GNATMAKE)" \
1533 "GNATLINK=$(GNATLINK)" \
1534 "GNATBIND=$(GNATBIND)"
1536 # Build directory for the tools. Let's copy the target dependent
1537 # sources using the same mechanism as for gnatlib. The other sources are
1538 # accessed using the vpath directive below
1544 -(cd tools
; $(LN_S
) ..
/sdefault.adb .
)
1545 -$(foreach PAIR
,$(TOOLS_TARGET_PAIRS
), \
1546 $(RM
) tools
/$(word 1,$(subst <, ,$(PAIR
)));\
1547 $(LN_S
) $(fsrcdir
)/$(word 2,$(subst <, ,$(PAIR
))) \
1548 tools
/$(word 1,$(subst <, ,$(PAIR
)));)
1549 touch ..
/stamp-tools
1551 # when compiling the tools, the runtime has to be first on the path so that
1552 # it hides the runtime files lying with the rest of the sources
1553 ifeq ($(TOOLSCASE
),native
)
1554 vpath
%.ads ..
/rts ..
/
1555 vpath
%.adb ..
/rts ..
/
1556 vpath
%.c ..
/rts ..
/
1557 vpath
%.h ..
/rts ..
/
1560 # in the cross tools case, everything is compiled with the native
1561 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1562 ifeq ($(TOOLSCASE
),cross
)
1569 # gnatmake/link tools cannot always be built with gnatmake/link for bootstrap
1570 # reasons: gnatmake should be built with a recent compiler, a recent compiler
1571 # may not generate ALI files compatible with an old gnatmake so it is important
1572 # to be able to build gnatmake without a version of gnatmake around. Once
1573 # everything has been compiled once, gnatmake can be recompiled with itself
1574 # (see target gnattools1-re)
1575 gnattools1
: ..
/stamp-tools ..
/stamp-gnatlib
1576 $(MAKE
) -C tools
-f ..
/Makefile
$(TOOLS_FLAGS_TO_PASS
) \
1578 ..
/..
/gnatmake
$(exeext
) ..
/..
/gnatlink
$(exeext
) ..
/..
/gnatbl
$(exeext
)
1580 # gnatmake/link can be build with recent gnatmake/link if they are available.
1581 # This is especially convenient for building cross tools or for rebuilding
1582 # the tools when the original bootstrap has already be done.
1583 gnattools1-re
: ..
/stamp-tools
1584 $(MAKE
) -C tools
-f ..
/Makefile
$(TOOLS_FLAGS_TO_PASS
) \
1585 TOOLSCASE
=cross INCLUDES
="" gnatmake-re gnatlink-re
1587 # these tools are built with gnatmake & are common to native and cross
1588 gnattools2
: ..
/stamp-tools
1589 $(MAKE
) -C tools
-f ..
/Makefile
$(TOOLS_FLAGS_TO_PASS
) \
1591 ..
/..
/gnatchop
$(exeext
) ..
/..
/gnat
$(exeext
) ..
/..
/gnatkr
$(exeext
) \
1592 ..
/..
/gnatls
$(exeext
) ..
/..
/gnatprep
$(exeext
) \
1593 ..
/..
/gnatpsta
$(exeext
) ..
/..
/gnatxref
$(exeext
) \
1594 ..
/..
/gnatfind
$(exeext
) ..
/..
/gnatname
$(exeext
)
1596 # These tools are only built for the native version.
1597 gnattools3
: ..
/stamp-tools
1598 # $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1599 # TOOLSCASE=native \
1600 # top_builddir=../.. ../../gnatmem$(exeext) $(EXTRA_GNATTOOLS)
1602 ..
/..
/gnatchop
$(exeext
):
1603 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatchop
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1604 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatchop
1605 $(GNATLINK
) -v gnatchop
-o
$@
--GCC
="$(CC) $(ADA_INCLUDES)" \
1608 ..
/..
/gnat
$(exeext
):
1609 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatcmd
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1610 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatcmd
1611 $(GNATLINK
) -v gnatcmd
-o
$@
--GCC
="$(CC) $(ADA_INCLUDES)" \
1614 ..
/..
/gnatkr
$(exeext
):
1615 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatkr
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1616 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatkr
1617 $(GNATLINK
) -v gnatkr
-o
$@
--GCC
="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS
)
1619 ..
/..
/gnatls
$(exeext
):
1620 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatls
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1621 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatls
1622 $(GNATLINK
) -v gnatls
-o
$@
--GCC
="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS
)
1624 ..
/..
/gnatname
$(exeext
):
1625 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatname
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1626 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatname
1627 $(GNATLINK
) -v gnatname
-o
$@
--GCC
="$(CC) $(ADA_INCLUDES)" \
1630 ..
/..
/gnatprep
$(exeext
):
1631 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatprep
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1632 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatprep
1633 $(GNATLINK
) -v gnatprep
-o
$@
--GCC
="$(CC) $(ADA_INCLUDES)" \
1636 ..
/..
/gnatpsta
$(exeext
): deftarg.o
1637 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatpsta
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1638 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatpsta
1639 $(GNATLINK
) -v gnatpsta
-o
$@
--GCC
="$(CC) $(ADA_INCLUDES)"\
1640 ..
/targtyps.o deftarg.o
$(TOOLS_LIBS
)
1642 ..
/..
/gnatxref
$(exeext
):
1643 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatxref
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1644 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatxref
1645 $(GNATLINK
) -v gnatxref
-o
$@
--GCC
="$(CC) $(ADA_INCLUDES)" \
1648 ..
/..
/gnatfind
$(exeext
):
1649 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatfind
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1650 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatfind
1651 $(GNATLINK
) -v gnatfind
-o
$@
--GCC
="$(CC) $(ADA_INCLUDES)" \
1654 ..
/..
/gnatmem
$(exeext
): gmem.o
$(SYMDEPS
)
1655 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatmem
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1656 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatmem
1657 $(GNATLINK
) -v gnatmem
-o
$@
--GCC
="$(CC) $(ADA_INCLUDES)" \
1658 gmem.o
$(SYMLIB
) $(TOOLS_LIBS
)
1660 ..
/..
/gnatdll
$(exeext
):
1661 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatdll
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1662 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) $(GNATBIND_FLAGS
) gnatdll
1663 $(GNATLINK
) -v gnatdll
-o
$@
--GCC
="$(CC) $(ADA_INCLUDES)" \
1667 $(GNATMAKE
) $(ADA_INCLUDES
) -u sdefault
--GCC
="$(CC) $(MOST_ADA_FLAGS)"
1668 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatmake
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1669 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatmake
1670 $(GNATLINK
) -v gnatmake
-o ..
/..
/gnatmake
$(exeext
) \
1671 --GCC
="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS
)
1673 # Note the use of the "mv" command in order to allow gnatlink to be linked with
1674 # with the former version of gnatlink itself which cannot override itself.
1676 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatlink
--GCC
="$(CC) $(ALL_ADAFLAGS)"
1677 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatlink
1678 $(GNATLINK
) -v gnatlink
-o ..
/..
/gnatlinknew
$(exeext
) \
1679 --GCC
="$(CC) $(ADA_INCLUDES)" link.o
$(TOOLS_LIBS
)
1680 $(MV
) ..
/..
/gnatlinknew
$(exeext
) ..
/..
/gnatlink
$(exeext
)
1683 # Needs to be built with CC=gcc
1684 # Since the RTL should be built with the latest compiler, remove the
1685 # stamp target in the parent directory whenever gnat1 is rebuilt
1686 # Likewise for the tools
1687 ..
/..
/gnatmake
$(exeext
): $(P
) b_gnatm.o
$(GNATMAKE_OBJS
)
1688 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ b_gnatm.o
$(GNATMAKE_OBJS
) \
1691 ..
/..
/gnatlink
$(exeext
): $(P
) b_gnatl.o
$(GNATLINK_OBJS
)
1692 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ b_gnatl.o
$(GNATLINK_OBJS
) \
1695 ..
/..
/gnatbl
$(exeext
): gnatbl.o
1696 $(CC
) -o
$@
$(ALL_CFLAGS
) $(LDFLAGS
) gnatbl.o
$(TOOLS_LIBS
)
1698 gnatbl.o
: gnatbl.c adaint.h
1699 $(CC
) $(ALL_CFLAGS
) $(INCLUDES
) -c
$<
1702 @if
[ ! -f stamp-gnatlib
] ; \
1704 $(ECHO
) You must first build the GNAT library
: make gnatlib
; \
1710 install-gnatlib
: ..
/stamp-gnatlib
1711 # Create the directory before deleting it, in case the directory is
1712 # a list of directories (as it may be on VMS). This ensures we are
1713 # deleting the right one.
1714 -$(MKDIR
) $(DESTDIR
)$(ADA_RTL_OBJ_DIR
)
1715 -$(MKDIR
) $(DESTDIR
)$(ADA_INCLUDE_DIR
)
1716 $(RMDIR
) $(DESTDIR
)$(ADA_RTL_OBJ_DIR
)
1717 $(RMDIR
) $(DESTDIR
)$(ADA_INCLUDE_DIR
)
1718 -$(MKDIR
) $(DESTDIR
)$(ADA_RTL_OBJ_DIR
)
1719 -$(MKDIR
) $(DESTDIR
)$(ADA_INCLUDE_DIR
)
1720 -$(INSTALL_DATA
) ada
/rts
/Makefile.adalib
$(DESTDIR
)$(ADA_RTL_OBJ_DIR
)
1721 for file in ada
/rts
/*.ali
; do \
1722 $(INSTALL_DATA
) $$file $(DESTDIR
)$(ADA_RTL_OBJ_DIR
); \
1724 -for file in ada
/rts
/*$(arext
);do \
1725 $(INSTALL_DATA
) $$file $(DESTDIR
)$(ADA_RTL_OBJ_DIR
); \
1727 ifeq ($(strip $(filter-out alpha
% dec vms
% openvms
% alphavms
%,$(targ
))),)
1728 -for file in ada
/rts
/lib
*$(soext
);do \
1729 $(INSTALL_DATA
) $$file $(DESTDIR
)$(ADA_RTL_OBJ_DIR
); \
1732 -for file in ada
/rts
/lib
*-**$(soext
);do \
1733 $(INSTALL_DATA
) $$file $(DESTDIR
)$(ADA_RTL_OBJ_DIR
); \
1736 -( cd
$(DESTDIR
)$(ADA_RTL_OBJ_DIR
) && \
1737 $(LN_S
) libgnat-
*$(soext
) libgnat
$(soext
) )
1738 -( cd
$(DESTDIR
)$(ADA_RTL_OBJ_DIR
) && \
1739 $(LN_S
) libgnarl-
*$(soext
) libgnarl
$(soext
) )
1740 # This copy must be done preserving the date on the original file.
1741 for file in ada
/rts
/*.adb ada
/rts
/*.ads
; do \
1742 $(INSTALL_DATA_DATE
) $$file $(DESTDIR
)$(ADA_INCLUDE_DIR
); \
1744 cd
$(DESTDIR
)$(ADA_INCLUDE_DIR
); $(CHMOD
) a-wx
*.adb
1745 cd
$(DESTDIR
)$(ADA_INCLUDE_DIR
); $(CHMOD
) a-wx
*.ads
1749 $(RM
) rts
/s-
*$(objext
)
1751 $(RM
) rts
/a-
*$(objext
)
1753 $(RM
) rts
/*$(objext
)
1756 touch ..
/stamp-gnatlib2
1757 $(RM
) ..
/stamp-gnatlib
1759 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1760 # successive target commands. Although the Gnu make documentation
1761 # implies this is true on all systems, I suspect it may not be, So care
1762 # has been taken to allow a sed script to look for ";)" and substitue
1763 # for ";" the appropriate character in the range of lines below
1764 # beginning with "GNULLI Begin" and ending with "GNULLI End"
1766 # GNULLI Begin ###########################################################
1768 ..
/stamp-gnatlib1
: Makefile ..
/stamp-gnatlib2
1772 # Copy target independent sources
1773 $(foreach f
,$(ADA_INCLUDE_SRCS
) $(LIBGNAT_SRCS
), \
1774 $(LN_S
) $(fsrcpfx
)$(f
) rts
;) true
1775 # Remove files to be replaced by target dependent sources
1776 $(RM
) $(foreach PAIR
,$(LIBGNAT_TARGET_PAIRS
), \
1777 rts
/$(word 1,$(subst <, ,$(PAIR
))))
1778 # Copy new target dependent sources
1779 $(foreach PAIR
,$(LIBGNAT_TARGET_PAIRS
), \
1780 $(LN_S
) $(fsrcpfx
)$(word 2,$(subst <, ,$(PAIR
))) \
1781 rts
/$(word 1,$(subst <, ,$(PAIR
)));)
1782 $(RM
) ..
/stamp-gnatlib
1783 touch ..
/stamp-gnatlib1
1785 # GNULLI End #############################################################
1787 # Don't use semicolon separated shell commands that involve list expansions.
1788 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
1789 # line lengths in excess of 256 characters.
1790 # Example: cd rts; ar rc libfoo.a $(LONG_LIST_OF_OBJS)
1791 # is guaranteed to overflow the buffer.
1793 gnatlib
: ..
/stamp-gnatlib1 ..
/stamp-gnatlib2
1794 # ../xgcc -B../ -dD -E ../tconfig.h $(INCLUDES) > rts/tconfig.h
1795 $(MAKE
) -C rts CC
="../../xgcc -B../../" \
1796 INCLUDES
="$(INCLUDES_FOR_SUBDIR) -I./../.." \
1797 CFLAGS
="$(GNATLIBCFLAGS_FOR_C)" \
1798 srcdir=$(fsrcdir
) VPATH
=$(fsrcdir
) \
1799 -f ..
/Makefile
$(LIBGNAT_OBJS
) prefix.o
1800 $(MAKE
) -C rts CC
="../../xgcc -B../../" \
1801 ADA_INCLUDES
="$(ADA_INCLUDES_FOR_SUBDIR)" \
1802 CFLAGS
="$(GNATLIBCFLAGS)" ADA_CFLAGS
="$(GNATLIBCFLAGS)" \
1803 ADAFLAGS
="$(GNATLIBFLAGS)" \
1804 srcdir=$(fsrcdir
) VPATH
=$(fsrcdir
) \
1807 $(RM
) rts
/libgnat
$(arext
) rts
/libgnarl
$(arext
)
1808 $(AR
) $(AR_FLAGS
) rts
/libgnat
$(arext
) \
1809 $(addprefix rts
/,$(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
) prefix.o
)
1810 if
$(RANLIB_TEST
) ; then
$(RANLIB
) rts
/libgnat
$(arext
); else true
; fi
1811 $(AR
) $(AR_FLAGS
) rts
/libgnarl
$(arext
) \
1812 $(addprefix rts
/,$(GNATRTL_TASKING_OBJS
))
1813 if
$(RANLIB_TEST
) ; then
$(RANLIB
) rts
/libgnarl
$(arext
); else true
; fi
1814 ifeq ($(GMEM_LIB
),gmemlib
)
1815 $(AR
) $(AR_FLAGS
) rts
/libgmem
$(arext
) rts
/memtrack.o
;
1817 $(CHMOD
) a-wx rts
/*.ali
1818 touch ..
/stamp-gnatlib
1820 HIE_NONE_TARGET_PAIRS
=\
1821 a-except.ads
<1aexcept.ads \
1822 a-except.adb
<1aexcept.adb \
1823 a-tags.adb
<1atags.adb \
1824 s-secsta.ads
<1ssecsta.ads \
1825 s-secsta.adb
<1ssecsta.adb \
1828 HIE_SUBST
:='s/High_Integrity_Mode.*/High_Integrity_Mode : constant Boolean := True;/'
1829 # This target needs RTS_NAME, RTS_SRCS, RTS_TARGET_PAIRS to be set properly
1830 # it creates a rts with the proper structure and the right target dependent srcs
1832 $(RMDIR
) rts-
$(RTS_NAME
)
1833 $(MKDIR
) rts-
$(RTS_NAME
)
1834 $(CHMOD
) u
+w rts-
$(RTS_NAME
)
1835 $(MKDIR
) rts-
$(RTS_NAME
)/adalib
1836 $(MKDIR
) rts-
$(RTS_NAME
)/adainclude
1837 $(CHMOD
) u
+w rts-
$(RTS_NAME
)/*
1838 $(LN
) $(fsrcpfx
)$(RTS_NAME
).gpr rts-
$(RTS_NAME
)
1839 # Copy target independent sources
1840 $(foreach f
,$(RTS_SRCS
), \
1841 $(LN
) $(fsrcpfx
)$(f
) rts-
$(RTS_NAME
)/adainclude
;) true
1842 # Remove files to be replaced by target dependent sources
1843 $(RM
) $(foreach PAIR
,$(RTS_TARGET_PAIRS
), \
1844 rts-
$(RTS_NAME
)/adainclude
/$(word 1,$(subst <, ,$(PAIR
))))
1845 # Copy new target dependent sources
1846 $(foreach PAIR
,$(RTS_TARGET_PAIRS
), \
1847 $(LN
) $(fsrcpfx
)$(word 2,$(subst <, ,$(PAIR
))) \
1848 rts-
$(RTS_NAME
)/adainclude
/$(word 1,$(subst <, ,$(PAIR
)));)
1849 # change system.High_Integrity_Mode to true for the none & ravenscar rts
1850 ifeq ($(filter-out none ravenscar
,$(RTS_NAME
)),)
1851 sed
-e
$(HIE_SUBST
) rts-
$(RTS_NAME
)/adainclude
/system.ads \
1853 $(MV
) dummy rts-
$(RTS_NAME
)/adainclude
/system.ads
1857 $(CP
) -r rts-
$(RTS_NAME
) $(DESTDIR
)$(libsubdir
)/
1860 $(MAKE
) $(FLAGS_TO_PASS
) prepare-rts \
1861 RTS_NAME
=none RTS_SRCS
="$(HIE_SOURCES)" \
1862 RTS_TARGET_PAIRS
="$(HIE_NONE_TARGET_PAIRS)"
1863 -$(GNATMAKE
) -Prts-none
/none.gpr
1864 $(RM
) rts-none
/adalib
/*.o
1865 $(CHMOD
) a-wx rts-none
/adalib
/*.ali
1867 rts-ravenscar
: force
1868 $(MAKE
) $(FLAGS_TO_PASS
) prepare-rts \
1869 RTS_NAME
=ravenscar RTS_SRCS
="$(RAVEN_SOURCES)" \
1870 RTS_TARGET_PAIRS
="$(HIE_RAVEN_TARGET_PAIRS)"
1871 -$(GNATMAKE
) -Prts-ravenscar
/none.gpr
1872 $(CHMOD
) a-wx rts-ravenscar
/adalib
/*.ali
1874 internal-hielib
: ..
/stamp-gnatlib1
1875 sed
-e
's/High_Integrity_Mode.*/High_Integrity_Mode : constant Boolean := True;/' rts
/system.ads
> rts
/s.ads
1876 $(MV
) rts
/s.ads rts
/system.ads
1877 $(MAKE
) -C rts CC
="../../xgcc -B../../" \
1878 ADA_INCLUDES
="$(ADA_INCLUDES_FOR_SUBDIR)" \
1879 CFLAGS
="$(GNATLIBCFLAGS)" \
1880 ADAFLAGS
="$(GNATLIBFLAGS)" \
1881 srcdir=$(fsrcdir
) VPATH
=$(fsrcdir
) \
1884 $(CHMOD
) a-wx rts
/*.ali
1885 $(RM
) $(addprefix rts
/,$(HIE_OBJS
))
1886 touch ..
/stamp-gnatlib
1889 $(MAKE
) ADA_INCLUDE_SRCS
="$(HIE_SOURCES)" LIBGNAT_SRCS
="" \
1890 LIBGNAT_TARGET_PAIRS
="a-except.ads<1aexcept.ads \
1891 a-except.adb<1aexcept.adb \
1892 a-tags.adb<1atags.adb \
1893 s-secsta.ads<1ssecsta.ads \
1894 s-secsta.adb<1ssecsta.adb \
1895 i-c.ads<1ic.ads" internal-hielib
1897 internal-ravenlib
: ..
/stamp-gnatlib1
1898 sed
-e
's/High_Integrity_Mode.*/High_Integrity_Mode : constant Boolean := True;/' rts
/system.ads
> rts
/s.ads
1899 $(MV
) rts
/s.ads rts
/system.ads
1900 $(MAKE
) -C rts CC
="../../xgcc -B../../" \
1901 ADA_INCLUDES
="$(ADA_INCLUDES_FOR_SUBDIR)" \
1902 CFLAGS
="$(GNATLIBCFLAGS)" \
1903 ADAFLAGS
="$(GNATLIBFLAGS)" \
1904 srcdir=$(fsrcdir
) VPATH
=$(fsrcdir
) \
1907 $(CHMOD
) a-wx rts
/*.ali
1908 touch ..
/stamp-gnatlib
1910 # Target for building a ravenscar run time for VxWorks/Cert PPC
1912 $(MAKE
) ADA_INCLUDE_SRCS
="$(RAVEN_SOURCES)" LIBGNAT_SRCS
="" \
1913 LIBGNAT_TARGET_PAIRS
="a-except.ads<1aexcept.ads \
1914 a-except.adb<1aexcept.adb \
1915 a-tags.adb<1atags.adb \
1916 s-secsta.ads<1ssecsta.ads \
1917 s-secsta.adb<1ssecsta.adb \
1919 a-reatim.ads<1areatim.ads \
1920 a-reatim.adb<1areatim.adb \
1921 a-retide.adb<1aretide.adb \
1922 a-interr.adb<1ainterr.adb \
1923 s-interr.ads<1sinterr.ads \
1924 s-interr.adb<1sinterr.adb \
1925 s-taskin.ads<1staskin.ads \
1926 s-taskin.adb<1staskin.adb \
1927 s-tarest.adb<1starest.adb \
1928 s-tposen.ads<1stposen.ads \
1929 s-tposen.adb<1stposen.adb \
1930 s-osinte.adb<1sosinte.adb \
1931 s-taprop.ads<1staprop.ads \
1932 s-taprop.adb<1staprop.adb \
1933 a-sytaco.ads<1asytaco.ads \
1934 a-sytaco.adb<1asytaco.adb \
1935 a-intnam.ads<4zintnam.ads \
1936 s-osinte.adb<5zosinte.adb \
1937 s-osinte.ads<5zosinte.ads \
1938 s-taspri.ads<5ztaspri.ads \
1939 s-vxwork.ads<5pvxwork.ads \
1940 system.ads<5ysystem.ads" internal-ravenlib
1942 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
1943 gnatlib-shared-default
:
1944 $(MAKE
) $(FLAGS_TO_PASS
) \
1945 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
1946 GNATLIBCFLAGS
="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1947 THREAD_KIND
="$(THREAD_KIND)" \
1949 $(RM
) rts
/libgnat
$(soext
) rts
/libgnarl
$(soext
)
1950 cd rts
; ..
/..
/xgcc
-B..
/..
/ -shared
$(TARGET_LIBGCC2_CFLAGS
) \
1951 -o libgnat-
$(LIBRARY_VERSION
)$(soext
) \
1952 $(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
) \
1953 $(SO_OPTS
)libgnat-
$(LIBRARY_VERSION
)$(soext
) $(MISCLIB
) -lm
1954 cd rts
; ..
/..
/xgcc
-B..
/..
/ -shared
$(TARGET_LIBGCC2_CFLAGS
) \
1955 -o libgnarl-
$(LIBRARY_VERSION
)$(soext
) \
1956 $(GNATRTL_TASKING_OBJS
) \
1957 $(SO_OPTS
)libgnarl-
$(LIBRARY_VERSION
)$(soext
) $(THREADSLIB
)
1958 cd rts
; $(LN_S
) libgnat-
$(LIBRARY_VERSION
)$(soext
) libgnat
$(soext
)
1959 cd rts
; $(LN_S
) libgnarl-
$(LIBRARY_VERSION
)$(soext
) libgnarl
$(soext
)
1961 gnatlib-shared-dual
:
1962 $(MAKE
) $(FLAGS_TO_PASS
) \
1963 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
1964 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
1965 THREAD_KIND
="$(THREAD_KIND)" \
1967 $(MV
) rts
/libgnat
$(arext
) rts
/libgnarl
$(arext
) .
1968 $(RM
) ..
/stamp-gnatlib2
1969 $(MAKE
) $(FLAGS_TO_PASS
) \
1970 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
1971 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
1972 THREAD_KIND
="$(THREAD_KIND)" \
1973 gnatlib-shared-default
1974 $(MV
) libgnat
$(arext
) libgnarl
$(arext
) rts
1977 $(MAKE
) $(FLAGS_TO_PASS
) \
1978 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
1979 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
1980 THREAD_KIND
="$(THREAD_KIND)" \
1982 $(RM
) rts
/libgnat
$(soext
) rts
/libgnarl
$(soext
)
1983 rm -f rts
/*.sym rts
/gnatlib_symvec.opt
1984 make
-C rts
-f ..
/Makefile.vms \
1985 $(patsubst %.obj
,%.sym
,$(LIBGNAT_OBJS
) $(GNATRTL_NONTASKING_OBJS
))
1986 append
/new
[.rts
]*.sym
[.rts
]gnatlib_symvec.opt
1987 ..
/xgcc.exe
-g
-B..
/ -nostartfiles
-shared
--for-linker
=/noinform \
1988 -o rts
/libgnat.exe rts
/libgnat.olb \
1989 --for-linker
=rts
/gnatlib_symvec.opt \
1990 --for-linker
=gsmatch
=equal
,YY
,MMDD
1991 rm -f rts
/*.sym rts
/gnatlib_symvec.opt
1992 make
-C rts
-f ..
/Makefile.vms \
1993 $(patsubst %.obj
,%.sym
,$(GNATRTL_TASKING_OBJS
))
1994 append
/new
[.rts
]*.sym
[.rts
]gnatlib_symvec.opt
1995 ..
/xgcc.exe
-g
-B..
/ -nostartfiles
-shared
--for-linker
=/noinform \
1996 -o rts
/libgnarl.exe rts
/libgnarl.olb rts
/libgnat.exe \
1997 --for-linker
=rts
/gnatlib_symvec.opt \
1998 --for-linker
=gsmatch
=equal
,YY
,MMDD
2001 $(MAKE
) $(FLAGS_TO_PASS
) \
2002 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
2003 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
2004 THREAD_KIND
="$(THREAD_KIND)" \
2005 TARGET_LIBGCC2_CFLAGS
="$(TARGET_LIBGCC2_CFLAGS)" \
2008 # .s files for cross-building
2010 make
$(GNAT1_ADA_OBJS
) CC
="gcc -B../stage1/" CFLAGS
="-S -gnatp" \
2011 HOST_CFLAGS
= HOST_CC
=cc
2013 # Compiling object files from source files.
2015 # Ada language specific files.
2017 b_gnatl.c
: $(GNATLINK_OBJS
)
2018 $(GNATBIND
) $(ADA_INCLUDES
) -o b_gnatl.c gnatlink.ali
2019 b_gnatl.o
: b_gnatl.c
2021 b_gnatm.c
: $(GNATMAKE_OBJS
)
2022 $(GNATBIND
) $(ADA_INCLUDES
) -o b_gnatm.c gnatmake.ali
2023 b_gnatm.o
: b_gnatm.c
2025 # force debugging information on s-tasdeb.o so that it is always
2026 # possible to set conditional breakpoints on tasks.
2028 s-tasdeb.o
: s-tasdeb.adb s-tasdeb.ads
2029 $(ADAC
) -c
$(ALL_ADAFLAGS
) $(FORCE_DEBUG_ADAFLAGS
) $(ADA_INCLUDES
) $<
2031 # force debugging information on s-vaflop.o so that it is always
2032 # possible to call the VAX float debug print routines.
2033 # force at least -O so that the inline assembly works.
2035 s-vaflop.o
: s-vaflop.adb s-vaflop.ads
2036 $(ADAC
) -c
-O
$(ALL_ADAFLAGS
) $(FORCE_DEBUG_ADAFLAGS
) \
2039 # force debugging information on a-except.o so that it is always
2040 # possible to set conditional breakpoints on exceptions.
2041 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2043 a-except.o
: a-except.adb a-except.ads
2044 $(ADAC
) -c
$(ALL_ADAFLAGS
) $(FORCE_DEBUG_ADAFLAGS
) -O1
-fno-inline \
2047 # force debugging information on s-assert.o so that it is always
2048 # possible to set breakpoint on assert failures.
2050 s-assert.o
: s-assert.adb s-assert.ads a-except.ads
2051 $(ADAC
) -c
$(ALL_ADAFLAGS
) $(FORCE_DEBUG_ADAFLAGS
) -O2 \
2054 mdll.o
: mdll.adb mdll.ads mdll-file.ads mdll-utl.ads
2055 $(CC
) -c
$(ALL_ADAFLAGS
) -O2
$(ADA_INCLUDES
) $<
2057 mdll-fil.o
: mdll-fil.adb mdll.ads mdll-fil.ads
2058 $(CC
) -c
$(ALL_ADAFLAGS
) -O2
$(ADA_INCLUDES
) $<
2060 mdll-utl.o
: mdll-utl.adb mdll.ads mdll-utl.ads sdefault.ads types.ads
2061 $(CC
) -c
$(ALL_ADAFLAGS
) -O2
$(ADA_INCLUDES
) $<
2063 # force debugging information and no optimization on s-memory.o so that it
2064 # is always possible to set breakpoint on __gnat_malloc and __gnat_free
2065 # this is important for gnatmem using GDB. memtrack.o is built from
2066 # memtrack.adb, and used by the post-mortem analysis with gnatmem.
2068 s-memory.o
: s-memory.adb s-memory.ads memtrack.o
2069 $(ADAC
) -c
$(ALL_ADAFLAGS
) $(FORCE_DEBUG_ADAFLAGS
) -O0 \
2072 memtrack.o
: memtrack.adb s-memory.ads
2073 $(ADAC
) -c
$(ALL_ADAFLAGS
) $(FORCE_DEBUG_ADAFLAGS
) -O0 \
2076 # Need to keep the frame pointer in this file to pop the stack properly on
2080 $(CC
) -c
$(ALL_ADAFLAGS
) $(FORCE_DEBUG_ADAFLAGS
) -O0
$(ADA_INCLUDES
) \
2087 deftarg.o
: deftarg.c
2089 exit.o
: raise.h exit.c
2091 adafinal.o
: raise.h adafinal.c
2098 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_ADA_CFLAGS
) $(RT_FLAGS
) \
2099 $(ALL_CPPFLAGS
) $(INCLUDES
) $<
2101 init.o
: init.c ada.h types.h raise.h
2102 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_ADA_CFLAGS
) $(RT_FLAGS
) \
2103 $(ALL_CPPFLAGS
) $(INCLUDES
) $<
2105 raise.o
: raise.c raise.h
2106 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_ADA_CFLAGS
) $(RT_FLAGS
) \
2107 $(ALL_CPPFLAGS
) $(INCLUDES
) $<
2109 # Need to keep the frame pointer in this file to pop the stack properly on
2111 tracebak.o
: tracebak.c
2112 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_ADA_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
2113 -fno-omit-frame-pointer
$<
2115 targtyps.o
: targtyps.c
$(CONFIG_H
) ada.h types.h atree.h nlists.h elists.h \
2116 uintp.h sinfo.h einfo.h namet.h snames.h stringt.h urealp.h fe.h \
2117 $(ADA_TREE_H
) gigi.h
2119 # Rule to compile prefix.o for the run-time.
2121 prefix.o
: $(srcdir)/..
/prefix.c
2122 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_ADA_CFLAGS
) $(RT_FLAGS
) \
2123 $(ALL_CPPFLAGS
) $(INCLUDES
) -I
$(srcdir)/..
/..
-I..
/.. \
2124 -DPREFIX
=\"$(prefix)\" $<
2126 # In GNU Make, ignore whether `stage*' exists.
2127 .PHONY
: stage1 stage2 stage3 stage4
clean realclean TAGS bootstrap
2128 .PHONY
: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2132 # Gnatlbr is only used on VMS
2134 GNATLBR_RTL_C_OBJS
= adaint.o argv.o cio.o cstreams.o exit.o adafinal.o init.o \
2135 raise.o sysdep.o tracebak.o
2136 GNATLBR_C_OBJS
= $(GNATLBR_RTL_C_OBJS
)
2138 ..
/gnatlbr
$(exeext
):: sdefault.o
$(GNATLBR_C_OBJS
) $(EXTRA_GNATTOOLS_OBJS
)
2140 ..
/gnatlbr
$(exeext
):: force
2141 $(GNATMAKE
) -a
--GCC
="$(CC)" $(ALL_ADAFLAGS
) $(ADA_INCLUDES
) \
2142 --GNATBIND
="$(GNATBIND)" --GNATLINK
="$(GNATLINK)" \
2143 -nostdlib
$(fsrcpfx
)gnatlbr
-o
$@ \
2144 -largs
--GCC
="$(CC) $(ALL_CFLAGS) $(LDFLAGS)" \
2145 $(GNATLBR_C_OBJS
) $(EXTRA_GNATTOOLS_OBJS
)