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