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