OSDN Git Service

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