1 # Makefile for GNU Ada Compiler (GNAT).
2 # Copyright (C) 1994-2009 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 3, or (at your option)
11 #GCC is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 #GNU General Public License for more details.
16 #You should have received a copy of the GNU General Public License
17 #along with GCC; see the file COPYING3. If not see
18 #<http://www.gnu.org/licenses/>.
20 # The makefile built from this file lives in the language subdirectory.
21 # Its purpose is to provide support for:
23 # 1) recursion where necessary, and only then (building .o's), and
24 # 2) building and debugging cc1 from the language subdirectory, and
27 # The parent makefile handles all other chores, with help from the
28 # language makefile fragment, of course.
30 # The targets for external use are:
31 # all, TAGS, ???mostlyclean, ???clean.
33 # This makefile will only work with Gnu make.
34 # The rules are written assuming a minimum subset of tools are available:
37 # MAKE: Only Gnu make will work.
38 # MV: Must accept (at least) one, maybe wildcard, source argument,
39 # a file or directory destination, and support creation/
40 # modification date preservation. Gnu mv -f works.
41 # RM: Must accept an arbitrary number of space separated file
42 # arguments, or one wildcard argument. Gnu rm works.
43 # RMDIR: Must delete a directory and all its contents. Gnu rm -rf works.
44 # ECHO: Must support command line redirection. Any Unix-like
45 # shell will typically provide this, otherwise a custom version
46 # is trivial to write.
48 # MKDIR: Gnu mkdir works.
49 # CHMOD: Gnu chmod works.
50 # true: Does nothing and returns a normal successful return code.
51 # pwd: Prints the current directory on stdout.
52 # cd: Change directory.
55 # BISON: Gnu bison works.
56 # FLEX: Gnu flex works.
57 # Other miscellaneous tools for obscure targets.
59 # Suppress smart makes who think they know how to automake Yacc files
62 # Variables that exist for you to override.
63 # See below for how to change them for certain systems.
65 # Various ways of specifying flags for compilations:
66 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
67 # BOOT_CFLAGS is the value of CFLAGS to pass
68 # to the stage2 and stage3 compilations
70 BOOT_CFLAGS = -O $(CFLAGS)
71 # These exists to be overridden by the t-* files, respectively.
92 RANLIB_FLAGS = @ranlib_flags@
96 PWD_COMMAND = $${PWDCMD-pwd}
97 # How to copy preserving the date
98 INSTALL_DATA_DATE = cp -p
102 GNATBIND_FLAGS = -static -x
104 ADAFLAGS = -W -Wall -gnatpg -gnata
105 SOME_ADAFLAGS =-gnata
106 FORCE_DEBUG_ADAFLAGS = -g
107 GNATLIBFLAGS = -gnatpg -nostdinc
108 GNATLIBCFLAGS = -g -O2
109 GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
111 ALL_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS)
112 MOST_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(SOME_ADAFLAGS)
117 SYMDEPS = $(LIBINTL_DEP)
118 OUTPUT_OPTION = @OUTPUT_OPTION@
127 # Define this as & to perform parallel make on a Sequent.
128 # Note that this has some bugs, and it seems currently necessary
129 # to compile all the gen* files first by hand to avoid erroneous results.
132 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
134 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
135 GCC_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS)
137 # Tools to use when building a cross-compiler.
138 # These are used because `configure' appends `cross-make'
139 # to the makefile when making a cross-compiler.
141 # We don't use cross-make. Instead we use the tools from the build tree,
142 # if they are available.
143 # program_transform_name and objdir are set by configure.in.
144 program_transform_name =
147 target_alias=@target_alias@
149 xmake_file = @xmake_file@
150 tmake_file = @tmake_file@
151 host_canonical=@host@
152 target_cpu_default=@target_cpu_default@
153 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
154 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
156 # Directory where sources are, from where we are.
157 VPATH = $(srcdir)/ada
159 fsrcdir := $(shell cd $(srcdir);${PWD_COMMAND})
160 fsrcpfx := $(shell cd $(srcdir);${PWD_COMMAND})/
161 fcurdir := $(shell ${PWD_COMMAND})
162 fcurpfx := $(shell ${PWD_COMMAND})/
164 # Top build directory, relative to here.
167 # Internationalization library.
169 LIBINTL_DEP = @LIBINTL_DEP@
171 # Any system libraries needed just for GNAT.
172 SYSLIBS = @GNAT_LIBEXC@
174 # List of extra object files linked in with various programs.
175 EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o
177 # List of target dependent sources, overridden below as necessary
180 # Type of tools build we are doing; default is not compiling tools.
185 RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
187 # End of variables for you to override.
191 # This tells GNU Make version 3 not to put all variables in the environment.
195 ifneq ($(tmake_file),)
196 include $(tmake_file)
200 ifneq ($(xmake_file),)
201 include $(xmake_file)
204 # Now figure out from those variables how to compile and link.
206 all.indirect: Makefile ../gnat1$(exeext)
208 # IN_GCC distinguishes between code compiled into GCC itself and other
209 # programs built during a bootstrap.
210 # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a cross
211 # compiler which does not use the native libraries and headers.
212 INTERNAL_CFLAGS = @CROSS@ -DIN_GCC
214 # This is the variable actually used when we compile.
215 LOOSE_CFLAGS = `echo $(CFLAGS) $(WARN2_CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`
216 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS)
219 ALL_CPPFLAGS = $(CPPFLAGS)
221 # This is where we get libiberty.a from.
222 LIBIBERTY = ../../libiberty/libiberty.a
224 # How to link with both our special library facilities
225 # and the system's installed libraries.
226 LIBS = $(LIBINTL) $(LIBIBERTY) $(SYSLIBS)
227 LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY)
228 # Default is no TGT_LIB; one might be passed down or something
230 TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB)
232 # Specify the directories to be searched for header files.
233 # Both . and srcdir are used, in that order,
234 # so that tm.h and config.h will be found in the compilation
235 # subdirectory rather than in the source directory.
236 INCLUDES = -I- -I. -I.. -I$(srcdir)/ada -I$(srcdir) -I$(srcdir)/config \
237 -I$(srcdir)/../include
239 ADA_INCLUDES = -I- -I. -I$(srcdir)/ada
241 INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir)/ada \
242 -I$(fsrcdir)/../include -I$(fsrcdir)
243 ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
245 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
248 # Say how to compile Ada programs.
249 .SUFFIXES: .ada .adb .ads .asm
251 # Always use -I$(srcdir)/config when compiling.
253 $(CC) -c -x assembler $< $(OUTPUT_OPTION)
256 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
260 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
263 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
265 # how to regenerate this file
266 Makefile: ../config.status $(srcdir)/ada/gcc-interface/Makefile.in $(srcdir)/ada/Makefile.in $(srcdir)/version.c
268 LANGUAGES="$(CONFIG_LANGUAGES)" \
270 CONFIG_FILES="ada/gcc-interface/Makefile ada/Makefile" $(SHELL) config.status
272 # This tells GNU make version 3 not to export all the variables
273 # defined in this file into the environment.
276 # Lists of files for various purposes.
278 GNATLINK_OBJS = gnatlink.o \
279 a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \
280 gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \
281 osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
282 sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \
283 types.o validsw.o widechar.o
285 GNATMAKE_OBJS = a-except.o ali.o ali-util.o s-casuti.o \
286 alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\
287 erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
288 gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
289 make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o \
290 mlib-tgt-specific.o mlib-utl.o namet.o nlists.o opt.o osint.o osint-m.o output.o \
291 prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o prj-err.o prj-ext.o prj-nmsc.o \
292 prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \
293 rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
294 scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o \
295 sinfo.o sinput.o sinput-c.o sinput-p.o \
296 snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o switch.o switch-m.o \
297 table.o targparm.o tempdir.o tree_io.o types.o \
298 uintp.o uname.o urealp.o usage.o widechar.o \
299 $(EXTRA_GNATMAKE_OBJS)
301 # Convert the target variable into a space separated list of architecture,
302 # manufacturer, and operating system and assign each of those to its own
305 host:=$(subst -, ,$(host_canonical))
306 targ:=$(subst -, ,$(target))
307 arch:=$(word 1,$(targ))
308 ifeq ($(words $(targ)),2)
310 osys:=$(word 2,$(targ))
312 manu:=$(word 2,$(targ))
313 osys:=$(word 3,$(targ))
316 # Make arch match the current multilib so that the RTS selection code
317 # picks up the right files. For a given target this must be coherent
318 # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
320 ifeq ($(strip $(filter-out %x86_64, $(arch))),)
321 ifeq ($(strip $(MULTISUBDIR)),/32)
326 # ???: handle more multilib targets
328 # LIBGNAT_TARGET_PAIRS is a list of pairs of filenames.
329 # The members of each pair must be separated by a '<' and no whitespace.
330 # Each pair must be separated by some amount of whitespace from the following
335 LIBGNAT_TARGET_PAIRS = \
336 a-intnam.ads<a-intnam-dummy.ads \
337 s-inmaop.adb<s-inmaop-dummy.adb \
338 s-intman.adb<s-intman-dummy.adb \
339 s-osinte.ads<s-osinte-dummy.ads \
340 s-osprim.adb<s-osprim-posix.adb \
341 s-taprop.adb<s-taprop-dummy.adb \
342 s-taspri.ads<s-taspri-dummy.ads
344 # When using the GCC exception handling mechanism, we need to use an
345 # alternate body for a-exexpr.adb (a-exexpr-gcc.adb)
349 # Default shared object option. Note that we rely on the fact that the "soname"
350 # option will always be present and last in this flag, so that we can have
351 # $(SO_OPTS)libgnat-x.xx
353 SO_OPTS = -Wl,-soname,
355 # Default gnatlib-shared target.
356 # By default, equivalent to gnatlib.
357 # Set to gnatlib-shared-default, gnatlib-shared-dual, or a platform specific
358 # target when supported.
359 GNATLIB_SHARED = gnatlib
361 # default value for gnatmake's target dependent file
364 # By default, do not distribute prefix.o (in libgccprefix), since it is only
365 # needed by external GNAT tools such as gnatdist and Glide.
366 # Override this variable on native platforms when needed.
369 # To avoid duplicate code, use this variable to set PREFIX_OBJS when needed:
370 PREFIX_REAL_OBJS = ../prefix.o \
371 ../../libiberty/concat.o \
372 ../../libiberty/xmalloc.o \
373 ../../libiberty/xstrdup.o \
374 ../../libiberty/xexit.o
376 # By default, build socket support units. On platforms that do not support
377 # sockets, reset this variable to empty and add DUMMY_SOCKETS_TARGET_PAIRS
378 # to LIBGNAT_TARGET_PAIRS.
380 GNATRTL_SOCKETS_OBJS = g-soccon$(objext) g-socket$(objext) g-socthi$(objext) \
381 g-soliop$(objext) g-sothco$(objext) g-sttsne$(objext)
383 DUMMY_SOCKETS_TARGET_PAIRS = \
384 g-socket.adb<g-socket-dummy.adb \
385 g-socket.ads<g-socket-dummy.ads \
386 g-socthi.adb<g-socthi-dummy.adb \
387 g-socthi.ads<g-socthi-dummy.ads \
388 g-sothco.adb<g-sothco-dummy.adb \
389 g-sothco.ads<g-sothco-dummy.ads \
390 g-sttsne.ads<g-sttsne-dummy.ads
392 LIB_VERSION = $(strip $(shell grep ' Library_Version :' $(fsrcpfx)ada/gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/'))
394 # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
395 # $(strip STRING) removes leading and trailing spaces from STRING.
396 # If what's left is null then it's a match.
398 ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
399 LIBGNAT_TARGET_PAIRS = \
400 a-intnam.ads<a-intnam-vxworks.ads \
401 a-numaux.ads<a-numaux-vxworks.ads \
402 s-inmaop.adb<s-inmaop-posix.adb \
403 s-interr.adb<s-interr-hwint.adb \
404 s-intman.ads<s-intman-vxworks.ads \
405 s-intman.adb<s-intman-vxworks.adb \
406 s-osinte.adb<s-osinte-vxworks.adb \
407 s-osinte.ads<s-osinte-vxworks.ads \
408 s-osprim.adb<s-osprim-vxworks.adb \
409 s-parame.ads<s-parame-vxworks.ads \
410 s-parame.adb<s-parame-vxworks.adb \
411 s-stchop.ads<s-stchop-limit.ads \
412 s-stchop.adb<s-stchop-vxworks.adb \
413 s-taprop.adb<s-taprop-vxworks.adb \
414 s-taspri.ads<s-taspri-vxworks.ads \
415 s-tpopsp.adb<s-tpopsp-vxworks.adb \
416 s-vxwork.ads<s-vxwork-m68k.ads \
417 g-socthi.ads<g-socthi-vxworks.ads \
418 g-socthi.adb<g-socthi-vxworks.adb \
419 g-stsifd.adb<g-stsifd-sockets.adb \
420 g-sttsne.adb<g-sttsne-vxworks.adb \
421 g-sttsne.ads<g-sttsne-locking.ads \
422 g-trasym.ads<g-trasym-unimplemented.ads \
423 g-trasym.adb<g-trasym-unimplemented.adb \
424 system.ads<system-vxworks-m68k.ads
426 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
428 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
429 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
431 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
432 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
434 ifeq ($(strip $(filter-out yes,$(TRACE))),)
435 LIBGNAT_TARGET_PAIRS += \
436 s-traces.adb<s-traces-default.adb \
437 s-tratas.adb<s-tratas-default.adb \
438 s-trafor.adb<s-trafor-default.adb \
439 s-trafor.ads<s-trafor-default.ads \
440 s-tfsetr.adb<s-tfsetr-vxworks.adb
444 ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
445 LIBGNAT_TARGET_PAIRS = \
446 a-intnam.ads<a-intnam-vxworks.ads \
447 a-numaux.ads<a-numaux-vxworks.ads \
448 s-inmaop.adb<s-inmaop-posix.adb \
449 s-intman.ads<s-intman-vxworks.ads \
450 s-intman.adb<s-intman-vxworks.adb \
451 s-osinte.ads<s-osinte-vxworks.ads \
452 s-osinte.adb<s-osinte-vxworks.adb \
453 s-osprim.adb<s-osprim-vxworks.adb \
454 s-parame.ads<s-parame-vxworks.ads \
455 s-parame.adb<s-parame-vxworks.adb \
456 s-stchop.ads<s-stchop-limit.ads \
457 s-stchop.adb<s-stchop-vxworks.adb \
458 s-taprop.adb<s-taprop-vxworks.adb \
459 s-taspri.ads<s-taspri-vxworks.ads \
460 s-vxwork.ads<s-vxwork-ppc.ads \
461 g-socthi.ads<g-socthi-vxworks.ads \
462 g-socthi.adb<g-socthi-vxworks.adb \
463 g-stsifd.adb<g-stsifd-sockets.adb \
464 g-sttsne.adb<g-sttsne-vxworks.adb \
465 g-sttsne.ads<g-sttsne-locking.ads \
466 g-trasym.ads<g-trasym-unimplemented.ads \
467 g-trasym.adb<g-trasym-unimplemented.adb
470 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
471 indepsw.adb<indepsw-gnu.adb
473 ifeq ($(strip $(filter-out yes,$(TRACE))),)
474 LIBGNAT_TARGET_PAIRS += \
475 s-traces.adb<s-traces-default.adb \
476 s-trafor.adb<s-trafor-default.adb \
477 s-trafor.ads<s-trafor-default.ads \
478 s-tratas.adb<s-tratas-default.adb \
479 s-tfsetr.adb<s-tfsetr-vxworks.adb
482 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
483 LIBGNAT_TARGET_PAIRS += \
484 s-vxwext.ads<s-vxwext-rtp.ads \
485 s-vxwext.adb<s-vxwext-rtp.adb \
486 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
487 system.ads<system-vxworks-ppc-rtp.ads
489 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
491 LIBGNAT_TARGET_PAIRS += \
492 s-interr.adb<s-interr-hwint.adb \
493 s-tpopsp.adb<s-tpopsp-vxworks.adb
495 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
496 LIBGNAT_TARGET_PAIRS += \
497 s-vxwext.ads<s-vxwext-kernel.ads \
498 s-vxwext.adb<s-vxwext-kernel.adb \
499 system.ads<system-vxworks-ppc-kernel.ads
501 LIBGNAT_TARGET_PAIRS += \
502 system.ads<system-vxworks-ppc.ads
505 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
508 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
510 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
511 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
514 # vxworksae / vxworks 653
515 ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(targ))),)
516 # target pairs for kernel + vthreads runtime
517 LIBGNAT_TARGET_PAIRS = \
518 a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
519 a-intnam.ads<a-intnam-vxworks.ads \
520 a-numaux.ads<a-numaux-vxworks.ads \
521 g-io.adb<g-io-vxworks-ppc-cert.adb \
522 g-io.ads<g-io-vxworks-ppc-cert.ads \
523 s-inmaop.adb<s-inmaop-posix.adb \
524 s-interr.adb<s-interr-hwint.adb \
525 s-intman.ads<s-intman-vxworks.ads \
526 s-intman.adb<s-intman-vxworks.adb \
527 s-osinte.adb<s-osinte-vxworks.adb \
528 s-osinte.ads<s-osinte-vxworks.ads \
529 s-osprim.adb<s-osprim-vxworks.adb \
530 s-parame.ads<s-parame-ae653.ads \
531 s-parame.adb<s-parame-vxworks.adb \
532 s-taprop.adb<s-taprop-vxworks.adb \
533 s-taspri.ads<s-taspri-vxworks.ads \
534 s-tpopsp.adb<s-tpopsp-vxworks.adb \
535 s-vxwext.adb<s-vxwext-noints.adb \
536 s-vxwext.ads<s-vxwext-vthreads.ads \
537 s-vxwork.ads<s-vxwork-ppc.ads \
538 g-socthi.ads<g-socthi-vxworks.ads \
539 g-socthi.adb<g-socthi-vxworks.adb \
540 g-stsifd.adb<g-stsifd-sockets.adb \
541 g-sttsne.adb<g-sttsne-vxworks.adb \
542 g-sttsne.ads<g-sttsne-locking.ads \
543 g-trasym.ads<g-trasym-unimplemented.ads \
544 g-trasym.adb<g-trasym-unimplemented.adb \
545 system.ads<system-vxworks-ppc-vthread.ads
548 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
549 indepsw.adb<indepsw-gnu.adb
551 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
552 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
554 # Extra pairs for the vthreads runtime
555 ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
556 LIBGNAT_TARGET_PAIRS += \
557 s-thread.adb<s-thread-ae653.adb
558 EXTRA_GNATRTL_NONTASKING_OBJS += s-thread.o
561 ifeq ($(strip $(filter-out yes,$(TRACE))),)
562 LIBGNAT_TARGET_PAIRS += \
563 s-traces.adb<s-traces-default.adb \
564 s-trafor.adb<s-trafor-default.adb \
565 s-trafor.ads<s-trafor-default.ads \
566 s-tratas.adb<s-tratas-default.adb \
567 s-tfsetr.adb<s-tfsetr-vxworks.adb
571 # vxworksae / vxworks 653 for x86 (vxsim)
572 ifeq ($(strip $(filter-out %86 wrs vxworksae,$(targ))),)
573 # target pairs for kernel + vthreads runtime
574 LIBGNAT_TARGET_PAIRS = \
575 a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
576 a-intnam.ads<a-intnam-vxworks.ads \
577 a-numaux.ads<a-numaux-x86.ads \
578 a-numaux.adb<a-numaux-x86.adb \
579 a-sytaco.ads<1asytaco.ads \
580 a-sytaco.adb<1asytaco.adb \
581 g-bytswa.adb<g-bytswa-x86.adb \
582 g-io.adb<g-io-vxworks-ppc-cert.adb \
583 g-io.ads<g-io-vxworks-ppc-cert.ads \
584 s-inmaop.adb<s-inmaop-posix.adb \
585 s-interr.adb<s-interr-hwint.adb \
586 s-intman.ads<s-intman-vxworks.ads \
587 s-intman.adb<s-intman-vxworks.adb \
588 s-osinte.adb<s-osinte-vxworks.adb \
589 s-osinte.ads<s-osinte-vxworks.ads \
590 s-osprim.adb<s-osprim-vxworks.adb \
591 s-parame.ads<s-parame-ae653.ads \
592 s-taprop.adb<s-taprop-vxworks.adb \
593 s-taspri.ads<s-taspri-vxworks.ads \
594 s-thread.adb<s-thread-ae653.adb \
595 s-tpopsp.adb<s-tpopsp-vxworks.adb \
596 s-vxwext.adb<s-vxwext-noints.adb \
597 s-vxwext.ads<s-vxwext-vthreads.ads \
598 s-vxwork.ads<s-vxwork-x86.ads \
599 g-socthi.ads<g-socthi-vxworks.ads \
600 g-socthi.adb<g-socthi-vxworks.adb \
601 g-stsifd.adb<g-stsifd-sockets.adb \
602 g-sttsne.adb<g-sttsne-vxworks.adb \
603 g-sttsne.ads<g-sttsne-locking.ads \
604 g-trasym.ads<g-trasym-unimplemented.ads \
605 g-trasym.adb<g-trasym-unimplemented.adb \
606 system.ads<system-vxworks-x86.ads
609 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
610 indepsw.adb<indepsw-gnu.adb
612 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
613 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
615 # Extra pairs for the vthreads runtime
616 ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
617 LIBGNAT_TARGET_PAIRS += \
618 s-thread.adb<s-thread-ae653.adb
619 EXTRA_GNATRTL_NONTASKING_OBJS += s-thread.o
622 ifeq ($(strip $(filter-out yes,$(TRACE))),)
623 LIBGNAT_TARGET_PAIRS += \
624 s-traces.adb<s-traces-default.adb \
625 s-trafor.adb<s-trafor-default.adb \
626 s-trafor.ads<s-trafor-default.ads \
627 s-tratas.adb<s-tratas-default.adb \
628 s-tfsetr.adb<s-tfsetr-vxworks.adb
632 ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
633 LIBGNAT_TARGET_PAIRS = \
634 a-intnam.ads<a-intnam-vxworks.ads \
635 a-numaux.ads<a-numaux-vxworks.ads \
636 s-inmaop.adb<s-inmaop-posix.adb \
637 s-interr.adb<s-interr-hwint.adb \
638 s-intman.ads<s-intman-vxworks.ads \
639 s-intman.adb<s-intman-vxworks.adb \
640 s-osinte.adb<s-osinte-vxworks.adb \
641 s-osinte.ads<s-osinte-vxworks.ads \
642 s-osprim.adb<s-osprim-vxworks.adb \
643 s-parame.ads<s-parame-vxworks.ads \
644 s-parame.adb<s-parame-vxworks.adb \
645 s-stchop.ads<s-stchop-limit.ads \
646 s-stchop.adb<s-stchop-vxworks.adb \
647 s-taprop.adb<s-taprop-vxworks.adb \
648 s-taspri.ads<s-taspri-vxworks.ads \
649 s-tpopsp.adb<s-tpopsp-vxworks.adb \
650 s-vxwork.ads<s-vxwork-sparcv9.ads \
651 g-socthi.ads<g-socthi-vxworks.ads \
652 g-socthi.adb<g-socthi-vxworks.adb \
653 g-stsifd.adb<g-stsifd-sockets.adb \
654 g-sttsne.adb<g-sttsne-vxworks.adb \
655 g-sttsne.ads<g-sttsne-locking.ads \
656 g-trasym.ads<g-trasym-unimplemented.ads \
657 g-trasym.adb<g-trasym-unimplemented.adb \
658 system.ads<system-vxworks-sparcv9.ads \
661 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
662 indepsw.adb<indepsw-gnu.adb
664 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
665 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
667 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
668 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
671 ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
672 LIBGNAT_TARGET_PAIRS = \
673 a-intnam.ads<a-intnam-vxworks.ads \
674 i-vxwork.ads<i-vxwork-x86.ads \
675 s-osinte.adb<s-osinte-vxworks.adb \
676 s-osinte.ads<s-osinte-vxworks.ads \
677 s-inmaop.adb<s-inmaop-posix.adb \
678 s-intman.ads<s-intman-vxworks.ads \
679 s-intman.adb<s-intman-vxworks.adb \
680 a-numaux.adb<a-numaux-x86.adb \
681 a-numaux.ads<a-numaux-x86.ads \
682 s-osprim.adb<s-osprim-vxworks.adb \
683 s-parame.ads<s-parame-vxworks.ads \
684 s-parame.adb<s-parame-vxworks.adb \
685 s-stchop.ads<s-stchop-limit.ads \
686 s-stchop.adb<s-stchop-vxworks.adb \
687 s-taprop.adb<s-taprop-vxworks.adb \
688 s-taspri.ads<s-taspri-vxworks.ads \
689 s-vxwork.ads<s-vxwork-x86.ads \
690 g-bytswa.adb<g-bytswa-x86.adb \
691 g-socthi.ads<g-socthi-vxworks.ads \
692 g-socthi.adb<g-socthi-vxworks.adb \
693 g-stsifd.adb<g-stsifd-sockets.adb \
694 g-sttsne.adb<g-sttsne-vxworks.adb \
695 g-sttsne.ads<g-sttsne-locking.ads \
696 g-trasym.ads<g-trasym-unimplemented.ads \
697 g-trasym.adb<g-trasym-unimplemented.adb
700 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
701 indepsw.adb<indepsw-gnu.adb
703 ifeq ($(strip $(filter-out yes,$(TRACE))),)
704 LIBGNAT_TARGET_PAIRS += \
705 s-traces.adb<s-traces-default.adb \
706 s-trafor.adb<s-trafor-default.adb \
707 s-trafor.ads<s-trafor-default.ads \
708 s-tratas.adb<s-tratas-default.adb \
709 s-tfsetr.adb<s-tfsetr-vxworks.adb
712 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
713 LIBGNAT_TARGET_PAIRS += \
714 s-vxwext.ads<s-vxwext-rtp.ads \
715 s-vxwext.adb<s-vxwext-rtp.adb \
716 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
717 system.ads<system-vxworks-x86-rtp.ads
719 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
721 LIBGNAT_TARGET_PAIRS += \
722 s-interr.adb<s-interr-hwint.adb \
723 s-tpopsp.adb<s-tpopsp-vxworks.adb
725 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
726 LIBGNAT_TARGET_PAIRS += \
727 s-vxwext.ads<s-vxwext-kernel.ads \
728 s-vxwext.adb<s-vxwext-kernel.adb \
729 system.ads<system-vxworks-x86-kernel.ads
731 LIBGNAT_TARGET_PAIRS += \
732 system.ads<system-vxworks-x86.ads
735 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
738 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
740 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
741 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
744 ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
745 LIBGNAT_TARGET_PAIRS = \
746 a-intnam.ads<a-intnam-vxworks.ads \
747 a-numaux.ads<a-numaux-vxworks.ads \
748 s-inmaop.adb<s-inmaop-posix.adb \
749 s-interr.adb<s-interr-hwint.adb \
750 s-intman.ads<s-intman-vxworks.ads \
751 s-intman.adb<s-intman-vxworks.adb \
752 s-osinte.adb<s-osinte-vxworks.adb \
753 s-osinte.ads<s-osinte-vxworks.ads \
754 s-osprim.adb<s-osprim-vxworks.adb \
755 s-parame.ads<s-parame-vxworks.ads \
756 s-parame.adb<s-parame-vxworks.adb \
757 s-stchop.ads<s-stchop-limit.ads \
758 s-stchop.adb<s-stchop-vxworks.adb \
759 s-taprop.adb<s-taprop-vxworks.adb \
760 s-taspri.ads<s-taspri-vxworks.ads \
761 s-tpopsp.adb<s-tpopsp-vxworks.adb \
762 s-vxwork.ads<s-vxwork-arm.ads \
763 g-socthi.ads<g-socthi-vxworks.ads \
764 g-socthi.adb<g-socthi-vxworks.adb \
765 g-stsifd.adb<g-stsifd-sockets.adb \
766 g-sttsne.adb<g-sttsne-vxworks.adb \
767 g-sttsne.ads<g-sttsne-locking.ads \
768 g-trasym.ads<g-trasym-unimplemented.ads \
769 g-trasym.adb<g-trasym-unimplemented.adb \
770 system.ads<system-vxworks-arm.ads
773 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
774 indepsw.adb<indepsw-gnu.adb
776 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
777 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
779 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
780 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
783 ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
784 LIBGNAT_TARGET_PAIRS = \
785 a-intnam.ads<a-intnam-vxworks.ads \
786 a-numaux.ads<a-numaux-vxworks.ads \
787 s-inmaop.adb<s-inmaop-posix.adb \
788 s-interr.adb<s-interr-hwint.adb \
789 s-intman.ads<s-intman-vxworks.ads \
790 s-intman.adb<s-intman-vxworks.adb \
791 s-osinte.adb<s-osinte-vxworks.adb \
792 s-osinte.ads<s-osinte-vxworks.ads \
793 s-osprim.adb<s-osprim-vxworks.adb \
794 s-parame.ads<s-parame-vxworks.ads \
795 s-parame.adb<s-parame-vxworks.adb \
796 s-stchop.ads<s-stchop-limit.ads \
797 s-stchop.adb<s-stchop-vxworks.adb \
798 s-taprop.adb<s-taprop-vxworks.adb \
799 s-taspri.ads<s-taspri-vxworks.ads \
800 s-tpopsp.adb<s-tpopsp-vxworks.adb \
801 s-vxwork.ads<s-vxwork-mips.ads \
802 g-socthi.ads<g-socthi-vxworks.ads \
803 g-socthi.adb<g-socthi-vxworks.adb \
804 g-stsifd.adb<g-stsifd-sockets.adb \
805 g-sttsne.adb<g-sttsne-vxworks.adb \
806 g-sttsne.ads<g-sttsne-locking.ads \
807 g-trasym.ads<g-trasym-unimplemented.ads \
808 g-trasym.adb<g-trasym-unimplemented.adb \
809 system.ads<system-vxworks-mips.ads
812 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
813 indepsw.adb<indepsw-gnu.adb
815 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
816 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
818 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
819 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
822 ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
823 LIBGNAT_TARGET_PAIRS_COMMON = \
824 a-intnam.ads<a-intnam-solaris.ads \
825 s-inmaop.adb<s-inmaop-posix.adb \
826 s-intman.adb<s-intman-solaris.adb \
827 s-osinte.adb<s-osinte-solaris.adb \
828 s-osinte.ads<s-osinte-solaris.ads \
829 s-osprim.adb<s-osprim-solaris.adb \
830 s-taprop.adb<s-taprop-solaris.adb \
831 s-tasinf.adb<s-tasinf-solaris.adb \
832 s-tasinf.ads<s-tasinf-solaris.ads \
833 s-taspri.ads<s-taspri-solaris.ads \
834 s-tpopsp.adb<s-tpopsp-solaris.adb \
835 g-soliop.ads<g-soliop-solaris.ads
837 LIBGNAT_TARGET_PAIRS_32 = \
838 system.ads<system-solaris-sparc.ads
840 LIBGNAT_TARGET_PAIRS_64 = \
841 system.ads<system-solaris-sparcv9.ads
843 ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
844 ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
845 LIBGNAT_TARGET_PAIRS = \
846 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
848 LIBGNAT_TARGET_PAIRS = \
849 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
852 ifeq ($(strip $(MULTISUBDIR)),/sparcv7)
853 LIBGNAT_TARGET_PAIRS = \
854 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
856 LIBGNAT_TARGET_PAIRS = \
857 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
861 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
864 THREADSLIB = -lposix4 -lthread
865 MISCLIB = -lposix4 -lnsl -lsocket
867 GNATLIB_SHARED = gnatlib-shared-dual
869 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
870 LIBRARY_VERSION := $(LIB_VERSION)
872 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
873 LIBGNAT_TARGET_PAIRS = \
874 a-intnam.ads<a-intnam-solaris.ads \
875 s-inmaop.adb<s-inmaop-posix.adb \
876 s-intman.adb<s-intman-posix.adb \
877 s-osinte.adb<s-osinte-posix.adb \
878 s-osinte.ads<s-osinte-solaris-posix.ads \
879 s-osprim.adb<s-osprim-solaris.adb \
880 s-taprop.adb<s-taprop-posix.adb \
881 s-taspri.ads<s-taspri-posix.ads \
882 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
883 g-soliop.ads<g-soliop-solaris.ads \
884 system.ads<system-solaris-sparc.ads
886 THREADSLIB = -lposix4 -lpthread
889 ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),)
890 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
894 ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
895 LIBGNAT_TARGET_PAIRS = \
896 a-numaux.adb<a-numaux-x86.adb \
897 a-numaux.ads<a-numaux-x86.ads \
898 a-intnam.ads<a-intnam-solaris.ads \
899 s-inmaop.adb<s-inmaop-posix.adb \
900 s-intman.adb<s-intman-solaris.adb \
901 s-osinte.adb<s-osinte-solaris.adb \
902 s-osinte.ads<s-osinte-solaris.ads \
903 s-osprim.adb<s-osprim-solaris.adb \
904 s-taprop.adb<s-taprop-solaris.adb \
905 s-tasinf.adb<s-tasinf-solaris.adb \
906 s-tasinf.ads<s-tasinf-solaris.ads \
907 s-taspri.ads<s-taspri-solaris.ads \
908 s-tpopsp.adb<s-tpopsp-solaris.adb \
909 g-soliop.ads<g-soliop-solaris.ads
911 ifeq ($(strip $(MULTISUBDIR)),/amd64)
912 LIBGNAT_TARGET_PAIRS += \
913 system.ads<system-solaris-x86_64.ads
915 LIBGNAT_TARGET_PAIRS += \
916 g-bytswa.adb<g-bytswa-x86.adb \
917 system.ads<system-solaris-x86.ads
920 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
923 THREADSLIB = -lposix4 -lthread
924 MISCLIB = -lposix4 -lnsl -lsocket
926 GNATLIB_SHARED = gnatlib-shared-dual
928 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
929 LIBRARY_VERSION := $(LIB_VERSION)
932 ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
933 LIBGNAT_TARGET_PAIRS = \
934 a-intnam.ads<a-intnam-linux.ads \
935 a-numaux.adb<a-numaux-x86.adb \
936 a-numaux.ads<a-numaux-x86.ads \
937 g-bytswa.adb<g-bytswa-x86.adb \
938 s-inmaop.adb<s-inmaop-posix.adb \
939 s-intman.adb<s-intman-posix.adb \
940 s-taspri.ads<s-taspri-posix.ads \
941 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
942 g-sercom.adb<g-sercom-linux.adb
944 ifeq ($(strip $(filter-out marte,$(THREAD_KIND))),)
945 LIBGNAT_TARGET_PAIRS += \
946 a-exetim.adb<a-exetim-linux-marte.adb \
947 a-exetim.ads<a-exetim-linux-marte.ads \
948 a-extiti.adb<a-extiti-linux-marte.adb \
949 a-extiti.ads<a-extiti-linux-marte.ads \
950 a-rttiev.adb<a-rttiev-linux-marte.adb \
951 a-rttiev.ads<a-rttiev-linux-marte.ads \
952 s-osinte.adb<s-osinte-linux-marte.adb \
953 s-osinte.ads<s-osinte-linux-marte.ads \
954 s-osprim.adb<s-osprim-posix.adb \
955 s-taprop.adb<s-taprop-linux-marte.adb \
956 system.ads<system-linux-x86.ads
958 EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o a-extiti.o
963 LIBGNAT_TARGET_PAIRS += \
964 s-linux.ads<s-linux.ads \
965 s-osinte.adb<s-osinte-posix.adb
967 ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
968 LIBGNAT_TARGET_PAIRS += \
969 s-osinte.ads<s-osinte-linux-xenomai.ads \
970 s-osprim.adb<s-osprim-linux-xenomai.adb \
971 s-taprop.adb<s-taprop-linux-xenomai.adb \
972 system.ads<system-linux-x86-xenomai.ads
976 LIBGNAT_TARGET_PAIRS += \
977 s-osinte.ads<s-osinte-linux.ads \
978 s-osprim.adb<s-osprim-posix.adb \
979 s-taprop.adb<s-taprop-linux.adb \
980 s-tasinf.ads<s-tasinf-linux.ads \
981 s-tasinf.adb<s-tasinf-linux.adb \
982 system.ads<system-linux-x86.ads
987 THREADSLIB = -lpthread
988 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
991 TOOLS_TARGET_PAIRS = \
992 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
993 indepsw.adb<indepsw-gnu.adb
995 GNATLIB_SHARED = gnatlib-shared-dual
997 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
998 LIBRARY_VERSION := $(LIB_VERSION)
1001 ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
1002 LIBGNAT_TARGET_PAIRS = \
1003 a-intnam.ads<a-intnam-freebsd.ads \
1004 a-numaux.adb<a-numaux-x86.adb \
1005 a-numaux.ads<a-numaux-x86.ads \
1006 s-inmaop.adb<s-inmaop-posix.adb \
1007 s-intman.adb<s-intman-posix.adb \
1008 s-osinte.adb<s-osinte-posix.adb \
1009 s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
1010 s-osprim.adb<s-osprim-posix.adb \
1011 s-taprop.adb<s-taprop-linux.adb \
1012 s-tasinf.ads<s-tasinf-linux.ads \
1013 s-tasinf.adb<s-tasinf-linux.adb \
1014 s-taspri.ads<s-taspri-posix.ads \
1015 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1016 system.ads<system-freebsd-x86.ads
1018 TOOLS_TARGET_PAIRS = \
1019 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1020 indepsw.adb<indepsw-gnu.adb
1023 THREADSLIB = -lpthread
1024 GNATLIB_SHARED = gnatlib-shared-dual
1026 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1027 LIBRARY_VERSION := $(LIB_VERSION)
1030 ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
1031 LIBGNAT_TARGET_PAIRS = \
1032 a-intnam.ads<a-intnam-freebsd.ads \
1033 a-numaux.adb<a-numaux-x86.adb \
1034 a-numaux.ads<a-numaux-x86.ads \
1035 g-bytswa.adb<g-bytswa-x86.adb \
1036 s-inmaop.adb<s-inmaop-posix.adb \
1037 s-intman.adb<s-intman-posix.adb \
1038 s-osinte.adb<s-osinte-freebsd.adb \
1039 s-osinte.ads<s-osinte-freebsd.ads \
1040 s-osprim.adb<s-osprim-posix.adb \
1041 s-taprop.adb<s-taprop-posix.adb \
1042 s-taspri.ads<s-taspri-posix.ads \
1043 s-tpopsp.adb<s-tpopsp-posix.adb \
1044 system.ads<system-freebsd-x86.ads
1046 TOOLS_TARGET_PAIRS = \
1047 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
1048 GNATLIB_SHARED = gnatlib-shared-dual
1051 THREADSLIB= -lpthread
1053 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1054 LIBRARY_VERSION := $(LIB_VERSION)
1057 ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
1058 LIBGNAT_TARGET_PAIRS_COMMON = \
1059 a-intnam.ads<a-intnam-linux.ads \
1060 s-inmaop.adb<s-inmaop-posix.adb \
1061 s-intman.adb<s-intman-posix.adb \
1062 s-linux.ads<s-linux.ads \
1063 s-osinte.adb<s-osinte-posix.adb \
1064 s-osinte.ads<s-osinte-linux.ads \
1065 s-osprim.adb<s-osprim-posix.adb \
1066 s-taprop.adb<s-taprop-linux.adb \
1067 s-tasinf.ads<s-tasinf-linux.ads \
1068 s-tasinf.adb<s-tasinf-linux.adb \
1069 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1070 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1071 g-trasym.ads<g-trasym-unimplemented.ads \
1072 g-trasym.adb<g-trasym-unimplemented.adb
1074 LIBGNAT_TARGET_PAIRS_32 = \
1075 system.ads<system-linux-s390.ads
1077 LIBGNAT_TARGET_PAIRS_64 = \
1078 system.ads<system-linux-s390x.ads
1080 ifeq ($(strip $(filter-out s390x,$(arch))),)
1081 ifeq ($(strip $(MULTISUBDIR)),/32)
1082 LIBGNAT_TARGET_PAIRS = \
1083 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1085 LIBGNAT_TARGET_PAIRS = \
1086 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1089 LIBGNAT_TARGET_PAIRS = \
1090 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1093 TOOLS_TARGET_PAIRS = \
1094 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1095 indepsw.adb<indepsw-gnu.adb
1097 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1099 THREADSLIB = -lpthread
1100 GNATLIB_SHARED = gnatlib-shared-dual
1101 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1102 LIBRARY_VERSION := $(LIB_VERSION)
1105 ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
1106 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
1107 LIBGNAT_TARGET_PAIRS = \
1108 a-intnam.ads<a-intnam-irix.ads \
1109 s-inmaop.adb<s-inmaop-posix.adb \
1110 s-intman.adb<s-intman-irix.adb \
1111 s-mastop.adb<s-mastop-irix.adb \
1112 s-osinte.adb<s-osinte-irix.adb \
1113 s-osinte.ads<s-osinte-irix.ads \
1114 s-osprim.adb<s-osprim-posix.adb \
1115 s-proinf.adb<s-proinf-irix-athread.adb \
1116 s-proinf.ads<s-proinf-irix-athread.ads \
1117 s-taprop.adb<s-taprop-irix.adb \
1118 s-tasinf.ads<s-tasinf-irix.ads \
1119 s-taspri.ads<s-taspri-posix.ads \
1120 s-tpopsp.adb<s-tpopsp-posix.adb \
1121 s-traceb.adb<s-traceb-mastop.adb
1123 ifeq ($(strip $(MULTISUBDIR)),/64)
1124 LIBGNAT_TARGET_PAIRS += \
1125 system.ads<system-irix-n64.ads
1127 ifeq ($(strip $(MULTISUBDIR)),/32)
1128 LIBGNAT_TARGET_PAIRS += \
1129 system.ads<system-irix-o32.ads
1131 LIBGNAT_TARGET_PAIRS += \
1132 system.ads<system-irix-n32.ads
1136 THREADSLIB = -lpthread
1137 GNATLIB_SHARED = gnatlib-shared-default
1140 LIBGNAT_TARGET_PAIRS += \
1141 s-mastop.adb<s-mastop-irix.adb \
1142 s-osprim.adb<s-osprim-posix.adb \
1143 s-traceb.adb<s-traceb-mastop.adb \
1144 system.ads<system-irix-o32.ads
1148 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-irix.adb
1151 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1152 LIBRARY_VERSION := $(LIB_VERSION)
1156 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
1157 LIBGNAT_TARGET_PAIRS = \
1158 a-excpol.adb<a-excpol-abort.adb \
1159 a-intnam.ads<a-intnam-hpux.ads \
1160 s-inmaop.adb<s-inmaop-posix.adb \
1161 s-interr.adb<s-interr-sigaction.adb \
1162 s-intman.adb<s-intman-posix.adb \
1163 s-osinte.adb<s-osinte-hpux-dce.adb \
1164 s-osinte.ads<s-osinte-hpux-dce.ads \
1165 s-parame.ads<s-parame-hpux.ads \
1166 s-osprim.adb<s-osprim-posix.adb \
1167 s-taprop.adb<s-taprop-hpux-dce.adb \
1168 s-taspri.ads<s-taspri-hpux-dce.ads \
1169 s-tpopsp.adb<s-tpopsp-posix.adb \
1170 system.ads<system-hpux.ads
1173 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1176 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
1177 LIBGNAT_TARGET_PAIRS = \
1178 a-intnam.ads<a-intnam-hpux.ads \
1179 s-inmaop.adb<s-inmaop-posix.adb \
1180 s-intman.adb<s-intman-posix.adb \
1181 s-osinte.adb<s-osinte-posix.adb \
1182 s-osinte.ads<s-osinte-hpux.ads \
1183 s-parame.ads<s-parame-hpux.ads \
1184 s-osprim.adb<s-osprim-posix.adb \
1185 s-traceb.adb<s-traceb-hpux.adb \
1186 s-taprop.adb<s-taprop-posix.adb \
1187 s-taspri.ads<s-taspri-posix.ads \
1188 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1189 system.ads<system-hpux.ads
1191 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb
1193 TGT_LIB = /usr/lib/libcl.a
1194 THREADSLIB = -lpthread
1198 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1199 GNATLIB_SHARED = gnatlib-shared-dual
1200 LIBRARY_VERSION := $(LIB_VERSION)
1203 ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
1204 LIBGNAT_TARGET_PAIRS = \
1205 a-intnam.ads<a-intnam-aix.ads \
1206 s-inmaop.adb<s-inmaop-posix.adb \
1207 s-intman.adb<s-intman-posix.adb \
1208 s-osinte.adb<s-osinte-aix.adb \
1209 s-osinte.ads<s-osinte-aix.ads \
1210 s-osprim.adb<s-osprim-posix.adb \
1211 s-taprop.adb<s-taprop-posix.adb \
1212 s-taspri.ads<s-taspri-posix.ads \
1213 s-tpopsp.adb<s-tpopsp-posix.adb \
1214 system.ads<system-aix.ads
1216 THREADSLIB = -lpthreads
1217 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1219 TOOLS_TARGET_PAIRS = \
1220 mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
1221 indepsw.adb<indepsw-aix.adb
1226 ifeq ($(strip $(filter-out lynxos,$(osys))),)
1227 TOOLS_TARGET_PAIRS = \
1228 mlib-tgt-specific.adb<mlib-tgt-specific-lynxos.adb \
1229 indepsw.adb<indepsw-gnu.adb
1231 ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
1232 LIBGNAT_TARGET_PAIRS = \
1233 a-numaux.adb<a-numaux-x86.adb \
1234 a-numaux.ads<a-numaux-x86.ads \
1235 a-intnam.ads<a-intnam-lynxos.ads \
1236 g-bytswa.adb<g-bytswa-x86.adb \
1237 g-sttsne.adb<g-sttsne-locking.adb \
1238 g-sttsne.ads<g-sttsne-locking.ads \
1239 s-inmaop.adb<s-inmaop-posix.adb \
1240 s-intman.adb<s-intman-posix.adb \
1241 s-osinte.adb<s-osinte-lynxos.adb \
1242 s-osinte.ads<s-osinte-lynxos.ads \
1243 s-osprim.adb<s-osprim-posix.adb \
1244 s-taprop.adb<s-taprop-lynxos.adb \
1245 s-taspri.ads<s-taspri-lynxos.ads \
1246 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1247 g-trasym.ads<g-trasym-unimplemented.ads \
1248 g-trasym.adb<g-trasym-unimplemented.adb \
1249 system.ads<system-lynxos-x86.ads
1251 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1254 LIBGNAT_TARGET_PAIRS = \
1255 a-intnam.ads<a-intnam-lynxos.ads \
1256 g-sttsne.adb<g-sttsne-locking.adb \
1257 g-sttsne.ads<g-sttsne-locking.ads \
1258 s-inmaop.adb<s-inmaop-posix.adb \
1259 s-intman.adb<s-intman-posix.adb \
1260 s-osinte.adb<s-osinte-lynxos.adb \
1261 s-osinte.ads<s-osinte-lynxos.ads \
1262 s-osprim.adb<s-osprim-posix.adb \
1263 s-taprop.adb<s-taprop-lynxos.adb \
1264 s-taspri.ads<s-taspri-lynxos.ads \
1265 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1266 g-trasym.ads<g-trasym-unimplemented.ads \
1267 g-trasym.adb<g-trasym-unimplemented.adb \
1268 system.ads<system-lynxos-ppc.ads
1272 ifeq ($(strip $(filter-out rtems%,$(osys))),)
1273 LIBGNAT_TARGET_PAIRS = \
1274 system.ads<system-rtems.ads \
1275 a-intnam.ads<a-intnam-rtems.ads \
1276 s-inmaop.adb<s-inmaop-posix.adb \
1277 s-intman.adb<s-intman-posix.adb \
1278 s-osinte.adb<s-osinte-rtems.adb \
1279 s-osinte.ads<s-osinte-rtems.ads \
1280 s-osprim.adb<s-osprim-posix.adb \
1281 s-parame.adb<s-parame-rtems.adb \
1282 s-taprop.adb<s-taprop-posix.adb \
1283 s-taspri.ads<s-taspri-posix.ads \
1284 s-tpopsp.adb<s-tpopsp-rtems.adb \
1285 s-stchop.adb<s-stchop-rtems.adb \
1286 s-interr.adb<s-interr-hwint.adb \
1287 g-trasym.ads<g-trasym-unimplemented.ads \
1288 g-trasym.adb<g-trasym-unimplemented.adb
1291 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
1292 LIBGNAT_TARGET_PAIRS = \
1293 a-intnam.ads<a-intnam-tru64.ads \
1294 s-inmaop.adb<s-inmaop-posix.adb \
1295 s-intman.adb<s-intman-posix.adb \
1296 s-mastop.adb<s-mastop-tru64.adb \
1297 s-osinte.adb<s-osinte-tru64.adb \
1298 s-osinte.ads<s-osinte-tru64.ads \
1299 s-osprim.adb<s-osprim-unix.adb \
1300 s-taprop.adb<s-taprop-tru64.adb \
1301 s-tasinf.ads<s-tasinf-tru64.ads \
1302 s-taspri.ads<s-taspri-tru64.ads \
1303 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1304 s-traceb.adb<s-traceb-mastop.adb \
1305 system.ads<system-tru64.ads
1307 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb
1311 THREADSLIB = -lpthread -lmach -lexc -lrt
1312 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1313 GNATLIB_SHARED = gnatlib-shared-default
1314 LIBRARY_VERSION := $(LIB_VERSION)
1317 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
1327 @ gnu:[bin]vmssymvec $<
1330 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1331 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1332 LIBGNAT_TARGET_PAIRS_AUX1 = \
1333 g-enblsp.adb<g-enblsp-vms-ia64.adb \
1334 g-trasym.adb<g-trasym-vms-ia64.adb \
1335 s-asthan.adb<s-asthan-vms-ia64.adb \
1336 s-osinte.adb<s-osinte-vms-ia64.adb \
1337 s-osinte.ads<s-osinte-vms-ia64.ads \
1338 s-vaflop.adb<s-vaflop-vms-ia64.adb \
1339 g-trasym.ads<g-trasym-unimplemented.ads \
1340 g-trasym.adb<g-trasym-unimplemented.adb \
1341 system.ads<system-vms-ia64.ads
1343 LIBGNAT_TARGET_PAIRS_AUX2 = \
1344 s-parame.ads<s-parame-vms-ia64.ads
1346 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1347 LIBGNAT_TARGET_PAIRS_AUX1 = \
1348 g-enblsp.adb<g-enblsp-vms-alpha.adb \
1349 g-trasym.adb<g-trasym-vms-alpha.adb \
1350 s-traent.adb<s-traent-vms.adb \
1351 s-traent.ads<s-traent-vms.ads \
1352 s-asthan.adb<s-asthan-vms-alpha.adb \
1353 s-osinte.adb<s-osinte-vms.adb \
1354 s-osinte.ads<s-osinte-vms.ads \
1355 s-vaflop.adb<s-vaflop-vms-alpha.adb \
1356 system.ads<system-vms_64.ads
1358 ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1359 LIBGNAT_TARGET_PAIRS_AUX2 = \
1360 s-parame.ads<s-parame-vms-restrict.ads
1362 LIBGNAT_TARGET_PAIRS_AUX2 = \
1363 s-parame.ads<s-parame-vms-alpha.ads
1368 LIBGNAT_TARGET_PAIRS = \
1369 a-caldel.adb<a-caldel-vms.adb \
1370 a-calend.adb<a-calend-vms.adb \
1371 a-calend.ads<a-calend-vms.ads \
1372 a-dirval.adb<a-dirval-vms.adb \
1373 a-excpol.adb<a-excpol-abort.adb \
1374 a-intnam.ads<a-intnam-vms.ads \
1375 a-numaux.ads<a-numaux-vms.ads \
1376 g-expect.adb<g-expect-vms.adb \
1377 g-socthi.ads<g-socthi-vms.ads \
1378 g-socthi.adb<g-socthi-vms.adb \
1379 g-stsifd.adb<g-stsifd-sockets.adb \
1380 g-sttsne.adb<g-sttsne-locking.adb \
1381 g-sttsne.ads<g-sttsne-locking.ads \
1382 i-c.ads<i-c-vms_64.ads \
1383 i-cstrin.ads<i-cstrin-vms_64.ads \
1384 i-cstrin.adb<i-cstrin-vms_64.adb \
1385 i-cpoint.ads<i-cpoint-vms_64.ads \
1386 i-cpoint.adb<i-cpoint-vms_64.adb \
1387 i-cstrea.adb<i-cstrea-vms.adb \
1388 memtrack.adb<memtrack-vms_64.adb \
1389 s-auxdec.ads<s-auxdec-vms_64.ads \
1390 s-crtl.ads<s-crtl-vms_64.ads \
1391 s-inmaop.adb<s-inmaop-vms.adb \
1392 s-interr.adb<s-interr-vms.adb \
1393 s-intman.adb<s-intman-vms.adb \
1394 s-intman.ads<s-intman-vms.ads \
1395 s-memory.adb<s-memory-vms_64.adb \
1396 s-memory.ads<s-memory-vms_64.ads \
1397 s-osprim.adb<s-osprim-vms.adb \
1398 s-osprim.ads<s-osprim-vms.ads \
1399 s-taprop.adb<s-taprop-vms.adb \
1400 s-tasdeb.adb<s-tasdeb-vms.adb \
1401 s-taspri.ads<s-taspri-vms.ads \
1402 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1403 s-tpopde.adb<s-tpopde-vms.adb \
1404 s-tpopde.ads<s-tpopde-vms.ads \
1405 $(LIBGNAT_TARGET_PAIRS_AUX1) \
1406 $(LIBGNAT_TARGET_PAIRS_AUX2)
1408 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1409 TOOLS_TARGET_PAIRS= \
1410 mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
1411 symbols.adb<symbols-vms.adb \
1412 symbols-processing.adb<symbols-processing-vms-ia64.adb
1414 TOOLS_TARGET_PAIRS= \
1415 mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
1416 symbols.adb<symbols-vms.adb \
1417 symbols-processing.adb<symbols-processing-vms-alpha.adb
1420 adamsg.o: adamsg.msg
1421 -$(DECC) --cc=message adamsg.msg -o adamsg.o
1423 EXTRA_GNATMAKE_OBJS = mlib-tgt-vms_common.o
1427 GNATLIB_SHARED=gnatlib-shared-vms
1428 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1429 EXTRA_LIBGNAT_SRCS=vmshandler.asm
1430 EXTRA_LIBGNAT_OBJS=vmshandler.o
1432 EXTRA_LIBGNAT_SRCS+=adamsg.msg
1433 EXTRA_LIBGNAT_OBJS+=adamsg.o
1434 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1436 ../../gnatlbr$(exeext) \
1437 ../../gnatsym$(exeext) \
1438 ../../vms_help$(exeext) \
1440 # This command transforms (YYYYMMDD) into YY,MMDD
1441 GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)ada/gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\).*/\2,\3/')
1442 TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1443 LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1446 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1447 LIBGNAT_TARGET_PAIRS = \
1448 a-dirval.adb<a-dirval-mingw.adb \
1449 a-excpol.adb<a-excpol-abort.adb \
1450 a-numaux.adb<a-numaux-x86.adb \
1451 a-numaux.ads<a-numaux-x86.ads \
1452 s-gloloc.adb<s-gloloc-mingw.adb \
1453 s-inmaop.adb<s-inmaop-dummy.adb \
1454 s-memory.adb<s-memory-mingw.adb \
1455 s-taspri.ads<s-taspri-mingw.ads \
1456 s-tasinf.adb<s-tasinf-mingw.adb \
1457 s-tasinf.ads<s-tasinf-mingw.ads \
1458 g-bytswa.adb<g-bytswa-x86.adb \
1459 g-socthi.ads<g-socthi-mingw.ads \
1460 g-socthi.adb<g-socthi-mingw.adb \
1461 g-stsifd.adb<g-stsifd-sockets.adb \
1462 g-soliop.ads<g-soliop-mingw.ads
1464 ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
1465 LIBGNAT_TARGET_PAIRS += \
1466 s-intman.adb<s-intman-dummy.adb \
1467 s-osinte.ads<s-osinte-rtx.ads \
1468 s-osprim.adb<s-osprim-rtx.adb \
1469 s-taprop.adb<s-taprop-rtx.adb
1471 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o
1473 ifeq ($(strip $(filter-out rtx_w32,$(THREAD_KIND))),)
1474 LIBGNAT_TARGET_PAIRS += system.ads<system-rtx.ads
1478 LIBGNAT_TARGET_PAIRS += \
1479 system.ads<system-rtx-rtss.ads \
1480 s-parame.adb<s-parame-vxworks.adb
1486 LIBGNAT_TARGET_PAIRS += \
1487 a-exetim.adb<a-exetim-mingw.adb \
1488 a-exetim.ads<a-exetim-mingw.ads \
1489 a-intnam.ads<a-intnam-mingw.ads \
1490 g-sercom.adb<g-sercom-mingw.adb \
1491 s-interr.adb<s-interr-sigaction.adb \
1492 s-intman.adb<s-intman-mingw.adb \
1493 s-osinte.ads<s-osinte-mingw.ads \
1494 s-osprim.adb<s-osprim-mingw.adb \
1495 s-taprop.adb<s-taprop-mingw.adb
1497 ifeq ($(strip $(filter-out x86_64%,$(arch))),)
1498 LIBGNAT_TARGET_PAIRS += \
1499 system.ads<system-mingw-x86_64.ads
1501 LIBGNAT_TARGET_PAIRS += \
1502 system.ads<system-mingw.ads
1505 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o s-winext.o g-regist.o
1506 EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
1510 # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1511 # auto-import support for array/record will be done.
1512 GNATLIB_SHARED = gnatlib-shared-win32
1515 TOOLS_TARGET_PAIRS= \
1516 mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
1517 indepsw.adb<indepsw-mingw.adb
1520 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1521 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1522 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1524 LIBRARY_VERSION := $(LIB_VERSION)
1527 ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
1528 LIBGNAT_TARGET_PAIRS = \
1529 a-intnam.ads<a-intnam-linux.ads \
1530 s-inmaop.adb<s-inmaop-posix.adb \
1531 s-intman.adb<s-intman-posix.adb \
1532 s-linux.ads<s-linux.ads \
1533 s-osinte.adb<s-osinte-posix.adb \
1534 s-osinte.ads<s-osinte-linux.ads \
1535 s-osprim.adb<s-osprim-posix.adb \
1536 s-taprop.adb<s-taprop-linux.adb \
1537 s-tasinf.ads<s-tasinf-linux.ads \
1538 s-tasinf.adb<s-tasinf-linux.adb \
1539 s-taspri.ads<s-taspri-posix.ads \
1540 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1541 system.ads<system-linux-mips.ads
1544 THREADSLIB = -lpthread
1545 GNATLIB_SHARED = gnatlib-shared-dual
1547 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1548 LIBRARY_VERSION := $(LIB_VERSION)
1551 ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
1552 LIBGNAT_TARGET_PAIRS = \
1553 a-intnam.ads<a-intnam-linux.ads \
1554 s-inmaop.adb<s-inmaop-posix.adb \
1555 s-intman.adb<s-intman-posix.adb \
1556 s-linux.ads<s-linux.ads \
1557 s-osinte.adb<s-osinte-posix.adb \
1558 s-osinte.ads<s-osinte-linux.ads \
1559 s-osprim.adb<s-osprim-posix.adb \
1560 s-taprop.adb<s-taprop-linux.adb \
1561 s-tasinf.ads<s-tasinf-linux.ads \
1562 s-tasinf.adb<s-tasinf-linux.adb \
1563 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1564 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1565 g-sercom.adb<g-sercom-linux.adb \
1566 system.ads<system-linux-mipsel.ads
1568 TOOLS_TARGET_PAIRS = \
1569 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1570 indepsw.adb<indepsw-gnu.adb
1572 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1574 THREADSLIB = -lpthread
1575 GNATLIB_SHARED = gnatlib-shared-dual
1577 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1578 LIBRARY_VERSION := $(LIB_VERSION)
1581 ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
1582 LIBGNAT_TARGET_PAIRS_COMMON = \
1583 a-intnam.ads<a-intnam-linux.ads \
1584 s-inmaop.adb<s-inmaop-posix.adb \
1585 s-intman.adb<s-intman-posix.adb \
1586 s-linux.ads<s-linux.ads \
1587 s-osinte.adb<s-osinte-posix.adb \
1588 s-osinte.ads<s-osinte-linux.ads \
1589 s-osprim.adb<s-osprim-posix.adb \
1590 s-taprop.adb<s-taprop-linux.adb \
1591 s-tasinf.ads<s-tasinf-linux.ads \
1592 s-tasinf.adb<s-tasinf-linux.adb \
1593 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1594 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1595 g-sercom.adb<g-sercom-linux.adb
1597 LIBGNAT_TARGET_PAIRS_32 = \
1598 system.ads<system-linux-ppc.ads
1600 LIBGNAT_TARGET_PAIRS_64 = \
1601 system.ads<system-linux-ppc64.ads
1603 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1604 LIBGNAT_TARGET_PAIRS = \
1605 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1607 LIBGNAT_TARGET_PAIRS = \
1608 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1611 TOOLS_TARGET_PAIRS = \
1612 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1613 indepsw.adb<indepsw-gnu.adb
1615 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1617 THREADSLIB = -lpthread
1618 GNATLIB_SHARED = gnatlib-shared-dual
1620 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1621 LIBRARY_VERSION := $(LIB_VERSION)
1624 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
1625 LIBGNAT_TARGET_PAIRS_COMMON = \
1626 a-intnam.ads<a-intnam-linux.ads \
1627 s-inmaop.adb<s-inmaop-posix.adb \
1628 s-intman.adb<s-intman-posix.adb \
1629 s-linux.ads<s-linux.ads \
1630 s-osinte.adb<s-osinte-posix.adb \
1631 s-osinte.ads<s-osinte-linux.ads \
1632 s-osprim.adb<s-osprim-posix.adb \
1633 s-taprop.adb<s-taprop-linux.adb \
1634 s-tasinf.ads<s-tasinf-linux.ads \
1635 s-tasinf.adb<s-tasinf-linux.adb \
1636 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1637 s-tpopsp.adb<s-tpopsp-posix-foreign.adb
1639 LIBGNAT_TARGET_PAIRS_32 = \
1640 g-trasym.ads<g-trasym-unimplemented.ads \
1641 g-trasym.adb<g-trasym-unimplemented.adb \
1642 system.ads<system-linux-sparc.ads
1644 LIBGNAT_TARGET_PAIRS_64 = \
1645 system.ads<system-linux-sparcv9.ads
1647 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1648 LIBGNAT_TARGET_PAIRS = \
1649 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1651 LIBGNAT_TARGET_PAIRS = \
1652 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1655 TOOLS_TARGET_PAIRS = \
1656 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1657 indepsw.adb<indepsw-gnu.adb
1659 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1661 THREADSLIB = -lpthread
1662 GNATLIB_SHARED = gnatlib-shared-dual
1664 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1665 LIBRARY_VERSION := $(LIB_VERSION)
1668 ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1669 LIBGNAT_TARGET_PAIRS = \
1670 a-intnam.ads<a-intnam-linux.ads \
1671 s-inmaop.adb<s-inmaop-posix.adb \
1672 s-intman.adb<s-intman-posix.adb \
1673 s-linux.ads<s-linux-hppa.ads \
1674 s-osinte.adb<s-osinte-posix.adb \
1675 s-osinte.ads<s-osinte-linux.ads \
1676 s-osprim.adb<s-osprim-posix.adb \
1677 s-taprop.adb<s-taprop-linux.adb \
1678 s-tasinf.ads<s-tasinf-linux.ads \
1679 s-tasinf.adb<s-tasinf-linux.adb \
1680 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1681 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1682 g-trasym.ads<g-trasym-unimplemented.ads \
1683 g-trasym.adb<g-trasym-unimplemented.adb \
1684 system.ads<system-linux-hppa.ads
1686 TOOLS_TARGET_PAIRS = \
1687 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1688 indepsw.adb<indepsw-gnu.adb
1690 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1692 THREADSLIB = -lpthread
1693 GNATLIB_SHARED = gnatlib-shared-dual
1695 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1696 LIBRARY_VERSION := $(LIB_VERSION)
1699 ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
1700 LIBGNAT_TARGET_PAIRS = \
1701 a-intnam.ads<a-intnam-linux.ads \
1702 s-inmaop.adb<s-inmaop-posix.adb \
1703 s-intman.adb<s-intman-posix.adb \
1704 s-linux.ads<s-linux.ads \
1705 s-osinte.adb<s-osinte-posix.adb \
1706 s-osinte.ads<s-osinte-linux.ads \
1707 s-osprim.adb<s-osprim-posix.adb \
1708 s-taprop.adb<s-taprop-linux.adb \
1709 s-tasinf.ads<s-tasinf-linux.ads \
1710 s-tasinf.adb<s-tasinf-linux.adb \
1711 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1712 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1713 system.ads<system-linux-sh4.ads
1715 TOOLS_TARGET_PAIRS = \
1716 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1717 indepsw.adb<indepsw-linux.adb
1719 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1722 THREADSLIB = -lpthread
1723 GNATLIB_SHARED = gnatlib-shared-dual
1725 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1726 LIBRARY_VERSION := $(LIB_VERSION)
1729 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1730 LIBGNAT_TARGET_PAIRS = \
1731 a-intnam.ads<a-intnam-linux.ads \
1732 a-numaux.ads<a-numaux-libc-x86.ads \
1733 s-inmaop.adb<s-inmaop-posix.adb \
1734 s-intman.adb<s-intman-posix.adb \
1735 s-linux.ads<s-linux.ads \
1736 s-osinte.ads<s-osinte-linux.ads \
1737 s-osinte.adb<s-osinte-posix.adb \
1738 s-osprim.adb<s-osprim-posix.adb \
1739 s-taprop.adb<s-taprop-linux.adb \
1740 s-tasinf.ads<s-tasinf-linux.ads \
1741 s-tasinf.adb<s-tasinf-linux.adb \
1742 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1743 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1744 g-sercom.adb<g-sercom-linux.adb \
1745 system.ads<system-linux-ia64.ads
1747 TOOLS_TARGET_PAIRS = \
1748 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1749 indepsw.adb<indepsw-gnu.adb
1751 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1754 THREADSLIB=-lpthread
1755 GNATLIB_SHARED=gnatlib-shared-dual
1757 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1758 LIBRARY_VERSION := $(LIB_VERSION)
1761 ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
1762 LIBGNAT_TARGET_PAIRS = \
1763 a-intnam.ads<a-intnam-linux.ads \
1764 s-inmaop.adb<s-inmaop-posix.adb \
1765 s-intman.adb<s-intman-posix.adb \
1766 s-linux.ads<s-linux-alpha.ads \
1767 s-osinte.ads<s-osinte-linux.ads \
1768 s-osinte.adb<s-osinte-posix.adb \
1769 s-osprim.adb<s-osprim-posix.adb \
1770 s-taprop.adb<s-taprop-linux.adb \
1771 s-tasinf.ads<s-tasinf-linux.ads \
1772 s-tasinf.adb<s-tasinf-linux.adb \
1773 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1774 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1775 g-trasym.ads<g-trasym-unimplemented.ads \
1776 g-trasym.adb<g-trasym-unimplemented.adb \
1777 system.ads<system-linux-alpha.ads
1779 TOOLS_TARGET_PAIRS = \
1780 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1781 indepsw.adb<indepsw-gnu.adb
1783 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1786 THREADSLIB=-lpthread
1787 GNATLIB_SHARED=gnatlib-shared-dual
1788 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1789 LIBRARY_VERSION := $(LIB_VERSION)
1792 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
1793 LIBGNAT_TARGET_PAIRS = \
1794 a-intnam.ads<a-intnam-linux.ads \
1795 a-numaux.adb<a-numaux-x86.adb \
1796 a-numaux.ads<a-numaux-x86.ads \
1797 s-inmaop.adb<s-inmaop-posix.adb \
1798 s-intman.adb<s-intman-posix.adb \
1799 s-linux.ads<s-linux.ads \
1800 s-osinte.ads<s-osinte-linux.ads \
1801 s-osinte.adb<s-osinte-posix.adb \
1802 s-osprim.adb<s-osprim-posix.adb \
1803 s-taprop.adb<s-taprop-linux.adb \
1804 s-tasinf.ads<s-tasinf-linux.ads \
1805 s-tasinf.adb<s-tasinf-linux.adb \
1806 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1807 s-taspri.ads<s-taspri-posix.ads \
1808 g-sercom.adb<g-sercom-linux.adb \
1809 system.ads<system-linux-x86_64.ads
1811 TOOLS_TARGET_PAIRS = \
1812 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1813 indepsw.adb<indepsw-gnu.adb
1815 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1817 THREADSLIB=-lpthread
1818 GNATLIB_SHARED=gnatlib-shared-dual
1820 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1821 LIBRARY_VERSION := $(LIB_VERSION)
1824 ifeq ($(strip $(filter-out darwin%,$(osys))),)
1825 ifeq ($(strip $(filter-out %86,$(arch))),)
1826 LIBGNAT_TARGET_PAIRS = \
1827 a-intnam.ads<a-intnam-darwin.ads \
1828 s-inmaop.adb<s-inmaop-posix.adb \
1829 s-intman.adb<s-intman-posix.adb \
1830 s-osinte.adb<s-osinte-darwin.adb \
1831 s-osinte.ads<s-osinte-darwin.ads \
1832 s-osprim.adb<s-osprim-posix.adb \
1833 s-taprop.adb<s-taprop-posix.adb \
1834 s-taspri.ads<s-taspri-posix.ads \
1835 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1836 g-trasym.ads<g-trasym-unimplemented.ads \
1837 g-trasym.adb<g-trasym-unimplemented.adb \
1838 a-numaux.ads<a-numaux-x86.ads \
1839 a-numaux.adb<a-numaux-x86.adb
1840 ifeq ($(strip $(MULTISUBDIR)),/x86_64)
1841 LIBGNAT_TARGET_PAIRS += \
1842 system.ads<system-darwin-x86_64.ads
1844 LIBGNAT_TARGET_PAIRS += \
1845 system.ads<system-darwin-x86.ads
1849 ifeq ($(strip $(filter-out %x86_64,$(arch))),)
1850 LIBGNAT_TARGET_PAIRS = \
1851 a-intnam.ads<a-intnam-darwin.ads \
1852 s-inmaop.adb<s-inmaop-posix.adb \
1853 s-intman.adb<s-intman-posix.adb \
1854 s-osinte.adb<s-osinte-darwin.adb \
1855 s-osinte.ads<s-osinte-darwin.ads \
1856 s-osprim.adb<s-osprim-posix.adb \
1857 s-taprop.adb<s-taprop-posix.adb \
1858 s-taspri.ads<s-taspri-posix.ads \
1859 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1860 a-numaux.ads<a-numaux-x86.ads \
1861 a-numaux.adb<a-numaux-x86.adb \
1862 g-trasym.ads<g-trasym-unimplemented.ads \
1863 g-trasym.adb<g-trasym-unimplemented.adb \
1864 system.ads<system-darwin-x86_64.ads
1867 ifeq ($(strip $(filter-out powerpc%,$(arch))),)
1868 LIBGNAT_TARGET_PAIRS = \
1869 a-intnam.ads<a-intnam-darwin.ads \
1870 s-inmaop.adb<s-inmaop-posix.adb \
1871 s-intman.adb<s-intman-posix.adb \
1872 s-osinte.adb<s-osinte-darwin.adb \
1873 s-osinte.ads<s-osinte-darwin.ads \
1874 s-osprim.adb<s-osprim-posix.adb \
1875 s-taprop.adb<s-taprop-posix.adb \
1876 s-taspri.ads<s-taspri-posix.ads \
1877 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1878 a-numaux.ads<a-numaux-darwin.ads \
1879 a-numaux.adb<a-numaux-darwin.adb \
1880 g-trasym.ads<g-trasym-unimplemented.ads \
1881 g-trasym.adb<g-trasym-unimplemented.adb \
1882 system.ads<system-darwin-ppc.ads
1885 TOOLS_TARGET_PAIRS = \
1886 mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb
1889 GNATLIB_SHARED = gnatlib-shared-darwin
1890 SO_OPTS = -Wl,-flat_namespace -shared-libgcc
1893 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1894 LIBRARY_VERSION := $(LIB_VERSION)
1898 ifneq ($(EH_MECHANISM),)
1899 LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
1900 EXTRA_LIBGNAT_SRCS+=raise$(EH_MECHANISM).c
1901 EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
1904 # Use the Ada 2005 version of Ada.Exceptions by default, unless specified
1905 # explicitly already. The base files (a-except.ad?) are used only for building
1906 # the compiler and other basic tools.
1907 # These base versions lack Ada 2005 additions which would cause bootstrap
1908 # problems if included in the compiler and other basic tools.
1910 ifeq ($(filter-out a-except%,$(LIBGNAT_TARGET_PAIRS)),$(LIBGNAT_TARGET_PAIRS))
1911 LIBGNAT_TARGET_PAIRS += \
1912 a-except.ads<a-except-2005.ads \
1913 a-except.adb<a-except-2005.adb
1916 # The runtime library for gnat comprises two directories. One contains the
1917 # Ada source files that the compiler (gnat1) needs -- these files are listed
1918 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1919 # corresponding .ali files for the parts written in Ada, libgnat.a for
1920 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1921 # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1922 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1923 # go into the directory. The pthreads emulation is built in the threads
1924 # subdirectory and copied.
1925 LIBGNAT_SRCS = adaint.c adaint.h argv.c cio.c cstreams.c \
1926 errno.c exit.c cal.c ctrl_c.c env.c env.h arit64.c \
1927 raise.h raise.c sysdep.c aux-io.c init.c initialize.c seh_init.c \
1928 final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c expect.c mkdir.c \
1929 socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
1931 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o env.o \
1932 raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o arit64.o \
1933 final.o tracebak.o expect.o mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
1935 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1936 # the library installation will change and there will be a
1937 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1938 # from ADA_INCLUDE_SRCS.
1940 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
1941 # the following include file:
1943 include $(fsrcdir)/ada/Makefile.rtl
1945 GNATRTL_LINEARALGEBRA_OBJS = a-nlcoar.o a-nllcar.o a-nllrar.o a-nlrear.o \
1946 a-nucoar.o a-nurear.o i-forbla.o i-forlap.o s-gearop.o
1948 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
1949 $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
1951 # Default run time files
1954 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1955 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1956 sequenio.ads system.ads memtrack.adb \
1957 a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
1958 s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
1960 LIBGNAT=../$(RTSDIR)/libgnat.a
1962 GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
1964 # when compiling the tools, the runtime has to be first on the path so that
1965 # it hides the runtime files lying with the rest of the sources
1966 ifeq ($(TOOLSCASE),native)
1967 vpath %.ads ../$(RTSDIR) ../
1968 vpath %.adb ../$(RTSDIR) ../
1969 vpath %.c ../$(RTSDIR) ../
1970 vpath %.h ../$(RTSDIR) ../
1973 # in the cross tools case, everything is compiled with the native
1974 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1975 ifeq ($(TOOLSCASE),cross)
1983 $(GNATMAKE) -c -b $(ADA_INCLUDES) \
1984 --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
1985 gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
1986 gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
1987 $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
1988 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1989 $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
1990 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1991 $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
1992 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1993 $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
1994 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1995 $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
1996 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1997 $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
1998 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1999 $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
2000 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2001 $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
2002 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2003 $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
2004 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2006 ../../gnatsym$(exeext):
2007 $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
2008 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
2009 $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2011 ../../gnatdll$(exeext):
2012 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
2013 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
2014 $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2016 ../../vxaddr2line$(exeext): targext.o
2017 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
2018 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
2019 $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
2021 gnatmake-re: link.o targext.o
2022 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
2023 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
2024 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
2025 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
2026 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2028 # Note the use of the "mv" command in order to allow gnatlink to be linked with
2029 # with the former version of gnatlink itself which cannot override itself.
2030 gnatlink-re: link.o targext.o
2031 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
2032 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
2033 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
2034 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2035 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
2037 # Needs to be built with CC=gcc
2038 # Since the RTL should be built with the latest compiler, remove the
2039 # stamp target in the parent directory whenever gnat1 is rebuilt
2041 # Likewise for the tools
2042 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
2043 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
2046 ../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
2047 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
2050 ../stamp-gnatlib-$(RTSDIR):
2051 @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
2053 $(ECHO) You must first build the GNAT library: make gnatlib; \
2059 install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
2060 # Create the directory before deleting it, in case the directory is
2061 # a list of directories (as it may be on VMS). This ensures we are
2062 # deleting the right one.
2063 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2064 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2065 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2066 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2067 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2068 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2069 for file in $(RTSDIR)/*.ali; do \
2070 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2072 -$(INSTALL_DATA) $(RTSDIR)/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2073 -cd $(RTSDIR); for file in *$(arext);do \
2074 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2075 $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
2077 -$(foreach file, $(EXTRA_ADALIB_FILES), \
2078 $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
2080 # Install the shared libraries, if any, using $(INSTALL) instead
2081 # of $(INSTALL_DATA). The latter may force a mode inappropriate
2082 # for shared libraries on some targets, e.g. on HP-UX where the x
2083 # permission is required.
2084 for file in gnat gnarl; do \
2085 if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
2086 $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
2087 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2089 if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
2090 $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
2091 $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
2094 # This copy must be done preserving the date on the original file.
2095 for file in $(RTSDIR)/*.ad?; do \
2096 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
2098 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
2099 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
2101 ../stamp-gnatlib2-$(RTSDIR):
2102 $(RM) $(RTSDIR)/s-*.ali
2103 $(RM) $(RTSDIR)/s-*$(objext)
2104 $(RM) $(RTSDIR)/a-*.ali
2105 $(RM) $(RTSDIR)/a-*$(objext)
2106 $(RM) $(RTSDIR)/*.ali
2107 $(RM) $(RTSDIR)/*$(objext)
2108 $(RM) $(RTSDIR)/*$(arext)
2109 $(RM) $(RTSDIR)/*$(soext)
2110 touch ../stamp-gnatlib2-$(RTSDIR)
2111 $(RM) ../stamp-gnatlib-$(RTSDIR)
2113 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
2114 # successive target commands. Although the Gnu make documentation
2115 # implies this is true on all systems, I suspect it may not be, So care
2116 # has been taken to allow a sed script to look for ";)" and substitue
2117 # for ";" the appropriate character in the range of lines below
2118 # beginning with "GNULLI Begin" and ending with "GNULLI End"
2120 # GNULLI Begin ###########################################################
2122 ../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
2125 $(CHMOD) u+w $(RTSDIR)
2126 # Copy target independent sources
2127 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
2128 $(LN_S) $(fsrcpfx)ada/$(f) $(RTSDIR) ;) true
2129 # Remove files to be replaced by target dependent sources
2130 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
2131 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
2132 $(RM) $(RTSDIR)/*-*-*.ads $(RTSDIR)/*-*-*.adb
2133 # Copy new target dependent sources
2134 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
2135 $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
2136 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
2137 # Copy generated target dependent sources
2138 $(RM) $(RTSDIR)/s-oscons.ads
2139 (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
2140 $(RM) ../stamp-gnatlib-$(RTSDIR)
2141 touch ../stamp-gnatlib1-$(RTSDIR)
2143 # GNULLI End #############################################################
2145 # Don't use semicolon separated shell commands that involve list expansions.
2146 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
2147 # line lengths in excess of 256 characters.
2148 # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
2149 # is guaranteed to overflow the buffer.
2151 gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
2152 $(MAKE) -C $(RTSDIR) \
2153 CC="`echo \"$(GCC_FOR_TARGET)\" \
2154 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2155 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
2156 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
2157 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2159 -f ../Makefile $(LIBGNAT_OBJS)
2160 $(MAKE) -C $(RTSDIR) \
2161 CC="`echo \"$(GCC_FOR_TARGET)\" \
2162 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2164 CFLAGS="$(GNATLIBCFLAGS)" \
2165 ADAFLAGS="$(GNATLIBFLAGS)" \
2166 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2170 $(RM) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnarl$(arext)
2171 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat$(arext) \
2172 $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
2173 ifneq ($(PREFIX_OBJS),)
2174 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgccprefix$(arext) \
2176 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgccprefix$(arext)
2178 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat$(arext)
2179 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \
2180 $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
2181 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext)
2182 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnala$(arext) \
2183 $(addprefix $(RTSDIR)/,$(GNATRTL_LINEARALGEBRA_OBJS))
2184 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnala$(arext)
2185 ifeq ($(GMEM_LIB),gmemlib)
2186 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \
2187 $(RTSDIR)/memtrack.o
2188 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
2190 $(CHMOD) a-wx $(RTSDIR)/*.ali
2191 touch ../stamp-gnatlib-$(RTSDIR)
2193 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
2194 gnatlib-shared-default:
2195 $(MAKE) $(FLAGS_TO_PASS) \
2196 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2197 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2198 MULTISUBDIR="$(MULTISUBDIR)" \
2199 THREAD_KIND="$(THREAD_KIND)" \
2201 $(RM) $(RTSDIR)/libgna*$(soext)
2202 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2203 $(TARGET_LIBGCC2_CFLAGS) \
2204 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2205 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2206 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2208 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2209 $(TARGET_LIBGCC2_CFLAGS) \
2210 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2211 $(GNATRTL_TASKING_OBJS) \
2212 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2214 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2216 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2219 gnatlib-shared-dual:
2220 $(MAKE) $(FLAGS_TO_PASS) \
2221 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2222 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2223 MULTISUBDIR="$(MULTISUBDIR)" \
2224 THREAD_KIND="$(THREAD_KIND)" \
2225 gnatlib-shared-default
2226 $(MV) $(RTSDIR)/libgna*$(soext) .
2227 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2228 $(MAKE) $(FLAGS_TO_PASS) \
2229 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2230 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2231 MULTISUBDIR="$(MULTISUBDIR)" \
2232 THREAD_KIND="$(THREAD_KIND)" \
2234 $(MV) libgna*$(soext) $(RTSDIR)
2236 gnatlib-shared-dual-win32:
2237 $(MAKE) $(FLAGS_TO_PASS) \
2238 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2239 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2240 MULTISUBDIR="$(MULTISUBDIR)" \
2241 THREAD_KIND="$(THREAD_KIND)" \
2242 gnatlib-shared-win32
2243 $(MV) $(RTSDIR)/libgna*$(soext) .
2244 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2245 $(MAKE) $(FLAGS_TO_PASS) \
2246 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2247 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2248 MULTISUBDIR="$(MULTISUBDIR)" \
2249 THREAD_KIND="$(THREAD_KIND)" \
2251 $(MV) libgna*$(soext) $(RTSDIR)
2253 # ??? we need to add the option to support auto-import of arrays/records to
2254 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
2255 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
2257 gnatlib-shared-win32:
2258 $(MAKE) $(FLAGS_TO_PASS) \
2259 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2260 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2261 MULTISUBDIR="$(MULTISUBDIR)" \
2262 THREAD_KIND="$(THREAD_KIND)" \
2264 $(RM) $(RTSDIR)/libgna*$(soext)
2265 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2266 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2267 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2268 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
2269 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2270 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2271 $(GNATRTL_TASKING_OBJS) \
2272 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2273 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2275 gnatlib-shared-darwin:
2276 $(MAKE) $(FLAGS_TO_PASS) \
2277 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2278 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
2280 MULTISUBDIR="$(MULTISUBDIR)" \
2281 THREAD_KIND="$(THREAD_KIND)" \
2283 $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
2284 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2285 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2286 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2288 -Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2290 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2291 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2292 $(GNATRTL_TASKING_OBJS) \
2294 -Wl,-install_name,@rpath/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2295 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2296 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2298 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2302 $(MAKE) $(FLAGS_TO_PASS) \
2303 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2304 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2305 MULTISUBDIR="$(MULTISUBDIR)" \
2306 THREAD_KIND="$(THREAD_KIND)" \
2308 $(RM) $(RTSDIR)/libgna*$(soext)
2310 ../../gnatsym -s SYMVEC_$$$$.opt \
2311 $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \
2312 ../../xgcc -g -B../../ -shared -shared-libgcc \
2313 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
2314 sys\$$library:trace.exe \
2315 --for-linker=/noinform \
2316 --for-linker=SYMVEC_$$$$.opt \
2317 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2319 ../../gnatsym -s SYMVEC_$$$$.opt \
2320 $(GNATRTL_TASKING_OBJS) && \
2321 ../../xgcc -g -B../../ -shared -shared-libgcc \
2322 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2323 libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2324 sys\$$library:trace.exe \
2325 --for-linker=/noinform \
2326 --for-linker=SYMVEC_$$$$.opt \
2327 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2330 $(MAKE) $(FLAGS_TO_PASS) \
2331 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2332 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2333 MULTISUBDIR="$(MULTISUBDIR)" \
2334 THREAD_KIND="$(THREAD_KIND)" \
2335 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
2339 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1-$(RTSDIR)
2340 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2341 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2342 $(MAKE) $(FLAGS_TO_PASS) \
2344 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2345 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2346 MULTISUBDIR="$(MULTISUBDIR)" \
2347 THREAD_KIND="$(THREAD_KIND)" \
2348 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2351 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1-$(RTSDIR)
2352 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2353 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2354 $(MAKE) $(FLAGS_TO_PASS) \
2355 EH_MECHANISM="-gcc" \
2356 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2357 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2358 MULTISUBDIR="$(MULTISUBDIR)" \
2359 THREAD_KIND="$(THREAD_KIND)" \
2360 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2362 # .s files for cross-building
2364 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
2366 # Compiling object files from source files.
2368 # Note that dependencies on obstack.h are not written
2369 # because that file is not part of GCC.
2370 # Dependencies on gvarargs.h are not written
2371 # because all that file does, when not compiling with GCC,
2372 # is include the system varargs.h.
2374 b_gnatl.c : $(GNATLINK_OBJS)
2375 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2376 b_gnatl.o : b_gnatl.c
2378 b_gnatm.c : $(GNATMAKE_OBJS)
2379 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2380 b_gnatm.o : b_gnatm.c
2382 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2383 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2385 # force no sibling call optimization on s-traceb.o so the number of stack
2386 # frames to be skipped when computing a call chain is not modified by
2387 # optimization. However we can do that only when building the runtime
2388 # (not the compiler) because the -fno-optimize-sibling-calls option exists
2389 # only in GCC 3 and above.
2391 ifneq (,$(findstring xgcc,$(CC)))
2392 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2394 NO_SIBLING_ADAFLAGS=
2397 s-traceb.o : s-traceb.adb
2398 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2399 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2402 # force debugging information on s-tasdeb.o so that it is always
2403 # possible to set conditional breakpoints on tasks.
2405 s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
2406 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2409 # force no function reordering on a-except.o because of the exclusion bounds
2410 # mechanism (see the source file for more detailed information). However we
2411 # can do that only when building the runtime (not the compiler) because the
2412 # -fno-toplevel-reorder option exists only in GCC 4.2 and above.
2414 ifneq (,$(findstring xgcc,$(CC)))
2415 NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
2417 NO_REORDER_ADAFLAGS=
2420 # force debugging information on a-except.o so that it is always
2421 # possible to set conditional breakpoints on exceptions.
2422 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2424 a-except.o : a-except.adb a-except.ads
2425 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2426 $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2428 # compile s-except.o without optimization and with debug info to let the
2429 # debugger set breakpoints and inspect subprogram parameters on exception
2432 s-except.o : s-except.adb s-except.ads
2433 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2436 # force debugging information on s-assert.o so that it is always
2437 # possible to set breakpoint on assert failures.
2439 s-assert.o : s-assert.adb s-assert.ads a-except.ads
2440 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
2443 adadecode.o : adadecode.c adadecode.h
2447 deftarg.o : deftarg.c
2449 exit.o : adaint.h exit.c
2455 socket.o : socket.c gsocket.h
2457 raise-gcc.o : raise-gcc.c raise.h
2458 raise.o : raise.c raise.h
2459 vx_stack_info.o : vx_stack_info.c
2462 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2463 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2465 init.o : init.c adaint.h raise.h
2466 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2467 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2469 initialize.o : initialize.c raise.h
2470 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2471 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2473 targext.o : targext.c
2474 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2475 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2478 # No optimization to compile this file as optimizations (-O1 or above) breaks
2479 # the SEH handling on Windows. The reasons are not clear.
2480 seh_init.o : seh_init.c raise.h
2481 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) -O0 \
2482 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2484 # Need to keep the frame pointer in this file to pop the stack properly on
2486 tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
2487 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2488 -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2490 # In GNU Make, ignore whether `stage*' exists.
2491 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2492 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2496 # Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
2498 ../../gnatlbr$(exeext): ../../prefix.o
2499 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2500 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2501 $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2503 ../../vms_help$(exeext):
2504 $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
2505 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
2506 $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2508 ../../gnat.hlp: ../../vms_help$(exeext)
2509 ../../vms_help$(exeext) $(fsrcdir)/ada/gnat.help_in \
2510 $(fsrcdir)/ada/vms_data.ads ../../gnat.hlp