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