]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/gcc-interface/Makefile.in
Makefile.in (GNATLIBCFLAGS_FOR_C): New variable.
[thirdparty/gcc.git] / gcc / ada / gcc-interface / Makefile.in
1 # Makefile for GNU Ada Compiler (GNAT).
2 # Copyright (C) 1994-2009 Free Software Foundation, Inc.
3
4 #This file is part of GCC.
5
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.
10
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.
15
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/>.
19
20 # The makefile built from this file lives in the language subdirectory.
21 # Its purpose is to provide support for:
22 #
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.
26 #
27 # The parent makefile handles all other chores, with help from the
28 # language makefile fragment, of course.
29 #
30 # The targets for external use are:
31 # all, TAGS, ???mostlyclean, ???clean.
32
33 # This makefile will only work with Gnu make.
34 # The rules are written assuming a minimum subset of tools are available:
35 #
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.
53 #
54 # Optional:
55 # BISON: Gnu bison works.
56 # FLEX: Gnu flex works.
57 # Other miscellaneous tools for obscure targets.
58
59 # Suppress smart makes who think they know how to automake Yacc files
60 .y.c:
61
62 # Variables that exist for you to override.
63 # See below for how to change them for certain systems.
64
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 =
73
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@
94
95 COMPILER = $(CC)
96 COMPILER_FLAGS = $(CFLAGS)
97
98 SHELL = @SHELL@
99 PWD_COMMAND = $${PWDCMD-pwd}
100 # How to copy preserving the date
101 INSTALL_DATA_DATE = cp -p
102 MAKEINFO = makeinfo
103 TEXI2DVI = texi2dvi
104 TEXI2PDF = texi2pdf
105 GNATBIND_FLAGS = -static -x
106 ADA_CFLAGS =
107 ADAFLAGS = -W -Wall -gnatpg -gnata
108 SOME_ADAFLAGS =-gnata
109 FORCE_DEBUG_ADAFLAGS = -g
110 GNATLIBFLAGS = -gnatpg -nostdinc
111 GNATLIBCFLAGS = -g -O2
112 # Pretend that _Unwind_GetIPInfo is available for the target by default. This
113 # should be autodetected during the configuration of libada and passed down to
114 # here, but we need something for --disable-libada and hope for the best.
115 GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
116 -DIN_RTS -DHAVE_GETIPINFO
117 ALL_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS)
118 MOST_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(SOME_ADAFLAGS)
119 THREAD_KIND = native
120 THREADSLIB =
121 GMEM_LIB =
122 MISCLIB =
123 SYMDEPS = $(LIBINTL_DEP)
124 OUTPUT_OPTION = @OUTPUT_OPTION@
125
126 objext = .o
127 exeext =
128 arext = .a
129 soext = .so
130 shext =
131 hyphen = -
132
133 # Define this as & to perform parallel make on a Sequent.
134 # Note that this has some bugs, and it seems currently necessary
135 # to compile all the gen* files first by hand to avoid erroneous results.
136 P =
137
138 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
139 # It specifies -B./.
140 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
141 GCC_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS)
142
143 # Tools to use when building a cross-compiler.
144 # These are used because `configure' appends `cross-make'
145 # to the makefile when making a cross-compiler.
146
147 # We don't use cross-make. Instead we use the tools from the build tree,
148 # if they are available.
149 # program_transform_name and objdir are set by configure.in.
150 program_transform_name =
151 objdir = .
152
153 target_alias=@target_alias@
154 target=@target@
155 xmake_file = @xmake_file@
156 tmake_file = @tmake_file@
157 host_canonical=@host@
158 target_cpu_default=@target_cpu_default@
159 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
160 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
161
162 # Directory where sources are, from where we are.
163 VPATH = $(srcdir)/ada
164
165 fsrcdir := $(shell cd $(srcdir);${PWD_COMMAND})
166 fsrcpfx := $(shell cd $(srcdir);${PWD_COMMAND})/
167 fcurdir := $(shell ${PWD_COMMAND})
168 fcurpfx := $(shell ${PWD_COMMAND})/
169
170 # Top build directory, relative to here.
171 top_builddir = ../..
172
173 # Internationalization library.
174 LIBINTL = @LIBINTL@
175 LIBINTL_DEP = @LIBINTL_DEP@
176
177 # Any system libraries needed just for GNAT.
178 SYSLIBS = @GNAT_LIBEXC@
179
180 # List of extra object files linked in with various programs.
181 EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o
182
183 # List of target dependent sources, overridden below as necessary
184 TARGET_ADA_SRCS =
185
186 # Type of tools build we are doing; default is not compiling tools.
187 TOOLSCASE =
188
189 # Multilib handling
190 MULTISUBDIR =
191 RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
192
193 # End of variables for you to override.
194
195 all: all.indirect
196
197 # This tells GNU Make version 3 not to put all variables in the environment.
198 .NOEXPORT:
199
200 # target overrides
201 ifneq ($(tmake_file),)
202 include $(tmake_file)
203 endif
204
205 # host overrides
206 ifneq ($(xmake_file),)
207 include $(xmake_file)
208 endif
209 \f
210 # Now figure out from those variables how to compile and link.
211
212 all.indirect: Makefile ../gnat1$(exeext)
213
214 # IN_GCC distinguishes between code compiled into GCC itself and other
215 # programs built during a bootstrap.
216 # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a cross
217 # compiler which does not use the native libraries and headers.
218 INTERNAL_CFLAGS = @CROSS@ -DIN_GCC
219
220 # This is the variable actually used when we compile.
221 LOOSE_CFLAGS = `echo $(CFLAGS) $(WARN2_CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`
222 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS)
223
224 # Likewise.
225 ALL_CPPFLAGS = $(CPPFLAGS)
226
227 # Used with $(COMPILER).
228 ALL_COMPILERFLAGS = $(ALL_CFLAGS)
229
230 # This is where we get libiberty.a from.
231 LIBIBERTY = ../../libiberty/libiberty.a
232
233 # How to link with both our special library facilities
234 # and the system's installed libraries.
235 LIBS = $(LIBINTL) $(LIBIBERTY) $(SYSLIBS)
236 LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY)
237 # Default is no TGT_LIB; one might be passed down or something
238 TGT_LIB =
239 TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB)
240
241 # Specify the directories to be searched for header files.
242 # Both . and srcdir are used, in that order,
243 # so that tm.h and config.h will be found in the compilation
244 # subdirectory rather than in the source directory.
245 INCLUDES = -I- -I. -I.. -I$(srcdir)/ada -I$(srcdir) -I$(srcdir)/config \
246 -I$(srcdir)/../include
247
248 ADA_INCLUDES = -I- -I. -I$(srcdir)/ada
249
250 INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir)/ada \
251 -I$(fsrcdir)/../include -I$(fsrcdir)
252 ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
253
254 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
255 .SUFFIXES: .in .def
256
257 # Say how to compile Ada programs.
258 .SUFFIXES: .ada .adb .ads .asm
259
260 # Always use -I$(srcdir)/config when compiling.
261 .asm.o:
262 $(CC) -c -x assembler $< $(OUTPUT_OPTION)
263
264 .c.o:
265 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
266 $(INCLUDES) $< $(OUTPUT_OPTION)
267
268 .adb.o:
269 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
270
271 .ads.o:
272 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
273
274 # how to regenerate this file
275 Makefile: ../config.status $(srcdir)/ada/gcc-interface/Makefile.in $(srcdir)/ada/Makefile.in $(srcdir)/version.c
276 cd ..; \
277 LANGUAGES="$(CONFIG_LANGUAGES)" \
278 CONFIG_HEADERS= \
279 CONFIG_FILES="ada/gcc-interface/Makefile ada/Makefile" $(SHELL) config.status
280
281 # This tells GNU make version 3 not to export all the variables
282 # defined in this file into the environment.
283 .NOEXPORT:
284 \f
285 # Lists of files for various purposes.
286
287 GNATLINK_OBJS = gnatlink.o \
288 a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \
289 gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \
290 osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
291 sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \
292 types.o validsw.o widechar.o
293
294 GNATMAKE_OBJS = a-except.o ali.o ali-util.o s-casuti.o \
295 alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\
296 erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
297 gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
298 make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o \
299 mlib-tgt-specific.o mlib-utl.o namet.o nlists.o opt.o osint.o osint-m.o \
300 output.o prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o \
301 prj-conf.o prj-pp.o \
302 prj-err.o prj-ext.o prj-nmsc.o prj-pars.o prj-part.o prj-proc.o prj-strt.o \
303 prj-tree.o prj-util.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
304 scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o sinfo.o sinput.o \
305 sinput-c.o sinput-p.o snames.o stand.o stringt.o styleg.o stylesw.o system.o \
306 validsw.o switch.o switch-m.o table.o targparm.o tempdir.o tree_io.o types.o \
307 uintp.o uname.o urealp.o usage.o widechar.o \
308 $(EXTRA_GNATMAKE_OBJS)
309
310 # Convert the target variable into a space separated list of architecture,
311 # manufacturer, and operating system and assign each of those to its own
312 # variable.
313
314 host:=$(subst -, ,$(host_canonical))
315 targ:=$(subst -, ,$(target))
316 arch:=$(word 1,$(targ))
317 ifeq ($(words $(targ)),2)
318 manu:=
319 osys:=$(word 2,$(targ))
320 else
321 manu:=$(word 2,$(targ))
322 osys:=$(word 3,$(targ))
323 endif
324
325 # Make arch match the current multilib so that the RTS selection code
326 # picks up the right files. For a given target this must be coherent
327 # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
328
329 ifeq ($(strip $(filter-out %x86_64, $(arch))),)
330 ifeq ($(strip $(MULTISUBDIR)),/32)
331 arch:=i686
332 endif
333 endif
334
335 # ???: handle more multilib targets
336
337 # LIBGNAT_TARGET_PAIRS is a list of pairs of filenames.
338 # The members of each pair must be separated by a '<' and no whitespace.
339 # Each pair must be separated by some amount of whitespace from the following
340 # pair.
341
342 # Non-tasking case:
343
344 LIBGNAT_TARGET_PAIRS = \
345 a-intnam.ads<a-intnam-dummy.ads \
346 s-inmaop.adb<s-inmaop-dummy.adb \
347 s-intman.adb<s-intman-dummy.adb \
348 s-osinte.ads<s-osinte-dummy.ads \
349 s-osprim.adb<s-osprim-posix.adb \
350 s-taprop.adb<s-taprop-dummy.adb \
351 s-taspri.ads<s-taspri-dummy.ads
352
353 # When using the GCC exception handling mechanism, we need to use an
354 # alternate body for a-exexpr.adb (a-exexpr-gcc.adb)
355
356 EH_MECHANISM=
357
358 # Default shared object option. Note that we rely on the fact that the "soname"
359 # option will always be present and last in this flag, so that we can have
360 # $(SO_OPTS)libgnat-x.xx
361
362 SO_OPTS = -Wl,-soname,
363
364 # Default gnatlib-shared target.
365 # By default, equivalent to gnatlib.
366 # Set to gnatlib-shared-default, gnatlib-shared-dual, or a platform specific
367 # target when supported.
368 GNATLIB_SHARED = gnatlib
369
370 # default value for gnatmake's target dependent file
371 MLIB_TGT = mlib-tgt
372
373 # By default, do not distribute prefix.o (in libgccprefix), since it is only
374 # needed by external GNAT tools such as gnatdist and Glide.
375 # Override this variable on native platforms when needed.
376 PREFIX_OBJS =
377
378 # To avoid duplicate code, use this variable to set PREFIX_OBJS when needed:
379 PREFIX_REAL_OBJS = ../prefix.o \
380 ../../libiberty/concat.o \
381 ../../libiberty/xmalloc.o \
382 ../../libiberty/xstrdup.o \
383 ../../libiberty/xexit.o
384
385 # By default, build socket support units. On platforms that do not support
386 # sockets, reset this variable to empty and add DUMMY_SOCKETS_TARGET_PAIRS
387 # to LIBGNAT_TARGET_PAIRS.
388
389 GNATRTL_SOCKETS_OBJS = g-soccon$(objext) g-socket$(objext) g-socthi$(objext) \
390 g-soliop$(objext) g-sothco$(objext) g-sttsne$(objext)
391
392 DUMMY_SOCKETS_TARGET_PAIRS = \
393 g-socket.adb<g-socket-dummy.adb \
394 g-socket.ads<g-socket-dummy.ads \
395 g-socthi.adb<g-socthi-dummy.adb \
396 g-socthi.ads<g-socthi-dummy.ads \
397 g-sothco.adb<g-sothco-dummy.adb \
398 g-sothco.ads<g-sothco-dummy.ads \
399 g-sttsne.ads<g-sttsne-dummy.ads
400
401 LIB_VERSION = $(strip $(shell grep ' Library_Version :' $(fsrcpfx)ada/gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/'))
402
403 # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
404 # $(strip STRING) removes leading and trailing spaces from STRING.
405 # If what's left is null then it's a match.
406
407 ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
408 LIBGNAT_TARGET_PAIRS = \
409 a-intnam.ads<a-intnam-vxworks.ads \
410 a-numaux.ads<a-numaux-vxworks.ads \
411 s-inmaop.adb<s-inmaop-posix.adb \
412 s-interr.adb<s-interr-hwint.adb \
413 s-intman.ads<s-intman-vxworks.ads \
414 s-intman.adb<s-intman-vxworks.adb \
415 s-osinte.adb<s-osinte-vxworks.adb \
416 s-osinte.ads<s-osinte-vxworks.ads \
417 s-osprim.adb<s-osprim-vxworks.adb \
418 s-parame.ads<s-parame-vxworks.ads \
419 s-parame.adb<s-parame-vxworks.adb \
420 s-stchop.ads<s-stchop-limit.ads \
421 s-stchop.adb<s-stchop-vxworks.adb \
422 s-taprop.adb<s-taprop-vxworks.adb \
423 s-tasinf.ads<s-tasinf-vxworks.ads \
424 s-taspri.ads<s-taspri-vxworks.ads \
425 s-tpopsp.adb<s-tpopsp-vxworks.adb \
426 s-vxwork.ads<s-vxwork-m68k.ads \
427 g-socthi.ads<g-socthi-vxworks.ads \
428 g-socthi.adb<g-socthi-vxworks.adb \
429 g-stsifd.adb<g-stsifd-sockets.adb \
430 g-sttsne.adb<g-sttsne-vxworks.adb \
431 g-sttsne.ads<g-sttsne-locking.ads \
432 g-trasym.ads<g-trasym-unimplemented.ads \
433 g-trasym.adb<g-trasym-unimplemented.adb \
434 system.ads<system-vxworks-m68k.ads
435
436 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
437
438 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
439 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
440
441 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
442 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
443
444 ifeq ($(strip $(filter-out yes,$(TRACE))),)
445 LIBGNAT_TARGET_PAIRS += \
446 s-traces.adb<s-traces-default.adb \
447 s-tratas.adb<s-tratas-default.adb \
448 s-trafor.adb<s-trafor-default.adb \
449 s-trafor.ads<s-trafor-default.ads \
450 s-tfsetr.adb<s-tfsetr-vxworks.adb
451 endif
452 endif
453
454 ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
455 LIBGNAT_TARGET_PAIRS = \
456 a-intnam.ads<a-intnam-vxworks.ads \
457 a-numaux.ads<a-numaux-vxworks.ads \
458 s-inmaop.adb<s-inmaop-posix.adb \
459 s-intman.ads<s-intman-vxworks.ads \
460 s-intman.adb<s-intman-vxworks.adb \
461 s-osinte.ads<s-osinte-vxworks.ads \
462 s-osinte.adb<s-osinte-vxworks.adb \
463 s-osprim.adb<s-osprim-vxworks.adb \
464 s-parame.ads<s-parame-vxworks.ads \
465 s-parame.adb<s-parame-vxworks.adb \
466 s-stchop.ads<s-stchop-limit.ads \
467 s-stchop.adb<s-stchop-vxworks.adb \
468 s-taprop.adb<s-taprop-vxworks.adb \
469 s-tasinf.ads<s-tasinf-vxworks.ads \
470 s-taspri.ads<s-taspri-vxworks.ads \
471 s-vxwork.ads<s-vxwork-ppc.ads \
472 g-socthi.ads<g-socthi-vxworks.ads \
473 g-socthi.adb<g-socthi-vxworks.adb \
474 g-stsifd.adb<g-stsifd-sockets.adb \
475 g-sttsne.adb<g-sttsne-vxworks.adb \
476 g-sttsne.ads<g-sttsne-locking.ads \
477 g-trasym.ads<g-trasym-unimplemented.ads \
478 g-trasym.adb<g-trasym-unimplemented.adb
479
480 TOOLS_TARGET_PAIRS=\
481 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
482 indepsw.adb<indepsw-gnu.adb
483
484 ifeq ($(strip $(filter-out yes,$(TRACE))),)
485 LIBGNAT_TARGET_PAIRS += \
486 s-traces.adb<s-traces-default.adb \
487 s-trafor.adb<s-trafor-default.adb \
488 s-trafor.ads<s-trafor-default.ads \
489 s-tratas.adb<s-tratas-default.adb \
490 s-tfsetr.adb<s-tfsetr-vxworks.adb
491 endif
492
493 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
494 LIBGNAT_TARGET_PAIRS += \
495 s-vxwext.ads<s-vxwext-rtp.ads \
496 s-vxwext.adb<s-vxwext-rtp.adb \
497 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
498 system.ads<system-vxworks-ppc-rtp.ads
499
500 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
501 else
502 ifeq ($(strip $(filter-out rtp-smp,$(THREAD_KIND))),)
503 LIBGNAT_TARGET_PAIRS += \
504 s-vxwext.ads<s-vxwext-rtp.ads \
505 s-vxwext.adb<s-vxwext-rtp-smp.adb \
506 s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
507 system.ads<system-vxworks-ppc-rtp.ads
508
509 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
510 EXTRA_GNATRTL_TASKING_OBJS=affinity.o
511 else
512 ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),)
513 LIBGNAT_TARGET_PAIRS += \
514 s-interr.adb<s-interr-hwint.adb \
515 s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
516 s-vxwext.ads<s-vxwext-kernel.ads \
517 s-vxwext.adb<s-vxwext-kernel-smp.adb \
518 system.ads<system-vxworks-ppc-kernel.ads
519
520 EXTRA_GNATRTL_TASKING_OBJS=affinity.o
521 else
522 LIBGNAT_TARGET_PAIRS += \
523 s-interr.adb<s-interr-hwint.adb \
524 s-tpopsp.adb<s-tpopsp-vxworks.adb
525
526 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
527 LIBGNAT_TARGET_PAIRS += \
528 s-vxwext.ads<s-vxwext-kernel.ads \
529 s-vxwext.adb<s-vxwext-kernel.adb \
530 system.ads<system-vxworks-ppc-kernel.ads
531 else
532 LIBGNAT_TARGET_PAIRS += \
533 system.ads<system-vxworks-ppc.ads
534 endif
535 endif
536 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
537 endif
538 endif
539
540 EXTRA_GNATRTL_TASKING_OBJS += s-vxwork.o s-vxwext.o
541
542 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
543 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
544 endif
545
546 # vxworksae / vxworks 653
547 ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(targ))),)
548 # target pairs for vthreads runtime
549 LIBGNAT_TARGET_PAIRS = \
550 a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
551 a-intnam.ads<a-intnam-vxworks.ads \
552 a-numaux.ads<a-numaux-vxworks.ads \
553 g-io.adb<g-io-vxworks-ppc-cert.adb \
554 g-io.ads<g-io-vxworks-ppc-cert.ads \
555 s-inmaop.adb<s-inmaop-posix.adb \
556 s-interr.adb<s-interr-hwint.adb \
557 s-intman.ads<s-intman-vxworks.ads \
558 s-intman.adb<s-intman-vxworks.adb \
559 s-osinte.adb<s-osinte-vxworks.adb \
560 s-osinte.ads<s-osinte-vxworks.ads \
561 s-osprim.adb<s-osprim-vxworks.adb \
562 s-parame.ads<s-parame-ae653.ads \
563 s-parame.adb<s-parame-vxworks.adb \
564 s-taprop.adb<s-taprop-vxworks.adb \
565 s-tasinf.ads<s-tasinf-vxworks.ads \
566 s-taspri.ads<s-taspri-vxworks.ads \
567 s-tpopsp.adb<s-tpopsp-vxworks.adb \
568 s-vxwext.adb<s-vxwext-noints.adb \
569 s-vxwext.ads<s-vxwext-vthreads.ads \
570 s-vxwork.ads<s-vxwork-ppc.ads \
571 g-trasym.ads<g-trasym-unimplemented.ads \
572 g-trasym.adb<g-trasym-unimplemented.adb \
573 system.ads<system-vxworks-ppc-vthread.ads
574
575 TOOLS_TARGET_PAIRS=\
576 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
577 indepsw.adb<indepsw-gnu.adb
578
579 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
580 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
581
582 # Extra pairs for the vthreads runtime
583 ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
584 LIBGNAT_TARGET_PAIRS += \
585 s-thread.adb<s-thread-ae653.adb \
586 $(DUMMY_SOCKETS_TARGET_PAIRS)
587
588 GNATRTL_SOCKETS_OBJS =
589 EXTRA_GNATRTL_NONTASKING_OBJS += s-thread.o
590 else
591 LIBGNAT_TARGET_PAIRS += \
592 g-socthi.ads<g-socthi-vxworks.ads \
593 g-socthi.adb<g-socthi-vxworks.adb \
594 g-stsifd.adb<g-stsifd-sockets.adb \
595 g-sttsne.adb<g-sttsne-vxworks.adb \
596 g-sttsne.ads<g-sttsne-locking.ads
597 endif
598
599 ifeq ($(strip $(filter-out yes,$(TRACE))),)
600 LIBGNAT_TARGET_PAIRS += \
601 s-traces.adb<s-traces-default.adb \
602 s-trafor.adb<s-trafor-default.adb \
603 s-trafor.ads<s-trafor-default.ads \
604 s-tratas.adb<s-tratas-default.adb \
605 s-tfsetr.adb<s-tfsetr-vxworks.adb
606 endif
607 endif
608
609 # vxworksae / vxworks 653 for x86 (vxsim)
610 ifeq ($(strip $(filter-out %86 wrs vxworksae,$(targ))),)
611 # target pairs for kernel + vthreads runtime
612 LIBGNAT_TARGET_PAIRS = \
613 a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
614 a-intnam.ads<a-intnam-vxworks.ads \
615 a-numaux.ads<a-numaux-x86.ads \
616 a-numaux.adb<a-numaux-x86.adb \
617 a-sytaco.ads<1asytaco.ads \
618 a-sytaco.adb<1asytaco.adb \
619 g-bytswa.adb<g-bytswa-x86.adb \
620 g-io.adb<g-io-vxworks-ppc-cert.adb \
621 g-io.ads<g-io-vxworks-ppc-cert.ads \
622 s-inmaop.adb<s-inmaop-posix.adb \
623 s-interr.adb<s-interr-hwint.adb \
624 s-intman.ads<s-intman-vxworks.ads \
625 s-intman.adb<s-intman-vxworks.adb \
626 s-osinte.adb<s-osinte-vxworks.adb \
627 s-osinte.ads<s-osinte-vxworks.ads \
628 s-osprim.adb<s-osprim-vxworks.adb \
629 s-parame.ads<s-parame-ae653.ads \
630 s-taprop.adb<s-taprop-vxworks.adb \
631 s-tasinf.ads<s-tasinf-vxworks.ads \
632 s-taspri.ads<s-taspri-vxworks.ads \
633 s-thread.adb<s-thread-ae653.adb \
634 s-tpopsp.adb<s-tpopsp-vxworks.adb \
635 s-vxwext.adb<s-vxwext-noints.adb \
636 s-vxwext.ads<s-vxwext-vthreads.ads \
637 s-vxwork.ads<s-vxwork-x86.ads \
638 g-trasym.ads<g-trasym-unimplemented.ads \
639 g-trasym.adb<g-trasym-unimplemented.adb \
640 system.ads<system-vxworks-x86.ads
641
642 TOOLS_TARGET_PAIRS=\
643 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
644 indepsw.adb<indepsw-gnu.adb
645
646 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
647 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
648
649 # Extra pairs for the vthreads runtime
650 ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
651 LIBGNAT_TARGET_PAIRS += \
652 s-thread.adb<s-thread-ae653.adb \
653 $(DUMMY_SOCKETS_TARGET_PAIRS)
654
655 GNATRTL_SOCKETS_OBJS =
656 EXTRA_GNATRTL_NONTASKING_OBJS += s-thread.o
657 else
658 LIBGNAT_TARGET_PAIRS += \
659 g-socthi.ads<g-socthi-vxworks.ads \
660 g-socthi.adb<g-socthi-vxworks.adb \
661 g-stsifd.adb<g-stsifd-sockets.adb \
662 g-sttsne.adb<g-sttsne-vxworks.adb \
663 g-sttsne.ads<g-sttsne-locking.ads
664 endif
665
666 ifeq ($(strip $(filter-out yes,$(TRACE))),)
667 LIBGNAT_TARGET_PAIRS += \
668 s-traces.adb<s-traces-default.adb \
669 s-trafor.adb<s-trafor-default.adb \
670 s-trafor.ads<s-trafor-default.ads \
671 s-tratas.adb<s-tratas-default.adb \
672 s-tfsetr.adb<s-tfsetr-vxworks.adb
673 endif
674 endif
675
676 ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
677 LIBGNAT_TARGET_PAIRS = \
678 a-intnam.ads<a-intnam-vxworks.ads \
679 a-numaux.ads<a-numaux-vxworks.ads \
680 s-inmaop.adb<s-inmaop-posix.adb \
681 s-interr.adb<s-interr-hwint.adb \
682 s-intman.ads<s-intman-vxworks.ads \
683 s-intman.adb<s-intman-vxworks.adb \
684 s-osinte.adb<s-osinte-vxworks.adb \
685 s-osinte.ads<s-osinte-vxworks.ads \
686 s-osprim.adb<s-osprim-vxworks.adb \
687 s-parame.ads<s-parame-vxworks.ads \
688 s-parame.adb<s-parame-vxworks.adb \
689 s-stchop.ads<s-stchop-limit.ads \
690 s-stchop.adb<s-stchop-vxworks.adb \
691 s-taprop.adb<s-taprop-vxworks.adb \
692 s-tasinf.ads<s-tasinf-vxworks.ads \
693 s-taspri.ads<s-taspri-vxworks.ads \
694 s-tpopsp.adb<s-tpopsp-vxworks.adb \
695 s-vxwork.ads<s-vxwork-sparcv9.ads \
696 g-socthi.ads<g-socthi-vxworks.ads \
697 g-socthi.adb<g-socthi-vxworks.adb \
698 g-stsifd.adb<g-stsifd-sockets.adb \
699 g-sttsne.adb<g-sttsne-vxworks.adb \
700 g-sttsne.ads<g-sttsne-locking.ads \
701 g-trasym.ads<g-trasym-unimplemented.ads \
702 g-trasym.adb<g-trasym-unimplemented.adb \
703 system.ads<system-vxworks-sparcv9.ads \
704
705 TOOLS_TARGET_PAIRS=\
706 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
707 indepsw.adb<indepsw-gnu.adb
708
709 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
710 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
711
712 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
713 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
714 endif
715
716 ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
717 LIBGNAT_TARGET_PAIRS = \
718 a-intnam.ads<a-intnam-vxworks.ads \
719 i-vxwork.ads<i-vxwork-x86.ads \
720 s-osinte.adb<s-osinte-vxworks.adb \
721 s-osinte.ads<s-osinte-vxworks.ads \
722 s-inmaop.adb<s-inmaop-posix.adb \
723 s-intman.ads<s-intman-vxworks.ads \
724 s-intman.adb<s-intman-vxworks.adb \
725 a-numaux.adb<a-numaux-x86.adb \
726 a-numaux.ads<a-numaux-x86.ads \
727 s-osprim.adb<s-osprim-vxworks.adb \
728 s-parame.ads<s-parame-vxworks.ads \
729 s-parame.adb<s-parame-vxworks.adb \
730 s-stchop.ads<s-stchop-limit.ads \
731 s-stchop.adb<s-stchop-vxworks.adb \
732 s-taprop.adb<s-taprop-vxworks.adb \
733 s-tasinf.ads<s-tasinf-vxworks.ads \
734 s-taspri.ads<s-taspri-vxworks.ads \
735 s-vxwork.ads<s-vxwork-x86.ads \
736 g-bytswa.adb<g-bytswa-x86.adb \
737 g-socthi.ads<g-socthi-vxworks.ads \
738 g-socthi.adb<g-socthi-vxworks.adb \
739 g-stsifd.adb<g-stsifd-sockets.adb \
740 g-sttsne.adb<g-sttsne-vxworks.adb \
741 g-sttsne.ads<g-sttsne-locking.ads \
742 g-trasym.ads<g-trasym-unimplemented.ads \
743 g-trasym.adb<g-trasym-unimplemented.adb
744
745 TOOLS_TARGET_PAIRS=\
746 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
747 indepsw.adb<indepsw-gnu.adb
748
749 ifeq ($(strip $(filter-out yes,$(TRACE))),)
750 LIBGNAT_TARGET_PAIRS += \
751 s-traces.adb<s-traces-default.adb \
752 s-trafor.adb<s-trafor-default.adb \
753 s-trafor.ads<s-trafor-default.ads \
754 s-tratas.adb<s-tratas-default.adb \
755 s-tfsetr.adb<s-tfsetr-vxworks.adb
756 endif
757
758 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
759 LIBGNAT_TARGET_PAIRS += \
760 s-vxwext.ads<s-vxwext-rtp.ads \
761 s-vxwext.adb<s-vxwext-rtp.adb \
762 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
763 system.ads<system-vxworks-x86-rtp.ads
764
765 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
766 else
767 ifeq ($(strip $(filter-out rtp-smp, $(THREAD_KIND))),)
768 LIBGNAT_TARGET_PAIRS += \
769 s-vxwext.ads<s-vxwext-rtp.ads \
770 s-vxwext.adb<s-vxwext-rtp-smp.adb \
771 s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
772 system.ads<system-vxworks-x86-rtp.ads
773
774 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
775 EXTRA_GNATRTL_TASKING_OBJS=affinity.o
776 else
777 ifeq ($(strip $(filter-out kernel-smp, $(THREAD_KIND))),)
778 LIBGNAT_TARGET_PAIRS += \
779 s-interr.adb<s-interr-hwint.adb \
780 s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
781 s-vxwext.ads<s-vxwext-kernel.ads \
782 s-vxwext.adb<s-vxwext-kernel-smp.adb \
783 system.ads<system-vxworks-x86-kernel.ads
784 EXTRA_GNATRTL_TASKING_OBJS=affinity.o
785 else
786 LIBGNAT_TARGET_PAIRS += \
787 s-interr.adb<s-interr-hwint.adb \
788 s-tpopsp.adb<s-tpopsp-vxworks.adb
789
790 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
791 LIBGNAT_TARGET_PAIRS += \
792 s-vxwext.ads<s-vxwext-kernel.ads \
793 s-vxwext.adb<s-vxwext-kernel.adb \
794 system.ads<system-vxworks-x86-kernel.ads
795 else
796 LIBGNAT_TARGET_PAIRS += \
797 system.ads<system-vxworks-x86.ads
798 endif
799 endif
800
801 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
802 endif
803 endif
804 EXTRA_GNATRTL_TASKING_OBJS += s-vxwork.o s-vxwext.o
805
806 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
807 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
808 endif
809
810 ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
811 LIBGNAT_TARGET_PAIRS = \
812 a-intnam.ads<a-intnam-vxworks.ads \
813 a-numaux.ads<a-numaux-vxworks.ads \
814 s-inmaop.adb<s-inmaop-posix.adb \
815 s-interr.adb<s-interr-hwint.adb \
816 s-intman.ads<s-intman-vxworks.ads \
817 s-intman.adb<s-intman-vxworks.adb \
818 s-osinte.adb<s-osinte-vxworks.adb \
819 s-osinte.ads<s-osinte-vxworks.ads \
820 s-osprim.adb<s-osprim-vxworks.adb \
821 s-parame.ads<s-parame-vxworks.ads \
822 s-parame.adb<s-parame-vxworks.adb \
823 s-stchop.ads<s-stchop-limit.ads \
824 s-stchop.adb<s-stchop-vxworks.adb \
825 s-taprop.adb<s-taprop-vxworks.adb \
826 s-tasinf.ads<s-tasinf-vxworks.ads \
827 s-taspri.ads<s-taspri-vxworks.ads \
828 s-tpopsp.adb<s-tpopsp-vxworks.adb \
829 s-vxwork.ads<s-vxwork-arm.ads \
830 g-socthi.ads<g-socthi-vxworks.ads \
831 g-socthi.adb<g-socthi-vxworks.adb \
832 g-stsifd.adb<g-stsifd-sockets.adb \
833 g-sttsne.adb<g-sttsne-vxworks.adb \
834 g-sttsne.ads<g-sttsne-locking.ads \
835 g-trasym.ads<g-trasym-unimplemented.ads \
836 g-trasym.adb<g-trasym-unimplemented.adb \
837 system.ads<system-vxworks-arm.ads
838
839 TOOLS_TARGET_PAIRS=\
840 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
841 indepsw.adb<indepsw-gnu.adb
842
843 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
844 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
845
846 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
847 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
848 endif
849
850 ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
851 LIBGNAT_TARGET_PAIRS = \
852 a-intnam.ads<a-intnam-vxworks.ads \
853 a-numaux.ads<a-numaux-vxworks.ads \
854 s-inmaop.adb<s-inmaop-posix.adb \
855 s-interr.adb<s-interr-hwint.adb \
856 s-intman.ads<s-intman-vxworks.ads \
857 s-intman.adb<s-intman-vxworks.adb \
858 s-osinte.adb<s-osinte-vxworks.adb \
859 s-osinte.ads<s-osinte-vxworks.ads \
860 s-osprim.adb<s-osprim-vxworks.adb \
861 s-parame.ads<s-parame-vxworks.ads \
862 s-parame.adb<s-parame-vxworks.adb \
863 s-stchop.ads<s-stchop-limit.ads \
864 s-stchop.adb<s-stchop-vxworks.adb \
865 s-taprop.adb<s-taprop-vxworks.adb \
866 s-tasinf.ads<s-tasinf-vxworks.ads \
867 s-taspri.ads<s-taspri-vxworks.ads \
868 s-tpopsp.adb<s-tpopsp-vxworks.adb \
869 s-vxwork.ads<s-vxwork-mips.ads \
870 g-socthi.ads<g-socthi-vxworks.ads \
871 g-socthi.adb<g-socthi-vxworks.adb \
872 g-stsifd.adb<g-stsifd-sockets.adb \
873 g-sttsne.adb<g-sttsne-vxworks.adb \
874 g-sttsne.ads<g-sttsne-locking.ads \
875 g-trasym.ads<g-trasym-unimplemented.ads \
876 g-trasym.adb<g-trasym-unimplemented.adb \
877 system.ads<system-vxworks-mips.ads
878
879 TOOLS_TARGET_PAIRS=\
880 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
881 indepsw.adb<indepsw-gnu.adb
882
883 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
884 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
885
886 EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
887 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
888 endif
889
890 ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
891 LIBGNAT_TARGET_PAIRS_COMMON = \
892 a-intnam.ads<a-intnam-solaris.ads \
893 s-inmaop.adb<s-inmaop-posix.adb \
894 s-intman.adb<s-intman-solaris.adb \
895 s-osinte.adb<s-osinte-solaris.adb \
896 s-osinte.ads<s-osinte-solaris.ads \
897 s-osprim.adb<s-osprim-solaris.adb \
898 s-taprop.adb<s-taprop-solaris.adb \
899 s-tasinf.adb<s-tasinf-solaris.adb \
900 s-tasinf.ads<s-tasinf-solaris.ads \
901 s-taspri.ads<s-taspri-solaris.ads \
902 s-tpopsp.adb<s-tpopsp-solaris.adb \
903 g-soliop.ads<g-soliop-solaris.ads
904
905 LIBGNAT_TARGET_PAIRS_32 = \
906 system.ads<system-solaris-sparc.ads
907
908 LIBGNAT_TARGET_PAIRS_64 = \
909 system.ads<system-solaris-sparcv9.ads
910
911 ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
912 ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
913 LIBGNAT_TARGET_PAIRS = \
914 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
915 else
916 LIBGNAT_TARGET_PAIRS = \
917 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
918 endif
919 else
920 ifeq ($(strip $(MULTISUBDIR)),/sparcv7)
921 LIBGNAT_TARGET_PAIRS = \
922 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
923 else
924 LIBGNAT_TARGET_PAIRS = \
925 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
926 endif
927 endif
928
929 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
930
931 EH_MECHANISM=-gcc
932 THREADSLIB = -lposix4 -lthread
933 MISCLIB = -lposix4 -lnsl -lsocket
934 SO_OPTS = -Wl,-h,
935 GNATLIB_SHARED = gnatlib-shared-dual
936 GMEM_LIB = gmemlib
937 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
938 LIBRARY_VERSION := $(LIB_VERSION)
939
940 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
941 LIBGNAT_TARGET_PAIRS = \
942 a-intnam.ads<a-intnam-solaris.ads \
943 s-inmaop.adb<s-inmaop-posix.adb \
944 s-intman.adb<s-intman-posix.adb \
945 s-osinte.adb<s-osinte-posix.adb \
946 s-osinte.ads<s-osinte-solaris-posix.ads \
947 s-osprim.adb<s-osprim-solaris.adb \
948 s-taprop.adb<s-taprop-posix.adb \
949 s-taspri.ads<s-taspri-posix.ads \
950 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
951 g-soliop.ads<g-soliop-solaris.ads \
952 system.ads<system-solaris-sparc.ads
953
954 THREADSLIB = -lposix4 -lpthread
955 endif
956
957 ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),)
958 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
959 endif
960 endif
961
962 ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
963 LIBGNAT_TARGET_PAIRS = \
964 a-numaux.adb<a-numaux-x86.adb \
965 a-numaux.ads<a-numaux-x86.ads \
966 a-intnam.ads<a-intnam-solaris.ads \
967 s-inmaop.adb<s-inmaop-posix.adb \
968 s-intman.adb<s-intman-solaris.adb \
969 s-osinte.adb<s-osinte-solaris.adb \
970 s-osinte.ads<s-osinte-solaris.ads \
971 s-osprim.adb<s-osprim-solaris.adb \
972 s-taprop.adb<s-taprop-solaris.adb \
973 s-tasinf.adb<s-tasinf-solaris.adb \
974 s-tasinf.ads<s-tasinf-solaris.ads \
975 s-taspri.ads<s-taspri-solaris.ads \
976 s-tpopsp.adb<s-tpopsp-solaris.adb \
977 g-soliop.ads<g-soliop-solaris.ads
978
979 ifeq ($(strip $(MULTISUBDIR)),/amd64)
980 LIBGNAT_TARGET_PAIRS += \
981 system.ads<system-solaris-x86_64.ads
982 else
983 LIBGNAT_TARGET_PAIRS += \
984 g-bytswa.adb<g-bytswa-x86.adb \
985 system.ads<system-solaris-x86.ads
986 endif
987
988 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
989
990 EH_MECHANISM=-gcc
991 THREADSLIB = -lposix4 -lthread
992 MISCLIB = -lposix4 -lnsl -lsocket
993 SO_OPTS = -Wl,-h,
994 GNATLIB_SHARED = gnatlib-shared-dual
995 GMEM_LIB = gmemlib
996 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
997 LIBRARY_VERSION := $(LIB_VERSION)
998 endif
999
1000 ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
1001 LIBGNAT_TARGET_PAIRS = \
1002 a-intnam.ads<a-intnam-linux.ads \
1003 a-numaux.adb<a-numaux-x86.adb \
1004 a-numaux.ads<a-numaux-x86.ads \
1005 g-bytswa.adb<g-bytswa-x86.adb \
1006 s-inmaop.adb<s-inmaop-posix.adb \
1007 s-intman.adb<s-intman-posix.adb \
1008 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1009 g-sercom.adb<g-sercom-linux.adb
1010
1011 ifeq ($(strip $(filter-out marte,$(THREAD_KIND))),)
1012 LIBGNAT_TARGET_PAIRS += \
1013 a-exetim.adb<a-exetim-linux-marte.adb \
1014 a-exetim.ads<a-exetim-linux-marte.ads \
1015 a-extiti.adb<a-extiti-linux-marte.adb \
1016 a-extiti.ads<a-extiti-linux-marte.ads \
1017 a-rttiev.adb<a-rttiev-linux-marte.adb \
1018 a-rttiev.ads<a-rttiev-linux-marte.ads \
1019 s-osinte.adb<s-osinte-linux-marte.adb \
1020 s-osinte.ads<s-osinte-linux-marte.ads \
1021 s-osprim.adb<s-osprim-posix.adb \
1022 s-taprop.adb<s-taprop-linux-marte.adb \
1023 s-taspri.ads<s-taspri-posix.ads \
1024 system.ads<system-linux-x86.ads
1025
1026 EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o a-extiti.o
1027
1028 EH_MECHANISM=
1029 THREADSLIB = -lmarte
1030 else
1031 LIBGNAT_TARGET_PAIRS += \
1032 s-linux.ads<s-linux.ads \
1033 s-osinte.adb<s-osinte-posix.adb
1034
1035 ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
1036 LIBGNAT_TARGET_PAIRS += \
1037 s-osinte.ads<s-osinte-linux-xenomai.ads \
1038 s-osprim.adb<s-osprim-linux-xenomai.adb \
1039 s-taprop.adb<s-taprop-linux-xenomai.adb \
1040 s-taspri.ads<s-taspri-linux-xenomai.ads \
1041 system.ads<system-linux-x86-xenomai.ads
1042
1043 EH_MECHANISM=-gcc
1044 else
1045 LIBGNAT_TARGET_PAIRS += \
1046 s-osinte.ads<s-osinte-linux.ads \
1047 s-osprim.adb<s-osprim-posix.adb \
1048 s-taprop.adb<s-taprop-linux.adb \
1049 s-tasinf.ads<s-tasinf-linux.ads \
1050 s-tasinf.adb<s-tasinf-linux.adb \
1051 s-taspri.ads<s-taspri-posix.ads \
1052 system.ads<system-linux-x86.ads
1053
1054 EH_MECHANISM=-gcc
1055 endif
1056
1057 THREADSLIB = -lpthread
1058 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
1059 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1060 endif
1061
1062 TOOLS_TARGET_PAIRS = \
1063 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1064 indepsw.adb<indepsw-gnu.adb
1065
1066 GNATLIB_SHARED = gnatlib-shared-dual
1067 GMEM_LIB = gmemlib
1068 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1069 LIBRARY_VERSION := $(LIB_VERSION)
1070 endif
1071
1072 ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
1073 LIBGNAT_TARGET_PAIRS = \
1074 a-intnam.ads<a-intnam-freebsd.ads \
1075 a-numaux.adb<a-numaux-x86.adb \
1076 a-numaux.ads<a-numaux-x86.ads \
1077 s-inmaop.adb<s-inmaop-posix.adb \
1078 s-intman.adb<s-intman-posix.adb \
1079 s-osinte.adb<s-osinte-posix.adb \
1080 s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
1081 s-osprim.adb<s-osprim-posix.adb \
1082 s-taprop.adb<s-taprop-linux.adb \
1083 s-tasinf.ads<s-tasinf-linux.ads \
1084 s-tasinf.adb<s-tasinf-linux.adb \
1085 s-taspri.ads<s-taspri-posix.ads \
1086 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1087 system.ads<system-freebsd-x86.ads
1088
1089 TOOLS_TARGET_PAIRS = \
1090 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1091 indepsw.adb<indepsw-gnu.adb
1092
1093 EH_MECHANISM=-gcc
1094 THREADSLIB = -lpthread
1095 GNATLIB_SHARED = gnatlib-shared-dual
1096 GMEM_LIB = gmemlib
1097 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1098 LIBRARY_VERSION := $(LIB_VERSION)
1099 endif
1100
1101 ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(arch) $(osys))),)
1102 LIBGNAT_TARGET_PAIRS = \
1103 a-intnam.ads<a-intnam-freebsd.ads \
1104 a-numaux.adb<a-numaux-x86.adb \
1105 a-numaux.ads<a-numaux-x86.ads \
1106 s-inmaop.adb<s-inmaop-posix.adb \
1107 s-intman.adb<s-intman-posix.adb \
1108 s-osinte.adb<s-osinte-posix.adb \
1109 s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
1110 s-osprim.adb<s-osprim-posix.adb \
1111 s-taprop.adb<s-taprop-linux.adb \
1112 s-tasinf.ads<s-tasinf-linux.ads \
1113 s-tasinf.adb<s-tasinf-linux.adb \
1114 s-taspri.ads<s-taspri-posix.ads \
1115 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1116 system.ads<system-freebsd-x86_64.ads
1117
1118 TOOLS_TARGET_PAIRS = \
1119 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1120 indepsw.adb<indepsw-gnu.adb
1121
1122 EH_MECHANISM=-gcc
1123 THREADSLIB = -lpthread
1124 GNATLIB_SHARED = gnatlib-shared-dual
1125 GMEM_LIB = gmemlib
1126 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1127 LIBRARY_VERSION := $(LIB_VERSION)
1128 endif
1129
1130 ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
1131 LIBGNAT_TARGET_PAIRS = \
1132 a-intnam.ads<a-intnam-freebsd.ads \
1133 a-numaux.adb<a-numaux-x86.adb \
1134 a-numaux.ads<a-numaux-x86.ads \
1135 g-bytswa.adb<g-bytswa-x86.adb \
1136 s-inmaop.adb<s-inmaop-posix.adb \
1137 s-intman.adb<s-intman-posix.adb \
1138 s-osinte.adb<s-osinte-freebsd.adb \
1139 s-osinte.ads<s-osinte-freebsd.ads \
1140 s-osprim.adb<s-osprim-posix.adb \
1141 s-taprop.adb<s-taprop-posix.adb \
1142 s-taspri.ads<s-taspri-posix.ads \
1143 s-tpopsp.adb<s-tpopsp-posix.adb \
1144 system.ads<system-freebsd-x86.ads
1145
1146 TOOLS_TARGET_PAIRS = \
1147 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
1148 GNATLIB_SHARED = gnatlib-shared-dual
1149
1150 EH_MECHANISM=-gcc
1151 THREADSLIB= -lpthread
1152 GMEM_LIB = gmemlib
1153 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1154 LIBRARY_VERSION := $(LIB_VERSION)
1155 endif
1156
1157 ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
1158 LIBGNAT_TARGET_PAIRS_COMMON = \
1159 a-intnam.ads<a-intnam-linux.ads \
1160 s-inmaop.adb<s-inmaop-posix.adb \
1161 s-intman.adb<s-intman-posix.adb \
1162 s-linux.ads<s-linux.ads \
1163 s-osinte.adb<s-osinte-posix.adb \
1164 s-osinte.ads<s-osinte-linux.ads \
1165 s-osprim.adb<s-osprim-posix.adb \
1166 s-taprop.adb<s-taprop-linux.adb \
1167 s-tasinf.ads<s-tasinf-linux.ads \
1168 s-tasinf.adb<s-tasinf-linux.adb \
1169 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1170 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1171 g-trasym.ads<g-trasym-unimplemented.ads \
1172 g-trasym.adb<g-trasym-unimplemented.adb
1173
1174 LIBGNAT_TARGET_PAIRS_32 = \
1175 system.ads<system-linux-s390.ads
1176
1177 LIBGNAT_TARGET_PAIRS_64 = \
1178 system.ads<system-linux-s390x.ads
1179
1180 ifeq ($(strip $(filter-out s390x,$(arch))),)
1181 ifeq ($(strip $(MULTISUBDIR)),/32)
1182 LIBGNAT_TARGET_PAIRS = \
1183 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1184 else
1185 LIBGNAT_TARGET_PAIRS = \
1186 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1187 endif
1188 else
1189 LIBGNAT_TARGET_PAIRS = \
1190 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1191 endif
1192
1193 TOOLS_TARGET_PAIRS = \
1194 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1195 indepsw.adb<indepsw-gnu.adb
1196
1197 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1198 EH_MECHANISM=-gcc
1199 THREADSLIB = -lpthread
1200 GNATLIB_SHARED = gnatlib-shared-dual
1201 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1202 LIBRARY_VERSION := $(LIB_VERSION)
1203 endif
1204
1205 ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
1206 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
1207 LIBGNAT_TARGET_PAIRS = \
1208 a-intnam.ads<a-intnam-irix.ads \
1209 s-inmaop.adb<s-inmaop-posix.adb \
1210 s-intman.adb<s-intman-irix.adb \
1211 s-mastop.adb<s-mastop-irix.adb \
1212 s-osinte.adb<s-osinte-irix.adb \
1213 s-osinte.ads<s-osinte-irix.ads \
1214 s-osprim.adb<s-osprim-posix.adb \
1215 s-proinf.adb<s-proinf-irix-athread.adb \
1216 s-proinf.ads<s-proinf-irix-athread.ads \
1217 s-taprop.adb<s-taprop-irix.adb \
1218 s-tasinf.ads<s-tasinf-irix.ads \
1219 s-taspri.ads<s-taspri-posix.ads \
1220 s-tpopsp.adb<s-tpopsp-posix.adb \
1221 s-traceb.adb<s-traceb-mastop.adb
1222
1223 ifeq ($(strip $(MULTISUBDIR)),/64)
1224 LIBGNAT_TARGET_PAIRS += \
1225 system.ads<system-irix-n64.ads
1226 else
1227 ifeq ($(strip $(MULTISUBDIR)),/32)
1228 LIBGNAT_TARGET_PAIRS += \
1229 system.ads<system-irix-o32.ads
1230 else
1231 LIBGNAT_TARGET_PAIRS += \
1232 system.ads<system-irix-n32.ads
1233 endif
1234 endif
1235
1236 THREADSLIB = -lpthread
1237 GNATLIB_SHARED = gnatlib-shared-default
1238
1239 else
1240 LIBGNAT_TARGET_PAIRS += \
1241 s-mastop.adb<s-mastop-irix.adb \
1242 s-osprim.adb<s-osprim-posix.adb \
1243 s-traceb.adb<s-traceb-mastop.adb \
1244 system.ads<system-irix-o32.ads
1245 endif
1246
1247 EH_MECHANISM=-gcc
1248 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-irix.adb
1249 TGT_LIB = -lexc
1250 MISCLIB = -lexc
1251 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1252 LIBRARY_VERSION := $(LIB_VERSION)
1253 GMEM_LIB = gmemlib
1254 endif
1255
1256 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
1257 LIBGNAT_TARGET_PAIRS = \
1258 a-excpol.adb<a-excpol-abort.adb \
1259 a-intnam.ads<a-intnam-hpux.ads \
1260 s-inmaop.adb<s-inmaop-posix.adb \
1261 s-interr.adb<s-interr-sigaction.adb \
1262 s-intman.adb<s-intman-posix.adb \
1263 s-osinte.adb<s-osinte-hpux-dce.adb \
1264 s-osinte.ads<s-osinte-hpux-dce.ads \
1265 s-parame.ads<s-parame-hpux.ads \
1266 s-osprim.adb<s-osprim-posix.adb \
1267 s-taprop.adb<s-taprop-hpux-dce.adb \
1268 s-taspri.ads<s-taspri-hpux-dce.ads \
1269 s-tpopsp.adb<s-tpopsp-posix.adb \
1270 system.ads<system-hpux.ads
1271
1272 EH_MECHANISM=-gcc
1273 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1274 endif
1275
1276 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
1277 LIBGNAT_TARGET_PAIRS = \
1278 a-intnam.ads<a-intnam-hpux.ads \
1279 s-inmaop.adb<s-inmaop-posix.adb \
1280 s-intman.adb<s-intman-posix.adb \
1281 s-osinte.adb<s-osinte-posix.adb \
1282 s-osinte.ads<s-osinte-hpux.ads \
1283 s-parame.ads<s-parame-hpux.ads \
1284 s-osprim.adb<s-osprim-posix.adb \
1285 s-traceb.adb<s-traceb-hpux.adb \
1286 s-taprop.adb<s-taprop-posix.adb \
1287 s-taspri.ads<s-taspri-posix.ads \
1288 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1289 system.ads<system-hpux.ads
1290
1291 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb
1292 EH_MECHANISM=-gcc
1293 TGT_LIB = /usr/lib/libcl.a
1294 THREADSLIB = -lpthread
1295 GMEM_LIB = gmemlib
1296 soext = .sl
1297 SO_OPTS = -Wl,+h,
1298 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1299 GNATLIB_SHARED = gnatlib-shared-dual
1300 LIBRARY_VERSION := $(LIB_VERSION)
1301 endif
1302
1303 ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
1304 LIBGNAT_TARGET_PAIRS_COMMON = \
1305 a-intnam.ads<a-intnam-aix.ads \
1306 s-inmaop.adb<s-inmaop-posix.adb \
1307 s-intman.adb<s-intman-posix.adb \
1308 s-osinte.adb<s-osinte-aix.adb \
1309 s-osinte.ads<s-osinte-aix.ads \
1310 s-osprim.adb<s-osprim-posix.adb \
1311 s-taprop.adb<s-taprop-posix.adb \
1312 s-taspri.ads<s-taspri-posix.ads \
1313 s-tpopsp.adb<s-tpopsp-posix.adb
1314
1315 LIBGNAT_TARGET_PAIRS_32 = \
1316 system.ads<system-aix.ads
1317
1318 LIBGNAT_TARGET_PAIRS_64 = \
1319 system.ads<system-aix64.ads
1320
1321 ifeq ($(findstring ppc64, \
1322 $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) \
1323 -print-multi-os-directory)), \
1324 ppc64)
1325 LIBGNAT_TARGET_PAIRS = \
1326 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1327 else
1328 LIBGNAT_TARGET_PAIRS = \
1329 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1330 endif
1331
1332 THREADSLIB = -lpthreads
1333 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1334
1335 TOOLS_TARGET_PAIRS = \
1336 mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
1337 indepsw.adb<indepsw-aix.adb
1338
1339 GMEM_LIB = gmemlib
1340 endif
1341
1342 ifeq ($(strip $(filter-out lynxos,$(osys))),)
1343 TOOLS_TARGET_PAIRS = \
1344 mlib-tgt-specific.adb<mlib-tgt-specific-lynxos.adb \
1345 indepsw.adb<indepsw-gnu.adb
1346
1347 ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
1348 LIBGNAT_TARGET_PAIRS = \
1349 a-numaux.adb<a-numaux-x86.adb \
1350 a-numaux.ads<a-numaux-x86.ads \
1351 a-intnam.ads<a-intnam-lynxos.ads \
1352 g-bytswa.adb<g-bytswa-x86.adb \
1353 g-sttsne.adb<g-sttsne-locking.adb \
1354 g-sttsne.ads<g-sttsne-locking.ads \
1355 s-inmaop.adb<s-inmaop-posix.adb \
1356 s-intman.adb<s-intman-posix.adb \
1357 s-osinte.adb<s-osinte-lynxos.adb \
1358 s-osinte.ads<s-osinte-lynxos.ads \
1359 s-osprim.adb<s-osprim-posix.adb \
1360 s-taprop.adb<s-taprop-lynxos.adb \
1361 s-taspri.ads<s-taspri-lynxos.ads \
1362 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1363 g-trasym.ads<g-trasym-unimplemented.ads \
1364 g-trasym.adb<g-trasym-unimplemented.adb \
1365 system.ads<system-lynxos-x86.ads
1366
1367 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1368
1369 else
1370 LIBGNAT_TARGET_PAIRS = \
1371 a-intnam.ads<a-intnam-lynxos.ads \
1372 g-sttsne.adb<g-sttsne-locking.adb \
1373 g-sttsne.ads<g-sttsne-locking.ads \
1374 s-inmaop.adb<s-inmaop-posix.adb \
1375 s-intman.adb<s-intman-posix.adb \
1376 s-osinte.adb<s-osinte-lynxos.adb \
1377 s-osinte.ads<s-osinte-lynxos.ads \
1378 s-osprim.adb<s-osprim-posix.adb \
1379 s-taprop.adb<s-taprop-lynxos.adb \
1380 s-taspri.ads<s-taspri-lynxos.ads \
1381 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1382 g-trasym.ads<g-trasym-unimplemented.ads \
1383 g-trasym.adb<g-trasym-unimplemented.adb \
1384 system.ads<system-lynxos-ppc.ads
1385 endif
1386 endif
1387
1388 ifeq ($(strip $(filter-out rtems%,$(osys))),)
1389 LIBGNAT_TARGET_PAIRS = \
1390 system.ads<system-rtems.ads \
1391 a-intnam.ads<a-intnam-rtems.ads \
1392 s-inmaop.adb<s-inmaop-posix.adb \
1393 s-intman.adb<s-intman-posix.adb \
1394 s-osinte.adb<s-osinte-rtems.adb \
1395 s-osinte.ads<s-osinte-rtems.ads \
1396 s-osprim.adb<s-osprim-posix.adb \
1397 s-parame.adb<s-parame-rtems.adb \
1398 s-taprop.adb<s-taprop-posix.adb \
1399 s-taspri.ads<s-taspri-posix.ads \
1400 s-tpopsp.adb<s-tpopsp-rtems.adb \
1401 s-stchop.adb<s-stchop-rtems.adb \
1402 s-interr.adb<s-interr-hwint.adb \
1403 g-trasym.ads<g-trasym-unimplemented.ads \
1404 g-trasym.adb<g-trasym-unimplemented.adb
1405 endif
1406
1407 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
1408 LIBGNAT_TARGET_PAIRS = \
1409 a-intnam.ads<a-intnam-tru64.ads \
1410 s-inmaop.adb<s-inmaop-posix.adb \
1411 s-intman.adb<s-intman-posix.adb \
1412 s-mastop.adb<s-mastop-tru64.adb \
1413 s-osinte.adb<s-osinte-tru64.adb \
1414 s-osinte.ads<s-osinte-tru64.ads \
1415 s-osprim.adb<s-osprim-unix.adb \
1416 s-taprop.adb<s-taprop-tru64.adb \
1417 s-tasinf.ads<s-tasinf-tru64.ads \
1418 s-taspri.ads<s-taspri-tru64.ads \
1419 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1420 s-traceb.adb<s-traceb-mastop.adb \
1421 system.ads<system-tru64.ads
1422
1423 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb
1424
1425 EH_MECHANISM=-gcc
1426 GMEM_LIB=gmemlib
1427 THREADSLIB = -lpthread -lmach -lexc -lrt
1428 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1429 GNATLIB_SHARED = gnatlib-shared-default
1430 LIBRARY_VERSION := $(LIB_VERSION)
1431 endif
1432
1433 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
1434
1435 soext = .exe
1436 hyphen = _
1437 LN = cp -p
1438 LN_S = cp -p
1439
1440 .SUFFIXES: .sym
1441
1442 .o.sym:
1443 @ gnu:[bin]vmssymvec $<
1444 endif
1445
1446 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1447 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1448 LIBGNAT_TARGET_PAIRS_AUX1 = \
1449 g-enblsp.adb<g-enblsp-vms-ia64.adb \
1450 g-trasym.adb<g-trasym-vms-ia64.adb \
1451 s-asthan.adb<s-asthan-vms-ia64.adb \
1452 s-osinte.adb<s-osinte-vms-ia64.adb \
1453 s-osinte.ads<s-osinte-vms-ia64.ads \
1454 s-vaflop.adb<s-vaflop-vms-ia64.adb \
1455 g-trasym.ads<g-trasym-unimplemented.ads \
1456 g-trasym.adb<g-trasym-unimplemented.adb \
1457 system.ads<system-vms-ia64.ads
1458
1459 LIBGNAT_TARGET_PAIRS_AUX2 = \
1460 s-parame.ads<s-parame-vms-ia64.ads
1461 else
1462 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1463 LIBGNAT_TARGET_PAIRS_AUX1 = \
1464 g-enblsp.adb<g-enblsp-vms-alpha.adb \
1465 g-trasym.adb<g-trasym-vms-alpha.adb \
1466 s-traent.adb<s-traent-vms.adb \
1467 s-traent.ads<s-traent-vms.ads \
1468 s-asthan.adb<s-asthan-vms-alpha.adb \
1469 s-osinte.adb<s-osinte-vms.adb \
1470 s-osinte.ads<s-osinte-vms.ads \
1471 s-vaflop.adb<s-vaflop-vms-alpha.adb \
1472 system.ads<system-vms_64.ads
1473
1474 ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1475 LIBGNAT_TARGET_PAIRS_AUX2 = \
1476 s-parame.ads<s-parame-vms-restrict.ads
1477 else
1478 LIBGNAT_TARGET_PAIRS_AUX2 = \
1479 s-parame.ads<s-parame-vms-alpha.ads
1480 endif
1481 endif
1482 endif
1483
1484 LIBGNAT_TARGET_PAIRS = \
1485 a-caldel.adb<a-caldel-vms.adb \
1486 a-calend.adb<a-calend-vms.adb \
1487 a-calend.ads<a-calend-vms.ads \
1488 a-dirval.adb<a-dirval-vms.adb \
1489 a-excpol.adb<a-excpol-abort.adb \
1490 a-intnam.ads<a-intnam-vms.ads \
1491 a-numaux.ads<a-numaux-vms.ads \
1492 g-expect.adb<g-expect-vms.adb \
1493 g-socthi.ads<g-socthi-vms.ads \
1494 g-socthi.adb<g-socthi-vms.adb \
1495 g-stsifd.adb<g-stsifd-sockets.adb \
1496 g-sttsne.adb<g-sttsne-locking.adb \
1497 g-sttsne.ads<g-sttsne-locking.ads \
1498 i-c.ads<i-c-vms_64.ads \
1499 i-cstrin.ads<i-cstrin-vms_64.ads \
1500 i-cstrin.adb<i-cstrin-vms_64.adb \
1501 i-cpoint.ads<i-cpoint-vms_64.ads \
1502 i-cpoint.adb<i-cpoint-vms_64.adb \
1503 i-cstrea.adb<i-cstrea-vms.adb \
1504 memtrack.adb<memtrack-vms_64.adb \
1505 s-auxdec.ads<s-auxdec-vms_64.ads \
1506 s-crtl.ads<s-crtl-vms_64.ads \
1507 s-inmaop.adb<s-inmaop-vms.adb \
1508 s-interr.adb<s-interr-vms.adb \
1509 s-intman.adb<s-intman-vms.adb \
1510 s-intman.ads<s-intman-vms.ads \
1511 s-memory.adb<s-memory-vms_64.adb \
1512 s-memory.ads<s-memory-vms_64.ads \
1513 s-osprim.adb<s-osprim-vms.adb \
1514 s-osprim.ads<s-osprim-vms.ads \
1515 s-taprop.adb<s-taprop-vms.adb \
1516 s-tasdeb.adb<s-tasdeb-vms.adb \
1517 s-taspri.ads<s-taspri-vms.ads \
1518 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1519 s-tpopde.adb<s-tpopde-vms.adb \
1520 s-tpopde.ads<s-tpopde-vms.ads \
1521 $(LIBGNAT_TARGET_PAIRS_AUX1) \
1522 $(LIBGNAT_TARGET_PAIRS_AUX2)
1523
1524 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1525 TOOLS_TARGET_PAIRS= \
1526 mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
1527 symbols.adb<symbols-vms.adb \
1528 symbols-processing.adb<symbols-processing-vms-ia64.adb
1529 else
1530 TOOLS_TARGET_PAIRS= \
1531 mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
1532 symbols.adb<symbols-vms.adb \
1533 symbols-processing.adb<symbols-processing-vms-alpha.adb
1534 endif
1535
1536 adamsg.o: adamsg.msg
1537 -$(DECC) --cc=message adamsg.msg -o adamsg.o
1538
1539 EXTRA_GNATMAKE_OBJS = mlib-tgt-vms_common.o
1540
1541 GMEM_LIB = gmemlib
1542 EH_MECHANISM=-gcc
1543 GNATLIB_SHARED=gnatlib-shared-vms
1544 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1545 EXTRA_LIBGNAT_SRCS=vmshandler.asm
1546 EXTRA_LIBGNAT_OBJS=vmshandler.o
1547 endif
1548 EXTRA_LIBGNAT_SRCS+=adamsg.msg
1549 EXTRA_LIBGNAT_OBJS+=adamsg.o
1550 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1551 EXTRA_GNATTOOLS = \
1552 ../../gnatlbr$(exeext) \
1553 ../../gnatsym$(exeext) \
1554 ../../vms_help$(exeext) \
1555 ../../gnat.hlp
1556 # This command transforms (YYYYMMDD) into YY,MMDD
1557 GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)ada/gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\).*/\2,\3/')
1558 TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1559 LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1560 endif
1561
1562 ifeq ($(strip $(filter-out avr none powerpc% eabispe leon% erc32% unknown elf,$(targ))),)
1563 TOOLS_TARGET_PAIRS=\
1564 mlib-tgt-specific.adb<mlib-tgt-specific-xi.adb \
1565 indepsw.adb<indepsw-gnu.adb
1566 endif
1567
1568 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1569 LIBGNAT_TARGET_PAIRS = \
1570 a-dirval.adb<a-dirval-mingw.adb \
1571 a-excpol.adb<a-excpol-abort.adb \
1572 a-numaux.adb<a-numaux-x86.adb \
1573 a-numaux.ads<a-numaux-x86.ads \
1574 s-gloloc.adb<s-gloloc-mingw.adb \
1575 s-inmaop.adb<s-inmaop-dummy.adb \
1576 s-memory.adb<s-memory-mingw.adb \
1577 s-taspri.ads<s-taspri-mingw.ads \
1578 s-tasinf.adb<s-tasinf-mingw.adb \
1579 s-tasinf.ads<s-tasinf-mingw.ads \
1580 g-bytswa.adb<g-bytswa-x86.adb \
1581 g-socthi.ads<g-socthi-mingw.ads \
1582 g-socthi.adb<g-socthi-mingw.adb \
1583 g-stsifd.adb<g-stsifd-sockets.adb \
1584 g-soliop.ads<g-soliop-mingw.ads
1585
1586 ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
1587 LIBGNAT_TARGET_PAIRS += \
1588 s-intman.adb<s-intman-dummy.adb \
1589 s-osinte.ads<s-osinte-rtx.ads \
1590 s-osprim.adb<s-osprim-rtx.adb \
1591 s-taprop.adb<s-taprop-rtx.adb
1592
1593 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o
1594
1595 ifeq ($(strip $(filter-out rtx_w32,$(THREAD_KIND))),)
1596 LIBGNAT_TARGET_PAIRS += system.ads<system-rtx.ads
1597
1598 EH_MECHANISM=-gcc
1599 else
1600 LIBGNAT_TARGET_PAIRS += \
1601 system.ads<system-rtx-rtss.ads \
1602 s-parame.adb<s-parame-vxworks.adb
1603
1604 EH_MECHANISM=
1605 endif
1606
1607 else
1608 LIBGNAT_TARGET_PAIRS += \
1609 a-exetim.adb<a-exetim-mingw.adb \
1610 a-exetim.ads<a-exetim-mingw.ads \
1611 a-intnam.ads<a-intnam-mingw.ads \
1612 g-sercom.adb<g-sercom-mingw.adb \
1613 s-interr.adb<s-interr-sigaction.adb \
1614 s-intman.adb<s-intman-mingw.adb \
1615 s-osinte.ads<s-osinte-mingw.ads \
1616 s-osprim.adb<s-osprim-mingw.adb \
1617 s-taprop.adb<s-taprop-mingw.adb
1618
1619 ifeq ($(strip $(filter-out x86_64%,$(arch))),)
1620 LIBGNAT_TARGET_PAIRS += \
1621 system.ads<system-mingw-x86_64.ads
1622 else
1623 LIBGNAT_TARGET_PAIRS += \
1624 system.ads<system-mingw.ads
1625 endif
1626
1627 EXTRA_GNATRTL_NONTASKING_OBJS = \
1628 s-win32.o s-winext.o g-regist.o g-sse.o g-ssvety.o
1629 EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
1630
1631 MISCLIB = -lws2_32
1632
1633 # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1634 # auto-import support for array/record will be done.
1635 GNATLIB_SHARED = gnatlib-shared-win32
1636 endif
1637
1638 TOOLS_TARGET_PAIRS= \
1639 mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
1640 indepsw.adb<indepsw-mingw.adb
1641
1642 GMEM_LIB = gmemlib
1643 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1644 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1645 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1646 soext = .dll
1647 LIBRARY_VERSION := $(LIB_VERSION)
1648 endif
1649
1650 ifeq ($(strip $(filter-out mips 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.ads \
1656 s-osinte.adb<s-osinte-posix.adb \
1657 s-osinte.ads<s-osinte-linux.ads \
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-taspri.ads<s-taspri-posix.ads \
1663 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1664 system.ads<system-linux-mips.ads
1665
1666 EH_MECHANISM=-gcc
1667 THREADSLIB = -lpthread
1668 GNATLIB_SHARED = gnatlib-shared-dual
1669 GMEM_LIB = gmemlib
1670 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1671 LIBRARY_VERSION := $(LIB_VERSION)
1672 endif
1673
1674 ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
1675 LIBGNAT_TARGET_PAIRS_COMMON = \
1676 a-intnam.ads<a-intnam-linux.ads \
1677 s-inmaop.adb<s-inmaop-posix.adb \
1678 s-intman.adb<s-intman-posix.adb \
1679 s-linux.ads<s-linux-mipsel.ads \
1680 s-osinte.adb<s-osinte-posix.adb \
1681 s-osinte.ads<s-osinte-linux.ads \
1682 s-osprim.adb<s-osprim-posix.adb \
1683 s-taprop.adb<s-taprop-linux.adb \
1684 s-tasinf.ads<s-tasinf-linux.ads \
1685 s-tasinf.adb<s-tasinf-linux.adb \
1686 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1687 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1688 g-sercom.adb<g-sercom-linux.adb
1689
1690 LIBGNAT_TARGET_PAIRS_32 = \
1691 system.ads<system-linux-mipsel.ads
1692
1693 LIBGNAT_TARGET_PAIRS_64 = \
1694 system.ads<system-linux-mips64el.ads
1695
1696 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1697 LIBGNAT_TARGET_PAIRS = \
1698 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1699 else
1700 LIBGNAT_TARGET_PAIRS = \
1701 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1702 endif
1703
1704 TOOLS_TARGET_PAIRS = \
1705 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1706 indepsw.adb<indepsw-gnu.adb
1707
1708 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1709 EH_MECHANISM=-gcc
1710 THREADSLIB = -lpthread
1711 GNATLIB_SHARED = gnatlib-shared-dual
1712 GMEM_LIB = gmemlib
1713 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1714 LIBRARY_VERSION := $(LIB_VERSION)
1715 endif
1716
1717 ifeq ($(strip $(filter-out mips64el linux%,$(arch) $(osys))),)
1718 LIBGNAT_TARGET_PAIRS_COMMON = \
1719 a-intnam.ads<a-intnam-linux.ads \
1720 s-inmaop.adb<s-inmaop-posix.adb \
1721 s-intman.adb<s-intman-posix.adb \
1722 s-linux.ads<s-linux-mipsel.ads \
1723 s-osinte.adb<s-osinte-posix.adb \
1724 s-osinte.ads<s-osinte-linux.ads \
1725 s-osprim.adb<s-osprim-posix.adb \
1726 s-taprop.adb<s-taprop-linux.adb \
1727 s-tasinf.ads<s-tasinf-linux.ads \
1728 s-tasinf.adb<s-tasinf-linux.adb \
1729 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1730 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1731 g-sercom.adb<g-sercom-linux.adb
1732
1733 LIBGNAT_TARGET_PAIRS_32 = \
1734 system.ads<system-linux-mipsel.ads
1735
1736 LIBGNAT_TARGET_PAIRS_64 = \
1737 system.ads<system-linux-mips64el.ads
1738
1739 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1740 LIBGNAT_TARGET_PAIRS = \
1741 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1742 else
1743 LIBGNAT_TARGET_PAIRS = \
1744 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1745 endif
1746
1747 TOOLS_TARGET_PAIRS = \
1748 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1749 indepsw.adb<indepsw-gnu.adb
1750
1751 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1752 EH_MECHANISM=-gcc
1753 THREADSLIB = -lpthread
1754 GNATLIB_SHARED = gnatlib-shared-dual
1755 GMEM_LIB = gmemlib
1756 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1757 LIBRARY_VERSION := $(LIB_VERSION)
1758 endif
1759
1760 ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
1761 LIBGNAT_TARGET_PAIRS_COMMON = \
1762 a-intnam.ads<a-intnam-linux.ads \
1763 s-inmaop.adb<s-inmaop-posix.adb \
1764 s-intman.adb<s-intman-posix.adb \
1765 s-linux.ads<s-linux.ads \
1766 s-osinte.adb<s-osinte-posix.adb \
1767 s-osinte.ads<s-osinte-linux.ads \
1768 s-osprim.adb<s-osprim-posix.adb \
1769 s-taprop.adb<s-taprop-linux.adb \
1770 s-tasinf.ads<s-tasinf-linux.ads \
1771 s-tasinf.adb<s-tasinf-linux.adb \
1772 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1773 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1774 g-sercom.adb<g-sercom-linux.adb
1775
1776 LIBGNAT_TARGET_PAIRS_32 = \
1777 system.ads<system-linux-ppc.ads
1778
1779 LIBGNAT_TARGET_PAIRS_64 = \
1780 system.ads<system-linux-ppc64.ads
1781
1782 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1783 LIBGNAT_TARGET_PAIRS = \
1784 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1785 else
1786 LIBGNAT_TARGET_PAIRS = \
1787 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1788 endif
1789
1790 ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
1791 LIBGNAT_TARGET_PAIRS += \
1792 s-osinte.ads<s-osinte-linux-xenomai.ads \
1793 s-osprim.adb<s-osprim-linux-xenomai.adb \
1794 s-taprop.adb<s-taprop-linux-xenomai.adb \
1795 s-taspri.ads<s-taspri-linux-xenomai.ads \
1796 system.ads<system-linux-ppc-xenomai.ads
1797 else
1798 LIBGNAT_TARGET_PAIRS += \
1799 s-osinte.ads<s-osinte-linux.ads \
1800 s-osprim.adb<s-osprim-posix.adb \
1801 s-taprop.adb<s-taprop-linux.adb \
1802 s-tasinf.ads<s-tasinf-linux.ads \
1803 s-tasinf.adb<s-tasinf-linux.adb \
1804 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1805 system.ads<system-linux-ppc.ads
1806 endif
1807
1808 TOOLS_TARGET_PAIRS = \
1809 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1810 indepsw.adb<indepsw-gnu.adb
1811
1812 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1813 EH_MECHANISM=-gcc
1814 THREADSLIB = -lpthread
1815 GNATLIB_SHARED = gnatlib-shared-dual
1816 GMEM_LIB = gmemlib
1817 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1818 LIBRARY_VERSION := $(LIB_VERSION)
1819 endif
1820
1821 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
1822 LIBGNAT_TARGET_PAIRS_COMMON = \
1823 a-intnam.ads<a-intnam-linux.ads \
1824 s-inmaop.adb<s-inmaop-posix.adb \
1825 s-intman.adb<s-intman-posix.adb \
1826 s-linux.ads<s-linux.ads \
1827 s-osinte.adb<s-osinte-posix.adb \
1828 s-osinte.ads<s-osinte-linux.ads \
1829 s-osprim.adb<s-osprim-posix.adb \
1830 s-taprop.adb<s-taprop-linux.adb \
1831 s-tasinf.ads<s-tasinf-linux.ads \
1832 s-tasinf.adb<s-tasinf-linux.adb \
1833 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1834 s-tpopsp.adb<s-tpopsp-posix-foreign.adb
1835
1836 LIBGNAT_TARGET_PAIRS_32 = \
1837 g-trasym.ads<g-trasym-unimplemented.ads \
1838 g-trasym.adb<g-trasym-unimplemented.adb \
1839 system.ads<system-linux-sparc.ads
1840
1841 LIBGNAT_TARGET_PAIRS_64 = \
1842 system.ads<system-linux-sparcv9.ads
1843
1844 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1845 LIBGNAT_TARGET_PAIRS = \
1846 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1847 else
1848 LIBGNAT_TARGET_PAIRS = \
1849 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1850 endif
1851
1852 TOOLS_TARGET_PAIRS = \
1853 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1854 indepsw.adb<indepsw-gnu.adb
1855
1856 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1857 EH_MECHANISM=-gcc
1858 THREADSLIB = -lpthread
1859 GNATLIB_SHARED = gnatlib-shared-dual
1860 GMEM_LIB = gmemlib
1861 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1862 LIBRARY_VERSION := $(LIB_VERSION)
1863 endif
1864
1865 ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1866 LIBGNAT_TARGET_PAIRS = \
1867 a-intnam.ads<a-intnam-linux.ads \
1868 s-inmaop.adb<s-inmaop-posix.adb \
1869 s-intman.adb<s-intman-posix.adb \
1870 s-linux.ads<s-linux-hppa.ads \
1871 s-osinte.adb<s-osinte-posix.adb \
1872 s-osinte.ads<s-osinte-linux.ads \
1873 s-osprim.adb<s-osprim-posix.adb \
1874 s-taprop.adb<s-taprop-linux.adb \
1875 s-tasinf.ads<s-tasinf-linux.ads \
1876 s-tasinf.adb<s-tasinf-linux.adb \
1877 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1878 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1879 g-trasym.ads<g-trasym-unimplemented.ads \
1880 g-trasym.adb<g-trasym-unimplemented.adb \
1881 system.ads<system-linux-hppa.ads
1882
1883 TOOLS_TARGET_PAIRS = \
1884 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1885 indepsw.adb<indepsw-gnu.adb
1886
1887 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1888 EH_MECHANISM=-gcc
1889 THREADSLIB = -lpthread
1890 GNATLIB_SHARED = gnatlib-shared-dual
1891 GMEM_LIB = gmemlib
1892 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1893 LIBRARY_VERSION := $(LIB_VERSION)
1894 endif
1895
1896 ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
1897 LIBGNAT_TARGET_PAIRS = \
1898 a-intnam.ads<a-intnam-linux.ads \
1899 s-inmaop.adb<s-inmaop-posix.adb \
1900 s-intman.adb<s-intman-posix.adb \
1901 s-linux.ads<s-linux.ads \
1902 s-osinte.adb<s-osinte-posix.adb \
1903 s-osinte.ads<s-osinte-linux.ads \
1904 s-osprim.adb<s-osprim-posix.adb \
1905 s-taprop.adb<s-taprop-linux.adb \
1906 s-tasinf.ads<s-tasinf-linux.ads \
1907 s-tasinf.adb<s-tasinf-linux.adb \
1908 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1909 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1910 system.ads<system-linux-sh4.ads
1911
1912 TOOLS_TARGET_PAIRS = \
1913 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1914 indepsw.adb<indepsw-linux.adb
1915
1916 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1917 EH_MECHANISM=-gcc
1918 MISCLIB=
1919 THREADSLIB = -lpthread
1920 GNATLIB_SHARED = gnatlib-shared-dual
1921 GMEM_LIB = gmemlib
1922 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1923 LIBRARY_VERSION := $(LIB_VERSION)
1924 endif
1925
1926 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1927 LIBGNAT_TARGET_PAIRS = \
1928 a-intnam.ads<a-intnam-linux.ads \
1929 a-numaux.ads<a-numaux-libc-x86.ads \
1930 s-inmaop.adb<s-inmaop-posix.adb \
1931 s-intman.adb<s-intman-posix.adb \
1932 s-linux.ads<s-linux.ads \
1933 s-osinte.ads<s-osinte-linux.ads \
1934 s-osinte.adb<s-osinte-posix.adb \
1935 s-osprim.adb<s-osprim-posix.adb \
1936 s-taprop.adb<s-taprop-linux.adb \
1937 s-tasinf.ads<s-tasinf-linux.ads \
1938 s-tasinf.adb<s-tasinf-linux.adb \
1939 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1940 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1941 g-sercom.adb<g-sercom-linux.adb \
1942 system.ads<system-linux-ia64.ads
1943
1944 TOOLS_TARGET_PAIRS = \
1945 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1946 indepsw.adb<indepsw-gnu.adb
1947
1948 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1949 EH_MECHANISM=-gcc
1950 MISCLIB=
1951 THREADSLIB=-lpthread
1952 GNATLIB_SHARED=gnatlib-shared-dual
1953 GMEM_LIB = gmemlib
1954 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1955 LIBRARY_VERSION := $(LIB_VERSION)
1956 endif
1957
1958 ifeq ($(strip $(filter-out ia64% hp hpux%,$(targ))),)
1959 LIBGNAT_TARGET_PAIRS = \
1960 a-intnam.ads<a-intnam-hpux.ads \
1961 s-inmaop.adb<s-inmaop-posix.adb \
1962 s-intman.adb<s-intman-posix.adb \
1963 s-osinte.adb<s-osinte-posix.adb \
1964 s-osinte.ads<s-osinte-hpux.ads \
1965 s-osprim.adb<s-osprim-posix.adb \
1966 s-taprop.adb<s-taprop-posix.adb \
1967 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1968 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1969 system.ads<system-hpux-ia64.ads
1970
1971 TOOLS_TARGET_PAIRS = \
1972 mlib-tgt-specific.adb<mlib-tgt-specific-ia64-hpux.adb
1973
1974 MISCLIB=
1975 THREADSLIB=-lpthread
1976 GNATLIB_SHARED=gnatlib-shared-dual
1977 GMEM_LIB = gmemlib
1978 soext = .sl
1979 SO_OPTS = -Wl,+h,
1980 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1981 LIBRARY_VERSION := $(LIB_VERSION)
1982 endif
1983
1984 ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
1985 LIBGNAT_TARGET_PAIRS = \
1986 a-intnam.ads<a-intnam-linux.ads \
1987 s-inmaop.adb<s-inmaop-posix.adb \
1988 s-intman.adb<s-intman-posix.adb \
1989 s-linux.ads<s-linux-alpha.ads \
1990 s-osinte.ads<s-osinte-linux.ads \
1991 s-osinte.adb<s-osinte-posix.adb \
1992 s-osprim.adb<s-osprim-posix.adb \
1993 s-taprop.adb<s-taprop-linux.adb \
1994 s-tasinf.ads<s-tasinf-linux.ads \
1995 s-tasinf.adb<s-tasinf-linux.adb \
1996 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1997 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1998 g-trasym.ads<g-trasym-unimplemented.ads \
1999 g-trasym.adb<g-trasym-unimplemented.adb \
2000 system.ads<system-linux-alpha.ads
2001
2002 TOOLS_TARGET_PAIRS = \
2003 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
2004 indepsw.adb<indepsw-gnu.adb
2005
2006 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
2007 EH_MECHANISM=-gcc
2008 MISCLIB=
2009 THREADSLIB=-lpthread
2010 GNATLIB_SHARED=gnatlib-shared-dual
2011 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
2012 LIBRARY_VERSION := $(LIB_VERSION)
2013 endif
2014
2015 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
2016 LIBGNAT_TARGET_PAIRS = \
2017 a-intnam.ads<a-intnam-linux.ads \
2018 a-numaux.adb<a-numaux-x86.adb \
2019 a-numaux.ads<a-numaux-x86.ads \
2020 s-inmaop.adb<s-inmaop-posix.adb \
2021 s-intman.adb<s-intman-posix.adb \
2022 s-linux.ads<s-linux.ads \
2023 s-osinte.ads<s-osinte-linux.ads \
2024 s-osinte.adb<s-osinte-posix.adb \
2025 s-osprim.adb<s-osprim-posix.adb \
2026 s-taprop.adb<s-taprop-linux.adb \
2027 s-tasinf.ads<s-tasinf-linux.ads \
2028 s-tasinf.adb<s-tasinf-linux.adb \
2029 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2030 s-taspri.ads<s-taspri-posix.ads \
2031 g-sercom.adb<g-sercom-linux.adb \
2032 system.ads<system-linux-x86_64.ads
2033
2034 TOOLS_TARGET_PAIRS = \
2035 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
2036 indepsw.adb<indepsw-gnu.adb
2037
2038 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
2039 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
2040 EH_MECHANISM=-gcc
2041 THREADSLIB=-lpthread
2042 GNATLIB_SHARED=gnatlib-shared-dual
2043 GMEM_LIB = gmemlib
2044 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
2045 LIBRARY_VERSION := $(LIB_VERSION)
2046 endif
2047
2048 ifeq ($(strip $(filter-out darwin%,$(osys))),)
2049 ifeq ($(strip $(filter-out %86,$(arch))),)
2050 LIBGNAT_TARGET_PAIRS = \
2051 a-intnam.ads<a-intnam-darwin.ads \
2052 s-inmaop.adb<s-inmaop-posix.adb \
2053 s-intman.adb<s-intman-susv3.adb \
2054 s-osinte.adb<s-osinte-darwin.adb \
2055 s-osinte.ads<s-osinte-darwin.ads \
2056 s-osprim.adb<s-osprim-darwin.adb \
2057 s-taprop.adb<s-taprop-posix.adb \
2058 s-taspri.ads<s-taspri-posix.ads \
2059 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2060 g-trasym.ads<g-trasym-unimplemented.ads \
2061 g-trasym.adb<g-trasym-unimplemented.adb \
2062 a-numaux.ads<a-numaux-x86.ads \
2063 a-numaux.adb<a-numaux-x86.adb
2064 ifeq ($(strip $(MULTISUBDIR)),/x86_64)
2065 LIBGNAT_TARGET_PAIRS += \
2066 system.ads<system-darwin-x86_64.ads
2067 else
2068 LIBGNAT_TARGET_PAIRS += \
2069 system.ads<system-darwin-x86.ads
2070 endif
2071 endif
2072
2073 ifeq ($(strip $(filter-out %x86_64,$(arch))),)
2074 LIBGNAT_TARGET_PAIRS = \
2075 a-intnam.ads<a-intnam-darwin.ads \
2076 s-inmaop.adb<s-inmaop-posix.adb \
2077 s-intman.adb<s-intman-susv3.adb \
2078 s-osinte.adb<s-osinte-darwin.adb \
2079 s-osinte.ads<s-osinte-darwin.ads \
2080 s-osprim.adb<s-osprim-darwin.adb \
2081 s-taprop.adb<s-taprop-posix.adb \
2082 s-taspri.ads<s-taspri-posix.ads \
2083 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2084 a-numaux.ads<a-numaux-x86.ads \
2085 a-numaux.adb<a-numaux-x86.adb \
2086 g-trasym.ads<g-trasym-unimplemented.ads \
2087 g-trasym.adb<g-trasym-unimplemented.adb \
2088 system.ads<system-darwin-x86_64.ads
2089 endif
2090
2091 ifeq ($(strip $(filter-out powerpc%,$(arch))),)
2092 LIBGNAT_TARGET_PAIRS = \
2093 a-intnam.ads<a-intnam-darwin.ads \
2094 s-inmaop.adb<s-inmaop-posix.adb \
2095 s-intman.adb<s-intman-posix.adb \
2096 s-osinte.adb<s-osinte-darwin.adb \
2097 s-osinte.ads<s-osinte-darwin.ads \
2098 s-osprim.adb<s-osprim-posix.adb \
2099 s-taprop.adb<s-taprop-posix.adb \
2100 s-taspri.ads<s-taspri-posix.ads \
2101 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2102 a-numaux.ads<a-numaux-darwin.ads \
2103 a-numaux.adb<a-numaux-darwin.adb \
2104 g-trasym.ads<g-trasym-unimplemented.ads \
2105 g-trasym.adb<g-trasym-unimplemented.adb \
2106 system.ads<system-darwin-ppc.ads
2107 endif
2108
2109 TOOLS_TARGET_PAIRS = \
2110 mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb
2111
2112 EH_MECHANISM=-gcc
2113 GNATLIB_SHARED = gnatlib-shared-darwin
2114 SO_OPTS = -Wl,-flat_namespace -shared-libgcc
2115 RANLIB = ranlib -c
2116 GMEM_LIB = gmemlib
2117 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
2118 LIBRARY_VERSION := $(LIB_VERSION)
2119 soext = .dylib
2120 endif
2121
2122 ifneq ($(EH_MECHANISM),)
2123 LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
2124 EXTRA_LIBGNAT_SRCS+=raise$(EH_MECHANISM).c
2125 EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
2126 endif
2127
2128 # Use the Ada 2005 version of Ada.Exceptions by default, unless specified
2129 # explicitly already. The base files (a-except.ad?) are used only for building
2130 # the compiler and other basic tools.
2131 # These base versions lack Ada 2005 additions which would cause bootstrap
2132 # problems if included in the compiler and other basic tools.
2133
2134 ifeq ($(filter a-except%,$(LIBGNAT_TARGET_PAIRS)),)
2135 LIBGNAT_TARGET_PAIRS += \
2136 a-except.ads<a-except-2005.ads \
2137 a-except.adb<a-except-2005.adb
2138 endif
2139
2140 # The runtime library for gnat comprises two directories. One contains the
2141 # Ada source files that the compiler (gnat1) needs -- these files are listed
2142 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
2143 # corresponding .ali files for the parts written in Ada, libgnat.a for
2144 # the parts of the runtime written in C, and libgthreads.a for the pthreads
2145 # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
2146 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
2147 # go into the directory. The pthreads emulation is built in the threads
2148 # subdirectory and copied.
2149 LIBGNAT_SRCS = adaint.c adaint.h argv.c cio.c cstreams.c \
2150 errno.c exit.c cal.c ctrl_c.c env.c env.h arit64.c \
2151 raise.h raise.c sysdep.c aux-io.c init.c initialize.c seh_init.c \
2152 final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c expect.c mkdir.c \
2153 socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
2154
2155 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o env.o \
2156 raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o arit64.o \
2157 final.o tracebak.o expect.o mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
2158
2159 # NOTE ??? - when the -I option for compiling Ada code is made to work,
2160 # the library installation will change and there will be a
2161 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
2162 # from ADA_INCLUDE_SRCS.
2163
2164 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
2165 # the following include file:
2166
2167 include $(fsrcdir)/ada/Makefile.rtl
2168
2169 GNATRTL_LINEARALGEBRA_OBJS = a-nlcoar.o a-nllcar.o a-nllrar.o a-nlrear.o \
2170 a-nucoar.o a-nurear.o i-forbla.o i-forlap.o s-gearop.o
2171
2172 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
2173 $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
2174
2175 # Default run time files
2176
2177 ADA_INCLUDE_SRCS =\
2178 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
2179 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
2180 sequenio.ads system.ads memtrack.adb \
2181 a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
2182 s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
2183
2184 LIBGNAT=../$(RTSDIR)/libgnat.a
2185
2186 GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
2187
2188 # when compiling the tools, the runtime has to be first on the path so that
2189 # it hides the runtime files lying with the rest of the sources
2190 ifeq ($(TOOLSCASE),native)
2191 vpath %.ads ../$(RTSDIR) ../
2192 vpath %.adb ../$(RTSDIR) ../
2193 vpath %.c ../$(RTSDIR) ../
2194 vpath %.h ../$(RTSDIR) ../
2195 endif
2196
2197 # in the cross tools case, everything is compiled with the native
2198 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
2199 ifeq ($(TOOLSCASE),cross)
2200 vpath %.ads ../
2201 vpath %.adb ../
2202 vpath %.c ../
2203 vpath %.h ../
2204 endif
2205
2206 common-tools:
2207 $(GNATMAKE) -c -b $(ADA_INCLUDES) \
2208 --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
2209 gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
2210 gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
2211 $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
2212 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2213 $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
2214 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2215 $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
2216 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2217 $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
2218 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2219 $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
2220 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2221 $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
2222 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2223 $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
2224 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2225 $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
2226 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2227 $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
2228 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2229
2230 ../../gnatsym$(exeext):
2231 $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
2232 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
2233 $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2234
2235 ../../gnatdll$(exeext):
2236 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
2237 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
2238 $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2239
2240 ../../vxaddr2line$(exeext): targext.o
2241 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
2242 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
2243 $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
2244
2245 gnatmake-re: link.o targext.o
2246 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
2247 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
2248 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
2249 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
2250 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2251
2252 # Note the use of the "mv" command in order to allow gnatlink to be linked with
2253 # with the former version of gnatlink itself which cannot override itself.
2254 gnatlink-re: link.o targext.o
2255 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
2256 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
2257 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
2258 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2259 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
2260
2261 # Needs to be built with CC=gcc
2262 # Since the RTL should be built with the latest compiler, remove the
2263 # stamp target in the parent directory whenever gnat1 is rebuilt
2264
2265 # Likewise for the tools
2266 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
2267 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
2268 $(TOOLS_LIBS)
2269
2270 ../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
2271 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
2272 $(TOOLS_LIBS)
2273
2274 ../stamp-gnatlib-$(RTSDIR):
2275 @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
2276 then \
2277 $(ECHO) You must first build the GNAT library: make gnatlib; \
2278 false; \
2279 else \
2280 true; \
2281 fi
2282
2283 install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
2284 # Create the directory before deleting it, in case the directory is
2285 # a list of directories (as it may be on VMS). This ensures we are
2286 # deleting the right one.
2287 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2288 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2289 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2290 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2291 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2292 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2293 for file in $(RTSDIR)/*.ali; do \
2294 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2295 done
2296 -$(INSTALL_DATA) $(RTSDIR)/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2297 -cd $(RTSDIR); for file in *$(arext);do \
2298 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2299 $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
2300 done
2301 -$(foreach file, $(EXTRA_ADALIB_FILES), \
2302 $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
2303 ) true
2304 # Install the shared libraries, if any, using $(INSTALL) instead
2305 # of $(INSTALL_DATA). The latter may force a mode inappropriate
2306 # for shared libraries on some targets, e.g. on HP-UX where the x
2307 # permission is required.
2308 # Also install the .dSYM directories if they exist (these directories
2309 # contain the debug information for the shared libraries on darwin)
2310 for file in gnat gnarl; do \
2311 if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
2312 $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
2313 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2314 fi; \
2315 if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
2316 $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
2317 $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
2318 fi; \
2319 if [ -d $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM ]; then \
2320 $(CP) -r $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM \
2321 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2322 fi; \
2323 done
2324 # This copy must be done preserving the date on the original file.
2325 for file in $(RTSDIR)/*.ad?; do \
2326 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
2327 done
2328 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
2329 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
2330
2331 ../stamp-gnatlib2-$(RTSDIR):
2332 $(RM) $(RTSDIR)/s-*.ali
2333 $(RM) $(RTSDIR)/s-*$(objext)
2334 $(RM) $(RTSDIR)/a-*.ali
2335 $(RM) $(RTSDIR)/a-*$(objext)
2336 $(RM) $(RTSDIR)/*.ali
2337 $(RM) $(RTSDIR)/*$(objext)
2338 $(RM) $(RTSDIR)/*$(arext)
2339 $(RM) $(RTSDIR)/*$(soext)
2340 touch ../stamp-gnatlib2-$(RTSDIR)
2341 $(RM) ../stamp-gnatlib-$(RTSDIR)
2342
2343 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
2344 # successive target commands. Although the Gnu make documentation
2345 # implies this is true on all systems, I suspect it may not be, So care
2346 # has been taken to allow a sed script to look for ";)" and substitue
2347 # for ";" the appropriate character in the range of lines below
2348 # beginning with "GNULLI Begin" and ending with "GNULLI End"
2349
2350 # GNULLI Begin ###########################################################
2351
2352 ../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
2353 $(RMDIR) $(RTSDIR)
2354 $(MKDIR) $(RTSDIR)
2355 $(CHMOD) u+w $(RTSDIR)
2356 # Copy target independent sources
2357 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
2358 $(LN_S) $(fsrcpfx)ada/$(f) $(RTSDIR) ;) true
2359 # Remove files to be replaced by target dependent sources
2360 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
2361 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
2362 $(RM) $(RTSDIR)/*-*-*.ads $(RTSDIR)/*-*-*.adb
2363 # Copy new target dependent sources
2364 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
2365 $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
2366 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
2367 # Copy generated target dependent sources
2368 $(RM) $(RTSDIR)/s-oscons.ads
2369 (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
2370 $(RM) ../stamp-gnatlib-$(RTSDIR)
2371 touch ../stamp-gnatlib1-$(RTSDIR)
2372
2373 # GNULLI End #############################################################
2374
2375 # Don't use semicolon separated shell commands that involve list expansions.
2376 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
2377 # line lengths in excess of 256 characters.
2378 # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
2379 # is guaranteed to overflow the buffer.
2380
2381 gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
2382 $(MAKE) -C $(RTSDIR) \
2383 CC="`echo \"$(GCC_FOR_TARGET)\" \
2384 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2385 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
2386 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
2387 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2388 srcdir=$(fsrcdir) \
2389 -f ../Makefile $(LIBGNAT_OBJS)
2390 $(MAKE) -C $(RTSDIR) \
2391 CC="`echo \"$(GCC_FOR_TARGET)\" \
2392 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2393 ADA_INCLUDES="" \
2394 CFLAGS="$(GNATLIBCFLAGS)" \
2395 ADAFLAGS="$(GNATLIBFLAGS)" \
2396 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2397 srcdir=$(fsrcdir) \
2398 -f ../Makefile \
2399 $(GNATRTL_OBJS)
2400 $(RM) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnarl$(arext)
2401 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat$(arext) \
2402 $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
2403 ifneq ($(PREFIX_OBJS),)
2404 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgccprefix$(arext) \
2405 $(PREFIX_OBJS);
2406 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgccprefix$(arext)
2407 endif
2408 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat$(arext)
2409 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \
2410 $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
2411 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext)
2412 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnala$(arext) \
2413 $(addprefix $(RTSDIR)/,$(GNATRTL_LINEARALGEBRA_OBJS))
2414 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnala$(arext)
2415 ifeq ($(GMEM_LIB),gmemlib)
2416 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \
2417 $(RTSDIR)/memtrack.o
2418 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
2419 endif
2420 $(CHMOD) a-wx $(RTSDIR)/*.ali
2421 touch ../stamp-gnatlib-$(RTSDIR)
2422
2423 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
2424 gnatlib-shared-default:
2425 $(MAKE) $(FLAGS_TO_PASS) \
2426 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2427 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2428 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2429 MULTISUBDIR="$(MULTISUBDIR)" \
2430 THREAD_KIND="$(THREAD_KIND)" \
2431 gnatlib
2432 $(RM) $(RTSDIR)/libgna*$(soext)
2433 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2434 $(TARGET_LIBGCC2_CFLAGS) \
2435 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2436 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2437 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2438 $(MISCLIB) -lm
2439 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2440 $(TARGET_LIBGCC2_CFLAGS) \
2441 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2442 $(GNATRTL_TASKING_OBJS) \
2443 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2444 $(THREADSLIB)
2445 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2446 libgnat$(soext)
2447 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2448 libgnarl$(soext)
2449
2450 gnatlib-shared-dual:
2451 $(MAKE) $(FLAGS_TO_PASS) \
2452 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2453 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2454 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2455 MULTISUBDIR="$(MULTISUBDIR)" \
2456 THREAD_KIND="$(THREAD_KIND)" \
2457 gnatlib-shared-default
2458 $(MV) $(RTSDIR)/libgna*$(soext) .
2459 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2460 $(MAKE) $(FLAGS_TO_PASS) \
2461 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2462 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2463 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2464 MULTISUBDIR="$(MULTISUBDIR)" \
2465 THREAD_KIND="$(THREAD_KIND)" \
2466 gnatlib
2467 $(MV) libgna*$(soext) $(RTSDIR)
2468
2469 gnatlib-shared-dual-win32:
2470 $(MAKE) $(FLAGS_TO_PASS) \
2471 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2472 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2473 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2474 MULTISUBDIR="$(MULTISUBDIR)" \
2475 THREAD_KIND="$(THREAD_KIND)" \
2476 gnatlib-shared-win32
2477 $(MV) $(RTSDIR)/libgna*$(soext) .
2478 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2479 $(MAKE) $(FLAGS_TO_PASS) \
2480 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2481 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2482 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2483 MULTISUBDIR="$(MULTISUBDIR)" \
2484 THREAD_KIND="$(THREAD_KIND)" \
2485 gnatlib
2486 $(MV) libgna*$(soext) $(RTSDIR)
2487
2488 # ??? we need to add the option to support auto-import of arrays/records to
2489 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
2490 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
2491 # Windows.
2492 gnatlib-shared-win32:
2493 $(MAKE) $(FLAGS_TO_PASS) \
2494 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2495 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2496 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2497 MULTISUBDIR="$(MULTISUBDIR)" \
2498 THREAD_KIND="$(THREAD_KIND)" \
2499 gnatlib
2500 $(RM) $(RTSDIR)/libgna*$(soext)
2501 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2502 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2503 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2504 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
2505 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2506 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2507 $(GNATRTL_TASKING_OBJS) \
2508 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2509 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2510
2511 gnatlib-shared-darwin:
2512 $(MAKE) $(FLAGS_TO_PASS) \
2513 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2514 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
2515 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) -fno-common" \
2516 MULTISUBDIR="$(MULTISUBDIR)" \
2517 THREAD_KIND="$(THREAD_KIND)" \
2518 gnatlib
2519 $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
2520 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2521 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2522 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2523 $(SO_OPTS) \
2524 -Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2525 $(MISCLIB) -lm
2526 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2527 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2528 $(GNATRTL_TASKING_OBJS) \
2529 $(SO_OPTS) \
2530 -Wl,-install_name,@rpath/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2531 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2532 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2533 libgnat$(soext)
2534 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2535 libgnarl$(soext)
2536 cd $(RTSDIR); dsymutil libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2537 cd $(RTSDIR); dsymutil libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext)
2538
2539 gnatlib-shared-vms:
2540 $(MAKE) $(FLAGS_TO_PASS) \
2541 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2542 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2543 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2544 MULTISUBDIR="$(MULTISUBDIR)" \
2545 THREAD_KIND="$(THREAD_KIND)" \
2546 gnatlib
2547 $(RM) $(RTSDIR)/libgna*$(soext)
2548 cd $(RTSDIR) && \
2549 ../../gnatsym -s SYMVEC_$$$$.opt \
2550 $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \
2551 ../../xgcc -g -B../../ -shared -shared-libgcc \
2552 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
2553 sys\$$library:trace.exe \
2554 --for-linker=/noinform \
2555 --for-linker=SYMVEC_$$$$.opt \
2556 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2557 cd $(RTSDIR) && \
2558 ../../gnatsym -s SYMVEC_$$$$.opt \
2559 $(GNATRTL_TASKING_OBJS) && \
2560 ../../xgcc -g -B../../ -shared -shared-libgcc \
2561 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2562 libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2563 sys\$$library:trace.exe \
2564 --for-linker=/noinform \
2565 --for-linker=SYMVEC_$$$$.opt \
2566 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2567
2568 gnatlib-shared:
2569 $(MAKE) $(FLAGS_TO_PASS) \
2570 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2571 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2572 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2573 MULTISUBDIR="$(MULTISUBDIR)" \
2574 THREAD_KIND="$(THREAD_KIND)" \
2575 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
2576 $(GNATLIB_SHARED)
2577
2578 gnatlib-sjlj:
2579 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1-$(RTSDIR)
2580 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2581 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2582 $(MAKE) $(FLAGS_TO_PASS) \
2583 EH_MECHANISM="" \
2584 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2585 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2586 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2587 MULTISUBDIR="$(MULTISUBDIR)" \
2588 THREAD_KIND="$(THREAD_KIND)" \
2589 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2590
2591 gnatlib-zcx:
2592 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1-$(RTSDIR)
2593 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2594 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2595 $(MAKE) $(FLAGS_TO_PASS) \
2596 EH_MECHANISM="-gcc" \
2597 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2598 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2599 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2600 MULTISUBDIR="$(MULTISUBDIR)" \
2601 THREAD_KIND="$(THREAD_KIND)" \
2602 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2603
2604 # .s files for cross-building
2605 gnat-cross: force
2606 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
2607
2608 # Compiling object files from source files.
2609
2610 # Note that dependencies on obstack.h are not written
2611 # because that file is not part of GCC.
2612 # Dependencies on gvarargs.h are not written
2613 # because all that file does, when not compiling with GCC,
2614 # is include the system varargs.h.
2615
2616 b_gnatl.c : $(GNATLINK_OBJS)
2617 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2618 b_gnatl.o : b_gnatl.c
2619
2620 b_gnatm.c : $(GNATMAKE_OBJS)
2621 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2622 b_gnatm.o : b_gnatm.c
2623
2624 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2625 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2626
2627 # force no sibling call optimization on s-traceb.o so the number of stack
2628 # frames to be skipped when computing a call chain is not modified by
2629 # optimization. However we can do that only when building the runtime
2630 # (not the compiler) because the -fno-optimize-sibling-calls option exists
2631 # only in GCC 3 and above.
2632
2633 ifneq (,$(findstring xgcc,$(CC)))
2634 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2635 else
2636 NO_SIBLING_ADAFLAGS=
2637 endif
2638
2639 s-traceb.o : s-traceb.adb
2640 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2641 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2642 $< $(OUTPUT_OPTION)
2643
2644 # force debugging information on s-tasdeb.o so that it is always
2645 # possible to set conditional breakpoints on tasks.
2646
2647 s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
2648 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2649 $< $(OUTPUT_OPTION)
2650
2651 # force no function reordering on a-except.o because of the exclusion bounds
2652 # mechanism (see the source file for more detailed information). However we
2653 # can do that only when building the runtime (not the compiler) because the
2654 # -fno-toplevel-reorder option exists only in GCC 4.2 and above.
2655
2656 ifneq (,$(findstring xgcc,$(CC)))
2657 NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
2658 else
2659 NO_REORDER_ADAFLAGS=
2660 endif
2661
2662 # force debugging information on a-except.o so that it is always
2663 # possible to set conditional breakpoints on exceptions.
2664 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2665
2666 a-except.o : a-except.adb a-except.ads
2667 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2668 $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2669
2670 # compile s-except.o without optimization and with debug info to let the
2671 # debugger set breakpoints and inspect subprogram parameters on exception
2672 # related events.
2673
2674 s-except.o : s-except.adb s-except.ads
2675 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2676 $< $(OUTPUT_OPTION)
2677
2678 # force debugging information on s-assert.o so that it is always
2679 # possible to set breakpoint on assert failures.
2680
2681 s-assert.o : s-assert.adb s-assert.ads a-except.ads
2682 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
2683 $< $(OUTPUT_OPTION)
2684
2685 adadecode.o : adadecode.c adadecode.h
2686 aux-io.o : aux-io.c
2687 argv.o : argv.c
2688 cal.o : cal.c
2689 deftarg.o : deftarg.c
2690 errno.o : errno.c
2691 exit.o : adaint.h exit.c
2692 expect.o : expect.c
2693 final.o : final.c
2694 gmem.o : gmem.c
2695 link.o : link.c
2696 mkdir.o : mkdir.c
2697 socket.o : socket.c gsocket.h
2698 sysdep.o : sysdep.c
2699 raise-gcc.o : raise-gcc.c raise.h
2700 raise.o : raise.c raise.h
2701 vx_stack_info.o : vx_stack_info.c
2702
2703 cio.o : cio.c
2704 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2705 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2706
2707 init.o : init.c adaint.h raise.h
2708 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2709 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2710
2711 initialize.o : initialize.c raise.h
2712 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2713 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2714
2715 targext.o : targext.c
2716 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2717 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2718 $< $(OUTPUT_OPTION)
2719
2720 # Need to keep the frame pointer in this file to pop the stack properly on
2721 # some targets.
2722 tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
2723 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
2724 $(INCLUDES) -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2725
2726 # In GNU Make, ignore whether `stage*' exists.
2727 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2728 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2729
2730 force:
2731
2732 # Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
2733
2734 ../../gnatlbr$(exeext): ../../prefix.o
2735 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2736 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2737 $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2738
2739 ../../vms_help$(exeext):
2740 $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
2741 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
2742 $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2743
2744 ../../gnat.hlp: ../../vms_help$(exeext)
2745 ../../vms_help$(exeext) $(fsrcdir)/ada/gnat.help_in \
2746 $(fsrcdir)/ada/vms_data.ads ../../gnat.hlp