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