Merged revisions 143552,143554,143557,143560,143562,143564-143567,143570-143573,14357...
[official-gcc.git] / gcc / ada / gcc-interface / Makefile.in
blobc431118608e04b217ea49067d99c6a1004c6a4e0
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)
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 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
25 # 3) nothing else.
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:
36 # Required:
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.
47 # AR: Gnu ar works.
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.
54 # Optional:
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
60 .y.c:
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
69 CFLAGS = -g
70 BOOT_CFLAGS = -O $(CFLAGS)
71 # These exists to be overridden by the t-* files, respectively.
72 T_CFLAGS =
74 CC = cc
75 BISON = bison
76 BISONFLAGS =
77 ECHO = echo
78 LEX = flex
79 LEXFLAGS =
80 CHMOD = chmod
81 LN = ln
82 LN_S = ln -s
83 CP = cp -p
84 MV = mv -f
85 RM = rm -f
86 RMDIR = rm -rf
87 MKDIR = mkdir -p
88 AR = ar
89 AR_FLAGS = rc
90 LS = ls
91 RANLIB = @RANLIB@
92 RANLIB_FLAGS = @ranlib_flags@
93 AWK = @AWK@
95 SHELL = @SHELL@
96 PWD_COMMAND = $${PWDCMD-pwd}
97 # How to copy preserving the date
98 INSTALL_DATA_DATE = cp -p
99 MAKEINFO = makeinfo
100 TEXI2DVI = texi2dvi
101 TEXI2PDF = texi2pdf
102 GNATBIND_FLAGS = -static -x
103 ADA_CFLAGS =
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 \
110 -DIN_RTS
111 ALL_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS)
112 MOST_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(SOME_ADAFLAGS)
113 THREAD_KIND = native
114 THREADSLIB =
115 GMEM_LIB =
116 MISCLIB =
117 SYMDEPS = $(LIBINTL_DEP)
118 OUTPUT_OPTION = @OUTPUT_OPTION@
120 objext = .o
121 exeext =
122 arext = .a
123 soext = .so
124 shext =
125 hyphen = -
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.
133 # It specifies -B./.
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 =
145 objdir = .
147 target_alias=@target_alias@
148 target=@target@
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.
165 top_builddir = ../..
167 # Internationalization library.
168 LIBINTL = @LIBINTL@
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
178 TARGET_ADA_SRCS =
180 # Type of tools build we are doing; default is not compiling tools.
181 TOOLSCASE =
183 # Multilib handling
184 MULTISUBDIR =
185 RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
187 # End of variables for you to override.
189 all: all.indirect
191 # This tells GNU Make version 3 not to put all variables in the environment.
192 .NOEXPORT:
194 # target overrides
195 ifneq ($(tmake_file),)
196 include $(tmake_file)
197 endif
199 # host overrides
200 ifneq ($(xmake_file),)
201 include $(xmake_file)
202 endif
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)
218 # Likewise.
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
229 TGT_LIB =
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 -I$(fsrcdir)/config \
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.
246 .SUFFIXES: .in .def
248 # Say how to compile Ada programs.
249 .SUFFIXES: .ada .adb .ads .asm
251 # Always use -I$(srcdir)/config when compiling.
252 .asm.o:
253 $(CC) -c -x assembler $< $(OUTPUT_OPTION)
255 .c.o:
256 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \
257 $(OUTPUT_OPTION)
259 .adb.o:
260 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
262 .ads.o:
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
267 cd ..; \
268 LANGUAGES="$(CONFIG_LANGUAGES)" \
269 CONFIG_HEADERS= \
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.
274 .NOEXPORT:
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
303 # variable.
305 host:=$(subst -, ,$(host_canonical))
306 targ:=$(subst -, ,$(target))
307 arch:=$(word 1,$(targ))
308 ifeq ($(words $(targ)),2)
309 manu:=
310 osys:=$(word 2,$(targ))
311 else
312 manu:=$(word 2,$(targ))
313 osys:=$(word 3,$(targ))
314 endif
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)
322 arch:=i686
323 endif
324 endif
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
331 # pair.
333 # Non-tasking case:
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)
347 EH_MECHANISM=
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
362 MLIB_TGT = mlib-tgt
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.
367 PREFIX_OBJS =
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-kernel.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 system.ads<system-vxworks-m68k.ads
424 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
426 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
427 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
429 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
430 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
432 ifeq ($(strip $(filter-out yes,$(TRACE))),)
433 LIBGNAT_TARGET_PAIRS += \
434 s-traces.adb<s-traces-default.adb \
435 s-tratas.adb<s-tratas-default.adb \
436 s-trafor.adb<s-trafor-default.adb \
437 s-trafor.ads<s-trafor-default.ads \
438 s-tfsetr.adb<s-tfsetr-vxworks.adb
439 endif
440 endif
442 ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
443 LIBGNAT_TARGET_PAIRS = \
444 a-intnam.ads<a-intnam-vxworks.ads \
445 a-numaux.ads<a-numaux-vxworks.ads \
446 s-inmaop.adb<s-inmaop-posix.adb \
447 s-intman.ads<s-intman-vxworks.ads \
448 s-intman.adb<s-intman-vxworks.adb \
449 s-osprim.adb<s-osprim-vxworks.adb \
450 s-parame.ads<s-parame-vxworks.ads \
451 s-parame.adb<s-parame-vxworks.adb \
452 s-stchop.ads<s-stchop-limit.ads \
453 s-stchop.adb<s-stchop-vxworks.adb \
454 s-taprop.adb<s-taprop-vxworks.adb \
455 s-taspri.ads<s-taspri-vxworks.ads \
456 s-vxwork.ads<s-vxwork-ppc.ads \
457 g-socthi.ads<g-socthi-vxworks.ads \
458 g-socthi.adb<g-socthi-vxworks.adb \
459 g-stsifd.adb<g-stsifd-sockets.adb \
460 g-sttsne.adb<g-sttsne-vxworks.adb \
461 g-sttsne.ads<g-sttsne-locking.ads
463 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
465 ifeq ($(strip $(filter-out yes,$(TRACE))),)
466 LIBGNAT_TARGET_PAIRS += \
467 s-traces.adb<s-traces-default.adb \
468 s-trafor.adb<s-trafor-default.adb \
469 s-trafor.ads<s-trafor-default.ads \
470 s-tratas.adb<s-tratas-default.adb \
471 s-tfsetr.adb<s-tfsetr-vxworks.adb
472 endif
474 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
475 LIBGNAT_TARGET_PAIRS += \
476 s-osinte.adb<s-osinte-vxworks-rtp.adb \
477 s-osinte.ads<s-osinte-vxworks6.ads \
478 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
479 system.ads<system-vxworks-ppc-rtp.ads
481 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
482 else
483 LIBGNAT_TARGET_PAIRS += \
484 s-interr.adb<s-interr-hwint.adb \
485 s-tpopsp.adb<s-tpopsp-vxworks.adb \
486 system.ads<system-vxworks-ppc.ads
488 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
489 LIBGNAT_TARGET_PAIRS += \
490 s-osinte.ads<s-osinte-vxworks6.ads \
491 s-osinte.adb<s-osinte-vxworks-kernel.adb
492 else
493 LIBGNAT_TARGET_PAIRS += \
494 s-osinte.ads<s-osinte-vxworks.ads \
495 s-osinte.adb<s-osinte-vxworks.adb
496 endif
498 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
499 endif
501 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
503 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
504 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
505 endif
507 # vxworksae / vxworks 653
508 ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(targ))),)
509 # target pairs for kernel + vthreads runtime
510 LIBGNAT_TARGET_PAIRS = \
511 a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
512 a-intnam.ads<a-intnam-vxworks.ads \
513 a-numaux.ads<a-numaux-vxworks.ads \
514 g-io.adb<g-io-vxworks-ppc-cert.adb \
515 g-io.ads<g-io-vxworks-ppc-cert.ads \
516 s-inmaop.adb<s-inmaop-posix.adb \
517 s-interr.adb<s-interr-hwint.adb \
518 s-intman.ads<s-intman-vxworks.ads \
519 s-intman.adb<s-intman-vxworks.adb \
520 s-osinte.adb<s-osinte-vxworks-kernel.adb \
521 s-osinte.ads<s-osinte-vxworks.ads \
522 s-osprim.adb<s-osprim-vxworks.adb \
523 s-parame.ads<s-parame-ae653.ads \
524 s-parame.adb<s-parame-vxworks.adb \
525 s-taprop.adb<s-taprop-vxworks.adb \
526 s-taspri.ads<s-taspri-vxworks.ads \
527 s-tpopsp.adb<s-tpopsp-vxworks.adb \
528 s-vxwork.ads<s-vxwork-ppc.ads \
529 g-socthi.ads<g-socthi-vxworks.ads \
530 g-socthi.adb<g-socthi-vxworks.adb \
531 g-stsifd.adb<g-stsifd-sockets.adb \
532 g-sttsne.adb<g-sttsne-vxworks.adb \
533 g-sttsne.ads<g-sttsne-locking.ads \
534 system.ads<system-vxworks-ppc-vthread.ads
536 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
538 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
539 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
541 # Extra pairs for the vthreads runtime
542 ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
543 LIBGNAT_TARGET_PAIRS += \
544 s-thread.adb<s-thread-ae653.adb
545 EXTRA_GNATRTL_NONTASKING_OBJS += s-thread.o
546 endif
548 ifeq ($(strip $(filter-out yes,$(TRACE))),)
549 LIBGNAT_TARGET_PAIRS += \
550 s-traces.adb<s-traces-default.adb \
551 s-trafor.adb<s-trafor-default.adb \
552 s-trafor.ads<s-trafor-default.ads \
553 s-tratas.adb<s-tratas-default.adb \
554 s-tfsetr.adb<s-tfsetr-vxworks.adb
555 endif
556 endif
558 ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
559 LIBGNAT_TARGET_PAIRS = \
560 a-intnam.ads<a-intnam-vxworks.ads \
561 a-numaux.ads<a-numaux-vxworks.ads \
562 s-inmaop.adb<s-inmaop-posix.adb \
563 s-interr.adb<s-interr-hwint.adb \
564 s-intman.ads<s-intman-vxworks.ads \
565 s-intman.adb<s-intman-vxworks.adb \
566 s-osinte.adb<s-osinte-vxworks-kernel.adb \
567 s-osinte.ads<s-osinte-vxworks.ads \
568 s-osprim.adb<s-osprim-vxworks.adb \
569 s-parame.ads<s-parame-vxworks.ads \
570 s-parame.adb<s-parame-vxworks.adb \
571 s-stchop.ads<s-stchop-limit.ads \
572 s-stchop.adb<s-stchop-vxworks.adb \
573 s-taprop.adb<s-taprop-vxworks.adb \
574 s-taspri.ads<s-taspri-vxworks.ads \
575 s-tpopsp.adb<s-tpopsp-vxworks.adb \
576 s-vxwork.ads<s-vxwork-sparcv9.ads \
577 g-socthi.ads<g-socthi-vxworks.ads \
578 g-socthi.adb<g-socthi-vxworks.adb \
579 g-stsifd.adb<g-stsifd-sockets.adb \
580 g-sttsne.adb<g-sttsne-vxworks.adb \
581 g-sttsne.ads<g-sttsne-locking.ads \
582 system.ads<system-vxworks-sparcv9.ads \
584 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
586 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
587 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
589 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
590 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
591 endif
593 ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
594 LIBGNAT_TARGET_PAIRS = \
595 a-intnam.ads<a-intnam-vxworks.ads \
596 i-vxwork.ads<i-vxwork-x86.ads \
597 s-inmaop.adb<s-inmaop-posix.adb \
598 s-intman.ads<s-intman-vxworks.ads \
599 s-intman.adb<s-intman-vxworks.adb \
600 a-numaux.adb<a-numaux-x86.adb \
601 a-numaux.ads<a-numaux-x86.ads \
602 s-osprim.adb<s-osprim-vxworks.adb \
603 s-parame.ads<s-parame-vxworks.ads \
604 s-parame.adb<s-parame-vxworks.adb \
605 s-stchop.ads<s-stchop-limit.ads \
606 s-stchop.adb<s-stchop-vxworks.adb \
607 s-taprop.adb<s-taprop-vxworks.adb \
608 s-taspri.ads<s-taspri-vxworks.ads \
609 s-vxwork.ads<s-vxwork-x86.ads \
610 g-bytswa.adb<g-bytswa-x86.adb \
611 g-socthi.ads<g-socthi-vxworks.ads \
612 g-socthi.adb<g-socthi-vxworks.adb \
613 g-stsifd.adb<g-stsifd-sockets.adb \
614 g-sttsne.adb<g-sttsne-vxworks.adb \
615 g-sttsne.ads<g-sttsne-locking.ads
617 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
619 ifeq ($(strip $(filter-out yes,$(TRACE))),)
620 LIBGNAT_TARGET_PAIRS += \
621 s-traces.adb<s-traces-default.adb \
622 s-trafor.adb<s-trafor-default.adb \
623 s-trafor.ads<s-trafor-default.ads \
624 s-tratas.adb<s-tratas-default.adb \
625 s-tfsetr.adb<s-tfsetr-vxworks.adb
626 endif
628 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
629 LIBGNAT_TARGET_PAIRS += \
630 s-osinte.adb<s-osinte-vxworks-rtp.adb \
631 s-osinte.ads<s-osinte-vxworks6.ads \
632 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
633 system.ads<system-vxworks-x86-rtp.ads
635 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
636 else
637 LIBGNAT_TARGET_PAIRS += \
638 s-interr.adb<s-interr-hwint.adb \
639 s-tpopsp.adb<s-tpopsp-vxworks.adb \
640 system.ads<system-vxworks-x86.ads
642 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
643 LIBGNAT_TARGET_PAIRS += \
644 s-osinte.ads<s-osinte-vxworks6.ads \
645 s-osinte.adb<s-osinte-vxworks-kernel.adb
646 else
647 LIBGNAT_TARGET_PAIRS += \
648 s-osinte.ads<s-osinte-vxworks.ads \
649 s-osinte.adb<s-osinte-vxworks.adb
650 endif
652 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
653 endif
655 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
657 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
658 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
659 endif
661 ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
662 LIBGNAT_TARGET_PAIRS = \
663 a-intnam.ads<a-intnam-vxworks.ads \
664 a-numaux.ads<a-numaux-vxworks.ads \
665 s-inmaop.adb<s-inmaop-posix.adb \
666 s-interr.adb<s-interr-hwint.adb \
667 s-intman.ads<s-intman-vxworks.ads \
668 s-intman.adb<s-intman-vxworks.adb \
669 s-osinte.adb<s-osinte-vxworks-kernel.adb \
670 s-osinte.ads<s-osinte-vxworks.ads \
671 s-osprim.adb<s-osprim-vxworks.adb \
672 s-parame.ads<s-parame-vxworks.ads \
673 s-parame.adb<s-parame-vxworks.adb \
674 s-stchop.ads<s-stchop-limit.ads \
675 s-stchop.adb<s-stchop-vxworks.adb \
676 s-taprop.adb<s-taprop-vxworks.adb \
677 s-taspri.ads<s-taspri-vxworks.ads \
678 s-tpopsp.adb<s-tpopsp-vxworks.adb \
679 s-vxwork.ads<s-vxwork-arm.ads \
680 g-socthi.ads<g-socthi-vxworks.ads \
681 g-socthi.adb<g-socthi-vxworks.adb \
682 g-stsifd.adb<g-stsifd-sockets.adb \
683 g-sttsne.adb<g-sttsne-vxworks.adb \
684 g-sttsne.ads<g-sttsne-locking.ads \
685 system.ads<system-vxworks-arm.ads
687 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
689 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
690 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
692 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
693 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
694 endif
696 ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
697 LIBGNAT_TARGET_PAIRS = \
698 a-intnam.ads<a-intnam-vxworks.ads \
699 a-numaux.ads<a-numaux-vxworks.ads \
700 s-inmaop.adb<s-inmaop-posix.adb \
701 s-interr.adb<s-interr-hwint.adb \
702 s-intman.ads<s-intman-vxworks.ads \
703 s-intman.adb<s-intman-vxworks.adb \
704 s-osinte.adb<s-osinte-vxworks-kernel.adb \
705 s-osinte.ads<s-osinte-vxworks.ads \
706 s-osprim.adb<s-osprim-vxworks.adb \
707 s-parame.ads<s-parame-vxworks.ads \
708 s-parame.adb<s-parame-vxworks.adb \
709 s-stchop.ads<s-stchop-limit.ads \
710 s-stchop.adb<s-stchop-vxworks.adb \
711 s-taprop.adb<s-taprop-vxworks.adb \
712 s-taspri.ads<s-taspri-vxworks.ads \
713 s-tpopsp.adb<s-tpopsp-vxworks.adb \
714 s-vxwork.ads<s-vxwork-mips.ads \
715 g-socthi.ads<g-socthi-vxworks.ads \
716 g-socthi.adb<g-socthi-vxworks.adb \
717 g-stsifd.adb<g-stsifd-sockets.adb \
718 g-sttsne.adb<g-sttsne-vxworks.adb \
719 g-sttsne.ads<g-sttsne-locking.ads \
720 system.ads<system-vxworks-mips.ads
722 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
724 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
725 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
727 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
728 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
729 endif
731 ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
732 LIBGNAT_TARGET_PAIRS_COMMON = \
733 a-intnam.ads<a-intnam-solaris.ads \
734 s-inmaop.adb<s-inmaop-posix.adb \
735 s-intman.adb<s-intman-solaris.adb \
736 s-osinte.adb<s-osinte-solaris.adb \
737 s-osinte.ads<s-osinte-solaris.ads \
738 s-osprim.adb<s-osprim-solaris.adb \
739 s-taprop.adb<s-taprop-solaris.adb \
740 s-tasinf.adb<s-tasinf-solaris.adb \
741 s-tasinf.ads<s-tasinf-solaris.ads \
742 s-taspri.ads<s-taspri-solaris.ads \
743 s-tpopsp.adb<s-tpopsp-solaris.adb \
744 g-soliop.ads<g-soliop-solaris.ads
746 LIBGNAT_TARGET_PAIRS_32 = \
747 system.ads<system-solaris-sparc.ads
749 LIBGNAT_TARGET_PAIRS_64 = \
750 system.ads<system-solaris-sparcv9.ads
752 ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
753 ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
754 LIBGNAT_TARGET_PAIRS = \
755 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
756 else
757 LIBGNAT_TARGET_PAIRS = \
758 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
759 endif
760 else
761 ifeq ($(strip $(MULTISUBDIR)),/sparcv7)
762 LIBGNAT_TARGET_PAIRS = \
763 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
764 else
765 LIBGNAT_TARGET_PAIRS = \
766 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
767 endif
768 endif
770 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
772 EH_MECHANISM=-gcc
773 THREADSLIB = -lposix4 -lthread
774 MISCLIB = -lposix4 -lnsl -lsocket
775 SO_OPTS = -Wl,-h,
776 GNATLIB_SHARED = gnatlib-shared-dual
777 GMEM_LIB = gmemlib
778 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
779 LIBRARY_VERSION := $(LIB_VERSION)
781 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
782 LIBGNAT_TARGET_PAIRS = \
783 a-intnam.ads<a-intnam-solaris.ads \
784 s-inmaop.adb<s-inmaop-posix.adb \
785 s-intman.adb<s-intman-posix.adb \
786 s-osinte.adb<s-osinte-posix.adb \
787 s-osinte.ads<s-osinte-solaris-posix.ads \
788 s-osprim.adb<s-osprim-solaris.adb \
789 s-taprop.adb<s-taprop-posix.adb \
790 s-taspri.ads<s-taspri-posix.ads \
791 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
792 g-soliop.ads<g-soliop-solaris.ads \
793 system.ads<system-solaris-sparc.ads
795 THREADSLIB = -lposix4 -lpthread
796 endif
798 ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),)
799 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
800 endif
801 endif
803 ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
804 LIBGNAT_TARGET_PAIRS = \
805 a-numaux.adb<a-numaux-x86.adb \
806 a-numaux.ads<a-numaux-x86.ads \
807 a-intnam.ads<a-intnam-solaris.ads \
808 s-inmaop.adb<s-inmaop-posix.adb \
809 s-intman.adb<s-intman-solaris.adb \
810 s-osinte.adb<s-osinte-solaris.adb \
811 s-osinte.ads<s-osinte-solaris.ads \
812 s-osprim.adb<s-osprim-solaris.adb \
813 s-taprop.adb<s-taprop-solaris.adb \
814 s-tasinf.adb<s-tasinf-solaris.adb \
815 s-tasinf.ads<s-tasinf-solaris.ads \
816 s-taspri.ads<s-taspri-solaris.ads \
817 s-tpopsp.adb<s-tpopsp-solaris.adb \
818 g-soliop.ads<g-soliop-solaris.ads
820 ifeq ($(strip $(MULTISUBDIR)),/amd64)
821 LIBGNAT_TARGET_PAIRS += \
822 system.ads<system-solaris-x86_64.ads
823 else
824 LIBGNAT_TARGET_PAIRS += \
825 g-bytswa.adb<g-bytswa-x86.adb \
826 system.ads<system-solaris-x86.ads
827 endif
829 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
831 EH_MECHANISM=-gcc
832 THREADSLIB = -lposix4 -lthread
833 MISCLIB = -lposix4 -lnsl -lsocket
834 SO_OPTS = -Wl,-h,
835 GNATLIB_SHARED = gnatlib-shared-dual
836 GMEM_LIB = gmemlib
837 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
838 LIBRARY_VERSION := $(LIB_VERSION)
839 endif
841 ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
842 LIBGNAT_TARGET_PAIRS = \
843 a-intnam.ads<a-intnam-linux.ads \
844 a-numaux.adb<a-numaux-x86.adb \
845 a-numaux.ads<a-numaux-x86.ads \
846 g-bytswa.adb<g-bytswa-x86.adb \
847 s-inmaop.adb<s-inmaop-posix.adb \
848 s-intman.adb<s-intman-posix.adb \
849 s-osprim.adb<s-osprim-posix.adb \
850 s-taspri.ads<s-taspri-posix.ads \
851 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
852 g-sercom.adb<g-sercom-linux.adb \
853 system.ads<system-linux-x86.ads
855 ifeq ($(strip $(filter-out marte,$(THREAD_KIND))),)
856 LIBGNAT_TARGET_PAIRS += \
857 a-exetim.adb<a-exetim-linux-marte.adb \
858 a-exetim.ads<a-exetim-linux-marte.ads \
859 a-extiti.adb<a-extiti-linux-marte.adb \
860 a-extiti.ads<a-extiti-linux-marte.ads \
861 a-rttiev.adb<a-rttiev-linux-marte.adb \
862 a-rttiev.ads<a-rttiev-linux-marte.ads \
863 s-osinte.adb<s-osinte-linux-marte.adb \
864 s-osinte.ads<s-osinte-linux-marte.ads \
865 s-taprop.adb<s-taprop-linux-marte.adb
867 EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o a-extiti.o
869 EH_MECHANISM=
870 THREADSLIB = -lmarte
871 else
872 LIBGNAT_TARGET_PAIRS += \
873 s-linux.ads<s-linux.ads \
874 s-osinte.adb<s-osinte-posix.adb
876 ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
877 LIBGNAT_TARGET_PAIRS += \
878 s-osinte.ads<s-osinte-linux-xenomai.ads \
879 s-taprop.adb<s-taprop-linux-xenomai.adb
881 EH_MECHANISM=
882 else
883 LIBGNAT_TARGET_PAIRS += \
884 s-osinte.ads<s-osinte-linux.ads \
885 s-taprop.adb<s-taprop-linux.adb \
886 s-tasinf.ads<s-tasinf-linux.ads \
887 s-tasinf.adb<s-tasinf-linux.adb
889 EH_MECHANISM=-gcc
890 endif
892 THREADSLIB = -lpthread
893 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
894 endif
896 TOOLS_TARGET_PAIRS = \
897 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
898 indepsw.adb<indepsw-gnu.adb
900 GNATLIB_SHARED = gnatlib-shared-dual
901 GMEM_LIB = gmemlib
902 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
903 LIBRARY_VERSION := $(LIB_VERSION)
904 endif
906 ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
907 LIBGNAT_TARGET_PAIRS = \
908 a-intnam.ads<a-intnam-freebsd.ads \
909 a-numaux.adb<a-numaux-x86.adb \
910 a-numaux.ads<a-numaux-x86.ads \
911 s-inmaop.adb<s-inmaop-posix.adb \
912 s-intman.adb<s-intman-posix.adb \
913 s-osinte.adb<s-osinte-posix.adb \
914 s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
915 s-osprim.adb<s-osprim-posix.adb \
916 s-taprop.adb<s-taprop-linux.adb \
917 s-tasinf.ads<s-tasinf-linux.ads \
918 s-tasinf.adb<s-tasinf-linux.adb \
919 s-taspri.ads<s-taspri-posix.ads \
920 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
921 system.ads<system-freebsd-x86.ads
923 TOOLS_TARGET_PAIRS = \
924 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
925 indepsw.adb<indepsw-gnu.adb
927 EH_MECHANISM=-gcc
928 THREADSLIB = -lpthread
929 GNATLIB_SHARED = gnatlib-shared-dual
930 GMEM_LIB = gmemlib
931 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
932 LIBRARY_VERSION := $(LIB_VERSION)
933 endif
935 ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
936 LIBGNAT_TARGET_PAIRS = \
937 a-intnam.ads<a-intnam-freebsd.ads \
938 a-numaux.adb<a-numaux-x86.adb \
939 a-numaux.ads<a-numaux-x86.ads \
940 g-bytswa.adb<g-bytswa-x86.adb \
941 s-inmaop.adb<s-inmaop-posix.adb \
942 s-intman.adb<s-intman-posix.adb \
943 s-osinte.adb<s-osinte-freebsd.adb \
944 s-osinte.ads<s-osinte-freebsd.ads \
945 s-osprim.adb<s-osprim-posix.adb \
946 s-taprop.adb<s-taprop-posix.adb \
947 s-taspri.ads<s-taspri-posix.ads \
948 s-tpopsp.adb<s-tpopsp-posix.adb \
949 system.ads<system-freebsd-x86.ads
951 TOOLS_TARGET_PAIRS = \
952 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
953 GNATLIB_SHARED = gnatlib-shared-dual
955 EH_MECHANISM=-gcc
956 THREADSLIB= -lpthread
957 GMEM_LIB = gmemlib
958 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
959 LIBRARY_VERSION := $(LIB_VERSION)
960 endif
962 ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
963 LIBGNAT_TARGET_PAIRS_COMMON = \
964 a-intnam.ads<a-intnam-linux.ads \
965 s-inmaop.adb<s-inmaop-posix.adb \
966 s-intman.adb<s-intman-posix.adb \
967 s-linux.ads<s-linux.ads \
968 s-osinte.adb<s-osinte-posix.adb \
969 s-osinte.ads<s-osinte-linux.ads \
970 s-osprim.adb<s-osprim-posix.adb \
971 s-taprop.adb<s-taprop-linux.adb \
972 s-tasinf.ads<s-tasinf-linux.ads \
973 s-tasinf.adb<s-tasinf-linux.adb \
974 s-taspri.ads<s-taspri-posix-noaltstack.ads \
975 s-tpopsp.adb<s-tpopsp-posix-foreign.adb
977 LIBGNAT_TARGET_PAIRS_32 = \
978 system.ads<system-linux-s390.ads
980 LIBGNAT_TARGET_PAIRS_64 = \
981 system.ads<system-linux-s390x.ads
983 ifeq ($(strip $(filter-out s390x,$(arch))),)
984 ifeq ($(strip $(MULTISUBDIR)),/32)
985 LIBGNAT_TARGET_PAIRS = \
986 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
987 else
988 LIBGNAT_TARGET_PAIRS = \
989 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
990 endif
991 else
992 LIBGNAT_TARGET_PAIRS = \
993 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
994 endif
996 TOOLS_TARGET_PAIRS = \
997 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
999 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1000 EH_MECHANISM=-gcc
1001 THREADSLIB = -lpthread
1002 GNATLIB_SHARED = gnatlib-shared-dual
1003 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1004 LIBRARY_VERSION := $(LIB_VERSION)
1005 endif
1007 ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
1008 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
1009 LIBGNAT_TARGET_PAIRS = \
1010 a-intnam.ads<a-intnam-irix.ads \
1011 s-inmaop.adb<s-inmaop-posix.adb \
1012 s-intman.adb<s-intman-irix.adb \
1013 s-mastop.adb<s-mastop-irix.adb \
1014 s-osinte.adb<s-osinte-irix.adb \
1015 s-osinte.ads<s-osinte-irix.ads \
1016 s-osprim.adb<s-osprim-posix.adb \
1017 s-proinf.adb<s-proinf-irix-athread.adb \
1018 s-proinf.ads<s-proinf-irix-athread.ads \
1019 s-taprop.adb<s-taprop-irix.adb \
1020 s-tasinf.ads<s-tasinf-irix.ads \
1021 s-taspri.ads<s-taspri-posix.ads \
1022 s-tpopsp.adb<s-tpopsp-posix.adb \
1023 s-traceb.adb<s-traceb-mastop.adb
1025 ifeq ($(strip $(MULTISUBDIR)),/64)
1026 LIBGNAT_TARGET_PAIRS += \
1027 system.ads<system-irix-n64.ads
1028 else
1029 ifeq ($(strip $(MULTISUBDIR)),/32)
1030 LIBGNAT_TARGET_PAIRS += \
1031 system.ads<system-irix-o32.ads
1032 else
1033 LIBGNAT_TARGET_PAIRS += \
1034 system.ads<system-irix-n32.ads
1035 endif
1036 endif
1038 THREADSLIB = -lpthread
1039 GNATLIB_SHARED = gnatlib-shared-default
1041 else
1042 LIBGNAT_TARGET_PAIRS += \
1043 s-mastop.adb<s-mastop-irix.adb \
1044 s-osprim.adb<s-osprim-posix.adb \
1045 s-traceb.adb<s-traceb-mastop.adb \
1046 system.ads<system-irix-o32.ads
1047 endif
1049 EH_MECHANISM=-gcc
1050 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-irix.adb
1051 TGT_LIB = -lexc
1052 MISCLIB = -lexc
1053 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1054 LIBRARY_VERSION := $(LIB_VERSION)
1055 GMEM_LIB = gmemlib
1056 endif
1058 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
1059 LIBGNAT_TARGET_PAIRS = \
1060 a-excpol.adb<a-excpol-abort.adb \
1061 a-intnam.ads<a-intnam-hpux.ads \
1062 s-inmaop.adb<s-inmaop-posix.adb \
1063 s-interr.adb<s-interr-sigaction.adb \
1064 s-intman.adb<s-intman-posix.adb \
1065 s-osinte.adb<s-osinte-hpux-dce.adb \
1066 s-osinte.ads<s-osinte-hpux-dce.ads \
1067 s-parame.ads<s-parame-hpux.ads \
1068 s-osprim.adb<s-osprim-posix.adb \
1069 s-taprop.adb<s-taprop-hpux-dce.adb \
1070 s-taspri.ads<s-taspri-hpux-dce.ads \
1071 s-tpopsp.adb<s-tpopsp-posix.adb \
1072 system.ads<system-hpux.ads
1074 EH_MECHANISM=-gcc
1075 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1076 endif
1078 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
1079 LIBGNAT_TARGET_PAIRS = \
1080 a-intnam.ads<a-intnam-hpux.ads \
1081 s-inmaop.adb<s-inmaop-posix.adb \
1082 s-intman.adb<s-intman-posix.adb \
1083 s-osinte.adb<s-osinte-posix.adb \
1084 s-osinte.ads<s-osinte-hpux.ads \
1085 s-parame.ads<s-parame-hpux.ads \
1086 s-osprim.adb<s-osprim-posix.adb \
1087 s-traceb.adb<s-traceb-hpux.adb \
1088 s-taprop.adb<s-taprop-posix.adb \
1089 s-taspri.ads<s-taspri-posix.ads \
1090 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1091 system.ads<system-hpux.ads
1093 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb
1094 EH_MECHANISM=-gcc
1095 TGT_LIB = /usr/lib/libcl.a
1096 THREADSLIB = -lpthread
1097 GMEM_LIB = gmemlib
1098 soext = .sl
1099 SO_OPTS = -Wl,+h,
1100 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1101 GNATLIB_SHARED = gnatlib-shared-dual
1102 LIBRARY_VERSION := $(LIB_VERSION)
1103 endif
1105 ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
1106 LIBGNAT_TARGET_PAIRS = \
1107 a-intnam.ads<a-intnam-aix.ads \
1108 s-inmaop.adb<s-inmaop-posix.adb \
1109 s-intman.adb<s-intman-posix.adb \
1110 s-osinte.adb<s-osinte-aix.adb \
1111 s-osinte.ads<s-osinte-aix.ads \
1112 s-osprim.adb<s-osprim-posix.adb \
1113 s-taprop.adb<s-taprop-posix.adb \
1114 s-taspri.ads<s-taspri-posix.ads \
1115 s-tpopsp.adb<s-tpopsp-posix.adb \
1116 system.ads<system-aix.ads
1118 THREADSLIB = -lpthreads
1119 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1121 TOOLS_TARGET_PAIRS = \
1122 mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
1123 indepsw.adb<indepsw-aix.adb
1125 GMEM_LIB = gmemlib
1126 endif
1128 ifeq ($(strip $(filter-out lynxos,$(osys))),)
1129 TOOLS_TARGET_PAIRS = \
1130 mlib-tgt-specific.adb<mlib-tgt-specific-lynxos.adb \
1131 indepsw.adb<indepsw-gnu.adb
1133 ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
1134 LIBGNAT_TARGET_PAIRS = \
1135 a-numaux.adb<a-numaux-x86.adb \
1136 a-numaux.ads<a-numaux-x86.ads \
1137 a-intnam.ads<a-intnam-lynxos.ads \
1138 g-bytswa.adb<g-bytswa-x86.adb \
1139 g-sttsne.adb<g-sttsne-locking.adb \
1140 g-sttsne.ads<g-sttsne-locking.ads \
1141 s-inmaop.adb<s-inmaop-posix.adb \
1142 s-intman.adb<s-intman-posix.adb \
1143 s-osinte.adb<s-osinte-lynxos.adb \
1144 s-osinte.ads<s-osinte-lynxos.ads \
1145 s-osprim.adb<s-osprim-posix.adb \
1146 s-taprop.adb<s-taprop-lynxos.adb \
1147 s-taspri.ads<s-taspri-lynxos.ads \
1148 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1149 system.ads<system-lynxos-x86.ads
1151 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1153 else
1154 LIBGNAT_TARGET_PAIRS = \
1155 a-intnam.ads<a-intnam-lynxos.ads \
1156 g-sttsne.adb<g-sttsne-locking.adb \
1157 g-sttsne.ads<g-sttsne-locking.ads \
1158 s-inmaop.adb<s-inmaop-posix.adb \
1159 s-intman.adb<s-intman-posix.adb \
1160 s-osinte.adb<s-osinte-lynxos.adb \
1161 s-osinte.ads<s-osinte-lynxos.ads \
1162 s-osprim.adb<s-osprim-posix.adb \
1163 s-taprop.adb<s-taprop-lynxos.adb \
1164 s-taspri.ads<s-taspri-lynxos.ads \
1165 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1166 system.ads<system-lynxos-ppc.ads
1167 endif
1168 endif
1170 ifeq ($(strip $(filter-out rtems%,$(osys))),)
1171 LIBGNAT_TARGET_PAIRS = \
1172 system.ads<system-rtems.ads \
1173 a-intnam.ads<a-intnam-rtems.ads \
1174 s-inmaop.adb<s-inmaop-posix.adb \
1175 s-intman.adb<s-intman-posix.adb \
1176 s-osinte.adb<s-osinte-rtems.adb \
1177 s-osinte.ads<s-osinte-rtems.ads \
1178 s-osprim.adb<s-osprim-posix.adb \
1179 s-parame.adb<s-parame-rtems.adb \
1180 s-taprop.adb<s-taprop-posix.adb \
1181 s-taspri.ads<s-taspri-posix.ads \
1182 s-tpopsp.adb<s-tpopsp-rtems.adb \
1183 s-stchop.adb<s-stchop-rtems.adb \
1184 s-interr.adb<s-interr-hwint.adb
1185 endif
1187 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
1188 LIBGNAT_TARGET_PAIRS = \
1189 a-intnam.ads<a-intnam-tru64.ads \
1190 s-inmaop.adb<s-inmaop-posix.adb \
1191 s-intman.adb<s-intman-posix.adb \
1192 s-mastop.adb<s-mastop-tru64.adb \
1193 s-osinte.adb<s-osinte-tru64.adb \
1194 s-osinte.ads<s-osinte-tru64.ads \
1195 s-osprim.adb<s-osprim-unix.adb \
1196 s-taprop.adb<s-taprop-tru64.adb \
1197 s-tasinf.ads<s-tasinf-tru64.ads \
1198 s-taspri.ads<s-taspri-tru64.ads \
1199 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1200 s-traceb.adb<s-traceb-mastop.adb \
1201 system.ads<system-tru64.ads
1203 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb
1205 EH_MECHANISM=-gcc
1206 GMEM_LIB=gmemlib
1207 THREADSLIB = -lpthread -lmach -lexc -lrt
1208 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1209 GNATLIB_SHARED = gnatlib-shared-default
1210 LIBRARY_VERSION := $(LIB_VERSION)
1211 endif
1213 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
1215 soext = .exe
1216 hyphen = _
1217 LN = cp -p
1218 LN_S = cp -p
1220 .SUFFIXES: .sym
1222 .o.sym:
1223 @ gnu:[bin]vmssymvec $<
1224 endif
1226 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1227 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1228 LIBGNAT_TARGET_PAIRS_AUX1 = \
1229 g-enblsp.adb<g-enblsp-vms-ia64.adb \
1230 g-trasym.adb<g-trasym-vms-ia64.adb \
1231 s-asthan.adb<s-asthan-vms-ia64.adb \
1232 s-osinte.adb<s-osinte-vms-ia64.adb \
1233 s-osinte.ads<s-osinte-vms-ia64.ads \
1234 s-vaflop.adb<s-vaflop-vms-ia64.adb \
1235 system.ads<system-vms-ia64.ads
1237 LIBGNAT_TARGET_PAIRS_AUX2 = \
1238 s-parame.ads<s-parame-vms-ia64.ads
1239 else
1240 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1241 LIBGNAT_TARGET_PAIRS_AUX1 = \
1242 g-enblsp.adb<g-enblsp-vms-alpha.adb \
1243 g-trasym.adb<g-trasym-vms-alpha.adb \
1244 s-traent.adb<s-traent-vms.adb \
1245 s-traent.ads<s-traent-vms.ads \
1246 s-asthan.adb<s-asthan-vms-alpha.adb \
1247 s-osinte.adb<s-osinte-vms.adb \
1248 s-osinte.ads<s-osinte-vms.ads \
1249 s-vaflop.adb<s-vaflop-vms-alpha.adb \
1250 system.ads<system-vms_64.ads
1252 ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1253 LIBGNAT_TARGET_PAIRS_AUX2 = \
1254 s-parame.ads<s-parame-vms-restrict.ads
1255 else
1256 LIBGNAT_TARGET_PAIRS_AUX2 = \
1257 s-parame.ads<s-parame-vms-alpha.ads
1258 endif
1259 endif
1260 endif
1262 LIBGNAT_TARGET_PAIRS = \
1263 a-caldel.adb<a-caldel-vms.adb \
1264 a-calend.adb<a-calend-vms.adb \
1265 a-calend.ads<a-calend-vms.ads \
1266 a-dirval.adb<a-dirval-vms.adb \
1267 a-excpol.adb<a-excpol-abort.adb \
1268 a-intnam.ads<a-intnam-vms.ads \
1269 a-numaux.ads<a-numaux-vms.ads \
1270 g-expect.adb<g-expect-vms.adb \
1271 g-socthi.ads<g-socthi-vms.ads \
1272 g-socthi.adb<g-socthi-vms.adb \
1273 g-stsifd.adb<g-stsifd-sockets.adb \
1274 g-sttsne.adb<g-sttsne-locking.adb \
1275 g-sttsne.ads<g-sttsne-locking.ads \
1276 i-c.ads<i-c-vms_64.ads \
1277 i-cstrin.ads<i-cstrin-vms_64.ads \
1278 i-cstrin.adb<i-cstrin-vms_64.adb \
1279 i-cpoint.ads<i-cpoint-vms_64.ads \
1280 i-cpoint.adb<i-cpoint-vms_64.adb \
1281 i-cstrea.adb<i-cstrea-vms.adb \
1282 memtrack.adb<memtrack-vms_64.adb \
1283 s-auxdec.ads<s-auxdec-vms_64.ads \
1284 s-crtl.ads<s-crtl-vms_64.ads \
1285 s-inmaop.adb<s-inmaop-vms.adb \
1286 s-interr.adb<s-interr-vms.adb \
1287 s-intman.adb<s-intman-vms.adb \
1288 s-intman.ads<s-intman-vms.ads \
1289 s-memory.adb<s-memory-vms_64.adb \
1290 s-memory.ads<s-memory-vms_64.ads \
1291 s-osprim.adb<s-osprim-vms.adb \
1292 s-osprim.ads<s-osprim-vms.ads \
1293 s-taprop.adb<s-taprop-vms.adb \
1294 s-taspri.ads<s-taspri-vms.ads \
1295 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1296 s-tpopde.adb<s-tpopde-vms.adb \
1297 s-tpopde.ads<s-tpopde-vms.ads \
1298 $(LIBGNAT_TARGET_PAIRS_AUX1) \
1299 $(LIBGNAT_TARGET_PAIRS_AUX2)
1301 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1302 TOOLS_TARGET_PAIRS= \
1303 mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
1304 symbols.adb<symbols-vms.adb \
1305 symbols-processing.adb<symbols-processing-vms-ia64.adb
1306 else
1307 TOOLS_TARGET_PAIRS= \
1308 mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
1309 symbols.adb<symbols-vms.adb \
1310 symbols-processing.adb<symbols-processing-vms-alpha.adb
1311 endif
1313 adamsg.o: adamsg.msg
1314 -$(DECC) --cc=message adamsg.msg -o adamsg.o
1316 EXTRA_GNATMAKE_OBJS = mlib-tgt-vms_common.o
1318 GMEM_LIB = gmemlib
1319 EH_MECHANISM=-gcc
1320 GNATLIB_SHARED=gnatlib-shared-vms
1321 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1322 EXTRA_LIBGNAT_SRCS=vmshandler.asm
1323 EXTRA_LIBGNAT_OBJS=vmshandler.o
1324 endif
1325 EXTRA_LIBGNAT_SRCS+=adamsg.msg
1326 EXTRA_LIBGNAT_OBJS+=adamsg.o
1327 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1328 EXTRA_GNATTOOLS = \
1329 ../../gnatlbr$(exeext) \
1330 ../../gnatsym$(exeext) \
1331 ../../vms_help$(exeext) \
1332 ../../gnat.hlp
1333 # This command transforms (YYYYMMDD) into YY,MMDD
1334 GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)ada/gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\).*/\2,\3/')
1335 TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1336 LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1337 endif
1339 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1340 LIBGNAT_TARGET_PAIRS = \
1341 a-dirval.adb<a-dirval-mingw.adb \
1342 a-excpol.adb<a-excpol-abort.adb \
1343 a-numaux.adb<a-numaux-x86.adb \
1344 a-numaux.ads<a-numaux-x86.ads \
1345 s-gloloc.adb<s-gloloc-mingw.adb \
1346 s-inmaop.adb<s-inmaop-dummy.adb \
1347 s-memory.adb<s-memory-mingw.adb \
1348 s-taspri.ads<s-taspri-mingw.ads \
1349 s-tasinf.adb<s-tasinf-mingw.adb \
1350 s-tasinf.ads<s-tasinf-mingw.ads \
1351 g-bytswa.adb<g-bytswa-x86.adb \
1352 g-socthi.ads<g-socthi-mingw.ads \
1353 g-socthi.adb<g-socthi-mingw.adb \
1354 g-stsifd.adb<g-stsifd-sockets.adb \
1355 g-soliop.ads<g-soliop-mingw.ads
1357 ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
1358 LIBGNAT_TARGET_PAIRS += \
1359 s-intman.adb<s-intman-dummy.adb \
1360 s-osinte.ads<s-osinte-rtx.ads \
1361 s-osprim.adb<s-osprim-rtx.adb \
1362 s-taprop.adb<s-taprop-rtx.adb
1364 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o
1366 ifeq ($(strip $(filter-out rtx_w32,$(THREAD_KIND))),)
1367 LIBGNAT_TARGET_PAIRS += system.ads<system-rtx.ads
1369 EH_MECHANISM=-gcc
1370 else
1371 LIBGNAT_TARGET_PAIRS += \
1372 system.ads<system-rtx-rtss.ads \
1373 s-parame.adb<s-parame-vxworks.adb
1375 EH_MECHANISM=
1376 endif
1378 else
1379 LIBGNAT_TARGET_PAIRS += \
1380 a-exetim.adb<a-exetim-mingw.adb \
1381 a-exetim.ads<a-exetim-mingw.ads \
1382 a-intnam.ads<a-intnam-mingw.ads \
1383 g-sercom.adb<g-sercom-mingw.adb \
1384 s-interr.adb<s-interr-sigaction.adb \
1385 s-intman.adb<s-intman-mingw.adb \
1386 s-osinte.ads<s-osinte-mingw.ads \
1387 s-osprim.adb<s-osprim-mingw.adb \
1388 s-taprop.adb<s-taprop-mingw.adb
1390 ifeq ($(strip $(filter-out x86_64%,$(arch))),)
1391 LIBGNAT_TARGET_PAIRS += \
1392 system.ads<system-mingw-x86_64.ads
1393 else
1394 LIBGNAT_TARGET_PAIRS += \
1395 system.ads<system-mingw.ads
1396 endif
1398 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o s-winext.o g-regist.o
1399 EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
1401 MISCLIB = -lwsock32
1403 # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1404 # auto-import support for array/record will be done.
1405 GNATLIB_SHARED = gnatlib-shared-win32
1406 endif
1408 TOOLS_TARGET_PAIRS= \
1409 mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
1410 indepsw.adb<indepsw-mingw.adb
1412 GMEM_LIB = gmemlib
1413 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1414 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1415 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1416 soext = .dll
1417 LIBRARY_VERSION := $(LIB_VERSION)
1418 endif
1420 ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
1421 LIBGNAT_TARGET_PAIRS = \
1422 a-intnam.ads<a-intnam-linux.ads \
1423 s-inmaop.adb<s-inmaop-posix.adb \
1424 s-intman.adb<s-intman-posix.adb \
1425 s-linux.ads<s-linux.ads \
1426 s-osinte.adb<s-osinte-posix.adb \
1427 s-osinte.ads<s-osinte-linux.ads \
1428 s-osprim.adb<s-osprim-posix.adb \
1429 s-taprop.adb<s-taprop-linux.adb \
1430 s-tasinf.ads<s-tasinf-linux.ads \
1431 s-tasinf.adb<s-tasinf-linux.adb \
1432 s-taspri.ads<s-taspri-posix.ads \
1433 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1434 system.ads<system-linux-mips.ads
1436 EH_MECHANISM=-gcc
1437 THREADSLIB = -lpthread
1438 GNATLIB_SHARED = gnatlib-shared-dual
1439 GMEM_LIB = gmemlib
1440 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1441 LIBRARY_VERSION := $(LIB_VERSION)
1442 endif
1444 ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
1445 LIBGNAT_TARGET_PAIRS = \
1446 a-intnam.ads<a-intnam-linux.ads \
1447 s-inmaop.adb<s-inmaop-posix.adb \
1448 s-intman.adb<s-intman-posix.adb \
1449 s-linux.ads<s-linux.ads \
1450 s-osinte.adb<s-osinte-posix.adb \
1451 s-osinte.ads<s-osinte-linux.ads \
1452 s-osprim.adb<s-osprim-posix.adb \
1453 s-taprop.adb<s-taprop-linux.adb \
1454 s-tasinf.ads<s-tasinf-linux.ads \
1455 s-tasinf.adb<s-tasinf-linux.adb \
1456 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1457 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1458 g-sercom.adb<g-sercom-linux.adb \
1459 system.ads<system-linux-mipsel.ads
1461 TOOLS_TARGET_PAIRS = \
1462 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1463 indepsw.adb<indepsw-gnu.adb
1465 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1466 EH_MECHANISM=-gcc
1467 THREADSLIB = -lpthread
1468 GNATLIB_SHARED = gnatlib-shared-dual
1469 GMEM_LIB = gmemlib
1470 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1471 LIBRARY_VERSION := $(LIB_VERSION)
1472 endif
1474 ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
1475 LIBGNAT_TARGET_PAIRS_COMMON = \
1476 a-intnam.ads<a-intnam-linux.ads \
1477 s-inmaop.adb<s-inmaop-posix.adb \
1478 s-intman.adb<s-intman-posix.adb \
1479 s-linux.ads<s-linux.ads \
1480 s-osinte.adb<s-osinte-posix.adb \
1481 s-osinte.ads<s-osinte-linux.ads \
1482 s-osprim.adb<s-osprim-posix.adb \
1483 s-taprop.adb<s-taprop-linux.adb \
1484 s-tasinf.ads<s-tasinf-linux.ads \
1485 s-tasinf.adb<s-tasinf-linux.adb \
1486 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1487 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1488 g-sercom.adb<g-sercom-linux.adb
1490 LIBGNAT_TARGET_PAIRS_32 = \
1491 system.ads<system-linux-ppc.ads
1493 LIBGNAT_TARGET_PAIRS_64 = \
1494 system.ads<system-linux-ppc64.ads
1496 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1497 LIBGNAT_TARGET_PAIRS = \
1498 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1499 else
1500 LIBGNAT_TARGET_PAIRS = \
1501 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1502 endif
1504 TOOLS_TARGET_PAIRS = \
1505 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1506 indepsw.adb<indepsw-gnu.adb
1508 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1509 EH_MECHANISM=-gcc
1510 THREADSLIB = -lpthread
1511 GNATLIB_SHARED = gnatlib-shared-dual
1512 GMEM_LIB = gmemlib
1513 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1514 LIBRARY_VERSION := $(LIB_VERSION)
1515 endif
1517 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
1518 LIBGNAT_TARGET_PAIRS_COMMON = \
1519 a-intnam.ads<a-intnam-linux.ads \
1520 s-inmaop.adb<s-inmaop-posix.adb \
1521 s-intman.adb<s-intman-posix.adb \
1522 s-linux.ads<s-linux.ads \
1523 s-osinte.adb<s-osinte-posix.adb \
1524 s-osinte.ads<s-osinte-linux.ads \
1525 s-osprim.adb<s-osprim-posix.adb \
1526 s-taprop.adb<s-taprop-linux.adb \
1527 s-tasinf.ads<s-tasinf-linux.ads \
1528 s-tasinf.adb<s-tasinf-linux.adb \
1529 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1530 s-tpopsp.adb<s-tpopsp-posix-foreign.adb
1532 LIBGNAT_TARGET_PAIRS_32 = \
1533 system.ads<system-linux-sparc.ads
1535 LIBGNAT_TARGET_PAIRS_64 = \
1536 system.ads<system-linux-sparcv9.ads
1538 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1539 LIBGNAT_TARGET_PAIRS = \
1540 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1541 else
1542 LIBGNAT_TARGET_PAIRS = \
1543 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1544 endif
1546 TOOLS_TARGET_PAIRS = \
1547 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1548 indepsw.adb<indepsw-gnu.adb
1550 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1551 EH_MECHANISM=-gcc
1552 THREADSLIB = -lpthread
1553 GNATLIB_SHARED = gnatlib-shared-dual
1554 GMEM_LIB = gmemlib
1555 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1556 LIBRARY_VERSION := $(LIB_VERSION)
1557 endif
1559 ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1560 LIBGNAT_TARGET_PAIRS = \
1561 a-intnam.ads<a-intnam-linux.ads \
1562 s-inmaop.adb<s-inmaop-posix.adb \
1563 s-intman.adb<s-intman-posix.adb \
1564 s-linux.ads<s-linux-hppa.ads \
1565 s-osinte.adb<s-osinte-posix.adb \
1566 s-osinte.ads<s-osinte-linux.ads \
1567 s-osprim.adb<s-osprim-posix.adb \
1568 s-taprop.adb<s-taprop-linux.adb \
1569 s-tasinf.ads<s-tasinf-linux.ads \
1570 s-tasinf.adb<s-tasinf-linux.adb \
1571 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1572 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1573 system.ads<system-linux-hppa.ads
1575 TOOLS_TARGET_PAIRS = \
1576 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1577 indepsw.adb<indepsw-gnu.adb
1579 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1580 EH_MECHANISM=-gcc
1581 THREADSLIB = -lpthread
1582 GNATLIB_SHARED = gnatlib-shared-dual
1583 GMEM_LIB = gmemlib
1584 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1585 LIBRARY_VERSION := $(LIB_VERSION)
1586 endif
1588 ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
1589 LIBGNAT_TARGET_PAIRS = \
1590 a-intnam.ads<a-intnam-linux.ads \
1591 s-inmaop.adb<s-inmaop-posix.adb \
1592 s-intman.adb<s-intman-posix.adb \
1593 s-linux.ads<s-linux.ads \
1594 s-osinte.adb<s-osinte-posix.adb \
1595 s-osinte.ads<s-osinte-linux.ads \
1596 s-osprim.adb<s-osprim-posix.adb \
1597 s-taprop.adb<s-taprop-linux.adb \
1598 s-tasinf.ads<s-tasinf-linux.ads \
1599 s-tasinf.adb<s-tasinf-linux.adb \
1600 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1601 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1602 system.ads<system-linux-sh4.ads
1604 TOOLS_TARGET_PAIRS = \
1605 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1606 indepsw.adb<indepsw-linux.adb
1608 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1609 EH_MECHANISM=-gcc
1610 MISCLIB=
1611 THREADSLIB = -lpthread
1612 GNATLIB_SHARED = gnatlib-shared-dual
1613 GMEM_LIB = gmemlib
1614 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1615 LIBRARY_VERSION := $(LIB_VERSION)
1616 endif
1618 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1619 LIBGNAT_TARGET_PAIRS = \
1620 a-intnam.ads<a-intnam-linux.ads \
1621 a-numaux.ads<a-numaux-libc-x86.ads \
1622 s-inmaop.adb<s-inmaop-posix.adb \
1623 s-intman.adb<s-intman-posix.adb \
1624 s-linux.ads<s-linux.ads \
1625 s-osinte.ads<s-osinte-linux.ads \
1626 s-osinte.adb<s-osinte-posix.adb \
1627 s-osprim.adb<s-osprim-posix.adb \
1628 s-taprop.adb<s-taprop-linux.adb \
1629 s-tasinf.ads<s-tasinf-linux.ads \
1630 s-tasinf.adb<s-tasinf-linux.adb \
1631 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1632 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1633 g-sercom.adb<g-sercom-linux.adb \
1634 system.ads<system-linux-ia64.ads
1636 TOOLS_TARGET_PAIRS = \
1637 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1638 indepsw.adb<indepsw-gnu.adb
1640 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1641 EH_MECHANISM=-gcc
1642 MISCLIB=
1643 THREADSLIB=-lpthread
1644 GNATLIB_SHARED=gnatlib-shared-dual
1645 GMEM_LIB = gmemlib
1646 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1647 LIBRARY_VERSION := $(LIB_VERSION)
1648 endif
1650 ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
1651 LIBGNAT_TARGET_PAIRS = \
1652 a-intnam.ads<a-intnam-linux.ads \
1653 s-inmaop.adb<s-inmaop-posix.adb \
1654 s-intman.adb<s-intman-posix.adb \
1655 s-linux.ads<s-linux-alpha.ads \
1656 s-osinte.ads<s-osinte-linux.ads \
1657 s-osinte.adb<s-osinte-posix.adb \
1658 s-osprim.adb<s-osprim-posix.adb \
1659 s-taprop.adb<s-taprop-linux.adb \
1660 s-tasinf.ads<s-tasinf-linux.ads \
1661 s-tasinf.adb<s-tasinf-linux.adb \
1662 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1663 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1664 system.ads<system-linux-alpha.ads
1666 TOOLS_TARGET_PAIRS = \
1667 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1668 indepsw.adb<indepsw-gnu.adb
1670 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1671 EH_MECHANISM=-gcc
1672 MISCLIB=
1673 THREADSLIB=-lpthread
1674 GNATLIB_SHARED=gnatlib-shared-dual
1675 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1676 LIBRARY_VERSION := $(LIB_VERSION)
1677 endif
1679 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
1680 LIBGNAT_TARGET_PAIRS = \
1681 a-intnam.ads<a-intnam-linux.ads \
1682 a-numaux.adb<a-numaux-x86.adb \
1683 a-numaux.ads<a-numaux-x86.ads \
1684 s-inmaop.adb<s-inmaop-posix.adb \
1685 s-intman.adb<s-intman-posix.adb \
1686 s-linux.ads<s-linux.ads \
1687 s-osinte.ads<s-osinte-linux.ads \
1688 s-osinte.adb<s-osinte-posix.adb \
1689 s-osprim.adb<s-osprim-posix.adb \
1690 s-taprop.adb<s-taprop-linux.adb \
1691 s-tasinf.ads<s-tasinf-linux.ads \
1692 s-tasinf.adb<s-tasinf-linux.adb \
1693 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1694 s-taspri.ads<s-taspri-posix.ads \
1695 g-sercom.adb<g-sercom-linux.adb \
1696 system.ads<system-linux-x86_64.ads
1698 TOOLS_TARGET_PAIRS = \
1699 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1700 indepsw.adb<indepsw-gnu.adb
1702 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1703 EH_MECHANISM=-gcc
1704 THREADSLIB=-lpthread
1705 GNATLIB_SHARED=gnatlib-shared-dual
1706 GMEM_LIB = gmemlib
1707 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1708 LIBRARY_VERSION := $(LIB_VERSION)
1709 endif
1711 ifeq ($(strip $(filter-out darwin%,$(osys))),)
1712 ifeq ($(strip $(filter-out %86,$(arch))),)
1713 LIBGNAT_TARGET_PAIRS = \
1714 a-intnam.ads<a-intnam-darwin.ads \
1715 s-inmaop.adb<s-inmaop-posix.adb \
1716 s-intman.adb<s-intman-posix.adb \
1717 s-osinte.adb<s-osinte-darwin.adb \
1718 s-osinte.ads<s-osinte-darwin.ads \
1719 s-osprim.adb<s-osprim-posix.adb \
1720 s-taprop.adb<s-taprop-posix.adb \
1721 s-taspri.ads<s-taspri-posix.ads \
1722 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1723 a-numaux.ads<a-numaux-x86.ads \
1724 a-numaux.adb<a-numaux-x86.adb
1725 ifeq ($(strip $(MULTISUBDIR)),/x86_64)
1726 LIBGNAT_TARGET_PAIRS += \
1727 system.ads<system-darwin-x86_64.ads
1728 else
1729 LIBGNAT_TARGET_PAIRS += \
1730 system.ads<system-darwin-x86.ads
1731 endif
1732 else
1733 LIBGNAT_TARGET_PAIRS = \
1734 a-intnam.ads<a-intnam-darwin.ads \
1735 s-inmaop.adb<s-inmaop-posix.adb \
1736 s-intman.adb<s-intman-posix.adb \
1737 s-osinte.adb<s-osinte-darwin.adb \
1738 s-osinte.ads<s-osinte-darwin.ads \
1739 s-osprim.adb<s-osprim-posix.adb \
1740 s-taprop.adb<s-taprop-posix.adb \
1741 s-taspri.ads<s-taspri-posix.ads \
1742 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1743 a-numaux.ads<a-numaux-darwin.ads \
1744 a-numaux.adb<a-numaux-darwin.adb \
1745 system.ads<system-darwin-ppc.ads
1746 endif
1748 TOOLS_TARGET_PAIRS = \
1749 mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb
1751 EH_MECHANISM=-gcc
1752 GNATLIB_SHARED = gnatlib-shared-darwin
1753 SO_OPTS = -Wl,-flat_namespace -shared-libgcc
1754 RANLIB = ranlib -c
1755 GMEM_LIB = gmemlib
1756 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1757 LIBRARY_VERSION := $(LIB_VERSION)
1758 soext = .dylib
1759 endif
1761 ifneq ($(EH_MECHANISM),)
1762 LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
1763 EXTRA_LIBGNAT_SRCS+=raise$(EH_MECHANISM).c
1764 EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
1765 endif
1767 # Use the Ada 2005 version of Ada.Exceptions by default, unless specified
1768 # explicitly already. The base files (a-except.ad?) are used only for building
1769 # the compiler and other basic tools.
1770 # These base versions lack Ada 2005 additions which would cause bootstrap
1771 # problems if included in the compiler and other basic tools.
1773 ifeq ($(filter-out a-except%,$(LIBGNAT_TARGET_PAIRS)),$(LIBGNAT_TARGET_PAIRS))
1774 LIBGNAT_TARGET_PAIRS += \
1775 a-except.ads<a-except-2005.ads \
1776 a-except.adb<a-except-2005.adb
1777 endif
1779 # The runtime library for gnat comprises two directories. One contains the
1780 # Ada source files that the compiler (gnat1) needs -- these files are listed
1781 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1782 # corresponding .ali files for the parts written in Ada, libgnat.a for
1783 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1784 # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1785 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1786 # go into the directory. The pthreads emulation is built in the threads
1787 # subdirectory and copied.
1788 LIBGNAT_SRCS = adaint.c adaint.h argv.c cio.c cstreams.c \
1789 errno.c exit.c cal.c ctrl_c.c env.c env.h arit64.c \
1790 raise.h raise.c sysdep.c aux-io.c init.c initialize.c seh_init.c \
1791 final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c expect.c mkdir.c \
1792 socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
1794 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o env.o \
1795 raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o arit64.o \
1796 final.o tracebak.o expect.o mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
1798 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1799 # the library installation will change and there will be a
1800 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1801 # from ADA_INCLUDE_SRCS.
1803 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
1804 # the following include file:
1806 include $(fsrcdir)/ada/Makefile.rtl
1808 GNATRTL_LINEARALGEBRA_OBJS = a-nlcoar.o a-nllcar.o a-nllrar.o a-nlrear.o \
1809 a-nucoar.o a-nurear.o i-forbla.o i-forlap.o s-gearop.o
1811 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
1812 $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
1814 # Default run time files
1816 ADA_INCLUDE_SRCS =\
1817 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1818 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1819 sequenio.ads system.ads memtrack.adb \
1820 a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
1821 s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
1823 LIBGNAT=../$(RTSDIR)/libgnat.a
1825 GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
1827 # when compiling the tools, the runtime has to be first on the path so that
1828 # it hides the runtime files lying with the rest of the sources
1829 ifeq ($(TOOLSCASE),native)
1830 vpath %.ads ../$(RTSDIR) ../
1831 vpath %.adb ../$(RTSDIR) ../
1832 vpath %.c ../$(RTSDIR) ../
1833 vpath %.h ../$(RTSDIR) ../
1834 endif
1836 # in the cross tools case, everything is compiled with the native
1837 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1838 ifeq ($(TOOLSCASE),cross)
1839 vpath %.ads ../
1840 vpath %.adb ../
1841 vpath %.c ../
1842 vpath %.h ../
1843 endif
1845 common-tools:
1846 $(GNATMAKE) -c -b $(ADA_INCLUDES) \
1847 --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
1848 gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
1849 gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
1850 $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
1851 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1852 $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
1853 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1854 $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
1855 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1856 $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
1857 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1858 $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
1859 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1860 $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
1861 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1862 $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
1863 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1864 $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
1865 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1866 $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
1867 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1869 ../../gnatsym$(exeext):
1870 $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
1871 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
1872 $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1874 ../../gnatdll$(exeext):
1875 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1876 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
1877 $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1879 ../../vxaddr2line$(exeext): targext.o
1880 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
1881 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
1882 $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
1884 gnatmake-re: link.o targext.o
1885 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1886 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1887 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
1888 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1889 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1891 # Note the use of the "mv" command in order to allow gnatlink to be linked with
1892 # with the former version of gnatlink itself which cannot override itself.
1893 gnatlink-re: link.o targext.o
1894 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1895 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
1896 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1897 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1898 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
1900 # Needs to be built with CC=gcc
1901 # Since the RTL should be built with the latest compiler, remove the
1902 # stamp target in the parent directory whenever gnat1 is rebuilt
1904 # Likewise for the tools
1905 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
1906 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1907 $(TOOLS_LIBS)
1909 ../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
1910 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1911 $(TOOLS_LIBS)
1913 ../stamp-gnatlib-$(RTSDIR):
1914 @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
1915 then \
1916 $(ECHO) You must first build the GNAT library: make gnatlib; \
1917 false; \
1918 else \
1919 true; \
1922 install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
1923 # Create the directory before deleting it, in case the directory is
1924 # a list of directories (as it may be on VMS). This ensures we are
1925 # deleting the right one.
1926 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1927 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1928 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1929 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1930 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1931 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1932 for file in $(RTSDIR)/*.ali; do \
1933 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1934 done
1935 -$(INSTALL_DATA) $(RTSDIR)/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1936 -cd $(RTSDIR); for file in *$(arext);do \
1937 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1938 $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
1939 done
1940 -$(foreach file, $(EXTRA_ADALIB_FILES), \
1941 $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
1942 ) true
1943 # Install the shared libraries, if any, using $(INSTALL) instead
1944 # of $(INSTALL_DATA). The latter may force a mode inappropriate
1945 # for shared libraries on some targets, e.g. on HP-UX where the x
1946 # permission is required.
1947 for file in gnat gnarl; do \
1948 if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
1949 $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1950 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1951 fi; \
1952 if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
1953 $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1954 $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
1955 fi; \
1956 done
1957 # This copy must be done preserving the date on the original file.
1958 for file in $(RTSDIR)/*.ad?; do \
1959 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
1960 done
1961 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1962 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1964 ../stamp-gnatlib2-$(RTSDIR):
1965 $(RM) $(RTSDIR)/s-*.ali
1966 $(RM) $(RTSDIR)/s-*$(objext)
1967 $(RM) $(RTSDIR)/a-*.ali
1968 $(RM) $(RTSDIR)/a-*$(objext)
1969 $(RM) $(RTSDIR)/*.ali
1970 $(RM) $(RTSDIR)/*$(objext)
1971 $(RM) $(RTSDIR)/*$(arext)
1972 $(RM) $(RTSDIR)/*$(soext)
1973 touch ../stamp-gnatlib2-$(RTSDIR)
1974 $(RM) ../stamp-gnatlib-$(RTSDIR)
1976 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1977 # successive target commands. Although the Gnu make documentation
1978 # implies this is true on all systems, I suspect it may not be, So care
1979 # has been taken to allow a sed script to look for ";)" and substitue
1980 # for ";" the appropriate character in the range of lines below
1981 # beginning with "GNULLI Begin" and ending with "GNULLI End"
1983 # GNULLI Begin ###########################################################
1985 ../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
1986 $(RMDIR) $(RTSDIR)
1987 $(MKDIR) $(RTSDIR)
1988 $(CHMOD) u+w $(RTSDIR)
1989 # Copy target independent sources
1990 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
1991 $(LN_S) $(fsrcpfx)ada/$(f) $(RTSDIR) ;) true
1992 # Remove files to be replaced by target dependent sources
1993 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1994 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
1995 $(RM) $(RTSDIR)/*-*-*.ads $(RTSDIR)/*-*-*.adb
1996 # Copy new target dependent sources
1997 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1998 $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
1999 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
2000 # Copy generated target dependent sources
2001 $(RM) $(RTSDIR)/s-oscons.ads
2002 (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
2003 $(RM) ../stamp-gnatlib-$(RTSDIR)
2004 touch ../stamp-gnatlib1-$(RTSDIR)
2006 # GNULLI End #############################################################
2008 # Don't use semicolon separated shell commands that involve list expansions.
2009 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
2010 # line lengths in excess of 256 characters.
2011 # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
2012 # is guaranteed to overflow the buffer.
2014 gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
2015 $(MAKE) -C $(RTSDIR) \
2016 CC="`echo \"$(GCC_FOR_TARGET)\" \
2017 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2018 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
2019 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
2020 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2021 srcdir=$(fsrcdir) \
2022 -f ../Makefile $(LIBGNAT_OBJS)
2023 $(MAKE) -C $(RTSDIR) \
2024 CC="`echo \"$(GCC_FOR_TARGET)\" \
2025 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2026 ADA_INCLUDES="" \
2027 CFLAGS="$(GNATLIBCFLAGS)" \
2028 ADAFLAGS="$(GNATLIBFLAGS)" \
2029 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2030 srcdir=$(fsrcdir) \
2031 -f ../Makefile \
2032 $(GNATRTL_OBJS)
2033 $(RM) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnarl$(arext)
2034 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat$(arext) \
2035 $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
2036 ifneq ($(PREFIX_OBJS),)
2037 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgccprefix$(arext) \
2038 $(PREFIX_OBJS);
2039 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgccprefix$(arext)
2040 endif
2041 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat$(arext)
2042 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \
2043 $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
2044 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext)
2045 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnala$(arext) \
2046 $(addprefix $(RTSDIR)/,$(GNATRTL_LINEARALGEBRA_OBJS))
2047 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnala$(arext)
2048 ifeq ($(GMEM_LIB),gmemlib)
2049 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \
2050 $(RTSDIR)/memtrack.o
2051 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
2052 endif
2053 $(CHMOD) a-wx $(RTSDIR)/*.ali
2054 touch ../stamp-gnatlib-$(RTSDIR)
2056 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
2057 gnatlib-shared-default:
2058 $(MAKE) $(FLAGS_TO_PASS) \
2059 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2060 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2061 MULTISUBDIR="$(MULTISUBDIR)" \
2062 THREAD_KIND="$(THREAD_KIND)" \
2063 gnatlib
2064 $(RM) $(RTSDIR)/libgna*$(soext)
2065 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2066 $(TARGET_LIBGCC2_CFLAGS) \
2067 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2068 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2069 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2070 $(MISCLIB) -lm
2071 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2072 $(TARGET_LIBGCC2_CFLAGS) \
2073 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2074 $(GNATRTL_TASKING_OBJS) \
2075 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2076 $(THREADSLIB)
2077 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2078 libgnat$(soext)
2079 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2080 libgnarl$(soext)
2082 gnatlib-shared-dual:
2083 $(MAKE) $(FLAGS_TO_PASS) \
2084 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2085 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2086 MULTISUBDIR="$(MULTISUBDIR)" \
2087 THREAD_KIND="$(THREAD_KIND)" \
2088 gnatlib-shared-default
2089 $(MV) $(RTSDIR)/libgna*$(soext) .
2090 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2091 $(MAKE) $(FLAGS_TO_PASS) \
2092 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2093 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2094 MULTISUBDIR="$(MULTISUBDIR)" \
2095 THREAD_KIND="$(THREAD_KIND)" \
2096 gnatlib
2097 $(MV) libgna*$(soext) $(RTSDIR)
2099 gnatlib-shared-dual-win32:
2100 $(MAKE) $(FLAGS_TO_PASS) \
2101 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2102 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2103 MULTISUBDIR="$(MULTISUBDIR)" \
2104 THREAD_KIND="$(THREAD_KIND)" \
2105 gnatlib-shared-win32
2106 $(MV) $(RTSDIR)/libgna*$(soext) .
2107 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2108 $(MAKE) $(FLAGS_TO_PASS) \
2109 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2110 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2111 MULTISUBDIR="$(MULTISUBDIR)" \
2112 THREAD_KIND="$(THREAD_KIND)" \
2113 gnatlib
2114 $(MV) libgna*$(soext) $(RTSDIR)
2116 # ??? we need to add the option to support auto-import of arrays/records to
2117 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
2118 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
2119 # Windows.
2120 gnatlib-shared-win32:
2121 $(MAKE) $(FLAGS_TO_PASS) \
2122 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2123 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2124 MULTISUBDIR="$(MULTISUBDIR)" \
2125 THREAD_KIND="$(THREAD_KIND)" \
2126 gnatlib
2127 $(RM) $(RTSDIR)/libgna*$(soext)
2128 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2129 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2130 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2131 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
2132 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2133 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2134 $(GNATRTL_TASKING_OBJS) \
2135 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2136 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2138 gnatlib-shared-darwin:
2139 $(MAKE) $(FLAGS_TO_PASS) \
2140 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2141 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
2142 -fno-common" \
2143 MULTISUBDIR="$(MULTISUBDIR)" \
2144 THREAD_KIND="$(THREAD_KIND)" \
2145 gnatlib
2146 $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
2147 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2148 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2149 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2150 $(SO_OPTS) \
2151 $(MISCLIB) -lm
2152 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2153 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2154 $(GNATRTL_TASKING_OBJS) \
2155 $(SO_OPTS) \
2156 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2157 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2158 libgnat$(soext)
2159 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2160 libgnarl$(soext)
2162 gnatlib-shared-vms:
2163 $(MAKE) $(FLAGS_TO_PASS) \
2164 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2165 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2166 MULTISUBDIR="$(MULTISUBDIR)" \
2167 THREAD_KIND="$(THREAD_KIND)" \
2168 gnatlib
2169 $(RM) $(RTSDIR)/libgna*$(soext)
2170 cd $(RTSDIR) && \
2171 ../../gnatsym -s SYMVEC_$$$$.opt \
2172 $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \
2173 ../../xgcc -g -B../../ -shared -shared-libgcc \
2174 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
2175 sys\$$library:trace.exe \
2176 --for-linker=/noinform \
2177 --for-linker=SYMVEC_$$$$.opt \
2178 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2179 cd $(RTSDIR) && \
2180 ../../gnatsym -s SYMVEC_$$$$.opt \
2181 $(GNATRTL_TASKING_OBJS) && \
2182 ../../xgcc -g -B../../ -shared -shared-libgcc \
2183 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2184 libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2185 sys\$$library:trace.exe \
2186 --for-linker=/noinform \
2187 --for-linker=SYMVEC_$$$$.opt \
2188 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2190 gnatlib-shared:
2191 $(MAKE) $(FLAGS_TO_PASS) \
2192 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2193 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2194 MULTISUBDIR="$(MULTISUBDIR)" \
2195 THREAD_KIND="$(THREAD_KIND)" \
2196 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
2197 $(GNATLIB_SHARED)
2199 gnatlib-sjlj:
2200 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1-$(RTSDIR)
2201 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2202 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2203 $(MAKE) $(FLAGS_TO_PASS) \
2204 EH_MECHANISM="" \
2205 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2206 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2207 MULTISUBDIR="$(MULTISUBDIR)" \
2208 THREAD_KIND="$(THREAD_KIND)" \
2209 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2211 gnatlib-zcx:
2212 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1-$(RTSDIR)
2213 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2214 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2215 $(MAKE) $(FLAGS_TO_PASS) \
2216 EH_MECHANISM="-gcc" \
2217 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2218 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2219 MULTISUBDIR="$(MULTISUBDIR)" \
2220 THREAD_KIND="$(THREAD_KIND)" \
2221 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2223 # .s files for cross-building
2224 gnat-cross: force
2225 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
2227 # Compiling object files from source files.
2229 # Note that dependencies on obstack.h are not written
2230 # because that file is not part of GCC.
2231 # Dependencies on gvarargs.h are not written
2232 # because all that file does, when not compiling with GCC,
2233 # is include the system varargs.h.
2235 b_gnatl.c : $(GNATLINK_OBJS)
2236 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2237 b_gnatl.o : b_gnatl.c
2239 b_gnatm.c : $(GNATMAKE_OBJS)
2240 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2241 b_gnatm.o : b_gnatm.c
2243 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2244 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2246 # force no sibling call optimization on s-traceb.o so the number of stack
2247 # frames to be skipped when computing a call chain is not modified by
2248 # optimization. However we can do that only when building the runtime
2249 # (not the compiler) because the -fno-optimize-sibling-calls option exists
2250 # only in GCC 3 and above.
2252 ifneq (,$(findstring xgcc,$(CC)))
2253 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2254 else
2255 NO_SIBLING_ADAFLAGS=
2256 endif
2258 s-traceb.o : s-traceb.adb
2259 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2260 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2261 $< $(OUTPUT_OPTION)
2263 # force debugging information on s-tasdeb.o so that it is always
2264 # possible to set conditional breakpoints on tasks.
2266 s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
2267 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2268 $< $(OUTPUT_OPTION)
2270 # force no function reordering on a-except.o because of the exclusion bounds
2271 # mechanism (see the source file for more detailed information). However we
2272 # can do that only when building the runtime (not the compiler) because the
2273 # -fno-toplevel-reorder option exists only in GCC 4.2 and above.
2275 ifneq (,$(findstring xgcc,$(CC)))
2276 NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
2277 else
2278 NO_REORDER_ADAFLAGS=
2279 endif
2281 # force debugging information on a-except.o so that it is always
2282 # possible to set conditional breakpoints on exceptions.
2283 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2285 a-except.o : a-except.adb a-except.ads
2286 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2287 $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2289 # compile s-except.o without optimization and with debug info to let the
2290 # debugger set breakpoints and inspect subprogram parameters on exception
2291 # related events.
2293 s-except.o : s-except.adb s-except.ads
2294 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2295 $< $(OUTPUT_OPTION)
2297 # force debugging information on s-assert.o so that it is always
2298 # possible to set breakpoint on assert failures.
2300 s-assert.o : s-assert.adb s-assert.ads a-except.ads
2301 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
2302 $< $(OUTPUT_OPTION)
2304 adadecode.o : adadecode.c adadecode.h
2305 aux-io.o : aux-io.c
2306 argv.o : argv.c
2307 cal.o : cal.c
2308 deftarg.o : deftarg.c
2309 errno.o : errno.c
2310 exit.o : adaint.h exit.c
2311 expect.o : expect.c
2312 final.o : final.c
2313 gmem.o : gmem.c
2314 link.o : link.c
2315 mkdir.o : mkdir.c
2316 socket.o : socket.c gsocket.h
2317 sysdep.o : sysdep.c
2318 raise-gcc.o : raise-gcc.c raise.h
2319 raise.o : raise.c raise.h
2320 vx_stack_info.o : vx_stack_info.c
2322 cio.o : cio.c
2323 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2324 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2326 init.o : init.c adaint.h raise.h
2327 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2328 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2330 initialize.o : initialize.c raise.h
2331 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2332 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2334 targext.o : targext.c
2335 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2336 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2337 $< $(OUTPUT_OPTION)
2339 # No optimization to compile this file as optimizations (-O1 or above) breaks
2340 # the SEH handling on Windows. The reasons are not clear.
2341 seh_init.o : seh_init.c raise.h
2342 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) -O0 \
2343 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2345 # Need to keep the frame pointer in this file to pop the stack properly on
2346 # some targets.
2347 tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
2348 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2349 -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2351 # In GNU Make, ignore whether `stage*' exists.
2352 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2353 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2355 force:
2357 # Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
2359 ../../gnatlbr$(exeext): ../../prefix.o
2360 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2361 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2362 $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2364 ../../vms_help$(exeext):
2365 $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
2366 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
2367 $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2369 ../../gnat.hlp: ../../vms_help$(exeext)
2370 ../../vms_help$(exeext) $(fsrcdir)/ada/gnat.help_in \
2371 $(fsrcdir)/ada/vms_data.ads ../../gnat.hlp