2008-07-31 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 += \
1339 system.ads<system-rtx-rtss.ads \
1340 s-parame.adb<s-parame-vxworks.adb
1341
1342 EH_MECHANISM=
1343 endif
1344
1345 else
1346 LIBGNAT_TARGET_PAIRS += \
1347 a-exetim.adb<a-exetim-mingw.adb \
1348 a-exetim.ads<a-exetim-mingw.ads \
1349 a-intnam.ads<a-intnam-mingw.ads \
1350 g-sercom.adb<g-sercom-mingw.adb \
1351 s-interr.adb<s-interr-sigaction.adb \
1352 s-intman.adb<s-intman-mingw.adb \
1353 s-osinte.ads<s-osinte-mingw.ads \
1354 s-osprim.adb<s-osprim-mingw.adb \
1355 s-taprop.adb<s-taprop-mingw.adb \
1356 system.ads<system-mingw.ads
1357
1358 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o s-winext.o g-regist.o
1359 EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
1360
1361 MISCLIB = -lwsock32
1362
1363 # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1364 # auto-import support for array/record will be done.
1365 GNATLIB_SHARED = gnatlib-shared-win32
1366
1367 EH_MECHANISM=-gcc
1368 endif
1369
1370 TOOLS_TARGET_PAIRS= \
1371 mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
1372 indepsw.adb<indepsw-mingw.adb
1373
1374 GMEM_LIB = gmemlib
1375 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1376 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1377 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1378 soext = .dll
1379 LIBRARY_VERSION := $(LIB_VERSION)
1380 endif
1381
1382 ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
1383 LIBGNAT_TARGET_PAIRS = \
1384 a-intnam.ads<a-intnam-linux.ads \
1385 g-soccon.ads<g-soccon-linux-mips.ads \
1386 s-inmaop.adb<s-inmaop-posix.adb \
1387 s-intman.adb<s-intman-posix.adb \
1388 s-linux.ads<s-linux.ads \
1389 s-osinte.adb<s-osinte-posix.adb \
1390 s-osinte.ads<s-osinte-linux.ads \
1391 s-osprim.adb<s-osprim-posix.adb \
1392 s-taprop.adb<s-taprop-linux.adb \
1393 s-tasinf.ads<s-tasinf-linux.ads \
1394 s-tasinf.adb<s-tasinf-linux.adb \
1395 s-taspri.ads<s-taspri-posix.ads \
1396 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1397 system.ads<system-linux-mips.ads
1398
1399 EH_MECHANISM=-gcc
1400 THREADSLIB = -lpthread
1401 GNATLIB_SHARED = gnatlib-shared-dual
1402 GMEM_LIB = gmemlib
1403 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1404 LIBRARY_VERSION := $(LIB_VERSION)
1405 endif
1406
1407 ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
1408 LIBGNAT_TARGET_PAIRS = \
1409 a-intnam.ads<a-intnam-linux.ads \
1410 g-soccon.ads<g-soccon-linux-mips.ads \
1411 s-inmaop.adb<s-inmaop-posix.adb \
1412 s-intman.adb<s-intman-posix.adb \
1413 s-linux.ads<s-linux.ads \
1414 s-osinte.adb<s-osinte-posix.adb \
1415 s-osinte.ads<s-osinte-linux.ads \
1416 s-osprim.adb<s-osprim-posix.adb \
1417 s-taprop.adb<s-taprop-linux.adb \
1418 s-tasinf.ads<s-tasinf-linux.ads \
1419 s-tasinf.adb<s-tasinf-linux.adb \
1420 s-taspri.ads<s-taspri-posix.ads \
1421 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1422 system.ads<system-linux-mipsel.ads
1423
1424 EH_MECHANISM=-gcc
1425 THREADSLIB = -lpthread
1426 GNATLIB_SHARED = gnatlib-shared-dual
1427 GMEM_LIB = gmemlib
1428 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1429 LIBRARY_VERSION := $(LIB_VERSION)
1430 endif
1431
1432 ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
1433 LIBGNAT_TARGET_PAIRS = \
1434 a-intnam.ads<a-intnam-linux.ads \
1435 g-soccon.ads<g-soccon-linux-ppc.ads \
1436 s-inmaop.adb<s-inmaop-posix.adb \
1437 s-intman.adb<s-intman-posix.adb \
1438 s-linux.ads<s-linux.ads \
1439 s-osinte.adb<s-osinte-posix.adb \
1440 s-osinte.ads<s-osinte-linux.ads \
1441 s-osprim.adb<s-osprim-posix.adb \
1442 s-taprop.adb<s-taprop-linux.adb \
1443 s-tasinf.ads<s-tasinf-linux.ads \
1444 s-tasinf.adb<s-tasinf-linux.adb \
1445 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1446 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1447 g-sercom.adb<g-sercom-linux.adb \
1448 system.ads<system-linux-ppc.ads
1449
1450 TOOLS_TARGET_PAIRS = \
1451 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1452 indepsw.adb<indepsw-gnu.adb
1453
1454 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1455 EH_MECHANISM=-gcc
1456 THREADSLIB = -lpthread
1457 GNATLIB_SHARED = gnatlib-shared-dual
1458 GMEM_LIB = gmemlib
1459 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1460 LIBRARY_VERSION := $(LIB_VERSION)
1461 endif
1462
1463 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
1464 LIBGNAT_TARGET_PAIRS = \
1465 a-intnam.ads<a-intnam-linux.ads \
1466 s-inmaop.adb<s-inmaop-posix.adb \
1467 s-intman.adb<s-intman-posix.adb \
1468 s-linux.ads<s-linux.ads \
1469 s-osinte.adb<s-osinte-posix.adb \
1470 s-osinte.ads<s-osinte-linux.ads \
1471 s-osprim.adb<s-osprim-posix.adb \
1472 s-taprop.adb<s-taprop-linux.adb \
1473 s-tasinf.ads<s-tasinf-linux.ads \
1474 s-tasinf.adb<s-tasinf-linux.adb \
1475 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1476 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1477 system.ads<system-linux-sparc.ads
1478
1479 TOOLS_TARGET_PAIRS = \
1480 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1481 indepsw.adb<indepsw-gnu.adb
1482
1483 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1484 EH_MECHANISM=-gcc
1485 THREADSLIB = -lpthread
1486 GNATLIB_SHARED = gnatlib-shared-dual
1487 GMEM_LIB = gmemlib
1488 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1489 LIBRARY_VERSION := $(LIB_VERSION)
1490 endif
1491
1492 ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1493 LIBGNAT_TARGET_PAIRS = \
1494 a-intnam.ads<a-intnam-linux.ads \
1495 s-inmaop.adb<s-inmaop-posix.adb \
1496 s-intman.adb<s-intman-posix.adb \
1497 s-linux.ads<s-linux-hppa.ads \
1498 s-osinte.adb<s-osinte-posix.adb \
1499 s-osinte.ads<s-osinte-linux.ads \
1500 s-osprim.adb<s-osprim-posix.adb \
1501 s-taprop.adb<s-taprop-linux.adb \
1502 s-tasinf.ads<s-tasinf-linux.ads \
1503 s-tasinf.adb<s-tasinf-linux.adb \
1504 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1505 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1506 system.ads<system-linux-hppa.ads
1507
1508 TOOLS_TARGET_PAIRS = \
1509 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1510 indepsw.adb<indepsw-gnu.adb
1511
1512 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1513 EH_MECHANISM=-gcc
1514 THREADSLIB = -lpthread
1515 GNATLIB_SHARED = gnatlib-shared-dual
1516 GMEM_LIB = gmemlib
1517 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1518 LIBRARY_VERSION := $(LIB_VERSION)
1519 endif
1520
1521 ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
1522 LIBGNAT_TARGET_PAIRS = \
1523 a-intnam.ads<a-intnam-linux.ads \
1524 s-inmaop.adb<s-inmaop-posix.adb \
1525 s-intman.adb<s-intman-posix.adb \
1526 s-linux.ads<s-linux.ads \
1527 s-osinte.adb<s-osinte-posix.adb \
1528 s-osinte.ads<s-osinte-linux.ads \
1529 s-osprim.adb<s-osprim-posix.adb \
1530 s-taprop.adb<s-taprop-linux.adb \
1531 s-tasinf.ads<s-tasinf-linux.ads \
1532 s-tasinf.adb<s-tasinf-linux.adb \
1533 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1534 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1535 system.ads<system-linux-sh4.ads
1536
1537 TOOLS_TARGET_PAIRS = \
1538 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1539 indepsw.adb<indepsw-linux.adb
1540
1541 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1542 EH_MECHANISM=-gcc
1543 MISCLIB=
1544 THREADSLIB = -lpthread
1545 GNATLIB_SHARED = gnatlib-shared-dual
1546 GMEM_LIB = gmemlib
1547 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1548 LIBRARY_VERSION := $(LIB_VERSION)
1549 endif
1550
1551 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1552 LIBGNAT_TARGET_PAIRS = \
1553 a-intnam.ads<a-intnam-linux.ads \
1554 a-numaux.ads<a-numaux-libc-x86.ads \
1555 g-soccon.ads<g-soccon-linux-64.ads \
1556 s-inmaop.adb<s-inmaop-posix.adb \
1557 s-intman.adb<s-intman-posix.adb \
1558 s-linux.ads<s-linux.ads \
1559 s-osinte.ads<s-osinte-linux.ads \
1560 s-osinte.adb<s-osinte-posix.adb \
1561 s-osprim.adb<s-osprim-posix.adb \
1562 s-taprop.adb<s-taprop-linux.adb \
1563 s-tasinf.ads<s-tasinf-linux.ads \
1564 s-tasinf.adb<s-tasinf-linux.adb \
1565 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1566 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1567 g-sercom.adb<g-sercom-linux.adb \
1568 system.ads<system-linux-ia64.ads
1569
1570 TOOLS_TARGET_PAIRS = \
1571 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1572 indepsw.adb<indepsw-gnu.adb
1573
1574 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1575 EH_MECHANISM=-gcc
1576 MISCLIB=
1577 THREADSLIB=-lpthread
1578 GNATLIB_SHARED=gnatlib-shared-dual
1579 GMEM_LIB = gmemlib
1580 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1581 LIBRARY_VERSION := $(LIB_VERSION)
1582 endif
1583
1584 ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
1585 LIBGNAT_TARGET_PAIRS = \
1586 a-intnam.ads<a-intnam-linux.ads \
1587 s-inmaop.adb<s-inmaop-posix.adb \
1588 s-intman.adb<s-intman-posix.adb \
1589 s-linux.ads<s-linux-alpha.ads \
1590 s-osinte.ads<s-osinte-linux.ads \
1591 s-osinte.adb<s-osinte-posix.adb \
1592 s-osprim.adb<s-osprim-posix.adb \
1593 s-taprop.adb<s-taprop-linux.adb \
1594 s-tasinf.ads<s-tasinf-linux.ads \
1595 s-tasinf.adb<s-tasinf-linux.adb \
1596 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1597 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1598 system.ads<system-linux-alpha.ads
1599
1600 TOOLS_TARGET_PAIRS = \
1601 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1602 indepsw.adb<indepsw-gnu.adb
1603
1604 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1605 EH_MECHANISM=-gcc
1606 MISCLIB=
1607 THREADSLIB=-lpthread
1608 GNATLIB_SHARED=gnatlib-shared-dual
1609 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1610 LIBRARY_VERSION := $(LIB_VERSION)
1611 endif
1612
1613 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
1614 LIBGNAT_TARGET_PAIRS = \
1615 a-intnam.ads<a-intnam-linux.ads \
1616 a-numaux.adb<a-numaux-x86.adb \
1617 a-numaux.ads<a-numaux-x86.ads \
1618 g-soccon.ads<g-soccon-linux-64.ads \
1619 s-inmaop.adb<s-inmaop-posix.adb \
1620 s-intman.adb<s-intman-posix.adb \
1621 s-linux.ads<s-linux.ads \
1622 s-osinte.ads<s-osinte-linux.ads \
1623 s-osinte.adb<s-osinte-posix.adb \
1624 s-osprim.adb<s-osprim-posix.adb \
1625 s-taprop.adb<s-taprop-linux.adb \
1626 s-tasinf.ads<s-tasinf-linux.ads \
1627 s-tasinf.adb<s-tasinf-linux.adb \
1628 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1629 s-taspri.ads<s-taspri-posix.ads \
1630 g-sercom.adb<g-sercom-linux.adb \
1631 system.ads<system-linux-x86_64.ads
1632
1633 TOOLS_TARGET_PAIRS = \
1634 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1635 indepsw.adb<indepsw-gnu.adb
1636
1637 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1638 EH_MECHANISM=-gcc
1639 THREADSLIB=-lpthread
1640 GNATLIB_SHARED=gnatlib-shared-dual
1641 GMEM_LIB = gmemlib
1642 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1643 LIBRARY_VERSION := $(LIB_VERSION)
1644 endif
1645
1646 ifeq ($(strip $(filter-out darwin%,$(osys))),)
1647 ifeq ($(strip $(filter-out %86,$(arch))),)
1648 LIBGNAT_TARGET_PAIRS = \
1649 a-intnam.ads<a-intnam-darwin.ads \
1650 s-inmaop.adb<s-inmaop-posix.adb \
1651 s-intman.adb<s-intman-posix.adb \
1652 s-osinte.adb<s-osinte-darwin.adb \
1653 s-osinte.ads<s-osinte-darwin.ads \
1654 s-osprim.adb<s-osprim-posix.adb \
1655 s-taprop.adb<s-taprop-posix.adb \
1656 s-taspri.ads<s-taspri-posix.ads \
1657 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1658 g-soccon.ads<g-soccon-darwin.ads \
1659 a-numaux.ads<a-numaux-x86.ads \
1660 a-numaux.adb<a-numaux-x86.adb \
1661 system.ads<system-darwin-x86.ads
1662 else
1663 LIBGNAT_TARGET_PAIRS = \
1664 a-intnam.ads<a-intnam-darwin.ads \
1665 s-inmaop.adb<s-inmaop-posix.adb \
1666 s-intman.adb<s-intman-posix.adb \
1667 s-osinte.adb<s-osinte-darwin.adb \
1668 s-osinte.ads<s-osinte-darwin.ads \
1669 s-osprim.adb<s-osprim-posix.adb \
1670 s-taprop.adb<s-taprop-posix.adb \
1671 s-taspri.ads<s-taspri-posix.ads \
1672 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1673 g-soccon.ads<g-soccon-darwin.ads \
1674 a-numaux.ads<a-numaux-darwin.ads \
1675 a-numaux.adb<a-numaux-darwin.adb \
1676 system.ads<system-darwin-ppc.ads
1677 endif
1678
1679 TOOLS_TARGET_PAIRS = \
1680 mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb
1681
1682 EH_MECHANISM=-gcc
1683 GNATLIB_SHARED = gnatlib-shared-darwin
1684 SO_OPTS = -Wl,-flat_namespace -shared-libgcc
1685 RANLIB = ranlib -c
1686 GMEM_LIB = gmemlib
1687 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1688 LIBRARY_VERSION := $(LIB_VERSION)
1689 soext = .dylib
1690 endif
1691
1692 ifneq ($(EH_MECHANISM),)
1693 LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
1694 EXTRA_LIBGNAT_SRCS+=raise$(EH_MECHANISM).c
1695 EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
1696 endif
1697
1698 # Use the Ada 2005 version of Ada.Exceptions by default, unless specified
1699 # explicitly already. The base files (a-except.ad?) are used only for building
1700 # the compiler and other basic tools.
1701 # These base versions lack Ada 2005 additions which would cause bootstrap
1702 # problems if included in the compiler and other basic tools.
1703
1704 ifeq ($(filter-out a-except%,$(LIBGNAT_TARGET_PAIRS)),$(LIBGNAT_TARGET_PAIRS))
1705 LIBGNAT_TARGET_PAIRS += \
1706 a-except.ads<a-except-2005.ads \
1707 a-except.adb<a-except-2005.adb
1708 endif
1709
1710 # The runtime library for gnat comprises two directories. One contains the
1711 # Ada source files that the compiler (gnat1) needs -- these files are listed
1712 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1713 # corresponding .ali files for the parts written in Ada, libgnat.a for
1714 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1715 # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1716 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1717 # go into the directory. The pthreads emulation is built in the threads
1718 # subdirectory and copied.
1719 LIBGNAT_SRCS = adaint.c adaint.h argv.c cio.c cstreams.c \
1720 errno.c exit.c cal.c ctrl_c.c env.c env.h arit64.c \
1721 raise.h raise.c sysdep.c aux-io.c init.c initialize.c seh_init.c \
1722 final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c expect.c mkdir.c \
1723 socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
1724
1725 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o env.o \
1726 raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o arit64.o \
1727 final.o tracebak.o expect.o mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
1728
1729 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1730 # the library installation will change and there will be a
1731 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1732 # from ADA_INCLUDE_SRCS.
1733
1734 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
1735 # the following include file:
1736
1737 include $(fsrcdir)/Makefile.rtl
1738
1739 GNATRTL_LINEARALGEBRA_OBJS = a-nlcoar.o a-nllcar.o a-nllrar.o a-nlrear.o \
1740 a-nucoar.o a-nurear.o i-forbla.o i-forlap.o s-gearop.o
1741
1742 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
1743 $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
1744
1745 # Default run time files
1746
1747 ADA_INCLUDE_SRCS =\
1748 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1749 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1750 sequenio.ads system.ads memtrack.adb \
1751 a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
1752 s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
1753
1754 LIBGNAT=../$(RTSDIR)/libgnat.a
1755
1756 GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
1757
1758 # when compiling the tools, the runtime has to be first on the path so that
1759 # it hides the runtime files lying with the rest of the sources
1760 ifeq ($(TOOLSCASE),native)
1761 vpath %.ads ../$(RTSDIR) ../
1762 vpath %.adb ../$(RTSDIR) ../
1763 vpath %.c ../$(RTSDIR) ../
1764 vpath %.h ../$(RTSDIR) ../
1765 endif
1766
1767 # in the cross tools case, everything is compiled with the native
1768 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1769 ifeq ($(TOOLSCASE),cross)
1770 vpath %.ads ../
1771 vpath %.adb ../
1772 vpath %.c ../
1773 vpath %.h ../
1774 endif
1775
1776 common-tools:
1777 $(GNATMAKE) -c -b $(ADA_INCLUDES) \
1778 --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
1779 gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
1780 gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
1781 $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
1782 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1783 $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
1784 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1785 $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
1786 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1787 $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
1788 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1789 $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
1790 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1791 $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
1792 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1793 $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
1794 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1795 $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
1796 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1797 $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
1798 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1799
1800 ../../gnatsym$(exeext):
1801 $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
1802 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
1803 $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1804
1805 ../../gnatdll$(exeext):
1806 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1807 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
1808 $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1809
1810 ../../vxaddr2line$(exeext): targext.o
1811 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
1812 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
1813 $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
1814
1815 gnatmake-re: link.o targext.o
1816 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1817 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1818 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
1819 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1820 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1821
1822 # Note the use of the "mv" command in order to allow gnatlink to be linked with
1823 # with the former version of gnatlink itself which cannot override itself.
1824 gnatlink-re: link.o targext.o
1825 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1826 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
1827 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1828 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1829 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
1830
1831 # Needs to be built with CC=gcc
1832 # Since the RTL should be built with the latest compiler, remove the
1833 # stamp target in the parent directory whenever gnat1 is rebuilt
1834
1835 # Likewise for the tools
1836 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
1837 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1838 $(TOOLS_LIBS)
1839
1840 ../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
1841 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1842 $(TOOLS_LIBS)
1843
1844 ../stamp-gnatlib-$(RTSDIR):
1845 @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
1846 then \
1847 $(ECHO) You must first build the GNAT library: make gnatlib; \
1848 false; \
1849 else \
1850 true; \
1851 fi
1852
1853 install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
1854 # Create the directory before deleting it, in case the directory is
1855 # a list of directories (as it may be on VMS). This ensures we are
1856 # deleting the right one.
1857 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1858 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1859 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1860 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1861 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1862 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1863 for file in $(RTSDIR)/*.ali; do \
1864 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1865 done
1866 -$(INSTALL_DATA) $(RTSDIR)/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1867 -cd $(RTSDIR); for file in *$(arext);do \
1868 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1869 $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
1870 done
1871 -$(foreach file, $(EXTRA_ADALIB_FILES), \
1872 $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
1873 ) true
1874 # Install the shared libraries, if any, using $(INSTALL) instead
1875 # of $(INSTALL_DATA). The latter may force a mode inappropriate
1876 # for shared libraries on some targets, e.g. on HP-UX where the x
1877 # permission is required.
1878 for file in gnat gnarl; do \
1879 if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
1880 $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1881 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1882 fi; \
1883 if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
1884 $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1885 $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
1886 fi; \
1887 done
1888 # This copy must be done preserving the date on the original file.
1889 for file in $(RTSDIR)/*.ad?; do \
1890 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
1891 done
1892 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1893 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1894
1895 ../stamp-gnatlib2-$(RTSDIR):
1896 $(RM) $(RTSDIR)/s-*.ali
1897 $(RM) $(RTSDIR)/s-*$(objext)
1898 $(RM) $(RTSDIR)/a-*.ali
1899 $(RM) $(RTSDIR)/a-*$(objext)
1900 $(RM) $(RTSDIR)/*.ali
1901 $(RM) $(RTSDIR)/*$(objext)
1902 $(RM) $(RTSDIR)/*$(arext)
1903 $(RM) $(RTSDIR)/*$(soext)
1904 touch ../stamp-gnatlib2-$(RTSDIR)
1905 $(RM) ../stamp-gnatlib-$(RTSDIR)
1906
1907 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1908 # successive target commands. Although the Gnu make documentation
1909 # implies this is true on all systems, I suspect it may not be, So care
1910 # has been taken to allow a sed script to look for ";)" and substitue
1911 # for ";" the appropriate character in the range of lines below
1912 # beginning with "GNULLI Begin" and ending with "GNULLI End"
1913
1914 # GNULLI Begin ###########################################################
1915
1916 ../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
1917 $(RMDIR) $(RTSDIR)
1918 $(MKDIR) $(RTSDIR)
1919 $(CHMOD) u+w $(RTSDIR)
1920 # Copy target independent sources
1921 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
1922 $(LN_S) $(fsrcpfx)$(f) $(RTSDIR) ;) true
1923 # Remove files to be replaced by target dependent sources
1924 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1925 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
1926 $(RM) $(RTSDIR)/*-*-*.ads $(RTSDIR)/*-*-*.adb
1927 # Copy new target dependent sources
1928 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1929 $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1930 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
1931 $(RM) ../stamp-gnatlib-$(RTSDIR)
1932 touch ../stamp-gnatlib1-$(RTSDIR)
1933
1934 # GNULLI End #############################################################
1935
1936 # Don't use semicolon separated shell commands that involve list expansions.
1937 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
1938 # line lengths in excess of 256 characters.
1939 # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
1940 # is guaranteed to overflow the buffer.
1941
1942 gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
1943 $(MAKE) -C $(RTSDIR) \
1944 CC="`echo \"$(GCC_FOR_TARGET)\" \
1945 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
1946 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
1947 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
1948 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
1949 srcdir=$(fsrcdir) \
1950 -f ../Makefile $(LIBGNAT_OBJS)
1951 $(MAKE) -C $(RTSDIR) \
1952 CC="`echo \"$(GCC_FOR_TARGET)\" \
1953 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
1954 ADA_INCLUDES="" \
1955 CFLAGS="$(GNATLIBCFLAGS)" \
1956 ADAFLAGS="$(GNATLIBFLAGS)" \
1957 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
1958 srcdir=$(fsrcdir) \
1959 -f ../Makefile \
1960 $(GNATRTL_OBJS)
1961 $(RM) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnarl$(arext)
1962 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat$(arext) \
1963 $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
1964 ifneq ($(PREFIX_OBJS),)
1965 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgccprefix$(arext) \
1966 $(PREFIX_OBJS);
1967 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgccprefix$(arext)
1968 endif
1969 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat$(arext)
1970 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \
1971 $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
1972 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext)
1973 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnala$(arext) \
1974 $(addprefix $(RTSDIR)/,$(GNATRTL_LINEARALGEBRA_OBJS))
1975 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnala$(arext)
1976 ifeq ($(GMEM_LIB),gmemlib)
1977 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \
1978 $(RTSDIR)/memtrack.o
1979 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
1980 endif
1981 $(CHMOD) a-wx $(RTSDIR)/*.ali
1982 touch ../stamp-gnatlib-$(RTSDIR)
1983
1984 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
1985 gnatlib-shared-default:
1986 $(MAKE) $(FLAGS_TO_PASS) \
1987 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1988 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1989 MULTISUBDIR="$(MULTISUBDIR)" \
1990 THREAD_KIND="$(THREAD_KIND)" \
1991 gnatlib
1992 $(RM) $(RTSDIR)/libgna*$(soext)
1993 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
1994 $(TARGET_LIBGCC2_CFLAGS) \
1995 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1996 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
1997 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
1998 $(MISCLIB) -lm
1999 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2000 $(TARGET_LIBGCC2_CFLAGS) \
2001 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2002 $(GNATRTL_TASKING_OBJS) \
2003 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2004 $(THREADSLIB)
2005 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2006 libgnat$(soext)
2007 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2008 libgnarl$(soext)
2009
2010 gnatlib-shared-dual:
2011 $(MAKE) $(FLAGS_TO_PASS) \
2012 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2013 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2014 MULTISUBDIR="$(MULTISUBDIR)" \
2015 THREAD_KIND="$(THREAD_KIND)" \
2016 gnatlib-shared-default
2017 $(MV) $(RTSDIR)/libgna*$(soext) .
2018 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2019 $(MAKE) $(FLAGS_TO_PASS) \
2020 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2021 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2022 MULTISUBDIR="$(MULTISUBDIR)" \
2023 THREAD_KIND="$(THREAD_KIND)" \
2024 gnatlib
2025 $(MV) libgna*$(soext) $(RTSDIR)
2026
2027 gnatlib-shared-dual-win32:
2028 $(MAKE) $(FLAGS_TO_PASS) \
2029 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2030 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2031 MULTISUBDIR="$(MULTISUBDIR)" \
2032 THREAD_KIND="$(THREAD_KIND)" \
2033 gnatlib-shared-win32
2034 $(MV) $(RTSDIR)/libgna*$(soext) .
2035 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2036 $(MAKE) $(FLAGS_TO_PASS) \
2037 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2038 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2039 MULTISUBDIR="$(MULTISUBDIR)" \
2040 THREAD_KIND="$(THREAD_KIND)" \
2041 gnatlib
2042 $(MV) libgna*$(soext) $(RTSDIR)
2043
2044 # ??? we need to add the option to support auto-import of arrays/records to
2045 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
2046 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
2047 # Windows.
2048 gnatlib-shared-win32:
2049 $(MAKE) $(FLAGS_TO_PASS) \
2050 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2051 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2052 MULTISUBDIR="$(MULTISUBDIR)" \
2053 THREAD_KIND="$(THREAD_KIND)" \
2054 gnatlib
2055 $(RM) $(RTSDIR)/libgna*$(soext)
2056 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2057 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2058 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2059 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
2060 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2061 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2062 $(GNATRTL_TASKING_OBJS) \
2063 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2064 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2065
2066 gnatlib-shared-darwin:
2067 $(MAKE) $(FLAGS_TO_PASS) \
2068 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2069 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
2070 -fno-common" \
2071 MULTISUBDIR="$(MULTISUBDIR)" \
2072 THREAD_KIND="$(THREAD_KIND)" \
2073 gnatlib
2074 $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
2075 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2076 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2077 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2078 $(SO_OPTS) \
2079 $(MISCLIB) -lm
2080 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2081 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2082 $(GNATRTL_TASKING_OBJS) \
2083 $(SO_OPTS) \
2084 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2085 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2086 libgnat$(soext)
2087 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2088 libgnarl$(soext)
2089
2090 gnatlib-shared-vms:
2091 $(MAKE) $(FLAGS_TO_PASS) \
2092 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2093 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2094 MULTISUBDIR="$(MULTISUBDIR)" \
2095 THREAD_KIND="$(THREAD_KIND)" \
2096 gnatlib
2097 $(RM) $(RTSDIR)/libgna*$(soext)
2098 cd $(RTSDIR) && \
2099 ../../gnatsym -s SYMVEC_$$$$.opt \
2100 $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \
2101 ../../xgcc -g -B../../ -shared -shared-libgcc \
2102 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
2103 sys\$$library:trace.exe \
2104 --for-linker=/noinform \
2105 --for-linker=SYMVEC_$$$$.opt \
2106 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2107 cd $(RTSDIR) && \
2108 ../../gnatsym -s SYMVEC_$$$$.opt \
2109 $(GNATRTL_TASKING_OBJS) && \
2110 ../../xgcc -g -B../../ -shared -shared-libgcc \
2111 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2112 libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2113 sys\$$library:trace.exe \
2114 --for-linker=/noinform \
2115 --for-linker=SYMVEC_$$$$.opt \
2116 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2117
2118 gnatlib-shared:
2119 $(MAKE) $(FLAGS_TO_PASS) \
2120 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2121 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2122 MULTISUBDIR="$(MULTISUBDIR)" \
2123 THREAD_KIND="$(THREAD_KIND)" \
2124 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
2125 $(GNATLIB_SHARED)
2126
2127 gnatlib-sjlj:
2128 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1-$(RTSDIR)
2129 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2130 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2131 $(MAKE) $(FLAGS_TO_PASS) \
2132 EH_MECHANISM="" \
2133 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2134 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2135 MULTISUBDIR="$(MULTISUBDIR)" \
2136 THREAD_KIND="$(THREAD_KIND)" \
2137 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2138
2139 gnatlib-zcx:
2140 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1-$(RTSDIR)
2141 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2142 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2143 $(MAKE) $(FLAGS_TO_PASS) \
2144 EH_MECHANISM="-gcc" \
2145 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2146 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2147 MULTISUBDIR="$(MULTISUBDIR)" \
2148 THREAD_KIND="$(THREAD_KIND)" \
2149 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2150
2151 # .s files for cross-building
2152 gnat-cross: force
2153 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
2154
2155 # Compiling object files from source files.
2156
2157 # Note that dependencies on obstack.h are not written
2158 # because that file is not part of GCC.
2159 # Dependencies on gvarargs.h are not written
2160 # because all that file does, when not compiling with GCC,
2161 # is include the system varargs.h.
2162
2163 b_gnatl.c : $(GNATLINK_OBJS)
2164 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2165 b_gnatl.o : b_gnatl.c
2166
2167 b_gnatm.c : $(GNATMAKE_OBJS)
2168 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2169 b_gnatm.o : b_gnatm.c
2170
2171 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2172 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2173
2174 # force no sibling call optimization on s-traceb.o so the number of stack
2175 # frames to be skipped when computing a call chain is not modified by
2176 # optimization. However we can do that only when building the runtime
2177 # (not the compiler) because the -fno-optimize-sibling-calls option exists
2178 # only in GCC 3 and above.
2179
2180 ifneq (,$(findstring xgcc,$(CC)))
2181 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2182 else
2183 NO_SIBLING_ADAFLAGS=
2184 endif
2185
2186 s-traceb.o : s-traceb.adb
2187 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2188 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2189 $< $(OUTPUT_OPTION)
2190
2191 # force debugging information on s-tasdeb.o so that it is always
2192 # possible to set conditional breakpoints on tasks.
2193
2194 s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
2195 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2196 $< $(OUTPUT_OPTION)
2197
2198 # force no function reordering on a-except.o because of the exclusion bounds
2199 # mechanism (see the source file for more detailed information). However we
2200 # can do that only when building the runtime (not the compiler) because the
2201 # -fno-toplevel-reorder option exists only in GCC 4.2 and above.
2202
2203 ifneq (,$(findstring xgcc,$(CC)))
2204 NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
2205 else
2206 NO_REORDER_ADAFLAGS=
2207 endif
2208
2209 # force debugging information on a-except.o so that it is always
2210 # possible to set conditional breakpoints on exceptions.
2211 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2212
2213 a-except.o : a-except.adb a-except.ads
2214 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2215 $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2216
2217 # compile s-except.o without optimization and with debug info to let the
2218 # debugger set breakpoints and inspect subprogram parameters on exception
2219 # related events.
2220
2221 s-except.o : s-except.adb s-except.ads
2222 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2223 $< $(OUTPUT_OPTION)
2224
2225 # force debugging information on s-assert.o so that it is always
2226 # possible to set breakpoint on assert failures.
2227
2228 s-assert.o : s-assert.adb s-assert.ads a-except.ads
2229 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
2230 $< $(OUTPUT_OPTION)
2231
2232 adadecode.o : adadecode.c adadecode.h
2233 aux-io.o : aux-io.c
2234 argv.o : argv.c
2235 cal.o : cal.c
2236 deftarg.o : deftarg.c
2237 errno.o : errno.c
2238 exit.o : adaint.h exit.c
2239 expect.o : expect.c
2240 final.o : final.c
2241 gmem.o : gmem.c
2242 link.o : link.c
2243 mkdir.o : mkdir.c
2244 socket.o : socket.c gsocket.h
2245 sysdep.o : sysdep.c
2246 raise-gcc.o : raise-gcc.c raise.h
2247 raise.o : raise.c raise.h
2248 vx_stack_info.o : vx_stack_info.c
2249
2250 gen-soccon: gen-soccon.c gsocket.h
2251 $(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2252 -UIN_GCC -DTARGET=\"$(target_alias)\" \
2253 $< $(OUTPUT_OPTION)
2254
2255 cio.o : cio.c
2256 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2257 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2258
2259 init.o : init.c adaint.h raise.h
2260 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2261 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2262
2263 initialize.o : initialize.c raise.h
2264 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2265 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2266
2267 targext.o : targext.c
2268 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2269 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2270 $< $(OUTPUT_OPTION)
2271
2272 # No optimization to compile this file as optimizations (-O1 or above) breaks
2273 # the SEH handling on Windows. The reasons are not clear.
2274 seh_init.o : seh_init.c raise.h
2275 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) -O0 \
2276 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2277
2278 # Need to keep the frame pointer in this file to pop the stack properly on
2279 # some targets.
2280 tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
2281 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2282 -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2283
2284 # In GNU Make, ignore whether `stage*' exists.
2285 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2286 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2287
2288 force:
2289
2290 # Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
2291
2292 ../../gnatlbr$(exeext): ../../prefix.o
2293 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2294 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2295 $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2296
2297 ../../vms_help$(exeext):
2298 $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
2299 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
2300 $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2301
2302 ../../gnat.hlp: ../../vms_help$(exeext)
2303 ../../vms_help$(exeext) $(fsrcdir)/gnat.help_in \
2304 $(fsrcdir)/vms_data.ads ../../gnat.hlp