xoscons.adb, [...]: New files.
[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
855 ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
856 LIBGNAT_TARGET_PAIRS += \
857 s-osinte.ads<s-osinte-linux-xenomai.ads \
858 s-taprop.adb<s-taprop-linux-xenomai.adb
859
860 EH_MECHANISM=
861 else
862 LIBGNAT_TARGET_PAIRS += \
863 s-osinte.ads<s-osinte-linux.ads \
864 s-taprop.adb<s-taprop-linux.adb \
865 s-tasinf.ads<s-tasinf-linux.ads \
866 s-tasinf.adb<s-tasinf-linux.adb
867
868 EH_MECHANISM=-gcc
869 endif
870
871 THREADSLIB = -lpthread
872 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
873 endif
874
875 TOOLS_TARGET_PAIRS = \
876 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
877 indepsw.adb<indepsw-gnu.adb
878
879 GNATLIB_SHARED = gnatlib-shared-dual
880 GMEM_LIB = gmemlib
881 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
882 LIBRARY_VERSION := $(LIB_VERSION)
883 endif
884
885 ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
886 LIBGNAT_TARGET_PAIRS = \
887 a-intnam.ads<a-intnam-freebsd.ads \
888 a-numaux.adb<a-numaux-x86.adb \
889 a-numaux.ads<a-numaux-x86.ads \
890 s-inmaop.adb<s-inmaop-posix.adb \
891 s-intman.adb<s-intman-posix.adb \
892 g-soccon.ads<g-soccon-freebsd.ads \
893 s-osinte.adb<s-osinte-posix.adb \
894 s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
895 s-osprim.adb<s-osprim-posix.adb \
896 s-taprop.adb<s-taprop-linux.adb \
897 s-tasinf.ads<s-tasinf-linux.ads \
898 s-tasinf.adb<s-tasinf-linux.adb \
899 s-taspri.ads<s-taspri-posix.ads \
900 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
901 system.ads<system-freebsd-x86.ads
902
903 TOOLS_TARGET_PAIRS = \
904 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
905 indepsw.adb<indepsw-gnu.adb
906
907 EH_MECHANISM=-gcc
908 THREADSLIB = -lpthread
909 GNATLIB_SHARED = gnatlib-shared-dual
910 GMEM_LIB = gmemlib
911 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
912 LIBRARY_VERSION := $(LIB_VERSION)
913 endif
914
915 ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
916 LIBGNAT_TARGET_PAIRS = \
917 a-intnam.ads<a-intnam-freebsd.ads \
918 a-numaux.adb<a-numaux-x86.adb \
919 a-numaux.ads<a-numaux-x86.ads \
920 g-bytswa.adb<g-bytswa-x86.adb \
921 g-soccon.ads<g-soccon-freebsd.ads \
922 s-inmaop.adb<s-inmaop-posix.adb \
923 s-intman.adb<s-intman-posix.adb \
924 s-osinte.adb<s-osinte-freebsd.adb \
925 s-osinte.ads<s-osinte-freebsd.ads \
926 s-osprim.adb<s-osprim-posix.adb \
927 s-taprop.adb<s-taprop-posix.adb \
928 s-taspri.ads<s-taspri-posix.ads \
929 s-tpopsp.adb<s-tpopsp-posix.adb \
930 system.ads<system-freebsd-x86.ads
931
932 TOOLS_TARGET_PAIRS = \
933 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
934 GNATLIB_SHARED = gnatlib-shared-dual
935
936 EH_MECHANISM=-gcc
937 THREADSLIB= -lpthread
938 GMEM_LIB = gmemlib
939 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
940 LIBRARY_VERSION := $(LIB_VERSION)
941 endif
942
943 ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
944 ifeq ($(strip $(filter-out s390x,$(arch))),)
945 LIBGNAT_TARGET_PAIRS = \
946 a-intnam.ads<a-intnam-linux.ads \
947 s-inmaop.adb<s-inmaop-posix.adb \
948 s-intman.adb<s-intman-posix.adb \
949 s-linux.ads<s-linux.ads \
950 s-osinte.adb<s-osinte-posix.adb \
951 s-osinte.ads<s-osinte-linux.ads \
952 s-osprim.adb<s-osprim-posix.adb \
953 s-taprop.adb<s-taprop-linux.adb \
954 s-tasinf.ads<s-tasinf-linux.ads \
955 s-tasinf.adb<s-tasinf-linux.adb \
956 s-taspri.ads<s-taspri-posix-noaltstack.ads \
957 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
958 system.ads<system-linux-s390x.ads
959 else
960 LIBGNAT_TARGET_PAIRS = \
961 a-intnam.ads<a-intnam-linux.ads \
962 s-inmaop.adb<s-inmaop-posix.adb \
963 s-intman.adb<s-intman-posix.adb \
964 s-linux.ads<s-linux.ads \
965 s-osinte.adb<s-osinte-posix.adb \
966 s-osinte.ads<s-osinte-linux.ads \
967 s-osprim.adb<s-osprim-posix.adb \
968 s-taprop.adb<s-taprop-linux.adb \
969 s-tasinf.ads<s-tasinf-linux.ads \
970 s-tasinf.adb<s-tasinf-linux.adb \
971 s-taspri.ads<s-taspri-posix-noaltstack.ads \
972 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
973 system.ads<system-linux-s390.ads
974 endif
975
976 TOOLS_TARGET_PAIRS = \
977 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
978
979 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
980 EH_MECHANISM=-gcc
981 THREADSLIB = -lpthread
982 GNATLIB_SHARED = gnatlib-shared-dual
983 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
984 LIBRARY_VERSION := $(LIB_VERSION)
985 endif
986
987 ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
988 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
989 LIBGNAT_TARGET_PAIRS = \
990 a-intnam.ads<a-intnam-irix.ads \
991 s-inmaop.adb<s-inmaop-posix.adb \
992 s-intman.adb<s-intman-irix.adb \
993 s-mastop.adb<s-mastop-irix.adb \
994 s-osinte.adb<s-osinte-irix.adb \
995 s-osinte.ads<s-osinte-irix.ads \
996 s-osprim.adb<s-osprim-posix.adb \
997 s-proinf.adb<s-proinf-irix-athread.adb \
998 s-proinf.ads<s-proinf-irix-athread.ads \
999 s-taprop.adb<s-taprop-irix.adb \
1000 s-tasinf.ads<s-tasinf-irix.ads \
1001 s-taspri.ads<s-taspri-posix.ads \
1002 s-tpopsp.adb<s-tpopsp-posix.adb \
1003 s-traceb.adb<s-traceb-mastop.adb \
1004 g-soccon.ads<g-soccon-irix.ads \
1005 system.ads<system-irix-n32.ads
1006
1007 THREADSLIB = -lpthread
1008 GNATLIB_SHARED = gnatlib-shared-default
1009
1010 else
1011 LIBGNAT_TARGET_PAIRS += \
1012 s-mastop.adb<s-mastop-irix.adb \
1013 s-osprim.adb<s-osprim-posix.adb \
1014 s-traceb.adb<s-traceb-mastop.adb \
1015 g-soccon.ads<g-soccon-irix.ads \
1016 system.ads<system-irix-o32.ads
1017 endif
1018
1019 EH_MECHANISM=-gcc
1020 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-irix.adb
1021 TGT_LIB = -lexc
1022 MISCLIB = -lexc
1023 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1024 LIBRARY_VERSION := $(LIB_VERSION)
1025 GMEM_LIB = gmemlib
1026 endif
1027
1028 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
1029 LIBGNAT_TARGET_PAIRS = \
1030 a-excpol.adb<a-excpol-abort.adb \
1031 a-intnam.ads<a-intnam-hpux.ads \
1032 s-inmaop.adb<s-inmaop-posix.adb \
1033 s-interr.adb<s-interr-sigaction.adb \
1034 s-intman.adb<s-intman-posix.adb \
1035 s-osinte.adb<s-osinte-hpux-dce.adb \
1036 s-osinte.ads<s-osinte-hpux-dce.ads \
1037 s-parame.ads<s-parame-hpux.ads \
1038 s-osprim.adb<s-osprim-posix.adb \
1039 s-taprop.adb<s-taprop-hpux-dce.adb \
1040 s-taspri.ads<s-taspri-hpux-dce.ads \
1041 s-tpopsp.adb<s-tpopsp-posix.adb \
1042 g-soccon.ads<g-soccon-hpux.ads \
1043 system.ads<system-hpux.ads
1044
1045 EH_MECHANISM=-gcc
1046 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1047 endif
1048
1049 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
1050 LIBGNAT_TARGET_PAIRS = \
1051 a-intnam.ads<a-intnam-hpux.ads \
1052 s-inmaop.adb<s-inmaop-posix.adb \
1053 s-intman.adb<s-intman-posix.adb \
1054 s-osinte.adb<s-osinte-posix.adb \
1055 s-osinte.ads<s-osinte-hpux.ads \
1056 s-parame.ads<s-parame-hpux.ads \
1057 s-osprim.adb<s-osprim-posix.adb \
1058 s-traceb.adb<s-traceb-hpux.adb \
1059 s-taprop.adb<s-taprop-posix.adb \
1060 s-taspri.ads<s-taspri-posix.ads \
1061 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1062 g-soccon.ads<g-soccon-hpux.ads \
1063 system.ads<system-hpux.ads
1064
1065 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb
1066 EH_MECHANISM=-gcc
1067 TGT_LIB = /usr/lib/libcl.a
1068 THREADSLIB = -lpthread
1069 GMEM_LIB = gmemlib
1070 soext = .sl
1071 SO_OPTS = -Wl,+h,
1072 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1073 GNATLIB_SHARED = gnatlib-shared-dual
1074 LIBRARY_VERSION := $(LIB_VERSION)
1075 endif
1076
1077 ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
1078 LIBGNAT_TARGET_PAIRS = \
1079 a-intnam.ads<a-intnam-aix.ads \
1080 s-inmaop.adb<s-inmaop-posix.adb \
1081 s-intman.adb<s-intman-posix.adb \
1082 s-osinte.adb<s-osinte-aix.adb \
1083 s-osinte.ads<s-osinte-aix.ads \
1084 s-osprim.adb<s-osprim-posix.adb \
1085 s-taprop.adb<s-taprop-posix.adb \
1086 s-taspri.ads<s-taspri-posix.ads \
1087 s-tpopsp.adb<s-tpopsp-posix.adb \
1088 g-soccon.ads<g-soccon-aix.ads \
1089 system.ads<system-aix.ads
1090
1091 THREADSLIB = -lpthreads
1092 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1093
1094 TOOLS_TARGET_PAIRS = \
1095 mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
1096 indepsw.adb<indepsw-aix.adb
1097
1098 GMEM_LIB = gmemlib
1099 endif
1100
1101 ifeq ($(strip $(filter-out lynxos,$(osys))),)
1102 TOOLS_TARGET_PAIRS = \
1103 mlib-tgt-specific.adb<mlib-tgt-specific-lynxos.adb \
1104 indepsw.adb<indepsw-gnu.adb
1105
1106 ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
1107 LIBGNAT_TARGET_PAIRS = \
1108 a-numaux.adb<a-numaux-x86.adb \
1109 a-numaux.ads<a-numaux-x86.ads \
1110 a-intnam.ads<a-intnam-lynxos.ads \
1111 g-bytswa.adb<g-bytswa-x86.adb \
1112 g-soccon.ads<g-soccon-lynxos.ads \
1113 g-sttsne.adb<g-sttsne-locking.adb \
1114 g-sttsne.ads<g-sttsne-locking.ads \
1115 s-inmaop.adb<s-inmaop-posix.adb \
1116 s-intman.adb<s-intman-posix.adb \
1117 s-osinte.adb<s-osinte-lynxos.adb \
1118 s-osinte.ads<s-osinte-lynxos.ads \
1119 s-osprim.adb<s-osprim-posix.adb \
1120 s-taprop.adb<s-taprop-lynxos.adb \
1121 s-taspri.ads<s-taspri-lynxos.ads \
1122 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1123 system.ads<system-lynxos-x86.ads
1124
1125 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1126
1127 else
1128 LIBGNAT_TARGET_PAIRS = \
1129 a-intnam.ads<a-intnam-lynxos.ads \
1130 g-soccon.ads<g-soccon-lynxos.ads \
1131 g-sttsne.adb<g-sttsne-locking.adb \
1132 g-sttsne.ads<g-sttsne-locking.ads \
1133 s-inmaop.adb<s-inmaop-posix.adb \
1134 s-intman.adb<s-intman-posix.adb \
1135 s-osinte.adb<s-osinte-lynxos.adb \
1136 s-osinte.ads<s-osinte-lynxos.ads \
1137 s-osprim.adb<s-osprim-posix.adb \
1138 s-taprop.adb<s-taprop-lynxos.adb \
1139 s-taspri.ads<s-taspri-lynxos.ads \
1140 s-tpopsp.adb<s-tpopsp-lynxos.adb \
1141 system.ads<system-lynxos-ppc.ads
1142 endif
1143 endif
1144
1145 ifeq ($(strip $(filter-out rtems%,$(osys))),)
1146 LIBGNAT_TARGET_PAIRS = \
1147 system.ads<system-rtems.ads \
1148 a-intnam.ads<a-intnam-rtems.ads \
1149 s-inmaop.adb<s-inmaop-posix.adb \
1150 s-intman.adb<s-intman-posix.adb \
1151 s-osinte.adb<s-osinte-rtems.adb \
1152 s-osinte.ads<s-osinte-rtems.ads \
1153 s-osprim.adb<s-osprim-posix.adb \
1154 s-parame.adb<s-parame-rtems.adb \
1155 s-taprop.adb<s-taprop-posix.adb \
1156 s-taspri.ads<s-taspri-posix.ads \
1157 s-tpopsp.adb<s-tpopsp-rtems.adb \
1158 g-soccon.ads<g-soccon-rtems.ads \
1159 s-stchop.adb<s-stchop-rtems.adb
1160 endif
1161
1162 ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
1163 LIBGNAT_TARGET_PAIRS = \
1164 a-intnam.ads<a-intnam-tru64.ads \
1165 s-inmaop.adb<s-inmaop-posix.adb \
1166 s-intman.adb<s-intman-posix.adb \
1167 s-mastop.adb<s-mastop-tru64.adb \
1168 s-osinte.adb<s-osinte-tru64.adb \
1169 s-osinte.ads<s-osinte-tru64.ads \
1170 s-osprim.adb<s-osprim-unix.adb \
1171 s-taprop.adb<s-taprop-tru64.adb \
1172 s-tasinf.ads<s-tasinf-tru64.ads \
1173 s-taspri.ads<s-taspri-tru64.ads \
1174 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1175 s-traceb.adb<s-traceb-mastop.adb \
1176 g-soccon.ads<g-soccon-tru64.ads \
1177 system.ads<system-tru64.ads
1178
1179 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb
1180
1181 EH_MECHANISM=-gcc
1182 GMEM_LIB=gmemlib
1183 THREADSLIB = -lpthread -lmach -lexc -lrt
1184 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1185 GNATLIB_SHARED = gnatlib-shared-default
1186 LIBRARY_VERSION := $(LIB_VERSION)
1187 endif
1188
1189 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
1190
1191 soext = .exe
1192 hyphen = _
1193 LN = cp -p
1194 LN_S = cp -p
1195
1196 .SUFFIXES: .sym
1197
1198 .o.sym:
1199 @ gnu:[bin]vmssymvec $<
1200 endif
1201
1202 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1203 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1204 LIBGNAT_TARGET_PAIRS_AUX1 = \
1205 g-enblsp.adb<g-enblsp-vms-ia64.adb \
1206 g-trasym.adb<g-trasym-vms-ia64.adb \
1207 s-asthan.adb<s-asthan-vms-ia64.adb \
1208 s-osinte.adb<s-osinte-vms-ia64.adb \
1209 s-osinte.ads<s-osinte-vms-ia64.ads \
1210 s-vaflop.adb<s-vaflop-vms-ia64.adb \
1211 system.ads<system-vms-ia64.ads
1212
1213 LIBGNAT_TARGET_PAIRS_AUX2 = \
1214 s-parame.ads<s-parame-vms-ia64.ads
1215 else
1216 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1217 LIBGNAT_TARGET_PAIRS_AUX1 = \
1218 g-enblsp.adb<g-enblsp-vms-alpha.adb \
1219 g-trasym.adb<g-trasym-vms-alpha.adb \
1220 s-traent.adb<s-traent-vms.adb \
1221 s-traent.ads<s-traent-vms.ads \
1222 s-asthan.adb<s-asthan-vms-alpha.adb \
1223 s-osinte.adb<s-osinte-vms.adb \
1224 s-osinte.ads<s-osinte-vms.ads \
1225 s-vaflop.adb<s-vaflop-vms-alpha.adb \
1226 system.ads<system-vms_64.ads
1227
1228 ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
1229 LIBGNAT_TARGET_PAIRS_AUX2 = \
1230 s-parame.ads<s-parame-vms-restrict.ads
1231 else
1232 LIBGNAT_TARGET_PAIRS_AUX2 = \
1233 s-parame.ads<s-parame-vms-alpha.ads
1234 endif
1235 endif
1236 endif
1237
1238 LIBGNAT_TARGET_PAIRS = \
1239 a-caldel.adb<a-caldel-vms.adb \
1240 a-calend.adb<a-calend-vms.adb \
1241 a-calend.ads<a-calend-vms.ads \
1242 a-dirval.adb<a-dirval-vms.adb \
1243 a-excpol.adb<a-excpol-abort.adb \
1244 a-intnam.ads<a-intnam-vms.ads \
1245 a-numaux.ads<a-numaux-vms.ads \
1246 g-expect.adb<g-expect-vms.adb \
1247 g-soccon.ads<g-soccon-vms.ads \
1248 g-socthi.ads<g-socthi-vms.ads \
1249 g-socthi.adb<g-socthi-vms.adb \
1250 g-stsifd.adb<g-stsifd-sockets.adb \
1251 g-sttsne.adb<g-sttsne-locking.adb \
1252 g-sttsne.ads<g-sttsne-locking.ads \
1253 i-c.ads<i-c-vms_64.ads \
1254 i-cstrin.ads<i-cstrin-vms_64.ads \
1255 i-cstrin.adb<i-cstrin-vms_64.adb \
1256 i-cpoint.ads<i-cpoint-vms_64.ads \
1257 i-cpoint.adb<i-cpoint-vms_64.adb \
1258 i-cstrea.adb<i-cstrea-vms.adb \
1259 memtrack.adb<memtrack-vms_64.adb \
1260 s-auxdec.ads<s-auxdec-vms_64.ads \
1261 s-crtl.ads<s-crtl-vms_64.ads \
1262 s-inmaop.adb<s-inmaop-vms.adb \
1263 s-interr.adb<s-interr-vms.adb \
1264 s-intman.adb<s-intman-vms.adb \
1265 s-intman.ads<s-intman-vms.ads \
1266 s-memory.adb<s-memory-vms_64.adb \
1267 s-memory.ads<s-memory-vms_64.ads \
1268 s-osprim.adb<s-osprim-vms.adb \
1269 s-osprim.ads<s-osprim-vms.ads \
1270 s-taprop.adb<s-taprop-vms.adb \
1271 s-taspri.ads<s-taspri-vms.ads \
1272 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1273 s-tpopde.adb<s-tpopde-vms.adb \
1274 s-tpopde.ads<s-tpopde-vms.ads \
1275 $(LIBGNAT_TARGET_PAIRS_AUX1) \
1276 $(LIBGNAT_TARGET_PAIRS_AUX2)
1277
1278 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1279 TOOLS_TARGET_PAIRS= \
1280 mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
1281 symbols.adb<symbols-vms.adb \
1282 symbols-processing.adb<symbols-processing-vms-ia64.adb
1283 else
1284 TOOLS_TARGET_PAIRS= \
1285 mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
1286 symbols.adb<symbols-vms.adb \
1287 symbols-processing.adb<symbols-processing-vms-alpha.adb
1288 endif
1289
1290 adamsg.o: adamsg.msg
1291 -$(DECC) --cc=message adamsg.msg -o adamsg.o
1292
1293 EXTRA_GNATMAKE_OBJS = mlib-tgt-vms_common.o
1294
1295 GMEM_LIB = gmemlib
1296 EH_MECHANISM=-gcc
1297 GNATLIB_SHARED=gnatlib-shared-vms
1298 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1299 EXTRA_LIBGNAT_SRCS=vmshandler.asm
1300 EXTRA_LIBGNAT_OBJS=vmshandler.o
1301 endif
1302 EXTRA_LIBGNAT_SRCS+=adamsg.msg
1303 EXTRA_LIBGNAT_OBJS+=adamsg.o
1304 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1305 EXTRA_GNATTOOLS = \
1306 ../../gnatlbr$(exeext) \
1307 ../../gnatsym$(exeext) \
1308 ../../vms_help$(exeext) \
1309 ../../gnat.hlp
1310 # This command transforms (YYYYMMDD) into YY,MMDD
1311 GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\).*/\2,\3/')
1312 TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1313 LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1314 endif
1315
1316 ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
1317 LIBGNAT_TARGET_PAIRS = \
1318 a-dirval.adb<a-dirval-mingw.adb \
1319 a-excpol.adb<a-excpol-abort.adb \
1320 a-numaux.adb<a-numaux-x86.adb \
1321 a-numaux.ads<a-numaux-x86.ads \
1322 s-gloloc.adb<s-gloloc-mingw.adb \
1323 s-inmaop.adb<s-inmaop-dummy.adb \
1324 s-memory.adb<s-memory-mingw.adb \
1325 s-taspri.ads<s-taspri-mingw.ads \
1326 s-tasinf.adb<s-tasinf-mingw.adb \
1327 s-tasinf.ads<s-tasinf-mingw.ads \
1328 g-bytswa.adb<g-bytswa-x86.adb \
1329 g-socthi.ads<g-socthi-mingw.ads \
1330 g-socthi.adb<g-socthi-mingw.adb \
1331 g-stsifd.adb<g-stsifd-sockets.adb \
1332 g-soliop.ads<g-soliop-mingw.ads
1333
1334 ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
1335 LIBGNAT_TARGET_PAIRS += \
1336 g-soccon.ads<g-soccon-mingw.ads \
1337 s-intman.adb<s-intman-dummy.adb \
1338 s-osinte.ads<s-osinte-rtx.ads \
1339 s-osprim.adb<s-osprim-rtx.adb \
1340 s-taprop.adb<s-taprop-rtx.adb
1341
1342 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o
1343
1344 ifeq ($(strip $(filter-out rtx_w32,$(THREAD_KIND))),)
1345 LIBGNAT_TARGET_PAIRS += system.ads<system-rtx.ads
1346
1347 EH_MECHANISM=-gcc
1348 else
1349 LIBGNAT_TARGET_PAIRS += \
1350 system.ads<system-rtx-rtss.ads \
1351 s-parame.adb<s-parame-vxworks.adb
1352
1353 EH_MECHANISM=
1354 endif
1355
1356 else
1357 LIBGNAT_TARGET_PAIRS += \
1358 a-exetim.adb<a-exetim-mingw.adb \
1359 a-exetim.ads<a-exetim-mingw.ads \
1360 a-intnam.ads<a-intnam-mingw.ads \
1361 g-sercom.adb<g-sercom-mingw.adb \
1362 s-interr.adb<s-interr-sigaction.adb \
1363 s-intman.adb<s-intman-mingw.adb \
1364 s-osinte.ads<s-osinte-mingw.ads \
1365 s-osprim.adb<s-osprim-mingw.adb \
1366 s-taprop.adb<s-taprop-mingw.adb
1367
1368 ifeq ($(strip $(filter-out x86_64%,$(arch))),)
1369 LIBGNAT_TARGET_PAIRS += \
1370 g-soccon.ads<g-soccon-mingw-64.ads \
1371 system.ads<system-mingw-x86_64.ads
1372 else
1373 LIBGNAT_TARGET_PAIRS += \
1374 g-soccon.ads<g-soccon-mingw.ads \
1375 system.ads<system-mingw.ads
1376 endif
1377
1378 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o s-win32.o g-regist.o
1379 EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
1380
1381 MISCLIB = -lwsock32
1382
1383 # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1384 # auto-import support for array/record will be done.
1385 GNATLIB_SHARED = gnatlib-shared-win32
1386
1387 EH_MECHANISM=-gcc
1388 endif
1389
1390 TOOLS_TARGET_PAIRS= \
1391 mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
1392 indepsw.adb<indepsw-mingw.adb
1393
1394 GMEM_LIB = gmemlib
1395 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1396 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1397 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1398 soext = .dll
1399 LIBRARY_VERSION := $(LIB_VERSION)
1400 endif
1401
1402 ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
1403 LIBGNAT_TARGET_PAIRS = \
1404 a-intnam.ads<a-intnam-linux.ads \
1405 g-soccon.ads<g-soccon-linux-mips.ads \
1406 s-inmaop.adb<s-inmaop-posix.adb \
1407 s-intman.adb<s-intman-posix.adb \
1408 s-linux.ads<s-linux.ads \
1409 s-osinte.adb<s-osinte-posix.adb \
1410 s-osinte.ads<s-osinte-linux.ads \
1411 s-osprim.adb<s-osprim-posix.adb \
1412 s-taprop.adb<s-taprop-linux.adb \
1413 s-tasinf.ads<s-tasinf-linux.ads \
1414 s-tasinf.adb<s-tasinf-linux.adb \
1415 s-taspri.ads<s-taspri-posix.ads \
1416 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1417 system.ads<system-linux-mips.ads
1418
1419 EH_MECHANISM=-gcc
1420 THREADSLIB = -lpthread
1421 GNATLIB_SHARED = gnatlib-shared-dual
1422 GMEM_LIB = gmemlib
1423 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1424 LIBRARY_VERSION := $(LIB_VERSION)
1425 endif
1426
1427 ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
1428 LIBGNAT_TARGET_PAIRS = \
1429 a-intnam.ads<a-intnam-linux.ads \
1430 g-soccon.ads<g-soccon-linux-mips.ads \
1431 s-inmaop.adb<s-inmaop-posix.adb \
1432 s-intman.adb<s-intman-posix.adb \
1433 s-linux.ads<s-linux.ads \
1434 s-osinte.adb<s-osinte-posix.adb \
1435 s-osinte.ads<s-osinte-linux.ads \
1436 s-osprim.adb<s-osprim-posix.adb \
1437 s-taprop.adb<s-taprop-linux.adb \
1438 s-tasinf.ads<s-tasinf-linux.ads \
1439 s-tasinf.adb<s-tasinf-linux.adb \
1440 s-taspri.ads<s-taspri-posix.ads \
1441 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1442 system.ads<system-linux-mipsel.ads
1443
1444 EH_MECHANISM=-gcc
1445 THREADSLIB = -lpthread
1446 GNATLIB_SHARED = gnatlib-shared-dual
1447 GMEM_LIB = gmemlib
1448 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1449 LIBRARY_VERSION := $(LIB_VERSION)
1450 endif
1451
1452 ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
1453 LIBGNAT_TARGET_PAIRS = \
1454 a-intnam.ads<a-intnam-linux.ads \
1455 g-soccon.ads<g-soccon-linux-ppc.ads \
1456 s-inmaop.adb<s-inmaop-posix.adb \
1457 s-intman.adb<s-intman-posix.adb \
1458 s-linux.ads<s-linux.ads \
1459 s-osinte.adb<s-osinte-posix.adb \
1460 s-osinte.ads<s-osinte-linux.ads \
1461 s-osprim.adb<s-osprim-posix.adb \
1462 s-taprop.adb<s-taprop-linux.adb \
1463 s-tasinf.ads<s-tasinf-linux.ads \
1464 s-tasinf.adb<s-tasinf-linux.adb \
1465 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1466 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1467 g-sercom.adb<g-sercom-linux.adb \
1468 system.ads<system-linux-ppc.ads
1469
1470 TOOLS_TARGET_PAIRS = \
1471 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1472 indepsw.adb<indepsw-gnu.adb
1473
1474 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1475 EH_MECHANISM=-gcc
1476 THREADSLIB = -lpthread
1477 GNATLIB_SHARED = gnatlib-shared-dual
1478 GMEM_LIB = gmemlib
1479 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1480 LIBRARY_VERSION := $(LIB_VERSION)
1481 endif
1482
1483 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
1484 LIBGNAT_TARGET_PAIRS = \
1485 a-intnam.ads<a-intnam-linux.ads \
1486 s-inmaop.adb<s-inmaop-posix.adb \
1487 s-intman.adb<s-intman-posix.adb \
1488 s-linux.ads<s-linux.ads \
1489 s-osinte.adb<s-osinte-posix.adb \
1490 s-osinte.ads<s-osinte-linux.ads \
1491 s-osprim.adb<s-osprim-posix.adb \
1492 s-taprop.adb<s-taprop-linux.adb \
1493 s-tasinf.ads<s-tasinf-linux.ads \
1494 s-tasinf.adb<s-tasinf-linux.adb \
1495 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1496 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1497 system.ads<system-linux-sparc.ads
1498
1499 TOOLS_TARGET_PAIRS = \
1500 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1501 indepsw.adb<indepsw-gnu.adb
1502
1503 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1504 EH_MECHANISM=-gcc
1505 THREADSLIB = -lpthread
1506 GNATLIB_SHARED = gnatlib-shared-dual
1507 GMEM_LIB = gmemlib
1508 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1509 LIBRARY_VERSION := $(LIB_VERSION)
1510 endif
1511
1512 ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1513 LIBGNAT_TARGET_PAIRS = \
1514 a-intnam.ads<a-intnam-linux.ads \
1515 s-inmaop.adb<s-inmaop-posix.adb \
1516 s-intman.adb<s-intman-posix.adb \
1517 s-linux.ads<s-linux-hppa.ads \
1518 s-osinte.adb<s-osinte-posix.adb \
1519 s-osinte.ads<s-osinte-linux.ads \
1520 s-osprim.adb<s-osprim-posix.adb \
1521 s-taprop.adb<s-taprop-linux.adb \
1522 s-tasinf.ads<s-tasinf-linux.ads \
1523 s-tasinf.adb<s-tasinf-linux.adb \
1524 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1525 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1526 system.ads<system-linux-hppa.ads
1527
1528 TOOLS_TARGET_PAIRS = \
1529 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1530 indepsw.adb<indepsw-gnu.adb
1531
1532 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1533 EH_MECHANISM=-gcc
1534 THREADSLIB = -lpthread
1535 GNATLIB_SHARED = gnatlib-shared-dual
1536 GMEM_LIB = gmemlib
1537 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1538 LIBRARY_VERSION := $(LIB_VERSION)
1539 endif
1540
1541 ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
1542 LIBGNAT_TARGET_PAIRS = \
1543 a-intnam.ads<a-intnam-linux.ads \
1544 s-inmaop.adb<s-inmaop-posix.adb \
1545 s-intman.adb<s-intman-posix.adb \
1546 s-linux.ads<s-linux.ads \
1547 s-osinte.adb<s-osinte-posix.adb \
1548 s-osinte.ads<s-osinte-linux.ads \
1549 s-osprim.adb<s-osprim-posix.adb \
1550 s-taprop.adb<s-taprop-linux.adb \
1551 s-tasinf.ads<s-tasinf-linux.ads \
1552 s-tasinf.adb<s-tasinf-linux.adb \
1553 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1554 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1555 system.ads<system-linux-sh4.ads
1556
1557 TOOLS_TARGET_PAIRS = \
1558 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1559 indepsw.adb<indepsw-linux.adb
1560
1561 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1562 EH_MECHANISM=-gcc
1563 MISCLIB=
1564 THREADSLIB = -lpthread
1565 GNATLIB_SHARED = gnatlib-shared-dual
1566 GMEM_LIB = gmemlib
1567 PREFIX_OBJS = $(PREFIX_REAL_OBJS)
1568 LIBRARY_VERSION := $(LIB_VERSION)
1569 endif
1570
1571 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
1572 LIBGNAT_TARGET_PAIRS = \
1573 a-intnam.ads<a-intnam-linux.ads \
1574 a-numaux.ads<a-numaux-libc-x86.ads \
1575 g-soccon.ads<g-soccon-linux-64.ads \
1576 s-inmaop.adb<s-inmaop-posix.adb \
1577 s-intman.adb<s-intman-posix.adb \
1578 s-linux.ads<s-linux.ads \
1579 s-osinte.ads<s-osinte-linux.ads \
1580 s-osinte.adb<s-osinte-posix.adb \
1581 s-osprim.adb<s-osprim-posix.adb \
1582 s-taprop.adb<s-taprop-linux.adb \
1583 s-tasinf.ads<s-tasinf-linux.ads \
1584 s-tasinf.adb<s-tasinf-linux.adb \
1585 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1586 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1587 g-sercom.adb<g-sercom-linux.adb \
1588 system.ads<system-linux-ia64.ads
1589
1590 TOOLS_TARGET_PAIRS = \
1591 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1592 indepsw.adb<indepsw-gnu.adb
1593
1594 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1595 EH_MECHANISM=-gcc
1596 MISCLIB=
1597 THREADSLIB=-lpthread
1598 GNATLIB_SHARED=gnatlib-shared-dual
1599 GMEM_LIB = gmemlib
1600 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1601 LIBRARY_VERSION := $(LIB_VERSION)
1602 endif
1603
1604 ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
1605 LIBGNAT_TARGET_PAIRS = \
1606 a-intnam.ads<a-intnam-linux.ads \
1607 s-inmaop.adb<s-inmaop-posix.adb \
1608 s-intman.adb<s-intman-posix.adb \
1609 s-linux.ads<s-linux-alpha.ads \
1610 s-osinte.ads<s-osinte-linux.ads \
1611 s-osinte.adb<s-osinte-posix.adb \
1612 s-osprim.adb<s-osprim-posix.adb \
1613 s-taprop.adb<s-taprop-linux.adb \
1614 s-tasinf.ads<s-tasinf-linux.ads \
1615 s-tasinf.adb<s-tasinf-linux.adb \
1616 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1617 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1618 system.ads<system-linux-alpha.ads
1619
1620 TOOLS_TARGET_PAIRS = \
1621 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1622 indepsw.adb<indepsw-gnu.adb
1623
1624 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1625 EH_MECHANISM=-gcc
1626 MISCLIB=
1627 THREADSLIB=-lpthread
1628 GNATLIB_SHARED=gnatlib-shared-dual
1629 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1630 LIBRARY_VERSION := $(LIB_VERSION)
1631 endif
1632
1633 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
1634 LIBGNAT_TARGET_PAIRS = \
1635 a-intnam.ads<a-intnam-linux.ads \
1636 a-numaux.adb<a-numaux-x86.adb \
1637 a-numaux.ads<a-numaux-x86.ads \
1638 g-soccon.ads<g-soccon-linux-64.ads \
1639 s-inmaop.adb<s-inmaop-posix.adb \
1640 s-intman.adb<s-intman-posix.adb \
1641 s-linux.ads<s-linux.ads \
1642 s-osinte.ads<s-osinte-linux.ads \
1643 s-osinte.adb<s-osinte-posix.adb \
1644 s-osprim.adb<s-osprim-posix.adb \
1645 s-taprop.adb<s-taprop-linux.adb \
1646 s-tasinf.ads<s-tasinf-linux.ads \
1647 s-tasinf.adb<s-tasinf-linux.adb \
1648 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1649 s-taspri.ads<s-taspri-posix.ads \
1650 g-sercom.adb<g-sercom-linux.adb \
1651 system.ads<system-linux-x86_64.ads
1652
1653 TOOLS_TARGET_PAIRS = \
1654 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1655 indepsw.adb<indepsw-gnu.adb
1656
1657 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1658 EH_MECHANISM=-gcc
1659 THREADSLIB=-lpthread
1660 GNATLIB_SHARED=gnatlib-shared-dual
1661 GMEM_LIB = gmemlib
1662 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1663 LIBRARY_VERSION := $(LIB_VERSION)
1664 endif
1665
1666 ifeq ($(strip $(filter-out darwin%,$(osys))),)
1667 ifeq ($(strip $(filter-out %86,$(arch))),)
1668 LIBGNAT_TARGET_PAIRS = \
1669 a-intnam.ads<a-intnam-darwin.ads \
1670 s-inmaop.adb<s-inmaop-posix.adb \
1671 s-intman.adb<s-intman-posix.adb \
1672 s-osinte.adb<s-osinte-darwin.adb \
1673 s-osinte.ads<s-osinte-darwin.ads \
1674 s-osprim.adb<s-osprim-posix.adb \
1675 s-taprop.adb<s-taprop-posix.adb \
1676 s-taspri.ads<s-taspri-posix.ads \
1677 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1678 g-soccon.ads<g-soccon-darwin.ads \
1679 a-numaux.ads<a-numaux-x86.ads \
1680 a-numaux.adb<a-numaux-x86.adb \
1681 system.ads<system-darwin-x86.ads
1682 else
1683 LIBGNAT_TARGET_PAIRS = \
1684 a-intnam.ads<a-intnam-darwin.ads \
1685 s-inmaop.adb<s-inmaop-posix.adb \
1686 s-intman.adb<s-intman-posix.adb \
1687 s-osinte.adb<s-osinte-darwin.adb \
1688 s-osinte.ads<s-osinte-darwin.ads \
1689 s-osprim.adb<s-osprim-posix.adb \
1690 s-taprop.adb<s-taprop-posix.adb \
1691 s-taspri.ads<s-taspri-posix.ads \
1692 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1693 g-soccon.ads<g-soccon-darwin.ads \
1694 a-numaux.ads<a-numaux-darwin.ads \
1695 a-numaux.adb<a-numaux-darwin.adb \
1696 system.ads<system-darwin-ppc.ads
1697 endif
1698
1699 TOOLS_TARGET_PAIRS = \
1700 mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb
1701
1702 EH_MECHANISM=-gcc
1703 GNATLIB_SHARED = gnatlib-shared-darwin
1704 SO_OPTS = -Wl,-flat_namespace -shared-libgcc
1705 RANLIB = ranlib -c
1706 GMEM_LIB = gmemlib
1707 PREFIX_OBJS=$(PREFIX_REAL_OBJS)
1708 LIBRARY_VERSION := $(LIB_VERSION)
1709 soext = .dylib
1710 endif
1711
1712 ifneq ($(EH_MECHANISM),)
1713 LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
1714 EXTRA_LIBGNAT_SRCS+=raise$(EH_MECHANISM).c
1715 EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
1716 endif
1717
1718 # Use the Ada 2005 version of Ada.Exceptions by default, unless specified
1719 # explicitly already. The base files (a-except.ad?) are used only for building
1720 # the compiler and other basic tools.
1721 # These base versions lack Ada 2005 additions which would cause bootstrap
1722 # problems if included in the compiler and other basic tools.
1723
1724 ifeq ($(filter-out a-except%,$(LIBGNAT_TARGET_PAIRS)),$(LIBGNAT_TARGET_PAIRS))
1725 LIBGNAT_TARGET_PAIRS += \
1726 a-except.ads<a-except-2005.ads \
1727 a-except.adb<a-except-2005.adb
1728 endif
1729
1730 # The runtime library for gnat comprises two directories. One contains the
1731 # Ada source files that the compiler (gnat1) needs -- these files are listed
1732 # by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1733 # corresponding .ali files for the parts written in Ada, libgnat.a for
1734 # the parts of the runtime written in C, and libgthreads.a for the pthreads
1735 # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1736 # while GNATRTL_OBJS lists the object files compiled from Ada sources that
1737 # go into the directory. The pthreads emulation is built in the threads
1738 # subdirectory and copied.
1739 LIBGNAT_SRCS = adaint.c adaint.h argv.c cio.c cstreams.c \
1740 errno.c exit.c cal.c ctrl_c.c env.c env.h arit64.c \
1741 raise.h raise.c sysdep.c aux-io.c init.c initialize.c seh_init.c \
1742 final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c expect.c mkdir.c \
1743 socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
1744
1745 LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o env.o \
1746 raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o arit64.o \
1747 final.o tracebak.o expect.o mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
1748
1749 # NOTE ??? - when the -I option for compiling Ada code is made to work,
1750 # the library installation will change and there will be a
1751 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1752 # from ADA_INCLUDE_SRCS.
1753
1754 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
1755 # the following include file:
1756
1757 include $(fsrcdir)/Makefile.rtl
1758
1759 GNATRTL_LINEARALGEBRA_OBJS = a-nlcoar.o a-nllcar.o a-nllrar.o a-nlrear.o \
1760 a-nucoar.o a-nurear.o i-forbla.o i-forlap.o s-gearop.o
1761
1762 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
1763 $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
1764
1765 # Default run time files
1766
1767 ADA_INCLUDE_SRCS =\
1768 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1769 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1770 sequenio.ads system.ads memtrack.adb \
1771 a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
1772 s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
1773
1774 LIBGNAT=../$(RTSDIR)/libgnat.a
1775
1776 GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
1777
1778 # when compiling the tools, the runtime has to be first on the path so that
1779 # it hides the runtime files lying with the rest of the sources
1780 ifeq ($(TOOLSCASE),native)
1781 vpath %.ads ../$(RTSDIR) ../
1782 vpath %.adb ../$(RTSDIR) ../
1783 vpath %.c ../$(RTSDIR) ../
1784 vpath %.h ../$(RTSDIR) ../
1785 endif
1786
1787 # in the cross tools case, everything is compiled with the native
1788 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1789 ifeq ($(TOOLSCASE),cross)
1790 vpath %.ads ../
1791 vpath %.adb ../
1792 vpath %.c ../
1793 vpath %.h ../
1794 endif
1795
1796 common-tools:
1797 $(GNATMAKE) -c -b $(ADA_INCLUDES) \
1798 --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
1799 gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
1800 gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
1801 $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
1802 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1803 $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
1804 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1805 $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
1806 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1807 $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
1808 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1809 $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
1810 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1811 $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
1812 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1813 $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
1814 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1815 $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
1816 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1817 $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
1818 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1819
1820 ../../gnatsym$(exeext):
1821 $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
1822 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
1823 $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1824
1825 ../../gnatdll$(exeext):
1826 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1827 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
1828 $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1829
1830 ../../vxaddr2line$(exeext): targext.o
1831 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
1832 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
1833 $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
1834
1835 gnatmake-re: link.o targext.o
1836 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1837 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1838 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
1839 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1840 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1841
1842 # Note the use of the "mv" command in order to allow gnatlink to be linked with
1843 # with the former version of gnatlink itself which cannot override itself.
1844 gnatlink-re: link.o targext.o
1845 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1846 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
1847 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1848 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
1849 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
1850
1851 # Needs to be built with CC=gcc
1852 # Since the RTL should be built with the latest compiler, remove the
1853 # stamp target in the parent directory whenever gnat1 is rebuilt
1854
1855 # Likewise for the tools
1856 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
1857 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1858 $(TOOLS_LIBS)
1859
1860 ../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
1861 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1862 $(TOOLS_LIBS)
1863
1864 ../stamp-gnatlib-$(RTSDIR):
1865 @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
1866 then \
1867 $(ECHO) You must first build the GNAT library: make gnatlib; \
1868 false; \
1869 else \
1870 true; \
1871 fi
1872
1873 install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
1874 # Create the directory before deleting it, in case the directory is
1875 # a list of directories (as it may be on VMS). This ensures we are
1876 # deleting the right one.
1877 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1878 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1879 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1880 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1881 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1882 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
1883 for file in $(RTSDIR)/*.ali; do \
1884 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1885 done
1886 -$(INSTALL_DATA) $(RTSDIR)/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
1887 -cd $(RTSDIR); for file in *$(arext);do \
1888 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1889 $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
1890 done
1891 -$(foreach file, $(EXTRA_ADALIB_FILES), \
1892 $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
1893 ) true
1894 # Install the shared libraries, if any, using $(INSTALL) instead
1895 # of $(INSTALL_DATA). The latter may force a mode inappropriate
1896 # for shared libraries on some targets, e.g. on HP-UX where the x
1897 # permission is required.
1898 for file in gnat gnarl; do \
1899 if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
1900 $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1901 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
1902 fi; \
1903 if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
1904 $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
1905 $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
1906 fi; \
1907 done
1908 # This copy must be done preserving the date on the original file.
1909 for file in $(RTSDIR)/*.ad?; do \
1910 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
1911 done
1912 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1913 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1914
1915 ../stamp-gnatlib2-$(RTSDIR):
1916 $(RM) $(RTSDIR)/s-*.ali
1917 $(RM) $(RTSDIR)/s-*$(objext)
1918 $(RM) $(RTSDIR)/a-*.ali
1919 $(RM) $(RTSDIR)/a-*$(objext)
1920 $(RM) $(RTSDIR)/*.ali
1921 $(RM) $(RTSDIR)/*$(objext)
1922 $(RM) $(RTSDIR)/*$(arext)
1923 $(RM) $(RTSDIR)/*$(soext)
1924 touch ../stamp-gnatlib2-$(RTSDIR)
1925 $(RM) ../stamp-gnatlib-$(RTSDIR)
1926
1927 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1928 # successive target commands. Although the Gnu make documentation
1929 # implies this is true on all systems, I suspect it may not be, So care
1930 # has been taken to allow a sed script to look for ";)" and substitue
1931 # for ";" the appropriate character in the range of lines below
1932 # beginning with "GNULLI Begin" and ending with "GNULLI End"
1933
1934 # GNULLI Begin ###########################################################
1935
1936 ../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
1937 $(RMDIR) $(RTSDIR)
1938 $(MKDIR) $(RTSDIR)
1939 $(CHMOD) u+w $(RTSDIR)
1940 # Copy target independent sources
1941 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
1942 $(LN_S) $(fsrcpfx)$(f) $(RTSDIR) ;) true
1943 # Remove files to be replaced by target dependent sources
1944 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1945 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
1946 $(RM) $(RTSDIR)/*-*-*.ads $(RTSDIR)/*-*-*.adb
1947 # Copy new target dependent sources
1948 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1949 $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1950 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
1951 # Copy generated target dependent sources
1952 $(RM) $(RTSDIR)/s-oscons.ads
1953 (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
1954 $(RM) ../stamp-gnatlib-$(RTSDIR)
1955 touch ../stamp-gnatlib1-$(RTSDIR)
1956
1957 # GNULLI End #############################################################
1958
1959 # Don't use semicolon separated shell commands that involve list expansions.
1960 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
1961 # line lengths in excess of 256 characters.
1962 # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
1963 # is guaranteed to overflow the buffer.
1964
1965 gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
1966 $(MAKE) -C $(RTSDIR) \
1967 CC="`echo \"$(GCC_FOR_TARGET)\" \
1968 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
1969 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
1970 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
1971 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
1972 srcdir=$(fsrcdir) \
1973 -f ../Makefile $(LIBGNAT_OBJS)
1974 $(MAKE) -C $(RTSDIR) \
1975 CC="`echo \"$(GCC_FOR_TARGET)\" \
1976 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
1977 ADA_INCLUDES="" \
1978 CFLAGS="$(GNATLIBCFLAGS)" \
1979 ADAFLAGS="$(GNATLIBFLAGS)" \
1980 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
1981 srcdir=$(fsrcdir) \
1982 -f ../Makefile \
1983 $(GNATRTL_OBJS)
1984 $(RM) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnarl$(arext)
1985 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat$(arext) \
1986 $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
1987 ifneq ($(PREFIX_OBJS),)
1988 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgccprefix$(arext) \
1989 $(PREFIX_OBJS);
1990 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgccprefix$(arext)
1991 endif
1992 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat$(arext)
1993 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \
1994 $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
1995 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext)
1996 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnala$(arext) \
1997 $(addprefix $(RTSDIR)/,$(GNATRTL_LINEARALGEBRA_OBJS))
1998 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnala$(arext)
1999 ifeq ($(GMEM_LIB),gmemlib)
2000 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \
2001 $(RTSDIR)/memtrack.o
2002 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
2003 endif
2004 $(CHMOD) a-wx $(RTSDIR)/*.ali
2005 touch ../stamp-gnatlib-$(RTSDIR)
2006
2007 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
2008 gnatlib-shared-default:
2009 $(MAKE) $(FLAGS_TO_PASS) \
2010 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2011 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2012 MULTISUBDIR="$(MULTISUBDIR)" \
2013 THREAD_KIND="$(THREAD_KIND)" \
2014 gnatlib
2015 $(RM) $(RTSDIR)/libgna*$(soext)
2016 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2017 $(TARGET_LIBGCC2_CFLAGS) \
2018 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2019 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2020 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2021 $(MISCLIB) -lm
2022 cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
2023 $(TARGET_LIBGCC2_CFLAGS) \
2024 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2025 $(GNATRTL_TASKING_OBJS) \
2026 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2027 $(THREADSLIB)
2028 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2029 libgnat$(soext)
2030 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2031 libgnarl$(soext)
2032
2033 gnatlib-shared-dual:
2034 $(MAKE) $(FLAGS_TO_PASS) \
2035 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2036 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2037 MULTISUBDIR="$(MULTISUBDIR)" \
2038 THREAD_KIND="$(THREAD_KIND)" \
2039 gnatlib-shared-default
2040 $(MV) $(RTSDIR)/libgna*$(soext) .
2041 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2042 $(MAKE) $(FLAGS_TO_PASS) \
2043 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2044 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2045 MULTISUBDIR="$(MULTISUBDIR)" \
2046 THREAD_KIND="$(THREAD_KIND)" \
2047 gnatlib
2048 $(MV) libgna*$(soext) $(RTSDIR)
2049
2050 gnatlib-shared-dual-win32:
2051 $(MAKE) $(FLAGS_TO_PASS) \
2052 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2053 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2054 MULTISUBDIR="$(MULTISUBDIR)" \
2055 THREAD_KIND="$(THREAD_KIND)" \
2056 gnatlib-shared-win32
2057 $(MV) $(RTSDIR)/libgna*$(soext) .
2058 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2059 $(MAKE) $(FLAGS_TO_PASS) \
2060 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2061 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2062 MULTISUBDIR="$(MULTISUBDIR)" \
2063 THREAD_KIND="$(THREAD_KIND)" \
2064 gnatlib
2065 $(MV) libgna*$(soext) $(RTSDIR)
2066
2067 # ??? we need to add the option to support auto-import of arrays/records to
2068 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
2069 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
2070 # Windows.
2071 gnatlib-shared-win32:
2072 $(MAKE) $(FLAGS_TO_PASS) \
2073 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2074 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
2075 MULTISUBDIR="$(MULTISUBDIR)" \
2076 THREAD_KIND="$(THREAD_KIND)" \
2077 gnatlib
2078 $(RM) $(RTSDIR)/libgna*$(soext)
2079 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2080 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2081 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2082 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
2083 cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
2084 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2085 $(GNATRTL_TASKING_OBJS) \
2086 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2087 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2088
2089 gnatlib-shared-darwin:
2090 $(MAKE) $(FLAGS_TO_PASS) \
2091 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2092 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
2093 -fno-common" \
2094 MULTISUBDIR="$(MULTISUBDIR)" \
2095 THREAD_KIND="$(THREAD_KIND)" \
2096 gnatlib
2097 $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
2098 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2099 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2100 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2101 $(SO_OPTS) \
2102 $(MISCLIB) -lm
2103 cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
2104 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2105 $(GNATRTL_TASKING_OBJS) \
2106 $(SO_OPTS) \
2107 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2108 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2109 libgnat$(soext)
2110 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2111 libgnarl$(soext)
2112
2113 gnatlib-shared-vms:
2114 $(MAKE) $(FLAGS_TO_PASS) \
2115 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2116 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2117 MULTISUBDIR="$(MULTISUBDIR)" \
2118 THREAD_KIND="$(THREAD_KIND)" \
2119 gnatlib
2120 $(RM) $(RTSDIR)/libgna*$(soext)
2121 cd $(RTSDIR) && \
2122 ../../gnatsym -s SYMVEC_$$$$.opt \
2123 $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \
2124 ../../xgcc -g -B../../ -shared -shared-libgcc \
2125 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
2126 sys\$$library:trace.exe \
2127 --for-linker=/noinform \
2128 --for-linker=SYMVEC_$$$$.opt \
2129 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2130 cd $(RTSDIR) && \
2131 ../../gnatsym -s SYMVEC_$$$$.opt \
2132 $(GNATRTL_TASKING_OBJS) && \
2133 ../../xgcc -g -B../../ -shared -shared-libgcc \
2134 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2135 libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2136 sys\$$library:trace.exe \
2137 --for-linker=/noinform \
2138 --for-linker=SYMVEC_$$$$.opt \
2139 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2140
2141 gnatlib-shared:
2142 $(MAKE) $(FLAGS_TO_PASS) \
2143 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2144 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2145 MULTISUBDIR="$(MULTISUBDIR)" \
2146 THREAD_KIND="$(THREAD_KIND)" \
2147 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
2148 $(GNATLIB_SHARED)
2149
2150 gnatlib-sjlj:
2151 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1-$(RTSDIR)
2152 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2153 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2154 $(MAKE) $(FLAGS_TO_PASS) \
2155 EH_MECHANISM="" \
2156 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2157 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2158 MULTISUBDIR="$(MULTISUBDIR)" \
2159 THREAD_KIND="$(THREAD_KIND)" \
2160 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2161
2162 gnatlib-zcx:
2163 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1-$(RTSDIR)
2164 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2165 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2166 $(MAKE) $(FLAGS_TO_PASS) \
2167 EH_MECHANISM="-gcc" \
2168 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2169 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2170 MULTISUBDIR="$(MULTISUBDIR)" \
2171 THREAD_KIND="$(THREAD_KIND)" \
2172 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
2173
2174 # .s files for cross-building
2175 gnat-cross: force
2176 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
2177
2178 # Compiling object files from source files.
2179
2180 # Note that dependencies on obstack.h are not written
2181 # because that file is not part of GCC.
2182 # Dependencies on gvarargs.h are not written
2183 # because all that file does, when not compiling with GCC,
2184 # is include the system varargs.h.
2185
2186 b_gnatl.c : $(GNATLINK_OBJS)
2187 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2188 b_gnatl.o : b_gnatl.c
2189
2190 b_gnatm.c : $(GNATMAKE_OBJS)
2191 $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2192 b_gnatm.o : b_gnatm.c
2193
2194 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2195 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2196
2197 # force no sibling call optimization on s-traceb.o so the number of stack
2198 # frames to be skipped when computing a call chain is not modified by
2199 # optimization. However we can do that only when building the runtime
2200 # (not the compiler) because the -fno-optimize-sibling-calls option exists
2201 # only in GCC 3 and above.
2202
2203 ifneq (,$(findstring xgcc,$(CC)))
2204 NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
2205 else
2206 NO_SIBLING_ADAFLAGS=
2207 endif
2208
2209 s-traceb.o : s-traceb.adb
2210 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2211 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2212 $< $(OUTPUT_OPTION)
2213
2214 # force debugging information on s-tasdeb.o so that it is always
2215 # possible to set conditional breakpoints on tasks.
2216
2217 s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
2218 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2219 $< $(OUTPUT_OPTION)
2220
2221 # force no function reordering on a-except.o because of the exclusion bounds
2222 # mechanism (see the source file for more detailed information). However we
2223 # can do that only when building the runtime (not the compiler) because the
2224 # -fno-toplevel-reorder option exists only in GCC 4.2 and above.
2225
2226 ifneq (,$(findstring xgcc,$(CC)))
2227 NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
2228 else
2229 NO_REORDER_ADAFLAGS=
2230 endif
2231
2232 # force debugging information on a-except.o so that it is always
2233 # possible to set conditional breakpoints on exceptions.
2234 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2235
2236 a-except.o : a-except.adb a-except.ads
2237 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2238 $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2239
2240 # compile s-except.o without optimization and with debug info to let the
2241 # debugger set breakpoints and inspect subprogram parameters on exception
2242 # related events.
2243
2244 s-except.o : s-except.adb s-except.ads
2245 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2246 $< $(OUTPUT_OPTION)
2247
2248 # force debugging information on s-assert.o so that it is always
2249 # possible to set breakpoint on assert failures.
2250
2251 s-assert.o : s-assert.adb s-assert.ads a-except.ads
2252 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
2253 $< $(OUTPUT_OPTION)
2254
2255 adadecode.o : adadecode.c adadecode.h
2256 aux-io.o : aux-io.c
2257 argv.o : argv.c
2258 cal.o : cal.c
2259 deftarg.o : deftarg.c
2260 errno.o : errno.c
2261 exit.o : adaint.h exit.c
2262 expect.o : expect.c
2263 final.o : final.c
2264 gmem.o : gmem.c
2265 link.o : link.c
2266 mkdir.o : mkdir.c
2267 socket.o : socket.c gsocket.h
2268 sysdep.o : sysdep.c
2269 raise-gcc.o : raise-gcc.c raise.h
2270 raise.o : raise.c raise.h
2271 vx_stack_info.o : vx_stack_info.c
2272
2273 gen-soccon: gen-soccon.c gsocket.h
2274 $(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2275 -UIN_GCC -DTARGET=\"$(target_alias)\" \
2276 $< $(OUTPUT_OPTION)
2277
2278 cio.o : cio.c
2279 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2280 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2281
2282 init.o : init.c adaint.h raise.h
2283 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2284 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2285
2286 initialize.o : initialize.c raise.h
2287 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2288 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2289
2290 targext.o : targext.c
2291 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
2292 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2293 $< $(OUTPUT_OPTION)
2294
2295 # No optimization to compile this file as optimizations (-O1 or above) breaks
2296 # the SEH handling on Windows. The reasons are not clear.
2297 seh_init.o : seh_init.c raise.h
2298 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) -O0 \
2299 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2300
2301 # Need to keep the frame pointer in this file to pop the stack properly on
2302 # some targets.
2303 tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
2304 $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2305 -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2306
2307 # In GNU Make, ignore whether `stage*' exists.
2308 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2309 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2310
2311 force:
2312
2313 # Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
2314
2315 ../../gnatlbr$(exeext): ../../prefix.o
2316 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
2317 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
2318 $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2319
2320 ../../vms_help$(exeext):
2321 $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
2322 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
2323 $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2324
2325 ../../gnat.hlp: ../../vms_help$(exeext)
2326 ../../vms_help$(exeext) $(fsrcdir)/gnat.help_in \
2327 $(fsrcdir)/vms_data.ads ../../gnat.hlp