]> gcc.gnu.org Git - gcc.git/blame - gcc/ada/Makefile.in
Makefile.in (SHELL): Set to @SHELL@.
[gcc.git] / gcc / ada / Makefile.in
CommitLineData
84481f76 1# Makefile for GNU Ada Compiler (GNAT).
07fc65c4 2# Copyright (C) 1994-2002 Free Software Foundation, Inc.
84481f76
RK
3
4#This file is part of GNU CC.
5
6#GNU CC 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#GNU CC 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 GNU CC; see the file COPYING. If not, write to
9f2f9eb6
JM
18#the Free Software Foundation, 59 Temple Place - Suite 330,
19#Boston, MA 02111-1307, USA.
84481f76
RK
20
21# The makefile built from this file lives in the language subdirectory.
22# It's 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
f4a12653 60# Tell GNU make 3.79 not to run this directory in parallel.
63adb4ff
RH
61# Not all of the required dependencies are present.
62.NOTPARALLEL:
63
84481f76
RK
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
84481f76
RK
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.
75XCFLAGS =
76CFLAGS = -g
77BOOT_CFLAGS = -O $(CFLAGS)
78# These exists to be overridden by the x-* and t-* files, respectively.
79X_CFLAGS =
80T_CFLAGS =
81
82X_CPPFLAGS =
83T_CPPFLAGS =
84
b303008e
JDA
85X_ADA_CFLAGS =
86T_ADA_CFLAGS =
87
67f28219
ZW
88X_ADAFLAGS =
89T_ADAFLAGS =
90
84481f76 91CC = cc
67f28219
ZW
92# Let the configure setting prevail only if CC hasn't been overridden
93# to xgcc by the top level Makefile (in a later stage of bootstrap).
94ifeq ($(findstring xgcc, $(CC)),)
95ADAC = @ADAC@
96else
97ADAC = $(CC)
98endif
99
84481f76
RK
100BISON = bison
101BISONFLAGS =
102ECHO = echo
103LEX = flex
104LEXFLAGS =
105CHMOD = chmod
106CP = cp -p
107MV = mv -f
108RM = rm -f
109RMDIR = rm -rf
110MKDIR = mkdir -p
111AR = ar
112AR_FLAGS = rc
113# How to invoke ranlib.
114RANLIB = ranlib
115# Test to use to see whether ranlib exists on the system.
116RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
b41e09a7 117SHELL = @SHELL@
1e6347d8 118PWD = $${PWDCMD-pwd}
84481f76
RK
119# How to copy preserving the date
120INSTALL_DATA_DATE = cp -p
121MAKEINFO = makeinfo
122TEXI2DVI = texi2dvi
123GNATBIND = $(STAGE_PREFIX)gnatbind -C
07fc65c4 124GNATBIND_FLAGS = -static -x
84481f76 125ADA_CFLAGS =
67f28219 126ADAFLAGS = -W -Wall -gnatpg -gnata
84481f76
RK
127SOME_ADAFLAGS =-gnata
128FORCE_DEBUG_ADAFLAGS = -g
129GNATLIBFLAGS = -gnatpg
07fc65c4
GB
130GNATLIBCFLAGS = -g -O2
131GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
132 -DIN_RTS
b303008e
JDA
133ALL_ADA_CFLAGS = $(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
134ALL_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \
135 $(ADAFLAGS)
136MOST_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \
137 $(SOME_ADAFLAGS)
07fc65c4
GB
138THREAD_KIND = native
139THREADSLIB =
140GMEM_LIB =
84481f76
RK
141MISCLIB =
142
143objext = .o
144exeext =
145arext = .a
146soext = .so
147shext =
148
149HOST_CC=$(CC)
150HOST_CFLAGS=$(ALL_CFLAGS)
151HOST_CLIB=$(CLIB)
152HOST_LDFLAGS=$(LDFLAGS)
153HOST_CPPFLAGS=$(ALL_CPPFLAGS)
154HOST_ALLOCA=$(ALLOCA)
155HOST_MALLOC=$(MALLOC)
156HOST_OBSTACK=$(OBSTACK)
157
158# Define this as & to perform parallel make on a Sequent.
159# Note that this has some bugs, and it seems currently necessary
160# to compile all the gen* files first by hand to avoid erroneous results.
161P =
162
163# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
164# It omits XCFLAGS, and specifies -B./.
165# It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
07fc65c4 166GCC_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
84481f76
RK
167
168# Tools to use when building a cross-compiler.
169# These are used because `configure' appends `cross-make'
170# to the makefile when making a cross-compiler.
171
172# We don't use cross-make. Instead we use the tools from the build tree,
173# if they are available.
174# program_transform_name and objdir are set by configure.in.
175program_transform_name =
176objdir = .
177
178target=@target@
179target_alias=@target_alias@
180xmake_file=@dep_host_xmake_file@
181tmake_file=@dep_tmake_file@
07fc65c4 182host_canonical=@host_canonical@
84481f76
RK
183#version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
184#mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
185
186# Directory where sources are, from where we are.
187srcdir = @srcdir@
188VPATH = @srcdir@
189
1e6347d8
RO
190fsrcdir := $(shell cd $(srcdir);${PWD})
191fsrcpfx := $(shell cd $(srcdir);${PWD})/
192fcurdir := $(shell ${PWD})
193fcurpfx := $(shell ${PWD})/
84481f76
RK
194
195# Top build directory, relative to here.
196top_builddir = ..
197
198# Internationalization library.
199INTLLIBS = @INTLLIBS@
07fc65c4 200INTLDEPS = @INTLDEPS@
84481f76
RK
201
202# Any system libraries needed just for GNAT.
203SYSLIBS = @GNAT_LIBEXC@
204
84481f76 205# List of extra object files linked in with various programs.
84481f76
RK
206EXTRA_GNATTOOLS_OBJS = ../prefix.o
207
208# List extra gnattools
209EXTRA_GNATTOOLS =
210
84481f76
RK
211# End of variables for you to override.
212
213# Definition of `all' is here so that new rules inserted by sed
214# do not specify the default target.
215all: all.indirect
216
217# This tells GNU Make version 3 not to put all variables in the environment.
218.NOEXPORT:
219
220# sed inserts variable overrides after the following line.
221####target overrides
222@target_overrides@
223
224####host overrides
225@host_overrides@
84481f76
RK
226\f
227# Now figure out from those variables how to compile and link.
228
229all.indirect: Makefile ../gnat1$(exeext)
230
a078a589
ZW
231# IN_GCC distinguishes between code compiled into GCC itself and other
232# programs built during a bootstrap.
233# autoconf inserts -DCROSS_COMPILE if we are building a cross compiler.
234INTERNAL_CFLAGS = @CROSS@ -DIN_GCC
84481f76
RK
235
236# This is the variable actually used when we compile.
237LOOSE_CFLAGS = `echo $(CFLAGS) $(WARN2_CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'`
238ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS) \
239 $(XCFLAGS)
240
241# Likewise.
242ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
243
84481f76
RK
244# This is where we get libiberty.a from.
245LIBIBERTY = ../../libiberty/libiberty.a
246
247# How to link with both our special library facilities
248# and the system's installed libraries.
249LIBS = $(INTLLIBS) $(LIBIBERTY) $(SYSLIBS)
07fc65c4
GB
250LIBDEPS = $(INTLDEPS) $(LIBIBERTY)
251TOOLS_LIBS = ../../prefix.o $(LIBGNAT) ../../../libiberty/libiberty.a \
252 $(SYSLIBS)
84481f76
RK
253
254# Specify the directories to be searched for header files.
255# Both . and srcdir are used, in that order,
256# so that tm.h and config.h will be found in the compilation
257# subdirectory rather than in the source directory.
258INCLUDES = -I- -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config \
259 -I$(srcdir)/../../include
260
261ADA_INCLUDES = -I- -I. -I$(srcdir)
262
07626501 263INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir) \
84481f76
RK
264 -I$(fsrcdir)/.. -I$(fsrcdir)/../config -I$(fsrcdir)/../../include
265ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)
266
267# Avoid a lot of time thinking about remaking Makefile.in and *.def.
268.SUFFIXES: .in .def
269
270# Say how to compile Ada programs.
271.SUFFIXES: .ada .adb .ads
272
273# Always use -I$(srcdir)/config when compiling.
274.c.o:
b303008e 275 $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
84481f76 276.adb.o:
67f28219 277 $(ADAC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $<
84481f76 278.ads.o:
67f28219 279 $(ADAC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $<
84481f76
RK
280
281# This tells GNU make version 3 not to export all the variables
282# defined in this file into the environment.
283.NOEXPORT:
284\f
285# Lists of files for various purposes.
286
84481f76 287# Object files for gnat executables
84481f76 288GNATLINK_OBJS = gnatlink.o link.o \
07fc65c4
GB
289 ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o gnatvsn.o \
290 hostparm.o namet.o opt.o osint.o output.o rident.o sdefault.o stylesw.o \
291 switch.o table.o tree_io.o types.o validsw.o widechar.o
84481f76
RK
292
293GNATMAKE_OBJS = ali.o ali-util.o \
294 alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o einfo.o elists.o \
6510f4c9 295 errout.o fmap.o fname.o fname-uf.o fname-sf.o \
84481f76
RK
296 gnatmake.o gnatvsn.o hostparm.o krunch.o lib.o make.o makeusg.o \
297 mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-utl.o \
07fc65c4 298 namet.o nlists.o opt.o osint.o osint-m.o output.o \
84481f76
RK
299 prj.o prj-attr.o prj-com.o prj-dect.o prj-env.o prj-ext.o prj-nmsc.o \
300 prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \
301 rident.o scans.o scn.o sdefault.o sfn_scan.o sinfo.o sinfo-cn.o \
302 sinput.o sinput-l.o sinput-p.o \
07fc65c4
GB
303 snames.o stand.o stringt.o style.o stylesw.o validsw.o switch.o switch-m.o \
304 switch-c.o table.o targparm.o tree_io.o types.o \
305 uintp.o uname.o urealp.o usage.o widechar.o
84481f76
RK
306
307# Convert the target variable into a space separated list of architecture,
308# manufacturer, and operating system and assign each of those to its own
309# variable.
310
07fc65c4 311host:=$(subst -, ,$(host_canonical))
84481f76
RK
312targ:=$(subst -, ,$(target))
313arch:=$(word 1,$(targ))
314ifeq ($(words $(targ)),2)
315 manu:=
316 osys:=$(word 2,$(targ))
317else
318 manu:=$(word 2,$(targ))
319 osys:=$(word 3,$(targ))
320endif
321
322# LIBGNAT_TARGET_PAIRS is a list of pairs of filenames.
323# The members of each pair must be separated by a '<' and no whitespace.
324# Each pair must be separated by some amount of whitespace from the following
325# pair.
326
327# Non-tasking case:
328
329LIBGNAT_TARGET_PAIRS = \
330a-intnam.ads<4nintnam.ads \
331s-inmaop.adb<5ninmaop.adb \
332s-intman.adb<5nintman.adb \
333s-osinte.ads<5nosinte.ads \
334s-osprim.adb<7sosprim.adb \
335s-taprop.adb<5ntaprop.adb \
336s-taspri.ads<5ntaspri.ads
337
338# Default shared object option. Note that we rely on the fact that the "soname"
339# option will always be present and last in this flag, so that we can have
340# $(SO_OPTS)libgnat-x.xx
341
07fc65c4 342SO_OPTS = -Wl,-soname,
84481f76
RK
343
344# Default gnatlib-shared target.
345# This is needed on some targets to use a different gnatlib-shared target, e.g
346# gnatlib-shared-dual
07fc65c4 347GNATLIB_SHARED = gnatlib-shared-default
84481f76 348
44d6a706 349# default value for gnatmake's target dependent file
07fc65c4 350MLIB_TGT = mlib-tgt
84481f76
RK
351
352# $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
353# $(strip STRING) removes leading and trailing spaces from STRING.
354# If what's left is null then it's a match.
355
356ifeq ($(strip $(filter-out %86 os2 OS2 os2_emx,$(arch) $(osys))),)
357 LIBGNAT_TARGET_PAIRS = \
358 a-excpol.adb<4wexcpol.adb \
359 a-intnam.ads<4nintnam.ads \
360 a-numaux.adb<86numaux.adb \
361 a-numaux.ads<86numaux.ads \
362 s-inmaop.adb<5ninmaop.adb \
363 s-interr.adb<5ointerr.adb \
364 s-intman.adb<5nintman.adb \
365 s-mastop.adb<5omastop.adb \
366 s-osinte.adb<5oosinte.adb \
367 s-osinte.ads<5oosinte.ads \
368 s-osprim.adb<5oosprim.adb \
369 s-parame.adb<5oparame.adb \
370 system.ads<5osystem.ads \
371 s-taprop.adb<5otaprop.adb \
372 s-taspri.ads<5otaspri.ads
373
374 EXTRA_GNATRTL_NONTASKING_OBJS = \
375 i-os2err.o \
376 i-os2lib.o \
377 i-os2syn.o \
378 i-os2thr.o
379endif
380
07fc65c4 381ifeq ($(strip $(filter-out %86 interix%,$(arch) $(osys))),)
84481f76 382 LIBGNAT_TARGET_PAIRS = \
07fc65c4 383 a-excpol.adb<4hexcpol.adb \
84481f76
RK
384 a-intnam.ads<4pintnam.ads \
385 a-numaux.adb<86numaux.adb \
386 a-numaux.ads<86numaux.ads \
07fc65c4 387 g-soccon.ads<3psoccon.ads \
84481f76
RK
388 s-inmaop.adb<7sinmaop.adb \
389 s-intman.adb<7sintman.adb \
390 s-mastop.adb<5omastop.adb \
391 s-osinte.adb<7sosinte.adb \
392 s-osinte.ads<5posinte.ads \
393 s-osprim.adb<5posprim.adb \
394 s-taprop.adb<7staprop.adb \
07fc65c4 395 system.ads<5psystem.ads \
84481f76
RK
396 s-taspri.ads<7staspri.ads \
397 s-tpopsp.adb<7stpopsp.adb
398
07fc65c4 399 THREADSLIB = -lgthreads -lmalloc
84481f76
RK
400endif
401
402# sysv5uw is SCO UnixWare 7
403ifeq ($(strip $(filter-out %86 sysv5uw%,$(arch) $(osys))),)
404 LIBGNAT_TARGET_PAIRS = \
07fc65c4 405 a-excpol.adb<4wexcpol.adb \
84481f76
RK
406 a-intnam.ads<41intnam.ads \
407 a-numaux.adb<86numaux.adb \
408 a-numaux.ads<86numaux.ads \
409 s-inmaop.adb<7sinmaop.adb \
410 s-intman.adb<7sintman.adb \
411 s-mastop.adb<5omastop.adb \
412 s-osinte.ads<51osinte.ads \
413 s-osinte.adb<51osinte.adb \
414 s-osprim.adb<5posprim.adb \
415 s-taprop.adb<7staprop.adb \
416 s-taspri.ads<7staspri.ads \
417 s-tpopsp.adb<5atpopsp.adb \
07fc65c4 418 system.ads<51system.ads \
84481f76
RK
419 g-soccon.ads<31soccon.ads \
420 g-soliop.ads<31soliop.ads
421
07fc65c4
GB
422 THREADSLIB = -lthread
423 SO_OPTS = -Wl,-h,
424 GNATLIB_SHARED = gnatlib-shared-dual
84481f76
RK
425 LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
426endif
427
84481f76
RK
428ifeq ($(strip $(filter-out alpha% dec vx%,$(targ))),)
429 LIBGNAT_TARGET_PAIRS = \
430 a-sytaco.ads<4zsytaco.ads \
431 a-sytaco.adb<4zsytaco.adb \
432 a-intnam.ads<4zintnam.ads \
433 a-numaux.ads<4znumaux.ads \
434 s-inmaop.adb<7sinmaop.adb \
435 s-interr.adb<5zinterr.adb \
436 s-intman.adb<5zintman.adb \
437 s-osinte.adb<5zosinte.adb \
438 s-osinte.ads<5zosinte.ads \
439 s-osprim.adb<5zosprim.adb \
440 s-taprop.adb<5ztaprop.adb \
07fc65c4 441 s-taspri.ads<5ztaspri.ads \
84481f76 442 s-vxwork.ads<5avxwork.ads \
07fc65c4
GB
443 g-soccon.ads<3zsoccon.ads \
444 g-socthi.ads<3zsocthi.ads \
445 g-socthi.adb<3zsocthi.adb \
84481f76
RK
446 system.ads<5zsystem.ads
447
07fc65c4 448 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
84481f76
RK
449 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
450endif
451
452ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
453 LIBGNAT_TARGET_PAIRS = \
454 a-sytaco.ads<4zsytaco.ads \
455 a-sytaco.adb<4zsytaco.adb \
456 a-intnam.ads<4zintnam.ads \
457 a-numaux.ads<4znumaux.ads \
458 s-inmaop.adb<7sinmaop.adb \
459 s-interr.adb<5zinterr.adb \
460 s-intman.adb<5zintman.adb \
461 s-osinte.adb<5zosinte.adb \
462 s-osinte.ads<5zosinte.ads \
463 s-osprim.adb<5zosprim.adb \
84481f76 464 s-taprop.adb<5ztaprop.adb \
07fc65c4 465 s-taspri.ads<5ztaspri.ads \
84481f76 466 s-vxwork.ads<5kvxwork.ads \
07fc65c4
GB
467 g-soccon.ads<3zsoccon.ads \
468 g-socthi.ads<3zsocthi.ads \
469 g-socthi.adb<3zsocthi.adb \
84481f76
RK
470 system.ads<5ksystem.ads
471
07fc65c4 472 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
84481f76
RK
473 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
474
07fc65c4
GB
475 ifeq ($(strip $(filter-out yes,$(TRACE))),)
476 LIBGNAT_TARGET_PAIRS += \
477 s-traces.adb<7straces.adb \
478 s-tratas.adb<7stratas.adb \
479 s-trafor.adb<7strafor.adb \
480 s-trafor.ads<7strafor.ads \
481 s-tfsetr.adb<5ztfsetr.adb
482 endif
84481f76
RK
483endif
484
485ifeq ($(strip $(filter-out powerpc% wrs vx%,$(targ))),)
486 LIBGNAT_TARGET_PAIRS = \
487 a-sytaco.ads<4zsytaco.ads \
488 a-sytaco.adb<4zsytaco.adb \
489 a-intnam.ads<4zintnam.ads \
490 a-numaux.ads<4znumaux.ads \
491 s-inmaop.adb<7sinmaop.adb \
492 s-interr.adb<5zinterr.adb \
493 s-intman.adb<5zintman.adb \
494 s-osinte.adb<5zosinte.adb \
495 s-osinte.ads<5zosinte.ads \
496 s-osprim.adb<5zosprim.adb \
497 s-taprop.adb<5ztaprop.adb \
07fc65c4 498 s-taspri.ads<5ztaspri.ads \
84481f76 499 s-vxwork.ads<5pvxwork.ads \
07fc65c4
GB
500 g-soccon.ads<3zsoccon.ads \
501 g-socthi.ads<3zsocthi.ads \
502 g-socthi.adb<3zsocthi.adb \
84481f76
RK
503 system.ads<5ysystem.ads
504
84481f76
RK
505 EXTRA_RAVEN_SOURCES=i-vxwork.ads s-vxwork.ads
506 EXTRA_RAVEN_OBJS=i-vxwork.o s-vxwork.o
507 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o
508 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
509endif
510
511ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
512 LIBGNAT_TARGET_PAIRS = \
513 a-sytaco.ads<4zsytaco.ads \
514 a-sytaco.adb<4zsytaco.adb \
515 a-intnam.ads<4zintnam.ads \
516 a-numaux.ads<4znumaux.ads \
517 s-inmaop.adb<7sinmaop.adb \
518 s-interr.adb<5zinterr.adb \
519 s-intman.adb<5zintman.adb \
520 s-osinte.adb<5zosinte.adb \
521 s-osinte.ads<5zosinte.ads \
522 s-osprim.adb<5zosprim.adb \
523 s-taprop.adb<5ztaprop.adb \
524 s-taspri.ads<7staspri.ads \
525 s-vxwork.ads<5svxwork.ads \
526 system.ads<5ysystem.ads
527
528 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o
529 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
530endif
531
532ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
533 LIBGNAT_TARGET_PAIRS = \
534 a-sytaco.ads<4zsytaco.ads \
535 a-sytaco.adb<4zsytaco.adb \
536 a-intnam.ads<4zintnam.ads \
537 a-numaux.ads<4znumaux.ads \
538 s-inmaop.adb<7sinmaop.adb \
539 s-interr.adb<5zinterr.adb \
540 s-intman.adb<5zintman.adb \
541 s-osinte.adb<5zosinte.adb \
542 s-osinte.ads<5zosinte.ads \
543 s-osprim.adb<5zosprim.adb \
544 s-taprop.adb<5ztaprop.adb \
545 s-taspri.ads<7staspri.ads \
546 s-vxwork.ads<5mvxwork.ads \
547 system.ads<5zsystem.ads
548
549 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o
550 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
551endif
552
553ifeq ($(strip $(filter-out sparc sun solaris2% sunos5%,$(targ))),)
554 LIBGNAT_TARGET_PAIRS = \
555 a-intnam.ads<4sintnam.ads \
556 s-inmaop.adb<7sinmaop.adb \
557 s-intman.adb<5sintman.adb \
84481f76
RK
558 s-osinte.adb<5sosinte.adb \
559 s-osinte.ads<5sosinte.ads \
560 s-osprim.adb<5posprim.adb \
561 s-parame.adb<5sparame.adb \
562 s-taprop.adb<5staprop.adb \
563 s-tasinf.adb<5stasinf.adb \
564 s-tasinf.ads<5stasinf.ads \
565 s-taspri.ads<5staspri.ads \
566 s-tpopse.adb<5stpopse.adb \
567 g-soccon.ads<3ssoccon.ads \
568 g-soliop.ads<3ssoliop.ads \
569 system.ads<5ssystem.ads
570
07fc65c4
GB
571 THREADSLIB = -lposix4 -lthread
572 MISCLIB = -lposix4 -lnsl -lsocket
573 SYMLIB = -laddr2line -lbfd $(INTLLIBS)
574 SO_OPTS = -Wl,-h,
575 GNATLIB_SHARED = gnatlib-shared-dual
576 GMEM_LIB = gmemlib
84481f76
RK
577 LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
578
579 ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),)
580 LIBGNAT_TARGET_PAIRS = \
581 a-intnam.ads<4sintnam.ads \
582 s-inmaop.adb<7sinmaop.adb \
583 s-intman.adb<5sintman.adb \
84481f76
RK
584 s-osinte.adb<7sosinte.adb \
585 s-osinte.ads<5tosinte.ads \
586 s-osprim.adb<5posprim.adb \
587 s-taprop.adb<7staprop.adb \
588 s-taspri.ads<7staspri.ads \
589 s-tpopsp.adb<7stpopsp.adb \
590 g-soccon.ads<3ssoccon.ads \
591 g-soliop.ads<3ssoliop.ads \
592 system.ads<5ssystem.ads
593
07fc65c4 594 THREADSLIB = -lgthreads -lmalloc
84481f76
RK
595 endif
596
597 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
598 LIBGNAT_TARGET_PAIRS = \
599 a-intnam.ads<4sintnam.ads \
600 s-inmaop.adb<7sinmaop.adb \
601 s-intman.adb<7sintman.adb \
84481f76
RK
602 s-osinte.adb<5iosinte.adb \
603 s-osinte.ads<54osinte.ads \
604 s-osprim.adb<5posprim.adb \
605 s-taprop.adb<7staprop.adb \
606 s-taspri.ads<7staspri.ads \
607 s-tpopsp.adb<5atpopsp.adb \
608 g-soccon.ads<3ssoccon.ads \
609 g-soliop.ads<3ssoliop.ads \
610 system.ads<5ssystem.ads
611
07fc65c4 612 THREADSLIB = -lposix4 -lpthread
84481f76
RK
613 endif
614endif
615
616ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
617 LIBGNAT_TARGET_PAIRS = \
618 a-numaux.adb<86numaux.adb \
619 a-numaux.ads<86numaux.ads \
620 a-intnam.ads<4sintnam.ads \
621 s-inmaop.adb<7sinmaop.adb \
622 s-intman.adb<5sintman.adb \
623 s-mastop.adb<5omastop.adb \
624 s-osinte.adb<5sosinte.adb \
625 s-osinte.ads<5sosinte.ads \
626 s-osprim.adb<5posprim.adb \
627 s-parame.adb<5sparame.adb \
628 s-taprop.adb<5staprop.adb \
629 s-tasinf.adb<5stasinf.adb \
630 s-tasinf.ads<5stasinf.ads \
631 s-taspri.ads<5staspri.ads \
632 s-tpopse.adb<5etpopse.adb \
633 g-soccon.ads<3ssoccon.ads \
634 g-soliop.ads<3ssoliop.ads \
635 system.ads<5esystem.ads
636
07fc65c4
GB
637 THREADSLIB = -lposix4 -lthread
638 MISCLIB = -lposix4 -lnsl -lsocket
639 SO_OPTS = -Wl,-h,
640 GNATLIB_SHARED = gnatlib-shared-dual
84481f76 641 LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
84481f76
RK
642endif
643
644ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
645 LIBGNAT_TARGET_PAIRS = \
646 a-intnam.ads<4lintnam.ads \
647 a-numaux.adb<86numaux.adb \
648 a-numaux.ads<86numaux.ads \
649 s-inmaop.adb<7sinmaop.adb \
650 s-intman.adb<5lintman.adb \
651 s-mastop.adb<5omastop.adb \
652 s-osinte.adb<5iosinte.adb \
653 s-osinte.ads<5iosinte.ads \
654 s-osprim.adb<7sosprim.adb \
655 s-taprop.adb<5itaprop.adb \
656 s-taspri.ads<5itaspri.ads \
07fc65c4 657 s-tpopsp.adb<5atpopsp.adb \
84481f76
RK
658 system.ads<5lsystem.ads
659
07fc65c4
GB
660 TOOLS_TARGET_PAIRS = mlib-tgt.adb<5lml-tgt.adb
661 SYMLIB = -laddr2line -lbfd $(INTLLIBS)
662 THREADSLIB = -lpthread
663 GNATLIB_SHARED = gnatlib-shared-dual
664 GMEM_LIB = gmemlib
84481f76
RK
665 LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
666
667 ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),)
668 LIBGNAT_TARGET_PAIRS = \
669 a-intnam.ads<4lintnam.ads \
670 a-numaux.adb<86numaux.adb \
671 a-numaux.ads<86numaux.ads \
672 s-inmaop.adb<7sinmaop.adb \
673 s-intman.adb<5lintman.adb \
674 s-mastop.adb<5omastop.adb \
675 s-osinte.adb<7sosinte.adb \
676 s-osinte.ads<5losinte.ads \
677 s-osprim.adb<7sosprim.adb \
678 s-taprop.adb<7staprop.adb \
679 s-taspri.ads<7staspri.ads \
680 s-tpopsp.adb<7stpopsp.adb \
681 system.ads<5lsystem.ads
682
07fc65c4 683 THREADSLIB = -lgthreads -lmalloc
84481f76
RK
684 endif
685
686 ifeq ($(strip $(filter-out rt-linux RT-LINUX,$(THREAD_KIND))),)
687 LIBGNAT_TARGET_PAIRS = \
688 a-intnam.ads<4nintnam.ads \
689 s-inmaop.adb<5ninmaop.adb \
690 s-intman.adb<5nintman.adb \
691 s-osinte.adb<5qosinte.adb \
692 s-osinte.ads<5qosinte.ads \
693 s-osprim.adb<5qosprim.adb \
84481f76
RK
694 s-stache.adb<5qstache.adb \
695 s-taprop.adb<5qtaprop.adb \
696 s-taspri.ads<5qtaspri.ads \
697 system.ads<5lsystem.ads
07fc65c4
GB
698
699 RT_FLAGS = -D__RT__
84481f76
RK
700 endif
701endif
702
703ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
704 ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),)
705 LIBGNAT_TARGET_PAIRS = \
706 a-intnam.ads<4gintnam.ads \
707 s-inmaop.adb<7sinmaop.adb \
708 s-intman.adb<5fintman.adb \
709 s-mastop.adb<5gmastop.adb \
710 s-osinte.adb<5aosinte.adb \
711 s-osinte.ads<5fosinte.ads \
712 s-osprim.adb<7sosprim.adb \
713 s-proinf.adb<5gproinf.adb \
714 s-proinf.ads<5gproinf.ads \
715 s-taprop.adb<5ftaprop.adb \
716 s-tasinf.ads<5ftasinf.ads \
717 s-taspri.ads<7staspri.ads \
84481f76
RK
718 s-traceb.adb<7straceb.adb \
719 g-soccon.ads<3gsoccon.ads \
720 system.ads<5gsystem.ads
721
07fc65c4 722 THREADSLIB = -lpthread
84481f76
RK
723
724 else
725 LIBGNAT_TARGET_PAIRS = \
726 a-intnam.ads<4gintnam.ads \
727 s-inmaop.adb<5ninmaop.adb \
728 s-interr.adb<5ginterr.adb \
729 s-intman.adb<5gintman.adb \
730 s-mastop.adb<5gmastop.adb \
731 s-osinte.adb<5aosinte.adb \
732 s-osinte.ads<5gosinte.ads \
733 s-osprim.adb<7sosprim.adb \
734 s-proinf.adb<5gproinf.adb \
735 s-proinf.ads<5gproinf.ads \
736 s-taprop.adb<5gtaprop.adb \
737 s-tasinf.adb<5gtasinf.adb \
738 s-tasinf.ads<5gtasinf.ads \
739 s-taspri.ads<7staspri.ads \
84481f76
RK
740 s-traceb.adb<7straceb.adb \
741 g-soccon.ads<3gsoccon.ads \
742 system.ads<5fsystem.ads
743
07fc65c4 744 THREADSLIB = -lathread
84481f76
RK
745 endif
746
07fc65c4
GB
747 TGT_LIB = -lexc
748 MISCLIB = -lexc
749 SO_OPTS = -Wl,-all,-set_version,sgi1.0,-update_registry,../so_locations,-soname,
84481f76 750 LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
84481f76
RK
751endif
752
753ifeq ($(strip $(filter-out hppa% hp hpux%,$(targ))),)
754 LIBGNAT_TARGET_PAIRS = \
755 a-intnam.ads<4hintnam.ads \
756 s-inmaop.adb<7sinmaop.adb \
757 s-intman.adb<7sintman.adb \
758 s-osinte.adb<5iosinte.adb \
759 s-osinte.ads<53osinte.ads \
760 s-parame.ads<5hparame.ads \
761 s-osprim.adb<7sosprim.adb \
762 s-traceb.adb<5htraceb.adb \
763 s-taprop.adb<7staprop.adb \
764 s-taspri.ads<7staspri.ads \
765 s-tpopsp.adb<5atpopsp.adb \
766 g-soccon.ads<3hsoccon.ads \
767 system.ads<5hsystem.ads
768
07fc65c4
GB
769 TGT_LIB = /usr/lib/libcl.a -lpthread
770 THREADSLIB = -lpthread -lc_r
771 SYMLIB = -laddr2line -lbfd $(INTLLIBS)
772 soext = .sl
773 SO_OPTS = -Wl,+h,
774 GNATLIB_SHARED = gnatlib-shared-dual
84481f76
RK
775
776 ifeq ($(strip $(filter-out dce DCE,$(THREAD_KIND))),)
777 LIBGNAT_TARGET_PAIRS = \
778 a-excpol.adb<4wexcpol.adb \
779 a-intnam.ads<4hintnam.ads \
780 s-inmaop.adb<7sinmaop.adb \
781 s-interr.adb<5ginterr.adb \
782 s-intman.adb<7sintman.adb \
783 s-osinte.adb<5hosinte.adb \
784 s-osinte.ads<5hosinte.ads \
785 s-parame.ads<5hparame.ads \
786 s-osprim.adb<7sosprim.adb \
84481f76
RK
787 s-taprop.adb<5htaprop.adb \
788 s-taspri.ads<5htaspri.ads \
789 g-soccon.ads<3hsoccon.ads \
790 system.ads<5hsystem.ads
791
07fc65c4 792 THREADSLIB = -lcma
84481f76
RK
793 endif
794endif
795
796ifeq ($(strip $(filter-out ibm aix4%,$(manu) $(osys))),)
797 LIBGNAT_TARGET_PAIRS = \
798 a-intnam.ads<4cintnam.ads \
799 s-inmaop.adb<7sinmaop.adb \
800 s-intman.adb<7sintman.adb \
801 s-osinte.adb<5bosinte.adb \
802 s-osinte.ads<5bosinte.ads \
803 s-osprim.adb<7sosprim.adb \
804 s-taprop.adb<7staprop.adb \
805 s-taspri.ads<7staspri.ads \
806 s-tpopsp.adb<7stpopsp.adb \
807 g-soccon.ads<3bsoccon.ads \
808 system.ads<5bsystem.ads
809
07fc65c4 810 THREADSLIB = -lpthreads
84481f76
RK
811 ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),)
812 LIBGNAT_TARGET_PAIRS = \
813 a-intnam.ads<4cintnam.ads \
814 s-inmaop.adb<7sinmaop.adb \
815 s-intman.adb<7sintman.adb \
816 s-osinte.adb<7sosinte.adb \
817 s-osinte.ads<5cosinte.ads \
818 s-osprim.adb<7sosprim.adb \
819 s-taprop.adb<7staprop.adb \
820 s-taspri.ads<7staspri.ads \
821 s-tpopsp.adb<7stpopsp.adb \
822 g-soccon.ads<3bsoccon.ads \
823 system.ads<5bsystem.ads
824
07fc65c4 825 THREADSLIB = -lgthreads -lmalloc
84481f76
RK
826 endif
827endif
828
829ifeq ($(strip $(filter-out lynxos,$(osys))),)
830 ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),)
831 LIBGNAT_TARGET_PAIRS = \
832 a-numaux.adb<86numaux.adb \
833 a-numaux.ads<86numaux.ads \
834 a-intnam.ads<42intnam.ads \
835 s-mastop.adb<5omastop.adb \
836 s-inmaop.adb<7sinmaop.adb \
837 s-intman.adb<7sintman.adb \
838 s-osinte.adb<52osinte.adb \
839 s-osinte.ads<52osinte.ads \
840 s-osprim.adb<7sosprim.adb \
841 s-taprop.adb<7staprop.adb \
842 s-taspri.ads<7staspri.ads \
843 s-tpopsp.adb<7stpopsp.adb \
844 system.ads<52system.ads
845
846 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
847 LIBGNAT_TARGET_PAIRS = \
848 a-numaux.adb<86numaux.adb \
849 a-numaux.ads<86numaux.ads \
850 a-intnam.ads<42intnam.ads \
851 s-mastop.adb<5omastop.adb \
852 s-inmaop.adb<7sinmaop.adb \
853 s-intman.adb<7sintman.adb \
854 s-osinte.adb<56osinte.adb \
855 s-osinte.ads<56osinte.ads \
856 s-osprim.adb<7sosprim.adb \
07fc65c4
GB
857 s-taprop.adb<56taprop.adb \
858 s-taspri.ads<56taspri.ads \
84481f76
RK
859 s-tpopsp.adb<5atpopsp.adb \
860 system.ads<52system.ads
861 endif
862
863 else
864 LIBGNAT_TARGET_PAIRS = \
865 a-intnam.ads<42intnam.ads \
866 s-inmaop.adb<7sinmaop.adb \
867 s-intman.adb<7sintman.adb \
07fc65c4
GB
868 s-osinte.adb<56osinte.adb \
869 s-osinte.ads<56osinte.ads \
84481f76 870 s-osprim.adb<7sosprim.adb \
07fc65c4
GB
871 s-taprop.adb<56taprop.adb \
872 s-taspri.ads<56taspri.ads \
873 s-tpopsp.adb<5atpopsp.adb \
84481f76
RK
874 system.ads<52system.ads
875 endif
876endif
877
878ifeq ($(strip $(filter-out rtems,$(osys))),)
879 LIBGNAT_TARGET_PAIRS = \
880 a-intnam.ads<4rintnam.ads \
881 s-inmaop.adb<7sinmaop.adb \
882 s-intman.adb<7sintman.adb \
883 s-osinte.adb<5rosinte.adb \
884 s-osinte.ads<5rosinte.ads \
885 s-osprim.adb<7sosprim.adb \
886 s-parame.adb<5rparame.adb \
887 s-taprop.adb<7staprop.adb \
888 s-taspri.ads<7staspri.ads \
889 s-tpopsp.adb<5atpopsp.adb
890endif
891
892ifeq ($(strip $(filter-out go32 msdos,$(osys))),)
893 LIBGNAT_TARGET_PAIRS = \
894 a-intnam.ads<4dintnam.ads \
895 s-inmaop.adb<7sinmaop.adb \
896 s-intman.adb<7sintman.adb \
897 s-osinte.adb<7sosinte.adb \
898 s-osinte.ads<5dosinte.ads \
899 s-osprim.adb<7sosprim.adb \
900 s-taprop.adb<7staprop.adb \
901 s-taspri.ads<7staspri.ads \
902 s-tpopsp.adb<7stpopsp.adb
903endif
904
905ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
906 LIBGNAT_TARGET_PAIRS = \
907 a-intnam.ads<4aintnam.ads \
908 s-inmaop.adb<7sinmaop.adb \
909 s-intman.adb<7sintman.adb \
910 s-mastop.adb<5amastop.adb \
911 s-osinte.adb<5aosinte.adb \
912 s-osinte.ads<5aosinte.ads \
913 s-osprim.adb<5posprim.adb \
914 s-taprop.adb<5ataprop.adb \
915 s-tasinf.ads<5atasinf.ads \
916 s-taspri.ads<5ataspri.ads \
917 s-tpopsp.adb<5atpopsp.adb \
918 s-traceb.adb<7straceb.adb \
919 g-soccon.ads<3asoccon.ads \
920 system.ads<5asystem.ads
921
07fc65c4
GB
922 THREADSLIB = -lpthread -lmach -lexc -lrt
923 SYMLIB = -laddr2line -lbfd $(INTLLIBS)
84481f76
RK
924 LIBRARY_VERSION := $(strip $(shell grep Library_Version $(fsrcpfx)gnatvsn.ads | sed -e 's/.*GNAT Lib v\(.*\)[ "].*/\1/'))
925endif
926
07fc65c4
GB
927ifeq ($(strip $(filter-out alpha% dec vms% openvms% alphavms%,$(host))),)
928
929EXTRA_GNAT1_OBJS = ../prefix.o vmshandler.o
930EXTRA_GNATBIND_OBJS = ../prefix.o vmshandler.o
931
932endif
933
934ifeq ($(strip $(filter-out alpha% dec vms% openvms% alphavms%,$(targ))),)
935
936ifeq ($(strip $(filter-out alpha64% dec vms% openvms% alphavms%,$(targ))),)
937 LIBGNAT_TARGET_PAIRS_AUX =
938else
939ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),)
940 LIBGNAT_TARGET_PAIRS_AUX = \
941 s-parame.ads<5xparame.ads
942else
943 LIBGNAT_TARGET_PAIRS_AUX = \
944 s-parame.ads<5vparame.ads
945endif
946endif
947
84481f76 948 LIBGNAT_TARGET_PAIRS = \
07fc65c4
GB
949 a-caldel.adb<4vcaldel.adb \
950 a-calend.adb<4vcalend.adb \
951 a-calend.ads<4vcalend.ads \
952 a-excpol.adb<4wexcpol.adb \
953 a-intnam.ads<4vintnam.ads \
954 g-enblsp.adb<3venblsp.adb \
955 i-cstrea.adb<6vcstrea.adb \
956 i-cpp.adb<6vcpp.adb \
957 interfac.ads<6vinterf.ads \
958 s-asthan.adb<5vasthan.adb \
959 s-inmaop.adb<5vinmaop.adb \
960 s-interr.adb<5vinterr.adb \
961 s-intman.adb<5vintman.adb \
962 s-intman.ads<5vintman.ads \
963 s-osinte.adb<5vosinte.adb \
964 s-osinte.ads<5vosinte.ads \
965 s-osprim.adb<5vosprim.adb \
966 s-osprim.ads<5vosprim.ads \
967 s-taprop.adb<5vtaprop.adb \
968 s-taspri.ads<5vtaspri.ads \
969 s-tpopde.adb<5vtpopde.adb \
970 s-tpopde.ads<5vtpopde.ads \
971 s-vaflop.adb<5vvaflop.adb \
972 system.ads<5xsystem.ads \
973 $(LIBGNAT_TARGET_PAIRS_AUX)
974
975 GNATLIB_SHARED=gnatlib-shared-vms
976 EXTRA_LIBGNAT_SRCS=vmshandler.asm
977 EXTRA_LIBGNAT_OBJS=vmshandler.o
978 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
979 EXTRA_GNATTOOLS_OBJS = ../prefix.o vmshandler.o
84481f76
RK
980endif
981
982ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
983 LIBGNAT_TARGET_PAIRS = \
984 a-calend.adb<4wcalend.adb \
985 a-excpol.adb<4wexcpol.adb \
986 a-intnam.ads<4wintnam.ads \
987 a-numaux.adb<86numaux.adb \
988 a-numaux.ads<86numaux.ads \
989 s-gloloc.adb<5wgloloc.adb \
990 s-inmaop.adb<5ninmaop.adb \
991 s-interr.adb<5ginterr.adb \
992 s-intman.adb<5wintman.adb \
993 s-mastop.adb<5omastop.adb \
994 s-memory.adb<5wmemory.adb \
995 s-osinte.ads<5wosinte.ads \
996 s-osprim.adb<5wosprim.adb \
997 s-taprop.adb<5wtaprop.adb \
998 s-taspri.ads<5wtaspri.ads \
999 g-socthi.ads<3wsocthi.ads \
1000 g-socthi.adb<3wsocthi.adb \
1001 g-soccon.ads<3wsoccon.ads \
1002 g-soliop.ads<3wsoliop.ads \
1003 system.ads<5wsystem.ads
1004
07fc65c4
GB
1005 MISCLIB = -lwsock32
1006 SYMLIB = -laddr2line -lbfd $(INTLLIBS)
1007 GMEM_LIB = gmemlib
1008 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
84481f76 1009 EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o
84481f76
RK
1010endif
1011
1012# The runtime library for gnat comprises two directories. One contains the
1013# Ada source files that the compiler (gnat1) needs -- these files are listed
1014# by ADA_INCLUDE_SRCS -- and the other contains the object files and their
1015# corresponding .ali files for the parts written in Ada, libgnat.a for
1016# the parts of the runtime written in C, and libgthreads.a for the pthreads
1017# emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a,
1018# while GNATRTL_OBJS lists the object files compiled from Ada sources that
1019# go into the directory. The pthreads emulation is built in the threads
1020# subdirectory and copied.
1021LIBGNAT_SRCS = ada.h adaint.c adaint.h argv.c cio.c cstreams.c \
1022 errno.c exit.c cal.c \
07fc65c4
GB
1023 raise.h raise.c sysdep.c types.h aux-io.c init.c \
1024 final.c tracebak.c expect.c mkdir.c $(EXTRA_LIBGNAT_SRCS)
84481f76
RK
1025
1026LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o errno.o exit.o \
07fc65c4
GB
1027 raise.o sysdep.o aux-io.o init.o cal.o final.o \
1028 tracebak.o expect.o mkdir.o $(EXTRA_LIBGNAT_OBJS)
84481f76
RK
1029
1030# NOTE ??? - when the -I option for compiling Ada code is made to work,
1031# the library installation will change and there will be a
1032# GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
1033# from ADA_INCLUDE_SRCS.
1034
1035# Objects needed only for tasking
1036GNATRTL_TASKING_OBJS= \
1037 a-dynpri.o \
1038 a-interr.o \
1039 a-intsig.o \
1040 a-intnam.o \
1041 a-reatim.o \
1042 a-retide.o \
1043 a-sytaco.o \
1044 a-taside.o \
1045 g-thread.o \
1046 s-asthan.o \
1047 s-inmaop.o \
1048 s-interr.o \
1049 s-intman.o \
1050 s-osinte.o \
1051 s-proinf.o \
1052 s-taenca.o \
1053 s-taprob.o \
1054 s-taprop.o \
1055 s-tarest.o \
1056 s-tasdeb.o \
1057 s-tasinf.o \
1058 s-tasini.o \
1059 s-taskin.o \
1060 s-taspri.o \
1061 s-tasque.o \
1062 s-tasres.o \
1063 s-tasren.o \
1064 s-tassta.o \
1065 s-tasuti.o \
1066 s-taasde.o \
1067 s-tadeca.o \
1068 s-tadert.o \
1069 s-tataat.o \
1070 s-tpinop.o \
1071 s-tpoben.o \
1072 s-tpobop.o \
07fc65c4
GB
1073 s-tposen.o \
1074 s-tratas.o $(EXTRA_GNATRTL_TASKING_OBJS)
84481f76
RK
1075
1076# Objects needed for non-tasking.
1077GNATRTL_NONTASKING_OBJS= \
1078 a-caldel.o \
1079 a-calend.o \
1080 a-chahan.o \
1081 a-charac.o \
1082 a-chlat1.o \
07fc65c4 1083 a-chlat9.o \
84481f76
RK
1084 a-colien.o \
1085 a-colire.o \
1086 a-comlin.o \
1087 a-cwila1.o \
07fc65c4 1088 a-cwila9.o \
84481f76
RK
1089 a-decima.o \
1090 a-einuoc.o \
1091 a-except.o \
1092 a-exctra.o \
1093 a-filico.o \
1094 a-finali.o \
1095 a-flteio.o \
1096 a-fwteio.o \
1097 a-inteio.o \
1098 a-ioexce.o \
1099 a-iwteio.o \
1100 a-lfteio.o \
1101 a-lfwtio.o \
1102 a-liteio.o \
1103 a-liwtio.o \
1104 a-llftio.o \
1105 a-llfwti.o \
1106 a-llitio.o \
1107 a-lliwti.o \
1108 a-ncelfu.o \
1109 a-nlcefu.o \
1110 a-nlcoty.o \
1111 a-nlelfu.o \
1112 a-nllcef.o \
1113 a-nllcty.o \
1114 a-nllefu.o \
1115 a-nscefu.o \
1116 a-nscoty.o \
1117 a-nselfu.o \
1118 a-nucoty.o \
1119 a-nuelfu.o \
1120 a-nuflra.o \
1121 a-numaux.o \
1122 a-numeri.o \
1123 a-sfteio.o \
1124 a-sfwtio.o \
1125 a-siteio.o \
1126 a-siwtio.o \
1127 a-ssicst.o \
1128 a-ssitio.o \
1129 a-ssiwti.o \
1130 a-stmaco.o \
1131 a-strbou.o \
1132 a-stream.o \
1133 a-strfix.o \
1134 a-string.o \
1135 a-strmap.o \
1136 a-strsea.o \
1137 a-strunb.o \
1138 a-ststio.o \
1139 a-stunau.o \
1140 a-stwibo.o \
1141 a-stwifi.o \
1142 a-stwima.o \
1143 a-stwise.o \
1144 a-stwiun.o \
1145 a-suteio.o \
1146 a-swuwti.o \
1147 a-swmwco.o \
1148 a-tags.o \
1149 a-teioed.o \
1150 a-textio.o \
1151 a-ticoau.o \
1152 a-tideau.o \
1153 a-tienau.o \
1154 a-tiflau.o \
1155 a-tigeau.o \
1156 a-tiinau.o \
1157 a-timoau.o \
1158 a-tiocst.o \
1159 a-titest.o \
1160 a-witeio.o \
1161 a-wtcoau.o \
1162 a-wtcstr.o \
1163 a-wtdeau.o \
1164 a-wtedit.o \
1165 a-wtenau.o \
1166 a-wtflau.o \
1167 a-wtgeau.o \
1168 a-wtinau.o \
1169 a-wtmoau.o \
1170 a-wttest.o \
1171 ada.o \
1172 calendar.o \
1173 g-awk.o \
1174 g-busora.o \
1175 g-calend.o \
1176 g-casuti.o \
1177 g-catiio.o \
1178 g-cgi.o \
1179 g-cgicoo.o \
1180 g-cgideb.o \
1181 g-comlin.o \
cfac6e9f 1182 g-crc32.o \
84481f76
RK
1183 g-curexc.o \
1184 g-debuti.o \
1185 g-debpoo.o \
0873bafc 1186 g-diopit.o \
84481f76
RK
1187 g-dirope.o \
1188 g-except.o \
1189 g-exctra.o \
1190 g-expect.o \
1191 g-flocon.o \
1192 g-hesora.o \
1193 g-htable.o \
1194 g-io.o \
1195 g-io_aux.o \
1196 g-locfil.o \
07fc65c4 1197 g-md5.o \
84481f76
RK
1198 g-moreex.o \
1199 g-os_lib.o \
1200 g-regexp.o \
1201 g-regpat.o \
1202 g-soccon.o \
1203 g-socket.o \
1204 g-socthi.o \
1205 g-soliop.o \
1206 g-souinf.o \
1207 g-speche.o \
1208 g-spipat.o \
1209 g-spitbo.o \
1210 g-sptabo.o \
1211 g-sptain.o \
1212 g-sptavs.o \
1213 g-tasloc.o \
1214 g-traceb.o \
84481f76
RK
1215 gnat.o \
1216 i-c.o \
1217 i-cexten.o \
1218 i-cobol.o \
1219 i-cpp.o \
1220 i-cstrea.o \
1221 i-cstrin.o \
1222 i-fortra.o \
1223 i-pacdec.o \
1224 interfac.o \
1225 ioexcept.o \
1226 machcode.o \
1227 s-addima.o \
1228 s-arit64.o \
1229 s-assert.o \
1230 s-auxdec.o \
1231 s-bitops.o \
1232 s-chepoo.o \
cfac6e9f 1233 s-crc32.o \
84481f76
RK
1234 s-direio.o \
1235 s-errrep.o \
1236 s-except.o \
1237 s-exctab.o \
1238 s-exnflt.o \
1239 s-exngen.o \
1240 s-exnint.o \
1241 s-exnlfl.o \
1242 s-exnlin.o \
1243 s-exnllf.o \
1244 s-exnlli.o \
1245 s-exnsfl.o \
1246 s-exnsin.o \
1247 s-exnssi.o \
1248 s-expflt.o \
1249 s-expgen.o \
1250 s-expint.o \
1251 s-explfl.o \
1252 s-explin.o \
1253 s-expllf.o \
1254 s-explli.o \
1255 s-expllu.o \
1256 s-expmod.o \
1257 s-expsfl.o \
1258 s-expsin.o \
1259 s-expssi.o \
1260 s-expuns.o \
1261 s-fatflt.o \
1262 s-fatlfl.o \
1263 s-fatllf.o \
1264 s-fatsfl.o \
1265 s-ficobl.o \
1266 s-fileio.o \
1267 s-finimp.o \
1268 s-finroo.o \
1269 s-fore.o \
1270 s-imgbiu.o \
1271 s-imgboo.o \
1272 s-imgcha.o \
1273 s-imgdec.o \
1274 s-imgenu.o \
1275 s-imgint.o \
1276 s-imgllb.o \
1277 s-imglld.o \
1278 s-imglli.o \
1279 s-imgllu.o \
1280 s-imgllw.o \
1281 s-imgrea.o \
1282 s-imguns.o \
1283 s-imgwch.o \
1284 s-imgwiu.o \
1285 s-io.o \
1286 s-gloloc.o \
1287 s-maccod.o \
1288 s-mantis.o \
1289 s-mastop.o \
1290 s-osprim.o \
1291 s-pack03.o \
1292 s-pack05.o \
1293 s-pack06.o \
1294 s-pack07.o \
1295 s-pack09.o \
1296 s-pack10.o \
1297 s-pack11.o \
1298 s-pack12.o \
1299 s-pack13.o \
1300 s-pack14.o \
1301 s-pack15.o \
1302 s-pack17.o \
1303 s-pack18.o \
1304 s-pack19.o \
1305 s-pack20.o \
1306 s-pack21.o \
1307 s-pack22.o \
1308 s-pack23.o \
1309 s-pack24.o \
1310 s-pack25.o \
1311 s-pack26.o \
1312 s-pack27.o \
1313 s-pack28.o \
1314 s-pack29.o \
1315 s-pack30.o \
1316 s-pack31.o \
1317 s-pack33.o \
1318 s-pack34.o \
1319 s-pack35.o \
1320 s-pack36.o \
1321 s-pack37.o \
1322 s-pack38.o \
1323 s-pack39.o \
1324 s-pack40.o \
1325 s-pack41.o \
1326 s-pack42.o \
1327 s-pack43.o \
1328 s-pack44.o \
1329 s-pack45.o \
1330 s-pack46.o \
1331 s-pack47.o \
1332 s-pack48.o \
1333 s-pack49.o \
1334 s-pack50.o \
1335 s-pack51.o \
1336 s-pack52.o \
1337 s-pack53.o \
1338 s-pack54.o \
1339 s-pack55.o \
1340 s-pack56.o \
1341 s-pack57.o \
1342 s-pack58.o \
1343 s-pack59.o \
1344 s-pack60.o \
1345 s-pack61.o \
1346 s-pack62.o \
1347 s-pack63.o \
1348 s-parame.o \
1349 s-parint.o \
1350 s-pooglo.o \
1351 s-pooloc.o \
1352 s-poosiz.o \
1353 s-powtab.o \
1354 s-rpc.o \
1355 s-scaval.o \
1356 s-secsta.o \
1357 s-sequio.o \
1358 s-shasto.o \
1359 s-sopco3.o \
1360 s-sopco4.o \
1361 s-sopco5.o \
1362 s-stache.o \
1363 s-stalib.o \
1364 s-stoele.o \
1365 s-stopoo.o \
1366 s-stratt.o \
1367 s-strops.o \
1368 s-soflin.o \
1369 s-memory.o \
1370 s-traceb.o \
07fc65c4 1371 s-traces.o \
84481f76
RK
1372 s-unstyp.o \
1373 s-vaflop.o \
1374 s-valboo.o \
1375 s-valcha.o \
1376 s-valdec.o \
1377 s-valenu.o \
1378 s-valint.o \
1379 s-vallld.o \
1380 s-vallli.o \
1381 s-valllu.o \
1382 s-valrea.o \
1383 s-valuns.o \
1384 s-valuti.o \
1385 s-valwch.o \
1386 s-vercon.o \
1387 s-vmexta.o \
1388 s-wchcnv.o \
1389 s-wchcon.o \
1390 s-wchjis.o \
1391 s-wchstw.o \
1392 s-wchwts.o \
1393 s-widboo.o \
1394 s-widcha.o \
1395 s-widenu.o \
1396 s-widlli.o \
1397 s-widllu.o \
1398 s-widwch.o \
1399 s-wwdcha.o \
1400 s-wwdenu.o \
1401 s-wwdwch.o \
1402 system.o \
1403 text_io.o $(EXTRA_GNATRTL_NONTASKING_OBJS)
1404
07fc65c4 1405GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) g-trasym.o
84481f76
RK
1406
1407# Files which are suitable in no run time/hi integrity mode
1408
1409HIE_SOURCES = \
1410 system.ads \
1411 ada.ads \
1412 a-unccon.ads \
1413 a-uncdea.ads \
1414 gnat.ads \
1415 g-souinf.ads \
1416 interfac.ads \
1417 s-stoele.ads \
1418 s-stoele.adb \
1419 unchconv.ads \
1420 unchdeal.ads \
1421 s-maccod.ads \
1422 s-unstyp.ads \
edc0f304
AC
1423 s-fatgen.ads \
1424 s-fatgen.adb \
1425 s-fatflt.ads \
1426 s-fatlfl.ads \
1427 s-fatllf.ads \
1428 s-fatsfl.ads \
17c5c8a5
GB
1429 s-secsta.ads \
1430 s-secsta.adb \
84481f76
RK
1431 a-tags.ads \
1432 a-tags.adb $(EXTRA_HIE_SOURCES)
1433
1434HIE_OBJS = \
1435 system.o \
1436 ada.o \
1437 a-except.o \
1438 gnat.o \
1439 g-souinf.o \
1440 interfac.o \
1441 i-c.o \
1442 s-stoele.o \
1443 s-maccod.o \
1444 s-unstyp.o \
17c5c8a5
GB
1445 s-fatflt.o \
1446 s-fatlfl.o \
1447 s-fatllf.o \
1448 s-secsta.o \
84481f76
RK
1449 a-tags.o $(EXTRA_HIE_OBJS)
1450
1451# Files which are needed in ravenscar mode
1452
1453RAVEN_SOURCES = \
1454 $(HIE_SOURCES) \
84481f76
RK
1455 s-parame.ads \
1456 s-parame.adb \
1457 g-except.ads \
84481f76
RK
1458 s-osinte.ads \
1459 s-osinte.adb \
1460 s-tasinf.ads \
1461 s-tasinf.adb \
1462 s-taspri.ads \
1463 s-taprop.ads \
1464 s-taprop.adb \
1465 s-taskin.ads \
17c5c8a5 1466 s-taskin.adb \
84481f76
RK
1467 s-interr.ads \
1468 s-interr.adb \
17c5c8a5
GB
1469 a-interr.ads \
1470 a-interr.adb \
1471 a-intnam.ads \
84481f76
RK
1472 a-reatim.ads \
1473 a-reatim.adb \
1474 a-retide.ads \
1475 a-retide.adb \
1476 s-taprob.ads \
1477 s-taprob.adb \
1478 s-tposen.ads \
1479 s-tposen.adb \
1480 s-tasres.ads \
1481 s-tarest.ads \
1482 s-tarest.adb $(EXTRA_RAVEN_SOURCES)
1483
84481f76
RK
1484# Objects to generate for the ravenscar run time
1485
1486RAVEN_OBJS = \
1487 $(HIE_OBJS) \
84481f76 1488 s-parame.o \
17c5c8a5 1489 g-except.o \
84481f76 1490 s-osinte.o \
17c5c8a5 1491 s-tasinf.o \
84481f76
RK
1492 s-taspri.o \
1493 s-taprop.o \
1494 s-taskin.o \
84481f76
RK
1495 s-interr.o \
1496 a-interr.o \
17c5c8a5 1497 a-intnam.o \
84481f76
RK
1498 a-reatim.o \
1499 a-retide.o \
17c5c8a5
GB
1500 s-taprob.o \
1501 s-tposen.o \
84481f76
RK
1502 s-tasres.o \
1503 s-tarest.o $(EXTRA_RAVEN_OBJS)
1504
1505# Default run time files
1506
7d600178
RO
1507ADA_INCLUDE_DIR = $(libsubdir)/adainclude
1508ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
1509
84481f76
RK
1510ADA_INCLUDE_SRCS =\
1511 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
1512 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
1513 sequenio.ads system.ads Makefile.adalib memtrack.adb \
1514 a-*.adb a-*.ads g-*.ad? i-*.ad? \
1515 s-[a-o]*.adb s-[p-z]*.adb \
1516 s-[a-o]*.ads s-[p-z]*.ads
1517
84481f76 1518# Language-independent object files.
07fc65c4
GB
1519LIBGNAT=../rts/libgnat.a
1520TOOLS_FLAGS_TO_PASS= \
1521 "CC=$(CC)" \
1522 "CFLAGS=$(CFLAGS)" \
1523 "LDFLAGS=$(LDFLAGS)" \
1524 "ADAFLAGS=$(ADAFLAGS)" \
1525 "INCLUDES=$(INCLUDES_FOR_SUBDIR)"\
1526 "ADA_INCLUDES=$(ADA_INCLUDES) $(ADA_INCLUDES_FOR_SUBDIR)"\
1527 "libsubdir=$(libsubdir)" \
1528 "exeext=$(exeext)" \
1529 "srcdir=$(fsrcdir)" \
a71742a8 1530 "VPATH=$(fsrcdir)" \
07fc65c4
GB
1531 "TOOLS_LIBS=$(TOOLS_LIBS) $(TGT_LIB)" \
1532 "GNATMAKE=$(GNATMAKE)" \
1533 "GNATLINK=$(GNATLINK)" \
1534 "GNATBIND=$(GNATBIND)"
1535
1536# Build directory for the tools. Let's copy the target dependent
1537# sources using the same mechanism as for gnatlib. The other sources are
1538# accessed using the vpath directive below
1539
1540../stamp-tools:
1541 -$(RM) tools/*
1542 -$(RMDIR) tools
1543 -$(MKDIR) tools
1544 -(cd tools; $(LN_S) ../sdefault.adb .)
1545 -$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
1546 $(RM) tools/$(word 1,$(subst <, ,$(PAIR)));\
1547 $(LN_S) $(fsrcdir)/$(word 2,$(subst <, ,$(PAIR))) \
1548 tools/$(word 1,$(subst <, ,$(PAIR)));)
1549 touch ../stamp-tools
1550
1551# when compiling the tools, the runtime has to be first on the path so that
1552# it hides the runtime files lying with the rest of the sources
1553ifeq ($(TOOLSCASE),native)
1554 vpath %.ads ../rts ../
1555 vpath %.adb ../rts ../
1556 vpath %.c ../rts ../
1557 vpath %.h ../rts ../
1558endif
84481f76 1559
07fc65c4
GB
1560# in the cross tools case, everything is compiled with the native
1561# gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
1562ifeq ($(TOOLSCASE),cross)
1563 vpath %.ads ../
1564 vpath %.adb ../
1565 vpath %.c ../
1566 vpath %.h ../
1567endif
84481f76 1568
07fc65c4
GB
1569# gnatmake/link tools cannot always be built with gnatmake/link for bootstrap
1570# reasons: gnatmake should be built with a recent compiler, a recent compiler
1571# may not generate ALI files compatible with an old gnatmake so it is important
1572# to be able to build gnatmake without a version of gnartmake around. Once
1573# everything has been compiled once, gnatmake can be recompiled with itself
1574# (see target gnattools1-re)
1575gnattools1: ../stamp-tools ../stamp-gnatlib
1576 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1577 TOOLSCASE=native \
1578 ../../gnatmake$(exeext) ../../gnatlink$(exeext) ../../gnatbl$(exeext)
1579
1580# gnatmake/link can be build with recent gnatmake/link if they are available.
1581# This is especially convenient for building cross tools or for rebuilding
1582# the tools when the original bootstrap has already be done.
1583gnattools1-re: ../stamp-tools
1584 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1585 TOOLSCASE=cross INCLUDES="" gnatmake-re gnatlink-re
1586
1587# these tools are built with gnatmake & are common to native and cross
1588gnattools2: ../stamp-tools
1589 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1590 TOOLSCASE=native \
1591 ../../gnatchop$(exeext) ../../gnat$(exeext) ../../gnatkr$(exeext) \
1592 ../../gnatls$(exeext) ../../gnatprep$(exeext) \
1593 ../../gnatpsta$(exeext) ../../gnatxref$(exeext) \
1594 ../../gnatfind$(exeext) ../../gnatname$(exeext)
1595
1596# These tools are only built for the native version.
1597gnattools3: ../stamp-tools
a71742a8
LG
1598# $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
1599# TOOLSCASE=native \
1600# top_builddir=../.. ../../gnatmem$(exeext) $(EXTRA_GNATTOOLS)
07fc65c4
GB
1601
1602../../gnatchop$(exeext):
1603 $(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)"
1604 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatchop
1605 $(GNATLINK) -v gnatchop -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1606 $(TOOLS_LIBS)
1607
1608../../gnat$(exeext):
1609 $(GNATMAKE) -c $(ADA_INCLUDES) gnatcmd --GCC="$(CC) $(ALL_ADAFLAGS)"
1610 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatcmd
1611 $(GNATLINK) -v gnatcmd -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1612 $(TOOLS_LIBS)
1613
1614../../gnatkr$(exeext):
1615 $(GNATMAKE) -c $(ADA_INCLUDES) gnatkr --GCC="$(CC) $(ALL_ADAFLAGS)"
1616 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatkr
1617 $(GNATLINK) -v gnatkr -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1618
1619../../gnatls$(exeext):
1620 $(GNATMAKE) -c $(ADA_INCLUDES) gnatls --GCC="$(CC) $(ALL_ADAFLAGS)"
1621 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatls
1622 $(GNATLINK) -v gnatls -o $@ --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1623
1624../../gnatname$(exeext):
1625 $(GNATMAKE) -c $(ADA_INCLUDES) gnatname --GCC="$(CC) $(ALL_ADAFLAGS)"
1626 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatname
1627 $(GNATLINK) -v gnatname -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1628 $(TOOLS_LIBS)
1629
1630../../gnatprep$(exeext):
1631 $(GNATMAKE) -c $(ADA_INCLUDES) gnatprep --GCC="$(CC) $(ALL_ADAFLAGS)"
1632 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatprep
1633 $(GNATLINK) -v gnatprep -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1634 $(TOOLS_LIBS)
1635
1636../../gnatpsta$(exeext): deftarg.o
1637 $(GNATMAKE) -c $(ADA_INCLUDES) gnatpsta --GCC="$(CC) $(ALL_ADAFLAGS)"
1638 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatpsta
1639 $(GNATLINK) -v gnatpsta -o $@ --GCC="$(CC) $(ADA_INCLUDES)"\
1640 ../targtyps.o deftarg.o $(TOOLS_LIBS)
1641
1642../../gnatxref$(exeext):
1643 $(GNATMAKE) -c $(ADA_INCLUDES) gnatxref --GCC="$(CC) $(ALL_ADAFLAGS)"
1644 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatxref
1645 $(GNATLINK) -v gnatxref -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1646 $(TOOLS_LIBS)
1647
1648../../gnatfind$(exeext):
1649 $(GNATMAKE) -c $(ADA_INCLUDES) gnatfind --GCC="$(CC) $(ALL_ADAFLAGS)"
1650 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatfind
1651 $(GNATLINK) -v gnatfind -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1652 $(TOOLS_LIBS)
1653
1654../../gnatmem$(exeext): gmem.o $(SYMDEPS)
1655 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmem --GCC="$(CC) $(ALL_ADAFLAGS)"
1656 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmem
1657 $(GNATLINK) -v gnatmem -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1658 gmem.o $(SYMLIB) $(TOOLS_LIBS)
1659
1660../../gnatdll$(exeext):
1661 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
1662 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) $(GNATBIND_FLAGS) gnatdll
1663 $(GNATLINK) -v gnatdll -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
1664 $(TOOLS_LIBS)
1665
1666gnatmake-re:
1667 $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
1668 $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
1669 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
1670 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
1671 --GCC="$(CC) $(ADA_INCLUDES)" $(TOOLS_LIBS)
1672
1673# Note the use of the "mv" command in order to allow gnatlink to be linked with
1674# with the former version of gnatlink itself which cannot override itself.
1675gnatlink-re: link.o
1676 $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
1677 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
1678 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
1679 --GCC="$(CC) $(ADA_INCLUDES)" link.o $(TOOLS_LIBS)
1680 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
1681
84481f76
RK
1682
1683# Needs to be built with CC=gcc
1684# Since the RTL should be built with the latest compiler, remove the
1685# stamp target in the parent directory whenever gnat1 is rebuilt
07fc65c4 1686# Likewise for the tools
07fc65c4
GB
1687../../gnatmake$(exeext): $(P) b_gnatm.o $(GNATMAKE_OBJS)
1688 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
1689 $(TOOLS_LIBS)
84481f76 1690
07fc65c4
GB
1691../../gnatlink$(exeext): $(P) b_gnatl.o $(GNATLINK_OBJS)
1692 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
1693 $(TOOLS_LIBS)
84481f76 1694
07fc65c4
GB
1695../../gnatbl$(exeext): gnatbl.o
1696 $(CC) -o $@ $(ALL_CFLAGS) $(LDFLAGS) gnatbl.o $(TOOLS_LIBS)
84481f76 1697
07fc65c4
GB
1698gnatbl.o: gnatbl.c adaint.h
1699 $(CC) $(ALL_CFLAGS) $(INCLUDES) -c $<
1700
84481f76
RK
1701../stamp-gnatlib:
1702 @if [ ! -f stamp-gnatlib ] ; \
1703 then \
1704 $(ECHO) You must first build the GNAT library: make gnatlib; \
1705 false; \
1706 else \
1707 true; \
1708 fi
1709
07fc65c4 1710install-gnatlib: ../stamp-gnatlib
84481f76
RK
1711# Create the directory before deleting it, in case the directory is
1712# a list of directories (as it may be on VMS). This ensures we are
1713# deleting the right one.
1714 -$(MKDIR) $(ADA_RTL_OBJ_DIR)
1715 -$(MKDIR) $(ADA_INCLUDE_DIR)
1716 $(RMDIR) $(ADA_RTL_OBJ_DIR)
1717 $(RMDIR) $(ADA_INCLUDE_DIR)
1718 -$(MKDIR) $(ADA_RTL_OBJ_DIR)
1719 -$(MKDIR) $(ADA_INCLUDE_DIR)
1720 -$(INSTALL_DATA) ada/rts/Makefile.adalib $(ADA_RTL_OBJ_DIR)
1721 for file in ada/rts/*.ali; do \
1722 $(INSTALL_DATA) $$file $(ADA_RTL_OBJ_DIR); \
1723 done
1724 -for file in ada/rts/*$(arext);do \
1725 $(INSTALL_DATA) $$file $(ADA_RTL_OBJ_DIR); \
1726 done
07fc65c4 1727ifeq ($(strip $(filter-out alpha% dec vms% openvms% alphavms%,$(targ))),)
84481f76
RK
1728 -for file in ada/rts/lib*$(soext);do \
1729 $(INSTALL_DATA) $$file $(ADA_RTL_OBJ_DIR); \
1730 done
1731else
1732 -for file in ada/rts/lib*-**$(soext);do \
1733 $(INSTALL_DATA) $$file $(ADA_RTL_OBJ_DIR); \
1734 done
1735endif
07fc65c4 1736 -$(LN_S) $(ADA_RTL_OBJ_DIR)/libgnat-*$(soext) \
84481f76 1737 $(ADA_RTL_OBJ_DIR)/libgnat$(soext)
07fc65c4 1738 -$(LN_S) $(ADA_RTL_OBJ_DIR)/libgnarl-*$(soext) \
84481f76
RK
1739 $(ADA_RTL_OBJ_DIR)/libgnarl$(soext)
1740# This copy must be done preserving the date on the original file.
1741 for file in ada/rts/*.adb ada/rts/*.ads; do \
1742 $(INSTALL_DATA_DATE) $$file $(ADA_INCLUDE_DIR); \
1743 done
1744 cd $(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
1745 cd $(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
1746
1747../stamp-gnatlib2:
1748 $(RM) rts/s-*.ali
1749 $(RM) rts/s-*$(objext)
1750 $(RM) rts/a-*.ali
1751 $(RM) rts/a-*$(objext)
1752 $(RM) rts/*.ali
1753 $(RM) rts/*$(objext)
1754 $(RM) rts/*$(arext)
1755 $(RM) rts/*$(soext)
1756 touch ../stamp-gnatlib2
1757 $(RM) ../stamp-gnatlib
1758
1759# NOTE: The $(foreach ...) commands assume ";" is the valid separator between
1760# successive target commands. Although the Gnu make documentation
1761# implies this is true on all systems, I suspect it may not be, So care
1762# has been taken to allow a sed script to look for ";)" and substitue
1763# for ";" the appropriate character in the range of lines below
1764# beginning with "GNULLI Begin" and ending with "GNULLI End"
1765
1766# GNULLI Begin ###########################################################
1767
1768../stamp-gnatlib1: Makefile ../stamp-gnatlib2
1769 $(RMDIR) rts
1770 $(MKDIR) rts
1771 $(CHMOD) u+w rts
1772# Copy target independent sources
1773 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
1774 $(LN_S) $(fsrcpfx)$(f) rts ;) true
1775# Remove files to be replaced by target dependent sources
1776 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1777 rts/$(word 1,$(subst <, ,$(PAIR))))
1778# Copy new target dependent sources
1779 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
1780 $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1781 rts/$(word 1,$(subst <, ,$(PAIR)));)
1782 $(RM) ../stamp-gnatlib
1783 touch ../stamp-gnatlib1
1784
1785# GNULLI End #############################################################
1786
1787# Don't use semicolon separated shell commands that involve list expansions.
1788# The semicolon triggers a call to DCL on VMS and DCL can't handle command
1789# line lengths in excess of 256 characters.
1790# Example: cd rts; ar rc libfoo.a $(LONG_LIST_OF_OBJS)
1791# is guaranteed to overflow the buffer.
1792
1793gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
1794# ../xgcc -B../ -dD -E ../tconfig.h $(INCLUDES) > rts/tconfig.h
1795 $(MAKE) -C rts CC="../../xgcc -B../../" \
1796 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
07fc65c4 1797 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
84481f76 1798 srcdir=$(fsrcdir) \
07fc65c4 1799 -f ../Makefile $(LIBGNAT_OBJS) prefix.o
84481f76
RK
1800 $(MAKE) -C rts CC="../../xgcc -B../../" \
1801 ADA_INCLUDES="$(ADA_INCLUDES_FOR_SUBDIR)" \
67f28219 1802 CFLAGS="$(GNATLIBCFLAGS)" ADA_CFLAGS="$(GNATLIBCFLAGS)" \
84481f76 1803 ADAFLAGS="$(GNATLIBFLAGS)" \
1d5af871 1804 srcdir=$(fsrcdir) VPATH=$(fsrcdir) \
84481f76
RK
1805 -f ../Makefile \
1806 $(GNATRTL_OBJS)
1807 $(RM) rts/libgnat$(arext) rts/libgnarl$(arext)
1808 $(AR) $(AR_FLAGS) rts/libgnat$(arext) \
07fc65c4 1809 $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) prefix.o)
84481f76
RK
1810 if $(RANLIB_TEST) ; then $(RANLIB) rts/libgnat$(arext); else true; fi
1811 $(AR) $(AR_FLAGS) rts/libgnarl$(arext) \
1812 $(addprefix rts/,$(GNATRTL_TASKING_OBJS))
1813 if $(RANLIB_TEST) ; then $(RANLIB) rts/libgnarl$(arext); else true; fi
1814 ifeq ($(GMEM_LIB),gmemlib)
1815 $(AR) $(AR_FLAGS) rts/libgmem$(arext) rts/memtrack.o;
84481f76
RK
1816 endif
1817 $(CHMOD) a-wx rts/*.ali
1818 touch ../stamp-gnatlib
1819
07fc65c4
GB
1820HIE_NONE_TARGET_PAIRS=\
1821 a-except.ads<1aexcept.ads \
1822 a-except.adb<1aexcept.adb \
1823 a-tags.adb<1atags.adb \
1824 s-secsta.ads<1ssecsta.ads \
1825 s-secsta.adb<1ssecsta.adb \
1826 i-c.ads<1ic.ads
1827
1828HIE_SUBST:='s/High_Integrity_Mode.*/High_Integrity_Mode : constant Boolean := True;/'
1829# This target needs RTS_NAME, RTS_SRCS, RTS_TARGET_PAIRS to be set properly
1830# it creates a rts with the proper structure and the right target dependent srcs
1831prepare-rts:
1832 $(RMDIR) rts-$(RTS_NAME)
1833 $(MKDIR) rts-$(RTS_NAME)
1834 $(CHMOD) u+w rts-$(RTS_NAME)
1835 $(MKDIR) rts-$(RTS_NAME)/adalib
1836 $(MKDIR) rts-$(RTS_NAME)/adainclude
1837 $(CHMOD) u+w rts-$(RTS_NAME)/*
1838 $(LN) $(fsrcpfx)$(RTS_NAME).gpr rts-$(RTS_NAME)
1839# Copy target independent sources
1840 $(foreach f,$(RTS_SRCS), \
1841 $(LN) $(fsrcpfx)$(f) rts-$(RTS_NAME)/adainclude ;) true
1842# Remove files to be replaced by target dependent sources
1843 $(RM) $(foreach PAIR,$(RTS_TARGET_PAIRS), \
1844 rts-$(RTS_NAME)/adainclude/$(word 1,$(subst <, ,$(PAIR))))
1845# Copy new target dependent sources
1846 $(foreach PAIR,$(RTS_TARGET_PAIRS), \
1847 $(LN) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
1848 rts-$(RTS_NAME)/adainclude/$(word 1,$(subst <, ,$(PAIR)));)
1849# change system.High_Integrity_Mode to true for the none & ravenscar rts
1850 ifeq ($(filter-out none ravenscar,$(RTS_NAME)),)
1851 sed -e $(HIE_SUBST) rts-$(RTS_NAME)/adainclude/system.ads \
1852 > dummy
1853 $(MV) dummy rts-$(RTS_NAME)/adainclude/system.ads
1854 endif
1855
1856install-rts: force
1857 $(CP) -r rts-$(RTS_NAME) $(libsubdir)/
1858
1859rts-none: force
1860 $(MAKE) $(FLAGS_TO_PASS) prepare-rts \
1861 RTS_NAME=none RTS_SRCS="$(HIE_SOURCES)" \
1862 RTS_TARGET_PAIRS="$(HIE_NONE_TARGET_PAIRS)"
1863 -$(GNATMAKE) -Prts-none/none.gpr
1864 $(RM) rts-none/adalib/*.o
1865 $(CHMOD) a-wx rts-none/adalib/*.ali
1866
1867rts-ravenscar: force
1868 $(MAKE) $(FLAGS_TO_PASS) prepare-rts \
1869 RTS_NAME=ravenscar RTS_SRCS="$(RAVEN_SOURCES)" \
1870 RTS_TARGET_PAIRS="$(HIE_RAVEN_TARGET_PAIRS)"
1871 -$(GNATMAKE) -Prts-ravenscar/none.gpr
1872 $(CHMOD) a-wx rts-ravenscar/adalib/*.ali
84481f76
RK
1873
1874internal-hielib: ../stamp-gnatlib1
1875 sed -e 's/High_Integrity_Mode.*/High_Integrity_Mode : constant Boolean := True;/' rts/system.ads > rts/s.ads
1876 $(MV) rts/s.ads rts/system.ads
1877 $(MAKE) -C rts CC="../../xgcc -B../../" \
1878 ADA_INCLUDES="$(ADA_INCLUDES_FOR_SUBDIR)" \
1879 CFLAGS="$(GNATLIBCFLAGS)" \
1880 ADAFLAGS="$(GNATLIBFLAGS)" \
1d5af871 1881 srcdir=$(fsrcdir) VPATH=$(fsrcdir) \
84481f76
RK
1882 -f ../Makefile \
1883 $(HIE_OBJS)
1884 $(CHMOD) a-wx rts/*.ali
1885 $(RM) $(addprefix rts/,$(HIE_OBJS))
1886 touch ../stamp-gnatlib
1887
1888hielib:
1889 $(MAKE) ADA_INCLUDE_SRCS="$(HIE_SOURCES)" LIBGNAT_SRCS="" \
1890 LIBGNAT_TARGET_PAIRS="a-except.ads<1aexcept.ads \
1891 a-except.adb<1aexcept.adb \
07fc65c4
GB
1892 a-tags.adb<1atags.adb \
1893 s-secsta.ads<1ssecsta.ads \
1894 s-secsta.adb<1ssecsta.adb \
84481f76
RK
1895 i-c.ads<1ic.ads" internal-hielib
1896
1897internal-ravenlib: ../stamp-gnatlib1
07fc65c4
GB
1898 sed -e 's/High_Integrity_Mode.*/High_Integrity_Mode : constant Boolean := True;/' rts/system.ads > rts/s.ads
1899 $(MV) rts/s.ads rts/system.ads
84481f76
RK
1900 $(MAKE) -C rts CC="../../xgcc -B../../" \
1901 ADA_INCLUDES="$(ADA_INCLUDES_FOR_SUBDIR)" \
1902 CFLAGS="$(GNATLIBCFLAGS)" \
1903 ADAFLAGS="$(GNATLIBFLAGS)" \
1d5af871 1904 srcdir=$(fsrcdir) VPATH=$(fsrcdir) \
84481f76
RK
1905 -f ../Makefile \
1906 $(RAVEN_OBJS)
1907 $(CHMOD) a-wx rts/*.ali
1908 touch ../stamp-gnatlib
1909
1910# Target for building a ravenscar run time for VxWorks/Cert PPC
1911ravenppclib:
1912 $(MAKE) ADA_INCLUDE_SRCS="$(RAVEN_SOURCES)" LIBGNAT_SRCS="" \
1913 LIBGNAT_TARGET_PAIRS="a-except.ads<1aexcept.ads \
1914 a-except.adb<1aexcept.adb \
07fc65c4
GB
1915 a-tags.adb<1atags.adb \
1916 s-secsta.ads<1ssecsta.ads \
1917 s-secsta.adb<1ssecsta.adb \
84481f76 1918 i-c.ads<1ic.ads \
07fc65c4
GB
1919 a-reatim.ads<1areatim.ads \
1920 a-reatim.adb<1areatim.adb \
1921 a-retide.adb<1aretide.adb \
84481f76
RK
1922 a-interr.adb<1ainterr.adb \
1923 s-interr.ads<1sinterr.ads \
1924 s-interr.adb<1sinterr.adb \
07fc65c4
GB
1925 s-taskin.ads<1staskin.ads \
1926 s-taskin.adb<1staskin.adb \
1927 s-tarest.adb<1starest.adb \
1928 s-tposen.ads<1stposen.ads \
1929 s-tposen.adb<1stposen.adb \
1930 s-osinte.adb<1sosinte.adb \
84481f76
RK
1931 s-taprop.ads<1staprop.ads \
1932 s-taprop.adb<1staprop.adb \
1933 a-sytaco.ads<1asytaco.ads \
1934 a-sytaco.adb<1asytaco.adb \
1935 a-intnam.ads<4zintnam.ads \
1936 s-osinte.adb<5zosinte.adb \
1937 s-osinte.ads<5zosinte.ads \
1938 s-taspri.ads<5ztaspri.ads \
1939 s-vxwork.ads<5pvxwork.ads \
1940 system.ads<5ysystem.ads" internal-ravenlib
1941
84481f76
RK
1942# Warning: this target assumes that LIBRARY_VERSION has been set correctly.
1943gnatlib-shared-default:
1944 $(MAKE) $(FLAGS_TO_PASS) \
1945 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1946 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
1947 THREAD_KIND="$(THREAD_KIND)" \
1948 gnatlib
1949 $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
1950 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
07fc65c4
GB
1951 -o libgnat-$(LIBRARY_VERSION)$(soext) \
1952 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
1953 $(SO_OPTS)libgnat-$(LIBRARY_VERSION)$(soext) $(MISCLIB) -lm
84481f76 1954 cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
07fc65c4
GB
1955 -o libgnarl-$(LIBRARY_VERSION)$(soext) \
1956 $(GNATRTL_TASKING_OBJS) \
1957 $(SO_OPTS)libgnarl-$(LIBRARY_VERSION)$(soext) $(THREADSLIB)
1958 cd rts; $(LN_S) libgnat-$(LIBRARY_VERSION)$(soext) libgnat$(soext)
1959 cd rts; $(LN_S) libgnarl-$(LIBRARY_VERSION)$(soext) libgnarl$(soext)
84481f76
RK
1960
1961gnatlib-shared-dual:
1962 $(MAKE) $(FLAGS_TO_PASS) \
1963 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1964 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1965 THREAD_KIND="$(THREAD_KIND)" \
1966 gnatlib
1967 $(MV) rts/libgnat$(arext) rts/libgnarl$(arext) .
1968 $(RM) ../stamp-gnatlib2
1969 $(MAKE) $(FLAGS_TO_PASS) \
1970 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1971 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1972 THREAD_KIND="$(THREAD_KIND)" \
1973 gnatlib-shared-default
1974 $(MV) libgnat$(arext) libgnarl$(arext) rts
1975
1976gnatlib-shared-vms:
1977 $(MAKE) $(FLAGS_TO_PASS) \
1978 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
1979 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
1980 THREAD_KIND="$(THREAD_KIND)" \
1981 gnatlib
1982 $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
1983 rm -f rts/*.sym rts/gnatlib_symvec.opt
1984 make -C rts -f ../Makefile.vms \
1985 $(patsubst %.obj,%.sym,$(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS))
1986 append /new [.rts]*.sym [.rts]gnatlib_symvec.opt
1987 ../xgcc.exe -g -B../ -nostartfiles -shared --for-linker=/noinform \
1988 -o rts/libgnat.exe rts/libgnat.olb \
1989 --for-linker=rts/gnatlib_symvec.opt \
1990 --for-linker=gsmatch=equal,YY,MMDD
1991 rm -f rts/*.sym rts/gnatlib_symvec.opt
1992 make -C rts -f ../Makefile.vms \
1993 $(patsubst %.obj,%.sym,$(GNATRTL_TASKING_OBJS))
1994 append /new [.rts]*.sym [.rts]gnatlib_symvec.opt
1995 ../xgcc.exe -g -B../ -nostartfiles -shared --for-linker=/noinform \
1996 -o rts/libgnarl.exe rts/libgnarl.olb rts/libgnat.exe \
1997 --for-linker=rts/gnatlib_symvec.opt \
1998 --for-linker=gsmatch=equal,YY,MMDD
1999
2000gnatlib-shared:
2001 $(MAKE) $(FLAGS_TO_PASS) \
2002 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2003 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2004 THREAD_KIND="$(THREAD_KIND)" \
07fc65c4 2005 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
84481f76
RK
2006 $(GNATLIB_SHARED)
2007
2008# .s files for cross-building
2009gnat-cross: force
2010 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp" \
2011 HOST_CFLAGS= HOST_CC=cc
2012
2013# Compiling object files from source files.
2014
84481f76
RK
2015# Ada language specific files.
2016
84481f76
RK
2017b_gnatl.c : $(GNATLINK_OBJS)
2018 $(GNATBIND) $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
2019b_gnatl.o : b_gnatl.c
2020
84481f76
RK
2021b_gnatm.c : $(GNATMAKE_OBJS)
2022 $(GNATBIND) $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
2023b_gnatm.o : b_gnatm.c
2024
84481f76
RK
2025# force debugging information on s-tasdeb.o so that it is always
2026# possible to set conditional breakpoints on tasks.
2027
2028s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
67f28219 2029 $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) $<
84481f76
RK
2030
2031# force debugging information on s-vaflop.o so that it is always
2032# possible to call the VAX float debug print routines.
2033# force at least -O so that the inline assembly works.
2034
2035s-vaflop.o : s-vaflop.adb s-vaflop.ads
67f28219
ZW
2036 $(ADAC) -c -O $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2037 $(ADA_INCLUDES) $<
84481f76
RK
2038
2039# force debugging information on a-except.o so that it is always
2040# possible to set conditional breakpoints on exceptions.
2041# use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2042
2043a-except.o : a-except.adb a-except.ads
67f28219 2044 $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
84481f76
RK
2045 $(ADA_INCLUDES) $<
2046
2047# force debugging information on s-assert.o so that it is always
2048# possible to set breakpoint on assert failures.
2049
2050s-assert.o : s-assert.adb s-assert.ads a-except.ads
67f28219
ZW
2051 $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 \
2052 $(ADA_INCLUDES) $<
84481f76 2053
07fc65c4
GB
2054mdll.o : mdll.adb mdll.ads mdll-file.ads mdll-utl.ads
2055 $(CC) -c $(ALL_ADAFLAGS) -O2 $(ADA_INCLUDES) $<
84481f76 2056
07fc65c4
GB
2057mdll-fil.o : mdll-fil.adb mdll.ads mdll-fil.ads
2058 $(CC) -c $(ALL_ADAFLAGS) -O2 $(ADA_INCLUDES) $<
84481f76 2059
07fc65c4
GB
2060mdll-utl.o : mdll-utl.adb mdll.ads mdll-utl.ads sdefault.ads types.ads
2061 $(CC) -c $(ALL_ADAFLAGS) -O2 $(ADA_INCLUDES) $<
2062
84481f76
RK
2063# force debugging information and no optimization on s-memory.o so that it
2064# is always possible to set breakpoint on __gnat_malloc and __gnat_free
2065# this is important for gnatmem using GDB. memtrack.o is built from
2066# memtrack.adb, and used by the post-mortem analysis with gnatmem.
2067
2068s-memory.o : s-memory.adb s-memory.ads memtrack.o
67f28219 2069 $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
07fc65c4 2070 $(ADA_INCLUDES) $<
84481f76
RK
2071
2072memtrack.o : memtrack.adb s-memory.ads
67f28219 2073 $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
07fc65c4 2074 $(ADA_INCLUDES) $<
84481f76
RK
2075
2076# Need to keep the frame pointer in this file to pop the stack properly on
2077# some targets.
2078
07fc65c4
GB
2079traceb.o : traceb.c
2080 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2081 $<
84481f76 2082
07fc65c4 2083
07fc65c4 2084aux-io.o : aux-io.c
84481f76
RK
2085argv.o : argv.c
2086cal.o : cal.c
84481f76
RK
2087deftarg.o : deftarg.c
2088errno.o : errno.c
2089exit.o : raise.h exit.c
07fc65c4 2090expect.o : expect.c
84481f76
RK
2091final.o : raise.h final.c
2092gmem.o : gmem.c
07fc65c4
GB
2093link.o : link.c
2094mkdir.o : mkdir.c
2095sysdep.o : sysdep.c
84481f76 2096
07fc65c4 2097cio.o : cio.c
b303008e 2098 $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(RT_FLAGS) \
07fc65c4 2099 $(ALL_CPPFLAGS) $(INCLUDES) $<
84481f76 2100
84481f76 2101init.o : init.c ada.h types.h raise.h
b303008e 2102 $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(RT_FLAGS) \
07fc65c4
GB
2103 $(ALL_CPPFLAGS) $(INCLUDES) $<
2104
2105raise.o : raise.c raise.h
b303008e 2106 $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(RT_FLAGS) \
07fc65c4 2107 $(ALL_CPPFLAGS) $(INCLUDES) $<
84481f76 2108
07fc65c4
GB
2109# Need to keep the frame pointer in this file to pop the stack properly on
2110# some targets.
2111tracebak.o : tracebak.c
b303008e 2112 $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
07fc65c4 2113 -fno-omit-frame-pointer $<
84481f76 2114
84481f76
RK
2115targtyps.o : targtyps.c $(CONFIG_H) ada.h types.h atree.h nlists.h elists.h \
2116 uintp.h sinfo.h einfo.h namet.h snames.h stringt.h urealp.h fe.h \
2117 $(ADA_TREE_H) gigi.h
2118
07fc65c4
GB
2119# Rule to compile prefix.o for the run-time.
2120
2121prefix.o : $(srcdir)/../prefix.c
b303008e 2122 $(CC) -c $(ALL_CFLAGS) $(ALL_ADA_CFLAGS) $(RT_FLAGS) \
07fc65c4
GB
2123 $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/../.. -I../.. \
2124 -DPREFIX=\"$(prefix)\" $<
2125
2126# In GNU Make, ignore whether `stage*' exists.
2127.PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2128.PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2129
2130force:
2131
2132# Gnatlbr is only used on VMS
2133
2134GNATLBR_RTL_C_OBJS = adaint.o argv.o cio.o cstreams.o exit.o final.o init.o \
2135 raise.o sysdep.o tracebak.o
2136GNATLBR_C_OBJS = $(GNATLBR_RTL_C_OBJS)
84481f76 2137
07fc65c4
GB
2138../gnatlbr$(exeext):: sdefault.o $(GNATLBR_C_OBJS) $(EXTRA_GNATTOOLS_OBJS)
2139 $(RM) $@
2140../gnatlbr$(exeext):: force
2141 $(GNATMAKE) -a --GCC="$(CC)" $(ALL_ADAFLAGS) $(ADA_INCLUDES) \
2142 --GNATBIND="$(GNATBIND)" --GNATLINK="$(GNATLINK)" \
2143 -nostdlib $(fsrcpfx)gnatlbr -o $@ \
2144 -largs --GCC="$(CC) $(ALL_CFLAGS) $(LDFLAGS)" \
2145 $(GNATLBR_C_OBJS) $(EXTRA_GNATTOOLS_OBJS)
84481f76 2146
This page took 0.424285 seconds and 5 git commands to generate.