2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / ada / Makefile.in
blobb20402c7f17b0678ca49443f5997f72a0b66e55d
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)
9 #any later version.
11 #GCC is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 #GNU General Public License for more details.
16 #You should have received a copy of the GNU General Public License
17 #along with GCC; see the file COPYING. If not, write to
18 #the Free Software Foundation, 59 Temple Place - Suite 330,
19 #Boston, MA 02111-1307, USA.
21 # The makefile built from this file lives in the language subdirectory.
22 # Its purpose is to provide support for:
24 # 1) recursion where necessary, and only then (building .o's), and
25 # 2) building and debugging cc1 from the language subdirectory, and
26 # 3) nothing else.
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:
37 # Required:
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.
48 # AR: Gnu ar works.
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.
55 # Optional:
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.
62 .NOTPARALLEL:
64 # Suppress smart makes who think they know how to automake Yacc files
65 .y.c:
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.
75 XCFLAGS =
76 CFLAGS = -g
77 BOOT_CFLAGS = -O $(CFLAGS)
78 # These exists to be overridden by the x-* and t-* files, respectively.
79 X_CFLAGS =
80 T_CFLAGS =
82 X_CPPFLAGS =
83 T_CPPFLAGS =
85 X_ADA_CFLAGS =
86 T_ADA_CFLAGS =
88 X_ADAFLAGS =
89 T_ADAFLAGS =
91 CC = cc
92 BISON = bison
93 BISONFLAGS =
94 ECHO = echo
95 LEX = flex
96 LEXFLAGS =
97 CHMOD = chmod
98 LN = ln
99 LN_S = ln -s
100 CP = cp -p
101 MV = mv -f
102 RM = rm -f
103 RMDIR = rm -rf
104 MKDIR = mkdir -p
105 AR = ar
106 AR_FLAGS = rc
107 LS = ls
108 # How to invoke ranlib.
109 RANLIB = ranlib
110 # Test to use to see whether ranlib exists on the system.
111 RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
113 SHELL = @SHELL@
114 PWD_COMMAND = $${PWDCMD-pwd}
115 # How to copy preserving the date
116 INSTALL_DATA_DATE = cp -p
117 MAKEINFO = makeinfo
118 TEXI2DVI = texi2dvi
119 GNATBIND = $(STAGE_PREFIX)gnatbind
120 GNATBIND_FLAGS = -static -x
121 ADA_CFLAGS =
122 ADAFLAGS = -W -Wall -gnatpg -gnata
123 SOME_ADAFLAGS =-gnata
124 FORCE_DEBUG_ADAFLAGS = -g
125 GNATLIBFLAGS = -gnatpg
126 GNATLIBCFLAGS = -g -O2
127 GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
128 -DIN_RTS
129 ALL_ADA_CFLAGS = $(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
130 ALL_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \
131 $(ADAFLAGS)
132 MOST_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \
133 $(SOME_ADAFLAGS)
134 THREAD_KIND = native
135 THREADSLIB =
136 GMEM_LIB =
137 MISCLIB =
138 SYMLIB =
139 SYMDEPS = $(LIBINTL_DEP)
140 OUTPUT_OPTION = @OUTPUT_OPTION@
142 objext = .o
143 exeext =
144 arext = .a
145 soext = .so
146 shext =
148 # Define this as & to perform parallel make on a Sequent.
149 # Note that this has some bugs, and it seems currently necessary
150 # to compile all the gen* files first by hand to avoid erroneous results.
153 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
154 # It omits XCFLAGS, and specifies -B./.
155 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
156 GCC_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
158 # Tools to use when building a cross-compiler.
159 # These are used because `configure' appends `cross-make'
160 # to the makefile when making a cross-compiler.
162 # We don't use cross-make. Instead we use the tools from the build tree,
163 # if they are available.
164 # program_transform_name and objdir are set by configure.in.
165 program_transform_name =
166 objdir = .
168 target=@target@
169 xmake_file = @xmake_file@
170 tmake_file = @tmake_file@
171 host_canonical=@host@
172 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
173 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
175 # Directory where sources are, from where we are.
176 srcdir = @srcdir@
177 VPATH = $(srcdir)
179 fsrcdir := $(shell cd $(srcdir);${PWD_COMMAND})
180 fsrcpfx := $(shell cd $(srcdir);${PWD_COMMAND})/
181 fcurdir := $(shell ${PWD_COMMAND})
182 fcurpfx := $(shell ${PWD_COMMAND})/
184 # Top build directory, relative to here.
185 top_builddir = ../..
187 # Internationalization library.
188 LIBINTL = @LIBINTL@
189 LIBINTL_DEP = @LIBINTL_DEP@
191 # Any system libraries needed just for GNAT.
192 SYSLIBS = @GNAT_LIBEXC@
194 # List of extra object files linked in with various programs.
195 EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o
197 # List extra gnattools
198 EXTRA_GNATTOOLS =
200 # List of target dependent sources, overridden below as necessary
201 TARGET_ADA_SRCS =
203 # Type of tools build we are doing; default is not compiling tools.
204 TOOLSCASE =
206 # End of variables for you to override.
208 all: all.indirect
210 # This tells GNU Make version 3 not to put all variables in the environment.
211 .NOEXPORT:
213 # tmake_file and xmake_file expand to lists with entries of the form
214 # $(srcdir)/config/... but here $(srcdir) is the ada subdirectory so we
215 # need to adjust the paths. There can't be spaces in the subst arguments
216 # or we get spurious spaces in the actual list of files to include.
218 # target overrides
219 ifneq ($(tmake_file),)
220 include $(subst /config,/../config,$(tmake_file))
221 endif
223 # host overrides
224 ifneq ($(xmake_file),)
225 include $(subst /config,/../config,$(xmake_file))
226 endif
228 # Now figure out from those variables how to compile and link.
230 all.indirect: Makefile ../gnat1$(exeext)
232 # IN_GCC distinguishes between code compiled into GCC itself and other
233 # programs built during a bootstrap.
234 # autoconf inserts -DCROSS_COMPILE if we are building a cross compiler.
235 INTERNAL_CFLAGS = @CROSS@ -DIN_GCC
237 # This is the variable actually used when we compile.
238 LOOSE_CFLAGS = `echo $(CFLAGS) $(WARN2_CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`
239 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS) \
240 $(XCFLAGS)
242 # Likewise.
243 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
245 # This is where we get libiberty.a from.
246 LIBIBERTY = ../../libiberty/libiberty.a
248 # How to link with both our special library facilities
249 # and the system's installed libraries.
250 LIBS = $(LIBINTL) $(LIBIBERTY) $(SYSLIBS)
251 LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY)
252 TOOLS_LIBS = $(LIBGNAT) $(EXTRA_GNATTOOLS_OBJS) ../../../libiberty/libiberty.a $(SYSLIBS)
254 # Specify the directories to be searched for header files.
255 # Both . and srcdir are used, in that order,
256 # so that tm.h and config.h will be found in the compilation
257 # subdirectory rather than in the source directory.
258 INCLUDES = -I- -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config \
259 -I$(srcdir)/../../include
261 ADA_INCLUDES = -I- -I. -I$(srcdir)
263 INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir) -I$(fsrcdir)/../config \
264 -I$(fsrcdir)/../../include -I$(fsrcdir)/..
265 ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)
267 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
268 .SUFFIXES: .in .def
270 # Say how to compile Ada programs.
271 .SUFFIXES: .ada .adb .ads .asm
273 # Always use -I$(srcdir)/config when compiling.
274 .asm.o:
275 $(CC) -c -x assembler $< $(OUTPUT_OPTION)
277 .c.o:
278 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
279 $(OUTPUT_OPTION)
281 .adb.o:
282 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
284 .ads.o:
285 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
287 # how to regenerate this file
288 Makefile: ../config.status $(srcdir)/Makefile.in $(srcdir)/../version.c
289 cd ..; \
290 LANGUAGES="$(CONFIG_LANGUAGES)" \
291 CONFIG_HEADERS= \
292 CONFIG_FILES=ada/Makefile $(SHELL) config.status
294 # This tells GNU make version 3 not to export all the variables
295 # defined in this file into the environment.
296 .NOEXPORT:
298 # Lists of files for various purposes.
300 GNATLINK_OBJS = gnatlink.o link.o \
301 ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o gnatvsn.o \
302 hostparm.o namet.o opt.o osint.o output.o rident.o sdefault.o \
303 stylesw.o switch.o table.o tree_io.o types.o validsw.o widechar.o
305 GNATMAKE_OBJS = ctrl_c.o ali.o ali-util.o s-casuti.o \
306 alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\
307 erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
308 gnatmake.o gnatvsn.o hostparm.o krunch.o lib.o make.o makeusg.o \
309 mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-utl.o \
310 namet.o nlists.o opt.o osint.o osint-m.o output.o \
311 prj.o prj-attr.o prj-com.o prj-dect.o prj-env.o prj-err.o prj-ext.o prj-nmsc.o \
312 prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \
313 rident.o scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o \
314 sinfo.o sinput.o sinput-c.o sinput-p.o \
315 snames.o stand.o stringt.o styleg.o stylesw.o validsw.o switch.o switch-m.o \
316 table.o targparm.o tempdir.o tree_io.o types.o \
317 uintp.o uname.o urealp.o usage.o widechar.o \
318 $(EXTRA_GNATMAKE_OBJS)
320 # Convert the target variable into a space separated list of architecture,
321 # manufacturer, and operating system and assign each of those to its own
322 # variable.
324 host:=$(subst -, ,$(host_canonical))
325 targ:=$(subst -, ,$(target))
326 arch:=$(word 1,$(targ))
327 ifeq ($(words $(targ)),2)
328 manu:=
329 osys:=$(word 2,$(targ))
330 else
331 manu:=$(word 2,$(targ))
332 osys:=$(word 3,$(targ))
333 endif
335 # LIBGNAT_TARGET_PAIRS is a list of pairs of filenames.
336 # The members of each pair must be separated by a '<' and no whitespace.
337 # Each pair must be separated by some amount of whitespace from the following
338 # pair.
340 # Non-tasking case:
342 LIBGNAT_TARGET_PAIRS = \
343 a-intnam.ads<4nintnam.ads \
344 s-inmaop.adb<5ninmaop.adb \
345 s-intman.adb<5nintman.adb \
346 s-osinte.ads<5nosinte.ads \
347 s-osprim.adb<7sosprim.adb \
348 s-taprop.adb<5ntaprop.adb \
349 s-taspri.ads<5ntaspri.ads
351 # Default shared object option. Note that we rely on the fact that the "soname"
352 # option will always be present and last in this flag, so that we can have
353 # $(SO_OPTS)libgnat-x.xx
355 SO_OPTS = -Wl,-soname,
357 # Default gnatlib-shared target.
358 # By default, equivalent to gnatlib.
359 # Set to gnatlib-shared-default, gnatlib-shared-dual, or a platform specific
360 # target when supported.
361 GNATLIB_SHARED = gnatlib
363 # default value for gnatmake's target dependent file
364 MLIB_TGT = mlib-tgt
366 # By default, do not distribute prefix.o (in libgccprefix), since it is only
367 # needed by external GNAT tools such as gnatdist and Glide.
368 # Override this variable on native platforms when needed.
369 PREFIX_OBJS =
371 # To avoid duplicate code, use this variable to set PREFIX_OBJS when needed:
372 PREFIX_REAL_OBJS = ../prefix.o \
373 ../../libiberty/concat.o \
374 ../../libiberty/xmalloc.o \
375 ../../libiberty/xstrdup.o \
376 ../../libiberty/xexit.o
378 LIB_VERSION = $(strip $(shell grep ' Library_Version :' $(fsrcpfx)gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/'))
380 # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
381 # $(strip STRING) removes leading and trailing spaces from STRING.
382 # If what's left is null then it's a match.
384 ifeq ($(strip $(filter-out %86 os2 OS2 os2_emx,$(arch) $(osys))),)
385 LIBGNAT_TARGET_PAIRS = \
386 a-excpol.adb<4wexcpol.adb \
387 a-intnam.ads<4nintnam.ads \
388 a-numaux.adb<86numaux.adb \
389 a-numaux.ads<86numaux.ads \
390 s-inmaop.adb<5ninmaop.adb \
391 s-interr.adb<5ointerr.adb \
392 s-intman.adb<5nintman.adb \
393 s-mastop.adb<5omastop.adb \
394 s-osinte.adb<5oosinte.adb \
395 s-osinte.ads<5oosinte.ads \
396 s-osprim.adb<5oosprim.adb \
397 s-parame.adb<5oparame.adb \
398 system.ads<5osystem.ads \
399 s-taprop.adb<5otaprop.adb \
400 s-taspri.ads<5otaspri.ads
402 EXTRA_GNATRTL_NONTASKING_OBJS = \
403 i-os2err.o \
404 i-os2lib.o \
405 i-os2syn.o \
406 i-os2thr.o
407 endif
409 ifeq ($(strip $(filter-out %86 interix%,$(arch) $(osys))),)
410 LIBGNAT_TARGET_PAIRS = \
411 a-excpol.adb<4hexcpol.adb \
412 a-intnam.ads<4pintnam.ads \
413 a-numaux.adb<86numaux.adb \
414 a-numaux.ads<86numaux.ads \
415 g-soccon.ads<3psoccon.ads \
416 s-inmaop.adb<7sinmaop.adb \
417 s-intman.adb<7sintman.adb \
418 s-mastop.adb<5omastop.adb \
419 s-osinte.adb<7sosinte.adb \
420 s-osinte.ads<5posinte.ads \
421 s-osprim.adb<5posprim.adb \
422 s-taprop.adb<7staprop.adb \
423 system.ads<5psystem.ads \
424 s-taspri.ads<7staspri.ads \
425 s-tpopsp.adb<7stpopsp.adb
427 THREADSLIB = -lgthreads -lmalloc
428 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
429 endif
431 # sysv5uw is SCO UnixWare 7
432 ifeq ($(strip $(filter-out %86 sysv5uw%,$(arch) $(osys))),)
433 LIBGNAT_TARGET_PAIRS = \
434 a-excpol.adb<4wexcpol.adb \
435 a-intnam.ads<41intnam.ads \
436 a-numaux.adb<86numaux.adb \
437 a-numaux.ads<86numaux.ads \
438 s-inmaop.adb<7sinmaop.adb \
439 s-intman.adb<7sintman.adb \
440 s-mastop.adb<5omastop.adb \
441 s-osinte.ads<51osinte.ads \
442 s-osinte.adb<51osinte.adb \
443 s-osprim.adb<5posprim.adb \
444 s-taprop.adb<7staprop.adb \
445 s-taspri.ads<7staspri.ads \
446 s-tpopsp.adb<5atpopsp.adb \
447 system.ads<51system.ads \
448 g-soccon.ads<31soccon.ads \
449 g-soliop.ads<31soliop.ads
451 THREADSLIB = -lthread
452 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
453 SO_OPTS = -Wl,-h,
454 GNATLIB_SHARED = gnatlib-shared-dual
455 LIBRARY_VERSION := $(LIB_VERSION)
456 endif
458 ifeq ($(strip $(filter-out alpha% dec vx%,$(targ))),)
459 LIBGNAT_TARGET_PAIRS = \
460 a-sytaco.ads<4zsytaco.ads \
461 a-sytaco.adb<4zsytaco.adb \
462 a-intnam.ads<4zintnam.ads \
463 a-numaux.ads<4znumaux.ads \
464 s-inmaop.adb<7sinmaop.adb \
465 s-interr.adb<5zinterr.adb \
466 s-intman.ads<5zintman.ads \
467 s-intman.adb<5zintman.adb \
468 s-osinte.adb<5zosinte.adb \
469 s-osinte.ads<5zosinte.ads \
470 s-osprim.adb<5zosprim.adb \
471 s-parame.ads<5zparame.ads \
472 s-taprop.adb<5ztaprop.adb \
473 s-tpopsp.adb<5ztpopsp.adb \
474 s-taspri.ads<5ztaspri.ads \
475 s-vxwork.ads<5avxwork.ads \
476 g-soccon.ads<3zsoccon.ads \
477 g-socthi.ads<3zsocthi.ads \
478 g-socthi.adb<3zsocthi.adb \
479 system.ads<5zsystem.ads
481 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
482 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
483 endif
485 ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
486 LIBGNAT_TARGET_PAIRS = \
487 a-sytaco.ads<4zsytaco.ads \
488 a-sytaco.adb<4zsytaco.adb \
489 a-intnam.ads<4zintnam.ads \
490 a-numaux.ads<4znumaux.ads \
491 s-inmaop.adb<7sinmaop.adb \
492 s-interr.adb<5zinterr.adb \
493 s-intman.ads<5zintman.ads \
494 s-intman.adb<5zintman.adb \
495 s-osinte.adb<5zosinte.adb \
496 s-osinte.ads<5zosinte.ads \
497 s-osprim.adb<5zosprim.adb \
498 s-parame.ads<5zparame.ads \
499 s-taprop.adb<5ztaprop.adb \
500 s-taspri.ads<5ztaspri.ads \
501 s-tpopsp.adb<5ztpopsp.adb \
502 s-vxwork.ads<5kvxwork.ads \
503 g-soccon.ads<3zsoccon.ads \
504 g-socthi.ads<3zsocthi.ads \
505 g-socthi.adb<3zsocthi.adb \
506 system.ads<5ksystem.ads
508 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5zml-tgt.adb
510 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
511 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
513 ifeq ($(strip $(filter-out yes,$(TRACE))),)
514 LIBGNAT_TARGET_PAIRS += \
515 s-traces.adb<7straces.adb \
516 s-tratas.adb<7stratas.adb \
517 s-trafor.adb<7strafor.adb \
518 s-trafor.ads<7strafor.ads \
519 s-tfsetr.adb<5ztfsetr.adb
520 endif
521 endif
523 ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
524 LIBGNAT_TARGET_PAIRS = \
525 a-sytaco.ads<4zsytaco.ads \
526 a-sytaco.adb<4zsytaco.adb \
527 a-intnam.ads<4zintnam.ads \
528 a-numaux.ads<4znumaux.ads \
529 s-inmaop.adb<7sinmaop.adb \
530 s-interr.adb<5zinterr.adb \
531 s-intman.ads<5zintman.ads \
532 s-intman.adb<5zintman.adb \
533 s-osinte.adb<5zosinte.adb \
534 s-osinte.ads<5zosinte.ads \
535 s-osprim.adb<5zosprim.adb \
536 s-parame.ads<5zparame.ads \
537 s-taprop.adb<5ztaprop.adb \
538 s-taspri.ads<5ztaspri.ads \
539 s-tpopsp.adb<5ztpopsp.adb \
540 s-vxwork.ads<5pvxwork.ads \
541 g-soccon.ads<3zsoccon.ads \
542 g-socthi.ads<3zsocthi.ads \
543 g-socthi.adb<3zsocthi.adb \
544 system.ads<5ysystem.ads
546 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5zml-tgt.adb
548 EXTRA_HIE_NONE_TARGET_PAIRS= \
549 system.ads<50system.ads
551 EXTRA_RAVEN_SOURCES=i-vxwork.ads s-vxwork.ads
552 EXTRA_RAVEN_OBJS=i-vxwork.o s-vxwork.o
553 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
554 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
555 HIE_RAVEN_TARGET_PAIRS=\
556 $(HIE_NONE_TARGET_PAIRS) \
557 a-reatim.ads<1areatim.ads \
558 a-reatim.adb<1areatim.adb \
559 a-retide.adb<1aretide.adb \
560 a-interr.adb<1ainterr.adb \
561 s-interr.ads<1sinterr.ads \
562 s-interr.adb<1sinterr.adb \
563 s-taskin.ads<1staskin.ads \
564 s-taskin.adb<1staskin.adb \
565 s-tarest.adb<1starest.adb \
566 s-tposen.ads<1stposen.ads \
567 s-tposen.adb<1stposen.adb \
568 s-osinte.adb<1sosinte.adb \
569 s-taprop.ads<1staprop.ads \
570 s-taprop.adb<1staprop.adb \
571 s-taprob.ads<1staprob.ads \
572 s-taprob.adb<1staprob.adb \
573 a-sytaco.ads<1asytaco.ads \
574 a-sytaco.adb<1asytaco.adb \
575 a-intnam.ads<4zintnam.ads \
576 s-osinte.ads<5zosinte.ads \
577 s-parame.ads<5zparame.ads \
578 s-taspri.ads<5ztaspri.ads \
579 s-vxwork.ads<5pvxwork.ads \
580 a-taside.adb<1ataside.adb \
582 ifeq ($(strip $(filter-out yes,$(TRACE))),)
583 LIBGNAT_TARGET_PAIRS += \
584 s-traces.adb<7straces.adb \
585 s-trafor.adb<7strafor.adb \
586 s-trafor.ads<7strafor.ads \
587 s-tratas.adb<7stratas.adb \
588 s-tfsetr.adb<5ztfsetr.adb
589 endif
590 endif
592 ifeq ($(strip $(filter-out powerpc% unknown elf,$(targ))),)
593 EXTRA_HIE_NONE_TARGET_PAIRS= \
594 system.ads<59system.ads
596 LIBGNAT_TARGET_PAIRS = \
597 $(HIE_NONE_TARGET_PAIRS)
598 endif
600 ifeq ($(strip $(filter-out sparc% unknown elf,$(targ))),)
601 EXTRA_HIE_NONE_TARGET_PAIRS= \
602 system.ads<5rsystem.ads
604 LIBGNAT_TARGET_PAIRS = \
605 $(HIE_NONE_TARGET_PAIRS)
606 endif
608 ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
609 LIBGNAT_TARGET_PAIRS = \
610 a-sytaco.ads<4zsytaco.ads \
611 a-sytaco.adb<4zsytaco.adb \
612 a-intnam.ads<4zintnam.ads \
613 a-numaux.ads<4znumaux.ads \
614 s-inmaop.adb<7sinmaop.adb \
615 s-interr.adb<5zinterr.adb \
616 s-intman.ads<5zintman.ads \
617 s-intman.adb<5zintman.adb \
618 s-osinte.adb<5zosinte.adb \
619 s-osinte.ads<5zosinte.ads \
620 s-osprim.adb<5zosprim.adb \
621 s-parame.ads<5zparame.ads \
622 s-taprop.adb<5ztaprop.adb \
623 s-taspri.ads<5ztaspri.ads \
624 s-tpopsp.adb<5ztpopsp.adb \
625 s-vxwork.ads<5svxwork.ads \
626 g-soccon.ads<3zsoccon.ads \
627 g-socthi.ads<3zsocthi.ads \
628 g-socthi.adb<3zsocthi.adb \
629 system.ads<5csystem.ads \
631 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5zml-tgt.adb
633 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
634 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
635 endif
637 ifeq ($(strip $(filter-out xscale% coff wrs vx%,$(targ))),)
638 LIBGNAT_TARGET_PAIRS = \
639 a-sytaco.ads<4zsytaco.ads \
640 a-sytaco.adb<4zsytaco.adb \
641 a-intnam.ads<4zintnam.ads \
642 a-numaux.ads<4znumaux.ads \
643 s-inmaop.adb<7sinmaop.adb \
644 s-interr.adb<5zinterr.adb \
645 s-intman.ads<5zintman.ads \
646 s-intman.adb<5zintman.adb \
647 s-osinte.adb<5zosinte.adb \
648 s-osinte.ads<5zosinte.ads \
649 s-osprim.adb<5zosprim.adb \
650 s-parame.ads<5zparame.ads \
651 s-taprop.adb<5ztaprop.adb \
652 s-taspri.ads<5ztaspri.ads \
653 s-tpopsp.adb<5ztpopsp.adb \
654 s-vxwork.ads<5xvxwork.ads \
655 g-soccon.ads<3zsoccon.ads \
656 g-socthi.ads<3zsocthi.ads \
657 g-socthi.adb<3zsocthi.adb \
658 system.ads<5rsystem.ads
660 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5zml-tgt.adb
662 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
663 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
664 endif
666 ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
667 LIBGNAT_TARGET_PAIRS = \
668 a-sytaco.ads<4zsytaco.ads \
669 a-sytaco.adb<4zsytaco.adb \
670 a-intnam.ads<4zintnam.ads \
671 a-numaux.ads<4znumaux.ads \
672 s-inmaop.adb<7sinmaop.adb \
673 s-interr.adb<5zinterr.adb \
674 s-intman.ads<5zintman.ads \
675 s-intman.adb<5zintman.adb \
676 s-osinte.adb<5zosinte.adb \
677 s-osinte.ads<5zosinte.ads \
678 s-osprim.adb<5zosprim.adb \
679 s-parame.ads<5zparame.ads \
680 s-taprop.adb<5ztaprop.adb \
681 s-taspri.ads<5ztaspri.ads \
682 s-tpopsp.adb<5ztpopsp.adb \
683 s-vxwork.ads<5mvxwork.ads \
684 g-soccon.ads<3zsoccon.ads \
685 g-socthi.ads<3zsocthi.ads \
686 g-socthi.adb<3zsocthi.adb \
687 system.ads<5msystem.ads
689 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5zml-tgt.adb
691 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
692 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
693 endif
695 ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
696 LIBGNAT_TARGET_PAIRS = \
697 a-intnam.ads<4sintnam.ads \
698 s-inmaop.adb<7sinmaop.adb \
699 s-intman.adb<5sintman.adb \
700 s-osinte.adb<5sosinte.adb \
701 s-osinte.ads<5sosinte.ads \
702 s-osprim.adb<5sosprim.adb \
703 s-parame.adb<5sparame.adb \
704 s-taprop.adb<5staprop.adb \
705 s-tasinf.adb<5stasinf.adb \
706 s-tasinf.ads<5stasinf.ads \
707 s-taspri.ads<5staspri.ads \
708 s-tpopsp.adb<5stpopsp.adb \
709 g-soccon.ads<3ssoccon.ads \
710 g-soliop.ads<3ssoliop.ads \
711 system.ads<5ssystem.ads
713 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5sml-tgt.adb
715 THREADSLIB = -lposix4 -lthread
716 MISCLIB = -lposix4 -lnsl -lsocket
717 SYMLIB = -laddr2line -lbfd $(LIBINTL)
718 SO_OPTS = -Wl,-h,
719 GNATLIB_SHARED = gnatlib-shared-dual
720 GMEM_LIB = gmemlib
721 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
722 LIBRARY_VERSION := $(LIB_VERSION)
724 ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),)
725 LIBGNAT_TARGET_PAIRS = \
726 a-intnam.ads<4sintnam.ads \
727 s-inmaop.adb<7sinmaop.adb \
728 s-intman.adb<5sintman.adb \
729 s-osinte.adb<7sosinte.adb \
730 s-osinte.ads<5tosinte.ads \
731 s-osprim.adb<5sosprim.adb \
732 s-taprop.adb<7staprop.adb \
733 s-taspri.ads<7staspri.ads \
734 s-tpopsp.adb<7stpopsp.adb \
735 g-soccon.ads<3ssoccon.ads \
736 g-soliop.ads<3ssoliop.ads \
737 system.ads<5ssystem.ads
739 THREADSLIB = -lgthreads -lmalloc
740 endif
742 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
743 LIBGNAT_TARGET_PAIRS = \
744 a-intnam.ads<4sintnam.ads \
745 s-inmaop.adb<7sinmaop.adb \
746 s-intman.adb<7sintman.adb \
747 s-osinte.adb<5iosinte.adb \
748 s-osinte.ads<54osinte.ads \
749 s-osprim.adb<5sosprim.adb \
750 s-taprop.adb<7staprop.adb \
751 s-taspri.ads<7staspri.ads \
752 s-tpopsp.adb<5atpopsp.adb \
753 g-soccon.ads<3ssoccon.ads \
754 g-soliop.ads<3ssoliop.ads \
755 system.ads<5ssystem.ads
757 THREADSLIB = -lposix4 -lpthread
758 endif
760 ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),)
761 LIBGNAT_TARGET_PAIRS = \
762 a-intnam.ads<4sintnam.ads \
763 s-inmaop.adb<7sinmaop.adb \
764 s-intman.adb<5sintman.adb \
765 s-osinte.adb<5sosinte.adb \
766 s-osinte.ads<5sosinte.ads \
767 s-osprim.adb<5sosprim.adb \
768 s-parame.adb<5sparame.adb \
769 s-taprop.adb<5staprop.adb \
770 s-tasinf.adb<5stasinf.adb \
771 s-tasinf.ads<5stasinf.ads \
772 s-taspri.ads<5staspri.ads \
773 s-tpopsp.adb<5stpopsp.adb \
774 g-soccon.ads<3ssoccon.ads \
775 g-soliop.ads<3ssoliop.ads \
776 system.ads<5usystem.ads
777 endif
778 endif
780 ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
781 LIBGNAT_TARGET_PAIRS = \
782 a-numaux.adb<86numaux.adb \
783 a-numaux.ads<86numaux.ads \
784 a-intnam.ads<4sintnam.ads \
785 s-inmaop.adb<7sinmaop.adb \
786 s-intman.adb<5sintman.adb \
787 s-mastop.adb<5omastop.adb \
788 s-osinte.adb<5sosinte.adb \
789 s-osinte.ads<5sosinte.ads \
790 s-osprim.adb<5sosprim.adb \
791 s-parame.adb<5sparame.adb \
792 s-taprop.adb<5staprop.adb \
793 s-tasinf.adb<5stasinf.adb \
794 s-tasinf.ads<5stasinf.ads \
795 s-taspri.ads<5staspri.ads \
796 s-tpopsp.adb<5stpopsp.adb \
797 g-soccon.ads<3ssoccon.ads \
798 g-soliop.ads<3ssoliop.ads \
799 system.ads<5esystem.ads
801 THREADSLIB = -lposix4 -lthread
802 MISCLIB = -lposix4 -lnsl -lsocket
803 SO_OPTS = -Wl,-h,
804 GNATLIB_SHARED = gnatlib-shared-dual
805 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
806 LIBRARY_VERSION := $(LIB_VERSION)
807 endif
809 ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
810 LIBGNAT_TARGET_PAIRS = \
811 a-intnam.ads<4lintnam.ads \
812 a-numaux.adb<86numaux.adb \
813 a-numaux.ads<86numaux.ads \
814 s-inmaop.adb<7sinmaop.adb \
815 s-intman.adb<7sintman.adb \
816 s-mastop.adb<5omastop.adb \
817 s-osinte.adb<5iosinte.adb \
818 s-osinte.ads<5iosinte.ads \
819 s-osprim.adb<7sosprim.adb \
820 s-taprop.adb<5itaprop.adb \
821 s-taspri.ads<5itaspri.ads \
822 s-tpopsp.adb<5atpopsp.adb \
823 s-parame.adb<5lparame.adb \
824 system.ads<5lsystem.ads
826 TOOLS_TARGET_PAIRS = mlib-tgt.adb<5lml-tgt.adb
827 SYMLIB = -laddr2line -lbfd -liberty $(LIBINTL)
828 THREADSLIB = -lpthread
829 GNATLIB_SHARED = gnatlib-shared-dual
830 GMEM_LIB = gmemlib
831 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
832 LIBRARY_VERSION := $(LIB_VERSION)
834 ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),)
835 LIBGNAT_TARGET_PAIRS = \
836 a-intnam.ads<4lintnam.ads \
837 a-numaux.adb<86numaux.adb \
838 a-numaux.ads<86numaux.ads \
839 s-inmaop.adb<7sinmaop.adb \
840 s-intman.adb<7sintman.adb \
841 s-mastop.adb<5omastop.adb \
842 s-osinte.adb<7sosinte.adb \
843 s-osinte.ads<5losinte.ads \
844 s-osprim.adb<7sosprim.adb \
845 s-taprop.adb<7staprop.adb \
846 s-taspri.ads<7staspri.ads \
847 s-tpopsp.adb<7stpopsp.adb \
848 system.ads<5lsystem.ads
850 THREADSLIB = -lgthreads -lmalloc
851 endif
852 endif
854 ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
855 LIBGNAT_TARGET_PAIRS = \
856 a-intnam.ads<45intnam.ads \
857 g-soccon.ads<35soccon.ads \
858 s-inmaop.adb<7sinmaop.adb \
859 s-intman.adb<7sintman.adb \
860 s-mastop.adb<5omastop.adb \
861 s-osinte.adb<55osinte.adb \
862 s-osinte.ads<55osinte.ads \
863 s-osprim.adb<7sosprim.adb \
864 s-taprop.adb<7staprop.adb \
865 s-taspri.ads<7staspri.ads \
866 s-tpopsp.adb<7stpopsp.adb \
867 system.ads<56system.ads
869 THREADSLIB=
870 LIBRARY_VERSION := $(LIB_VERSION)
871 endif
873 ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
874 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
875 LIBGNAT_TARGET_PAIRS = \
876 a-intnam.ads<4gintnam.ads \
877 s-inmaop.adb<7sinmaop.adb \
878 s-intman.adb<5fintman.adb \
879 s-mastop.adb<5gmastop.adb \
880 s-osinte.adb<5fosinte.adb \
881 s-osinte.ads<5fosinte.ads \
882 s-osprim.adb<7sosprim.adb \
883 s-proinf.adb<5gproinf.adb \
884 s-proinf.ads<5gproinf.ads \
885 s-taprop.adb<5ftaprop.adb \
886 s-tasinf.ads<5ftasinf.ads \
887 s-taspri.ads<7staspri.ads \
888 s-tpopsp.adb<7stpopsp.adb \
889 s-traceb.adb<7straceb.adb \
890 g-soccon.ads<3gsoccon.ads \
891 system.ads<5gsystem.ads
893 THREADSLIB = -lpthread
894 GNATLIB_SHARED = gnatlib-shared-default
896 else
897 LIBGNAT_TARGET_PAIRS = \
898 a-intnam.ads<4gintnam.ads \
899 s-inmaop.adb<5ninmaop.adb \
900 s-interr.adb<5ginterr.adb \
901 s-intman.adb<5gintman.adb \
902 s-mastop.adb<5gmastop.adb \
903 s-osinte.adb<5fosinte.adb \
904 s-osinte.ads<5gosinte.ads \
905 s-osprim.adb<7sosprim.adb \
906 s-proinf.adb<5gproinf.adb \
907 s-proinf.ads<5gproinf.ads \
908 s-taprop.adb<5gtaprop.adb \
909 s-tasinf.adb<5gtasinf.adb \
910 s-tasinf.ads<5gtasinf.ads \
911 s-taspri.ads<7staspri.ads \
912 s-traceb.adb<7straceb.adb \
913 g-soccon.ads<3gsoccon.ads \
914 system.ads<5fsystem.ads
916 THREADSLIB = -lathread
917 endif
919 TOOLS_TARGET_PAIRS = mlib-tgt.adb<5gml-tgt.adb
920 TGT_LIB = -lexc
921 MISCLIB = -lexc
922 SO_OPTS = -Wl,-all,-set_version,sgi1.0,-update_registry,../so_locations,-soname,
923 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
924 LIBRARY_VERSION := $(LIB_VERSION)
925 endif
927 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
928 LIBGNAT_TARGET_PAIRS = \
929 a-excpol.adb<4wexcpol.adb \
930 a-intnam.ads<4hintnam.ads \
931 s-inmaop.adb<7sinmaop.adb \
932 s-interr.adb<5ginterr.adb \
933 s-intman.adb<7sintman.adb \
934 s-osinte.adb<5hosinte.adb \
935 s-osinte.ads<5hosinte.ads \
936 s-parame.ads<5hparame.ads \
937 s-osprim.adb<7sosprim.adb \
938 s-taprop.adb<5htaprop.adb \
939 s-taspri.ads<5htaspri.ads \
940 s-tpopsp.adb<7stpopsp.adb \
941 g-soccon.ads<3hsoccon.ads \
942 system.ads<5hsystem.ads
944 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
945 endif
947 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
948 LIBGNAT_TARGET_PAIRS = \
949 a-intnam.ads<4hintnam.ads \
950 s-inmaop.adb<7sinmaop.adb \
951 s-intman.adb<7sintman.adb \
952 s-osinte.adb<5iosinte.adb \
953 s-osinte.ads<53osinte.ads \
954 s-parame.ads<5hparame.ads \
955 s-osprim.adb<7sosprim.adb \
956 s-traceb.adb<5htraceb.adb \
957 s-taprop.adb<7staprop.adb \
958 s-taspri.ads<7staspri.ads \
959 s-tpopsp.adb<5atpopsp.adb \
960 g-soccon.ads<3hsoccon.ads \
961 system.ads<5hsystem.ads
963 TOOLS_TARGET_PAIRS = mlib-tgt.adb<5hml-tgt.adb
964 TGT_LIB = /usr/lib/libcl.a
965 THREADSLIB = -lpthread
966 SYMLIB = -laddr2line -lbfd $(LIBINTL)
967 GMEM_LIB = gmemlib
968 soext = .sl
969 SO_OPTS = -Wl,+h,
970 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
971 GNATLIB_SHARED = gnatlib-shared-dual
972 LIBRARY_VERSION := $(LIB_VERSION)
974 ifeq ($(strip $(filter-out dce DCE,$(THREAD_KIND))),)
975 LIBGNAT_TARGET_PAIRS = \
976 a-excpol.adb<4wexcpol.adb \
977 a-intnam.ads<4hintnam.ads \
978 s-inmaop.adb<7sinmaop.adb \
979 s-interr.adb<5ginterr.adb \
980 s-intman.adb<7sintman.adb \
981 s-osinte.adb<5hosinte.adb \
982 s-osinte.ads<5hosinte.ads \
983 s-parame.ads<5hparame.ads \
984 s-osprim.adb<7sosprim.adb \
985 s-taprop.adb<5htaprop.adb \
986 s-taspri.ads<5htaspri.ads \
987 s-tpopsp.adb<7stpopsp.adb \
988 g-soccon.ads<3hsoccon.ads \
989 system.ads<5hsystem.ads
991 TGT_LIB =
992 THREADSLIB = -lcma
993 endif
994 endif
996 ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
997 LIBGNAT_TARGET_PAIRS = \
998 a-intnam.ads<4cintnam.ads \
999 s-inmaop.adb<7sinmaop.adb \
1000 s-intman.adb<7sintman.adb \
1001 s-osinte.adb<5bosinte.adb \
1002 s-osinte.ads<5bosinte.ads \
1003 s-osprim.adb<7sosprim.adb \
1004 s-taprop.adb<7staprop.adb \
1005 s-taspri.ads<7staspri.ads \
1006 s-tpopsp.adb<7stpopsp.adb \
1007 g-soccon.ads<3bsoccon.ads \
1008 system.ads<5bsystem.ads
1010 THREADSLIB = -lpthreads
1011 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1013 ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),)
1014 LIBGNAT_TARGET_PAIRS = \
1015 a-intnam.ads<4cintnam.ads \
1016 s-inmaop.adb<7sinmaop.adb \
1017 s-intman.adb<7sintman.adb \
1018 s-osinte.adb<7sosinte.adb \
1019 s-osinte.ads<5cosinte.ads \
1020 s-osprim.adb<7sosprim.adb \
1021 s-taprop.adb<7staprop.adb \
1022 s-taspri.ads<7staspri.ads \
1023 s-tpopsp.adb<7stpopsp.adb \
1024 g-soccon.ads<3bsoccon.ads \
1025 system.ads<5bsystem.ads
1027 THREADSLIB = -lgthreads -lmalloc
1028 endif
1030 TOOLS_TARGET_PAIRS = mlib-tgt.adb<5bml-tgt.adb
1031 GMEM_LIB = gmemlib
1032 SYMLIB = -laddr2line -lbfd -liberty $(LIBINTL)
1034 endif
1036 ifeq ($(strip $(filter-out lynxos,$(osys))),)
1037 ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
1038 LIBGNAT_TARGET_PAIRS = \
1039 a-numaux.adb<86numaux.adb \
1040 a-numaux.ads<86numaux.ads \
1041 a-intnam.ads<42intnam.ads \
1042 s-mastop.adb<5omastop.adb \
1043 s-inmaop.adb<7sinmaop.adb \
1044 s-intman.adb<7sintman.adb \
1045 s-osinte.adb<56osinte.adb \
1046 s-osinte.ads<56osinte.ads \
1047 s-osprim.adb<7sosprim.adb \
1048 s-taprop.adb<56taprop.adb \
1049 s-taspri.ads<56taspri.ads \
1050 s-tpopsp.adb<56tpopsp.adb \
1051 system.ads<58system.ads
1053 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1055 else
1056 LIBGNAT_TARGET_PAIRS = \
1057 a-intnam.ads<42intnam.ads \
1058 s-inmaop.adb<7sinmaop.adb \
1059 s-intman.adb<7sintman.adb \
1060 s-osinte.adb<52osinte.adb \
1061 s-osinte.ads<52osinte.ads \
1062 s-osprim.adb<7sosprim.adb \
1063 s-taprop.adb<7staprop.adb \
1064 s-taspri.ads<7staspri.ads \
1065 s-tpopsp.adb<7stpopsp.adb \
1066 system.ads<57system.ads
1068 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
1069 LIBGNAT_TARGET_PAIRS = \
1070 a-intnam.ads<42intnam.ads \
1071 s-inmaop.adb<7sinmaop.adb \
1072 s-intman.adb<7sintman.adb \
1073 s-osinte.adb<56osinte.adb \
1074 s-osinte.ads<56osinte.ads \
1075 s-osprim.adb<7sosprim.adb \
1076 s-taprop.adb<56taprop.adb \
1077 s-taspri.ads<56taspri.ads \
1078 s-tpopsp.adb<56tpopsp.adb \
1079 system.ads<57system.ads
1080 endif
1082 endif
1083 endif
1085 ifeq ($(strip $(filter-out rtems%,$(osys))),)
1086 LIBGNAT_TARGET_PAIRS = \
1087 a-intnam.ads<4rintnam.ads \
1088 s-inmaop.adb<7sinmaop.adb \
1089 s-intman.adb<7sintman.adb \
1090 s-osinte.adb<5rosinte.adb \
1091 s-osinte.ads<5rosinte.ads \
1092 s-osprim.adb<7sosprim.adb \
1093 s-parame.adb<5rparame.adb \
1094 s-taprop.adb<7staprop.adb \
1095 s-taspri.ads<7staspri.ads \
1096 s-tpopsp.adb<5rtpopsp.adb
1097 endif
1099 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
1100 LIBGNAT_TARGET_PAIRS = \
1101 a-intnam.ads<4aintnam.ads \
1102 s-inmaop.adb<7sinmaop.adb \
1103 s-intman.adb<7sintman.adb \
1104 s-mastop.adb<5amastop.adb \
1105 s-osinte.adb<5aosinte.adb \
1106 s-osinte.ads<5aosinte.ads \
1107 s-osprim.adb<5posprim.adb \
1108 s-taprop.adb<5ataprop.adb \
1109 s-tasinf.ads<5atasinf.ads \
1110 s-taspri.ads<5ataspri.ads \
1111 s-tpopsp.adb<5atpopsp.adb \
1112 s-traceb.adb<7straceb.adb \
1113 g-soccon.ads<3asoccon.ads \
1114 system.ads<5asystem.ads
1116 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5aml-tgt.adb
1118 GMEM_LIB=gmemlib
1119 SYMLIB = -laddr2line -lbfd $(LIBINTL)
1120 THREADSLIB = -lpthread -lmach -lexc -lrt
1121 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1122 GNATLIB_SHARED = gnatlib-shared-default
1123 LIBRARY_VERSION := $(LIB_VERSION)
1124 endif
1126 ifeq ($(strip $(filter-out alpha% ia64 dec vms% openvms% alphavms%,$(host))),)
1128 soext = .exe
1130 .SUFFIXES: .sym
1132 .o.sym:
1133 @ gnu:[bin]vmssymvec $<
1134 endif
1136 ifeq ($(strip $(filter-out alpha% ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1138 ifeq ($(strip $(filter-out ia64% hp vms% openvms%,$(targ))),)
1139 LIBGNAT_TARGET_PAIRS_AUX = \
1140 s-osinte.adb<5xosinte.adb \
1141 s-osinte.ads<5xosinte.ads \
1142 s-parame.ads<5vparame.ads
1143 else
1144 ifeq ($(strip $(filter-out alpha64% dec hp vms% openvms% alphavms%,$(targ))),)
1145 LIBGNAT_TARGET_PAIRS_AUX = \
1146 s-osinte.adb<5vosinte.adb \
1147 s-osinte.ads<5vosinte.ads \
1148 s-parame.ads<5vparame.ads
1149 else
1150 ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1151 LIBGNAT_TARGET_PAIRS_AUX = \
1152 s-osinte.adb<5vosinte.adb \
1153 s-osinte.ads<5vosinte.ads \
1154 s-parame.ads<5xparame.ads
1155 else
1156 LIBGNAT_TARGET_PAIRS_AUX = \
1157 s-osinte.adb<5vosinte.adb \
1158 s-osinte.ads<5vosinte.ads \
1159 s-parame.ads<5vparame.ads
1160 endif
1161 endif
1162 endif
1164 LIBGNAT_TARGET_PAIRS = \
1165 a-caldel.adb<4vcaldel.adb \
1166 a-calend.adb<4vcalend.adb \
1167 a-calend.ads<4vcalend.ads \
1168 a-excpol.adb<4wexcpol.adb \
1169 a-intnam.ads<4vintnam.ads \
1170 a-numaux.ads<4vnumaux.ads \
1171 g-expect.adb<3vexpect.adb \
1172 g-soccon.ads<3vsoccon.ads \
1173 g-socthi.ads<3vsocthi.ads \
1174 g-socthi.adb<3vsocthi.adb \
1175 g-trasym.adb<3vtrasym.adb \
1176 i-cstrea.adb<6vcstrea.adb \
1177 i-cpp.adb<6vcpp.adb \
1178 interfac.ads<6vinterf.ads \
1179 s-asthan.adb<5vasthan.adb \
1180 s-crtl.ads<5vcrtl.ads \
1181 s-inmaop.adb<5vinmaop.adb \
1182 s-interr.adb<5vinterr.adb \
1183 s-intman.adb<5vintman.adb \
1184 s-intman.ads<5vintman.ads \
1185 s-osprim.adb<5vosprim.adb \
1186 s-osprim.ads<5vosprim.ads \
1187 s-taprop.adb<5vtaprop.adb \
1188 s-taspri.ads<5vtaspri.ads \
1189 s-tpopsp.adb<7stpopsp.adb \
1190 s-tpopde.adb<5vtpopde.adb \
1191 s-tpopde.ads<5vtpopde.ads \
1192 s-traent.adb<5vtraent.adb \
1193 s-traent.ads<5vtraent.ads \
1194 s-vaflop.adb<5vvaflop.adb \
1195 system.ads<5xsystem.ads \
1196 $(LIBGNAT_TARGET_PAIRS_AUX)
1198 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5vml-tgt.adb
1200 GNATLIB_SHARED=gnatlib-shared-vms
1201 EXTRA_LIBGNAT_SRCS=vmshandler.asm
1202 EXTRA_LIBGNAT_OBJS=vmshandler.o
1203 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1204 EXTRA_GNATTOOLS = \
1205 ../../gnatlbr$(exeext) \
1206 ,,/../gnatsym$(exeext)
1207 # This command transforms (YYYYMMDD) into YY,MMDD
1208 GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\)/\2,\3/')
1209 TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1210 endif
1212 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1213 LIBGNAT_TARGET_PAIRS = \
1214 a-calend.adb<4wcalend.adb \
1215 a-excpol.adb<4wexcpol.adb \
1216 a-intnam.ads<4wintnam.ads \
1217 a-numaux.adb<86numaux.adb \
1218 a-numaux.ads<86numaux.ads \
1219 s-gloloc.adb<5wgloloc.adb \
1220 s-inmaop.adb<5ninmaop.adb \
1221 s-interr.adb<5ginterr.adb \
1222 s-intman.adb<5wintman.adb \
1223 s-mastop.adb<5omastop.adb \
1224 s-memory.adb<5wmemory.adb \
1225 s-osinte.ads<5wosinte.ads \
1226 s-osprim.adb<5wosprim.adb \
1227 s-taprop.adb<5wtaprop.adb \
1228 s-taspri.ads<5wtaspri.ads \
1229 g-socthi.ads<3wsocthi.ads \
1230 g-socthi.adb<3wsocthi.adb \
1231 g-soccon.ads<3wsoccon.ads \
1232 g-soliop.ads<3wsoliop.ads \
1233 system.ads<5wsystem.ads
1235 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5wml-tgt.adb
1236 MISCLIB = -lwsock32
1237 SYMLIB = -laddr2line -lbfd -liberty $(LIBINTL)
1238 GMEM_LIB = gmemlib
1239 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1240 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1241 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1242 EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o
1243 soext = .dll
1244 GNATLIB_SHARED = gnatlib-shared-win32
1245 LIBRARY_VERSION := $(LIB_VERSION)
1246 endif
1248 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1249 LIBGNAT_TARGET_PAIRS = \
1250 a-intnam.ads<4lintnam.ads \
1251 s-inmaop.adb<7sinmaop.adb \
1252 s-intman.adb<7sintman.adb \
1253 s-osinte.ads<5iosinte.ads \
1254 s-osinte.adb<5iosinte.adb \
1255 s-osprim.adb<7sosprim.adb \
1256 s-taprop.adb<5itaprop.adb \
1257 s-tpopsp.adb<5atpopsp.adb \
1258 s-taspri.ads<5itaspri.ads \
1259 system.ads<55system.ads
1261 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
1262 MISCLIB=
1263 THREADSLIB=-lpthread
1264 GNATLIB_SHARED=gnatlib-shared-dual
1265 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1266 LIBRARY_VERSION := $(LIB_VERSION)
1267 endif
1269 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
1270 LIBGNAT_TARGET_PAIRS = \
1271 a-intnam.ads<4lintnam.ads \
1272 s-inmaop.adb<7sinmaop.adb \
1273 s-intman.adb<7sintman.adb \
1274 s-osinte.ads<5iosinte.ads \
1275 s-osinte.adb<5iosinte.adb \
1276 s-osprim.adb<7sosprim.adb \
1277 s-taprop.adb<5itaprop.adb \
1278 s-tpopsp.adb<5atpopsp.adb \
1279 s-taspri.ads<5itaspri.ads \
1280 system.ads<5nsystem.ads
1282 TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
1283 MISCLIB=
1284 THREADSLIB=-lpthread
1285 GNATLIB_SHARED=gnatlib-shared-dual
1286 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1287 LIBRARY_VERSION := $(LIB_VERSION)
1288 endif
1290 # The runtime library for gnat comprises two directories. One contains the
1291 # Ada source files that the compiler (gnat1) needs -- these files are listed
1292 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1293 # corresponding .ali files for the parts written in Ada, libgnat.a for
1294 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1295 # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1296 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1297 # go into the directory. The pthreads emulation is built in the threads
1298 # subdirectory and copied.
1299 LIBGNAT_SRCS = ada.h adaint.c adaint.h argv.c cio.c cstreams.c \
1300 errno.c exit.c cal.c ctrl_c.c \
1301 raise.h raise.c sysdep.c types.h aux-io.c init.c \
1302 final.c tracebak.c tb-alvms.c tb-alvxw.c expect.c mkdir.c socket.c \
1303 $(EXTRA_LIBGNAT_SRCS)
1305 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o \
1306 raise.o sysdep.o aux-io.o init.o cal.o final.o \
1307 tracebak.o expect.o mkdir.o socket.o $(EXTRA_LIBGNAT_OBJS)
1309 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1310 # the library installation will change and there will be a
1311 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1312 # from ADA_INCLUDE_SRCS.
1314 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
1315 # the following include file:
1317 include $(fsrcdir)/Makefile.rtl
1319 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
1320 g-trasym.o memtrack.o
1322 # Files which are suitable in no run time/hi integrity mode
1324 COMPILABLE_HIE_SOURCES= \
1325 system.ads \
1326 ada.ads \
1327 gnat.ads \
1328 g-souinf.ads \
1329 interfac.ads \
1330 i-c.ads \
1331 s-stoele.ads \
1332 s-stoele.adb \
1333 s-maccod.ads \
1334 s-unstyp.ads \
1335 s-fatflt.ads \
1336 s-fatlfl.ads \
1337 s-fatllf.ads \
1338 s-fatsfl.ads \
1339 s-secsta.ads \
1340 s-secsta.adb \
1341 a-tags.ads \
1342 a-tags.adb \
1343 a-except.ads \
1344 a-except.adb $(EXTRA_HIE_SOURCES)
1346 NON_COMPILABLE_HIE_SOURCES= \
1347 a-unccon.ads \
1348 a-uncdea.ads \
1349 s-fatgen.adb \
1350 s-fatgen.ads \
1351 unchconv.ads \
1352 s-atacco.ads \
1353 s-atacco.adb \
1354 unchdeal.ads
1357 HIE_SOURCES = $(NON_COMPILABLE_HIE_SOURCES) $(COMPILABLE_HIE_SOURCES)
1359 # Object to generate for the HI run time
1361 HIE_OBJS = \
1362 system.o \
1363 ada.o \
1364 a-except.o \
1365 gnat.o \
1366 g-souinf.o \
1367 interfac.o \
1368 i-c.o \
1369 s-stoele.o \
1370 s-maccod.o \
1371 s-unstyp.o \
1372 s-fatflt.o \
1373 s-fatlfl.o \
1374 s-fatllf.o \
1375 s-secsta.o \
1376 a-tags.o $(EXTRA_HIE_OBJS)
1378 # Files which are needed in ravenscar mode
1380 COMPILABLE_RAVEN_SOURCES = \
1381 $(COMPILABLE_HIE_SOURCES) \
1382 s-parame.ads \
1383 s-parame.adb \
1384 s-purexc.ads \
1385 s-osinte.ads \
1386 s-osinte.adb \
1387 s-tasinf.ads \
1388 s-tasinf.adb \
1389 s-taspri.ads \
1390 s-taprop.ads \
1391 s-taprop.adb \
1392 s-taskin.ads \
1393 s-taskin.adb \
1394 s-interr.ads \
1395 s-interr.adb \
1396 a-interr.ads \
1397 a-interr.adb \
1398 a-intnam.ads \
1399 a-reatim.ads \
1400 a-reatim.adb \
1401 a-retide.ads \
1402 a-retide.adb \
1403 s-taprob.ads \
1404 s-taprob.adb \
1405 s-tposen.ads \
1406 s-tposen.adb \
1407 s-tasres.ads \
1408 s-tarest.ads \
1409 s-tarest.adb \
1410 a-sytaco.ads \
1411 a-sytaco.adb \
1412 a-taside.ads \
1413 a-taside.adb $(EXTRA_RAVEN_SOURCES)
1415 NON_COMPILABLE_RAVEN_SOURCES= $(NON_COMPILABLE_HIE_SOURCES)
1417 RAVEN_SOURCES = $(NON_COMPILABLE_RAVEN_SOURCES) $(COMPILABLE_RAVEN_SOURCES)
1419 # Objects to generate for the ravenscar run time
1421 RAVEN_OBJS = \
1422 $(HIE_OBJS) \
1423 s-parame.o \
1424 s-purexc.o \
1425 s-osinte.o \
1426 s-tasinf.o \
1427 s-taspri.o \
1428 s-taprop.o \
1429 s-taskin.o \
1430 s-interr.o \
1431 a-interr.o \
1432 a-intnam.o \
1433 a-reatim.o \
1434 a-retide.o \
1435 s-taprob.o \
1436 s-tposen.o \
1437 s-tasres.o \
1438 s-tarest.o \
1439 a-sytaco.o \
1440 a-taside.o $(EXTRA_RAVEN_OBJS)
1442 # Default run time files
1444 ADA_INCLUDE_SRCS =\
1445 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1446 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1447 sequenio.ads system.ads Makefile.adalib Makefile.prolog Makefile.generic \
1448 memtrack.adb \
1449 a-*.adb a-*.ads g-*.ad? i-*.ad? \
1450 s-[a-o]*.adb s-[p-z]*.adb \
1451 s-[a-o]*.ads s-[p-z]*.ads
1453 LIBGNAT=../rts/libgnat.a
1454 TOOLS_FLAGS_TO_PASS= \
1455 "CC=$(CC)" \
1456 "CFLAGS=$(CFLAGS)" \
1457 "LDFLAGS=$(LDFLAGS)" \
1458 "ADAFLAGS=$(ADAFLAGS)" \
1459 "INCLUDES=$(INCLUDES_FOR_SUBDIR)"\
1460 "ADA_INCLUDES=$(ADA_INCLUDES) $(ADA_INCLUDES_FOR_SUBDIR)"\
1461 "libsubdir=$(libsubdir)" \
1462 "exeext=$(exeext)" \
1463 "fsrcdir=$(fsrcdir)" \
1464 "srcdir=$(fsrcdir)" \
1465 "TOOLS_LIBS=$(TOOLS_LIBS) $(TGT_LIB)" \
1466 "GNATMAKE=$(GNATMAKE)" \
1467 "GNATLINK=$(GNATLINK)" \
1468 "GNATBIND=$(GNATBIND)"
1470 # Build directory for the tools. Let's copy the target-dependent
1471 # sources using the same mechanism as for gnatlib. The other sources are
1472 # accessed using the vpath directive below
1474 ../stamp-tools:
1475 -$(RM) tools/*
1476 -$(RMDIR) tools
1477 -$(MKDIR) tools
1478 -(cd tools; $(LN_S) ../sdefault.adb .)
1479 -$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
1480 $(RM) tools/$(word 1,$(subst <, ,$(PAIR)));\
1481 $(LN_S) $(fsrcdir)/$(word 2,$(subst <, ,$(PAIR))) \
1482 tools/$(word 1,$(subst <, ,$(PAIR)));)
1483 touch ../stamp-tools
1485 # when compiling the tools, the runtime has to be first on the path so that
1486 # it hides the runtime files lying with the rest of the sources
1487 ifeq ($(TOOLSCASE),native)
1488 vpath %.ads ../rts ../
1489 vpath %.adb ../rts ../
1490 vpath %.c ../rts ../
1491 vpath %.h ../rts ../
1492 endif
1494 # in the cross tools case, everything is compiled with the native
1495 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1496 ifeq ($(TOOLSCASE),cross)
1497 vpath %.ads ../
1498 vpath %.adb ../
1499 vpath %.c ../
1500 vpath %.h ../
1501 endif
1503 # gnatmake/link tools cannot always be built with gnatmake/link for bootstrap
1504 # reasons: gnatmake should be built with a recent compiler, a recent compiler
1505 # may not generate ALI files compatible with an old gnatmake so it is important
1506 # to be able to build gnatmake without a version of gnatmake around. Once
1507 # everything has been compiled once, gnatmake can be recompiled with itself
1508 # (see target gnattools1-re)
1509 gnattools1: ../stamp-tools ../stamp-gnatlib
1510 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1511 TOOLSCASE=native \
1512 ../../gnatmake$(exeext) ../../gnatlink$(exeext) ../../gnatbl$(exeext)
1514 # gnatmake/link can be built with recent gnatmake/link if they are available.
1515 # This is especially convenient for building cross tools or for rebuilding
1516 # the tools when the original bootstrap has already be done.
1517 gnattools1-re: ../stamp-tools
1518 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1519 TOOLSCASE=cross INCLUDES="" gnatmake-re gnatlink-re
1521 # these tools are built with gnatmake & are common to native and cross
1522 gnattools2: ../stamp-tools
1523 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1524 TOOLSCASE=native \
1525 ../../gnatchop$(exeext) ../../gnat$(exeext) ../../gnatkr$(exeext) \
1526 ../../gnatls$(exeext) ../../gnatprep$(exeext) \
1527 ../../gnatxref$(exeext) \
1528 ../../gnatfind$(exeext) ../../gnatname$(exeext) \
1529 ../../gnatclean$(exeext) \
1530 ../../gprcmd$(exeext) ../../gpr2make$(exeext)
1532 # These tools are only built for the native version.
1533 gnattools3: ../stamp-tools
1534 # $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1535 # TOOLSCASE=native top_builddir=../../.. \
1536 # ../../gnatmem$(exeext) $(EXTRA_GNATTOOLS)
1538 # those tools are only built for the cross version
1539 gnattools4: ../stamp-tools
1540 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1541 TOOLSCASE=cross top_buildir=../../.. \
1542 ../../vxaddr2line$(exeext)
1544 ../../gnatchop$(exeext): ../stamp-tools
1545 $(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)"
1546 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatchop
1547 $(GNATLINK) -v gnatchop -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1548 $(TOOLS_LIBS)
1550 ../../gnat$(exeext): ../stamp-tools
1551 $(GNATMAKE) -c $(ADA_INCLUDES) gnatcmd --GCC="$(CC) $(ALL_ADAFLAGS)"
1552 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatcmd
1553 $(GNATLINK) -v gnatcmd -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1555 ../../gnatkr$(exeext): ../stamp-tools
1556 $(GNATMAKE) -c $(ADA_INCLUDES) gnatkr --GCC="$(CC) $(ALL_ADAFLAGS)"
1557 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatkr
1558 $(GNATLINK) -v gnatkr -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1560 ../../gnatls$(exeext): ../stamp-tools
1561 $(GNATMAKE) -c $(ADA_INCLUDES) gnatls --GCC="$(CC) $(ALL_ADAFLAGS)"
1562 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatls
1563 $(GNATLINK) -v gnatls -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1565 ../../gnatname$(exeext): ../stamp-tools
1566 $(GNATMAKE) -c $(ADA_INCLUDES) gnatname --GCC="$(CC) $(ALL_ADAFLAGS)"
1567 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatname
1568 $(GNATLINK) -v gnatname -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1569 $(TOOLS_LIBS)
1571 ../../gpr2make$(exeext): ../stamp-tools
1572 $(GNATMAKE) -c $(ADA_INCLUDES) gpr2make --GCC="$(CC) $(ALL_ADAFLAGS)"
1573 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gpr2make
1574 $(GNATLINK) -v gpr2make -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1575 $(TOOLS_LIBS)
1577 ../../gnatprep$(exeext): ../stamp-tools
1578 $(GNATMAKE) -c $(ADA_INCLUDES) gnatprep --GCC="$(CC) $(ALL_ADAFLAGS)"
1579 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatprep
1580 $(GNATLINK) -v gnatprep -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1581 $(TOOLS_LIBS)
1583 ../../gnatxref$(exeext): ../stamp-tools
1584 $(GNATMAKE) -c $(ADA_INCLUDES) gnatxref --GCC="$(CC) $(ALL_ADAFLAGS)"
1585 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatxref
1586 $(GNATLINK) -v gnatxref -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1587 $(TOOLS_LIBS)
1589 ../../gnatfind$(exeext): ../stamp-tools
1590 $(GNATMAKE) -c $(ADA_INCLUDES) gnatfind --GCC="$(CC) $(ALL_ADAFLAGS)"
1591 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatfind
1592 $(GNATLINK) -v gnatfind -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1593 $(TOOLS_LIBS)
1595 ../../gnatclean$(exeext): ../stamp-tools
1596 $(GNATMAKE) -c $(ADA_INCLUDES) gnatclean --GCC="$(CC) $(ALL_ADAFLAGS)"
1597 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatclean
1598 $(GNATLINK) -v gnatclean -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1599 $(TOOLS_LIBS)
1601 ../../gnatsym$(exeext): ../stamp-tools
1602 $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
1603 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
1604 $(GNATLINK) -v gnatsym -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1605 $(TOOLS_LIBS)
1607 ../../gnatmem$(exeext): ../stamp-tools gmem.o $(SYMDEPS)
1608 ifeq ($(GMEM_LIB),gmemlib)
1609 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmem --GCC="$(CC) $(ALL_ADAFLAGS)"
1610 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmem
1611 $(GNATLINK) -v gnatmem -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1612 gmem.o $(SYMLIB) $(TOOLS_LIBS)
1613 endif
1615 ../../gnatdll$(exeext): ../stamp-tools
1616 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1617 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) $(GNATBIND_FLAGS) gnatdll
1618 $(GNATLINK) -v gnatdll -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1619 $(TOOLS_LIBS)
1621 ../../gprcmd$(exeext): ../stamp-tools
1622 $(GNATMAKE) -c $(ADA_INCLUDES) gprcmd --GCC="$(CC) $(ALL_ADAFLAGS)"
1623 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gprcmd
1624 $(GNATLINK) -v gprcmd -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1626 ../../vxaddr2line$(exeext): ../stamp-tools
1627 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
1628 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
1629 $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(CLIB)
1631 gnatmake-re: ../stamp-tools
1632 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1633 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1634 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
1635 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1636 --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1638 # Note the use of the "mv" command in order to allow gnatlink to be linked with
1639 # with the former version of gnatlink itself which cannot override itself.
1640 gnatlink-re: ../stamp-tools link.o
1641 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1642 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
1643 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1644 --GCC="$(CC) $(ADA_INCLUDES)" link.o $(TOOLS_LIBS)
1645 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
1647 # Needs to be built with CC=gcc
1648 # Since the RTL should be built with the latest compiler, remove the
1649 # stamp target in the parent directory whenever gnat1 is rebuilt
1651 # Likewise for the tools
1652 ../../gnatmake$(exeext): $(P) b_gnatm.o $(GNATMAKE_OBJS)
1653 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1654 $(TOOLS_LIBS)
1656 ../../gnatlink$(exeext): $(P) b_gnatl.o $(GNATLINK_OBJS)
1657 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1658 $(TOOLS_LIBS)
1660 ../../gnatbl$(exeext): gnatbl.o
1661 $(CC) -o $@ $(ALL_CFLAGS) $(LDFLAGS) gnatbl.o $(TOOLS_LIBS)
1663 gnatbl.o: gnatbl.c adaint.h
1664 $(CC) $(ALL_CFLAGS) $(INCLUDES) -c $< $(OUTPUT_OPTION)
1666 ../stamp-gnatlib:
1667 @if [ ! -f stamp-gnatlib ] ; \
1668 then \
1669 $(ECHO) You must first build the GNAT library: make gnatlib; \
1670 false; \
1671 else \
1672 true; \
1675 install-gnatlib: ../stamp-gnatlib
1676 # Create the directory before deleting it, in case the directory is
1677 # a list of directories (as it may be on VMS). This ensures we are
1678 # deleting the right one.
1679 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1680 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1681 -$(MKDIR) $(DESTDIR)$(ADA_SHARE_MAKE_DIR)
1682 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1683 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1684 $(RMDIR) $(DESTDIR)$(ADA_SHARE_MAKE_DIR)
1685 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1686 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1687 -$(MKDIR) $(DESTDIR)$(ADA_SHARE_MAKE_DIR)
1688 -$(INSTALL_DATA) rts/Makefile.prolog $(DESTDIR)$(ADA_SHARE_MAKE_DIR)
1689 -$(INSTALL_DATA) rts/Makefile.generic $(DESTDIR)$(ADA_SHARE_MAKE_DIR)
1690 for file in rts/*.ali; do \
1691 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1692 done
1693 -$(INSTALL_DATA) rts/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1694 -for file in rts/*$(arext);do \
1695 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1696 done
1697 # Install the shared libraries, if any, using $(INSTALL) instead
1698 # of $(INSTALL_DATA). The latter may force a mode inappropriate
1699 # for shared libraries on some targets, e.g. on HP-UX where the x
1700 # permission is required.
1701 ifeq ($(strip $(filter-out alpha% dec vms% openvms% alphavms%,$(targ))),)
1702 -for file in rts/lib*$(soext);do \
1703 $(INSTALL) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1704 done
1705 else
1706 -for file in rts/lib*-*$(soext);do \
1707 $(INSTALL) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1708 done
1709 endif
1710 if [ -f rts/libgnat-*$(soext) ]; then \
1711 (cd $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
1712 $(LN_S) libgnat-*$(soext) libgnat$(soext) && \
1713 $(LN_S) libgnarl-*$(soext) libgnarl$(soext)) \
1715 # This copy must be done preserving the date on the original file.
1716 for file in rts/*.adb rts/*.ads; do \
1717 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
1718 done
1719 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1720 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1722 ../stamp-gnatlib2:
1723 $(RM) rts/s-*.ali
1724 $(RM) rts/s-*$(objext)
1725 $(RM) rts/a-*.ali
1726 $(RM) rts/a-*$(objext)
1727 $(RM) rts/*.ali
1728 $(RM) rts/*$(objext)
1729 $(RM) rts/*$(arext)
1730 $(RM) rts/*$(soext)
1731 touch ../stamp-gnatlib2
1732 $(RM) ../stamp-gnatlib
1734 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1735 # successive target commands. Although the Gnu make documentation
1736 # implies this is true on all systems, I suspect it may not be, So care
1737 # has been taken to allow a sed script to look for ";)" and substitue
1738 # for ";" the appropriate character in the range of lines below
1739 # beginning with "GNULLI Begin" and ending with "GNULLI End"
1741 # GNULLI Begin ###########################################################
1743 ../stamp-gnatlib1: Makefile ../stamp-gnatlib2
1744 $(RMDIR) rts
1745 $(MKDIR) rts
1746 $(CHMOD) u+w rts
1747 # Copy target independent sources
1748 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
1749 $(LN_S) $(fsrcpfx)$(f) rts ;) true
1750 # Remove files to be replaced by target dependent sources
1751 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1752 rts/$(word 1,$(subst <, ,$(PAIR))))
1753 # Copy new target dependent sources
1754 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1755 $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1756 rts/$(word 1,$(subst <, ,$(PAIR)));)
1757 $(RM) ../stamp-gnatlib
1758 touch ../stamp-gnatlib1
1760 # GNULLI End #############################################################
1762 # Don't use semicolon separated shell commands that involve list expansions.
1763 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
1764 # line lengths in excess of 256 characters.
1765 # Example: cd rts; ar rc libfoo.a $(LONG_LIST_OF_OBJS)
1766 # is guaranteed to overflow the buffer.
1768 gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
1769 $(MAKE) -C rts CC="../../xgcc -B../../" \
1770 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
1771 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
1772 srcdir=$(fsrcdir) \
1773 -f ../Makefile $(LIBGNAT_OBJS)
1774 $(MAKE) -C rts CC="../../xgcc -B../../" \
1775 ADA_INCLUDES="" \
1776 CFLAGS="$(GNATLIBCFLAGS)" \
1777 ADAFLAGS="$(GNATLIBFLAGS)" \
1778 srcdir=$(fsrcdir) \
1779 -f ../Makefile \
1780 $(GNATRTL_OBJS)
1781 $(RM) rts/libgnat$(arext) rts/libgnarl$(arext)
1782 $(AR) $(AR_FLAGS) rts/libgnat$(arext) \
1783 $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
1784 ifneq ($(PREFIX_OBJS),)
1785 $(AR) $(AR_FLAGS) rts/libgccprefix$(arext) $(PREFIX_OBJS);
1786 endif
1787 if $(RANLIB_TEST) ; then $(RANLIB) rts/libgnat$(arext); else true; fi
1788 $(AR) $(AR_FLAGS) rts/libgnarl$(arext) \
1789 $(addprefix rts/,$(GNATRTL_TASKING_OBJS))
1790 if $(RANLIB_TEST) ; then $(RANLIB) rts/libgnarl$(arext); else true; fi
1791 ifeq ($(GMEM_LIB),gmemlib)
1792 $(AR) $(AR_FLAGS) rts/libgmem$(arext) rts/memtrack.o;
1793 endif
1794 $(CHMOD) a-wx rts/*.ali
1795 touch ../stamp-gnatlib
1797 HIE_NONE_TARGET_PAIRS=\
1798 a-except.ads<1aexcept.ads \
1799 a-except.adb<1aexcept.adb \
1800 a-tags.ads<1atags.ads \
1801 a-tags.adb<1atags.adb \
1802 s-secsta.ads<1ssecsta.ads \
1803 s-secsta.adb<1ssecsta.adb \
1804 i-c.ads<1ic.ads $(EXTRA_HIE_NONE_TARGET_PAIRS)
1806 # This target needs RTS_NAME, RTS_SRCS, RTS_TARGET_PAIRS to be set properly
1807 # it creates a rts with the proper structure and the right target
1808 # dependant srcs
1809 prepare-rts:
1810 $(RMDIR) rts-$(RTS_NAME)
1811 $(MKDIR) rts-$(RTS_NAME)
1812 $(CHMOD) u+w rts-$(RTS_NAME)
1813 $(MKDIR) rts-$(RTS_NAME)/adalib
1814 $(MKDIR) rts-$(RTS_NAME)/adainclude
1815 $(CHMOD) u+w rts-$(RTS_NAME)/*
1816 # Generate the project file
1817 $(ECHO) "project $(RTS_NAME) is" > rts-$(RTS_NAME)/$(RTS_NAME).gpr
1818 $(ECHO) " for Source_Dirs use (\"adainclude\");" \
1819 >> rts-$(RTS_NAME)/$(RTS_NAME).gpr
1820 $(ECHO) " for Object_Dir use \"adalib\";" \
1821 >> rts-$(RTS_NAME)/$(RTS_NAME).gpr
1822 $(ECHO) " for Source_List_File use " \
1823 >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1824 $(ECHO) " \"rts-$(RTS_NAME)_source_list.txt\";" \
1825 >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1826 $(ECHO) " package Builder is" >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1827 $(ECHO) " for Default_Switches (\"Ada\") use (\"-a\");" \
1828 >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1829 $(ECHO) " end Builder;" >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1830 $(ECHO) " package Compiler is" >> rts-$(RTS_NAME)/$(RTS_NAME).gpr
1831 $(ECHO) " for Default_Switches (\"Ada\") use (\"-nostdinc\");" \
1832 >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1833 $(ECHO) " end Compiler;" >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1834 $(ECHO) "end $(RTS_NAME);" >>rts-$(RTS_NAME)/$(RTS_NAME).gpr
1836 $(foreach f, $(COMPILABLE_SOURCES), \
1837 $(ECHO) $(f) >> \
1838 rts-$(RTS_NAME)/rts-$(RTS_NAME)_source_list.txt ;) true
1839 # Copy target independent sources
1840 $(foreach f,$(RTS_SRCS), \
1841 $(CP) $(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 $(CP) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1848 rts-$(RTS_NAME)/adainclude/$(word 1,$(subst <, ,$(PAIR)));)
1850 install-rts: force
1851 $(CP) -r rts-$(RTS_NAME) $(DESTDIR)$(libsubdir)/
1853 rts-zfp: force
1854 $(MAKE) $(FLAGS_TO_PASS) prepare-rts \
1855 RTS_NAME=zfp RTS_SRCS="$(HIE_SOURCES)" \
1856 RTS_TARGET_PAIRS="$(HIE_NONE_TARGET_PAIRS)" \
1857 COMPILABLE_SOURCES="$(COMPILABLE_HIE_SOURCES)"
1858 -$(GNATMAKE) -Prts-zfp/zfp.gpr --GCC="../../../xgcc -B../../../"
1859 cd rts-zfp/adalib/ ; $(AR) r libgnat.a *.o
1860 $(RM) rts-zfp/adalib/*.o
1861 $(CHMOD) a-wx rts-zfp/adalib/*.ali
1862 $(CHMOD) a-wx rts-zfp/adalib/libgnat.a
1864 rts-none: force
1865 $(MAKE) $(FLAGS_TO_PASS) prepare-rts \
1866 RTS_NAME=none RTS_SRCS="$(HIE_SOURCES)" \
1867 RTS_TARGET_PAIRS="$(HIE_NONE_TARGET_PAIRS)" \
1868 COMPILABLE_SOURCES="$(COMPILABLE_HIE_SOURCES)"
1869 -$(GNATMAKE) -Prts-none/none.gpr --GCC="../../../xgcc -B../../../"
1870 $(RM) rts-none/adalib/*.o
1871 $(CHMOD) a-wx rts-none/adalib/*.ali
1873 rts-ravenscar: force
1874 $(MAKE) $(FLAGS_TO_PASS) prepare-rts \
1875 RTS_NAME=ravenscar RTS_SRCS="$(RAVEN_SOURCES)" \
1876 RTS_TARGET_PAIRS="$(HIE_RAVEN_TARGET_PAIRS)" \
1877 COMPILABLE_SOURCES="$(COMPILABLE_RAVEN_SOURCES)"
1878 -$(GNATMAKE) -Prts-ravenscar/ravenscar.gpr \
1879 --GCC="../../../xgcc -B../../../"
1880 cd rts-ravenscar/adalib/ ; $(AR) r libgnat.a *.o
1881 $(RM) rts-ravenscar/adalib/*.o
1882 $(CHMOD) a-wx rts-ravenscar/adalib/*.ali
1883 $(CHMOD) a-wx rts-ravenscar/adalib/libgnat.a
1885 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
1886 gnatlib-shared-default:
1887 $(MAKE) $(FLAGS_TO_PASS) \
1888 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1889 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1890 THREAD_KIND="$(THREAD_KIND)" \
1891 gnatlib
1892 $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
1893 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1894 -o libgnat-$(LIBRARY_VERSION)$(soext) \
1895 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
1896 $(SO_OPTS)libgnat-$(LIBRARY_VERSION)$(soext) $(MISCLIB) -lm
1897 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1898 -o libgnarl-$(LIBRARY_VERSION)$(soext) \
1899 $(GNATRTL_TASKING_OBJS) \
1900 $(SO_OPTS)libgnarl-$(LIBRARY_VERSION)$(soext) $(THREADSLIB)
1901 cd rts; $(LN_S) libgnat-$(LIBRARY_VERSION)$(soext) libgnat$(soext)
1902 cd rts; $(LN_S) libgnarl-$(LIBRARY_VERSION)$(soext) libgnarl$(soext)
1904 gnatlib-shared-dual:
1905 $(MAKE) $(FLAGS_TO_PASS) \
1906 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1907 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1908 THREAD_KIND="$(THREAD_KIND)" \
1909 gnatlib-shared-default
1910 $(MV) rts/libgna*$(soext) .
1911 $(RM) ../stamp-gnatlib2
1912 $(MAKE) $(FLAGS_TO_PASS) \
1913 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1914 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1915 THREAD_KIND="$(THREAD_KIND)" \
1916 gnatlib
1917 $(MV) libgna*$(soext) rts
1919 # Note that on Win32 the auto-import does not work for DLL, so on the
1920 # platform we have a specific setup. The libgnat.dll contains only
1921 # non-tasking objects and libgnarl.dll contains tasking and non-tasking
1922 # objects. A tasking program must be linked with libgnarl.dll only.
1923 gnatlib-shared-win32:
1924 $(MAKE) $(FLAGS_TO_PASS) \
1925 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1926 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1927 THREAD_KIND="$(THREAD_KIND)" \
1928 gnatlib
1929 $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
1930 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1931 -o libgnat-$(LIBRARY_VERSION)$(soext) \
1932 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
1933 $(SO_OPTS)libgnat-$(LIBRARY_VERSION)$(soext) $(MISCLIB)
1934 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
1935 -o libgnarl-$(LIBRARY_VERSION)$(soext) \
1936 $(GNATRTL_TASKING_OBJS) \
1937 $(SO_OPTS)libgnarl-$(LIBRARY_VERSION)$(soext) \
1938 $(THREADSLIB) -Wl,libgnat-$(LIBRARY_VERSION)$(soext)
1939 cd rts; $(LN_S) libgnat-$(LIBRARY_VERSION)$(soext) libgnat$(soext)
1940 cd rts; $(LN_S) libgnarl-$(LIBRARY_VERSION)$(soext) libgnarl$(soext)
1942 gnatlib-shared-vms:
1943 $(MAKE) $(FLAGS_TO_PASS) \
1944 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1945 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1946 THREAD_KIND="$(THREAD_KIND)" \
1947 gnatlib
1948 $(RM) rts/libgnat*$(soext) rts/libgnarl*$(soext)
1949 cd rts && echo "case_sensitive=yes" > SYMVEC_$$$$.opt && \
1950 objdump --syms $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) | \
1951 $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt && \
1952 echo "case_sensitive=NO" >> SYMVEC_$$$$.opt && \
1953 ../../xgcc -g -B../../ -nostartfiles -shared -shared-libgcc \
1954 -o libgnat_s$(soext) libgnat.a \
1955 sys\$$library:trace.exe \
1956 --for-linker=/noinform \
1957 --for-linker=SYMVEC_$$$$.opt \
1958 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
1959 cd rts && echo "case_sensitive=yes" > SYMVEC_$$$$.opt && \
1960 objdump --syms $(GNATRTL_TASKING_OBJS) | \
1961 $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt && \
1962 echo "case_sensitive=NO" >> SYMVEC_$$$$.opt && \
1963 ../../xgcc -g -B../../ -nostartfiles -shared -shared-libgcc \
1964 -o libgnarl_s$(soext) \
1965 libgnarl.a libgnat_s$(soext) \
1966 sys\$$library:trace.exe \
1967 --for-linker=/noinform \
1968 --for-linker=SYMVEC_$$$$.opt \
1969 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
1971 gnatlib-shared:
1972 $(MAKE) $(FLAGS_TO_PASS) \
1973 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1974 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1975 THREAD_KIND="$(THREAD_KIND)" \
1976 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
1977 $(GNATLIB_SHARED)
1979 gnatlib-sjlj: ../stamp-gnatlib1
1980 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' rts/system.ads > rts/s.ads
1981 $(MV) rts/s.ads rts/system.ads
1982 $(MAKE) $(FLAGS_TO_PASS) \
1983 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1984 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1985 THREAD_KIND="$(THREAD_KIND)" \
1986 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
1988 # .s files for cross-building
1989 gnat-cross: force
1990 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
1992 # Compiling object files from source files.
1994 # Note that dependencies on obstack.h are not written
1995 # because that file is not part of GCC.
1996 # Dependencies on gvarargs.h are not written
1997 # because all that file does, when not compiling with GCC,
1998 # is include the system varargs.h.
2000 b_gnatl.c : $(GNATLINK_OBJS)
2001 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2002 b_gnatl.o : b_gnatl.c
2004 b_gnatm.c : $(GNATMAKE_OBJS)
2005 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2006 b_gnatm.o : b_gnatm.c
2008 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2009 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2010 ADA_SHARE_MAKE_DIR = $(prefix)/share/make
2012 # force no sibling call optimization on s-traceb.o so the number of stack
2013 # frames to be skipped when computing a call chain is not modified by
2014 # optimization. However we can do that only when building the runtime
2015 # (not the compiler) because the -fno-optimize-sibling-calls exists
2016 # only in GCC 3.
2018 ifneq (,$(findstring xgcc,$(CC)))
2019 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2020 else
2021 NO_SIBLING_ADAFLAGS=
2022 endif
2024 s-traceb.o : s-traceb.adb
2025 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2026 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2027 $< $(OUTPUT_OPTION)
2029 adadecode.o : adadecode.c adadecode.h
2030 aux-io.o : aux-io.c
2031 argv.o : argv.c
2032 cal.o : cal.c
2033 deftarg.o : deftarg.c
2034 errno.o : errno.c
2035 exit.o : raise.h exit.c
2036 expect.o : expect.c
2037 final.o : raise.h final.c
2038 gmem.o : gmem.c
2039 link.o : link.c
2040 mkdir.o : mkdir.c
2041 socket.o : socket.c
2042 sysdep.o : sysdep.c
2044 cio.o : cio.c
2045 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \
2046 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2048 init.o : init.c ada.h types.h raise.h
2049 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \
2050 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2052 raise.o : raise.c raise.h
2053 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \
2054 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2056 # Need to keep the frame pointer in this file to pop the stack properly on
2057 # some targets.
2058 tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c
2059 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2060 -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2062 # In GNU Make, ignore whether `stage*' exists.
2063 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2064 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2066 force:
2068 # Gnatlbr is only used on VMS
2070 ../../gnatlbr$(exeext): ../../prefix.o
2071 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2072 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2073 $(GNATLINK) -v gnatlbr -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
2074 $(TOOLS_LIBS)