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