]>
Commit | Line | Data |
---|---|---|
84481f76 | 1 | # Makefile for GNU Ada Compiler (GNAT). |
74a22497 | 2 | # Copyright (C) 1994-2005 Free Software Foundation, Inc. |
84481f76 | 3 | |
08e247b1 | 4 | #This file is part of GCC. |
84481f76 | 5 | |
08e247b1 | 6 | #GCC is free software; you can redistribute it and/or modify |
84481f76 RK |
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 | ||
08e247b1 | 11 | #GCC is distributed in the hope that it will be useful, |
84481f76 RK |
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 | |
08e247b1 | 17 | #along with GCC; 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. | |
fbf5a39b | 22 | # Its purpose is to provide support for: |
84481f76 RK |
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. | |
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 | ||
b303008e JDA |
85 | X_ADA_CFLAGS = |
86 | T_ADA_CFLAGS = | |
87 | ||
67f28219 ZW |
88 | X_ADAFLAGS = |
89 | T_ADAFLAGS = | |
90 | ||
84481f76 | 91 | CC = cc |
fbf5a39b AC |
92 | BISON = bison |
93 | BISONFLAGS = | |
94 | ECHO = echo | |
95 | LEX = flex | |
96 | LEXFLAGS = | |
97 | CHMOD = chmod | |
98 | LN = ln | |
99 | LN_S = ln -s | |
100 | CP = cp -p | |
101 | MV = mv -f | |
102 | RM = rm -f | |
103 | RMDIR = rm -rf | |
104 | MKDIR = mkdir -p | |
105 | AR = ar | |
106 | AR_FLAGS = rc | |
107 | LS = ls | |
5a944040 | 108 | RANLIB = @RANLIB@ |
110aba14 | 109 | RANLIB_FLAGS = @ranlib_flags@ |
67f28219 | 110 | |
b41e09a7 | 111 | SHELL = @SHELL@ |
8c90b13a | 112 | PWD_COMMAND = $${PWDCMD-pwd} |
84481f76 RK |
113 | # How to copy preserving the date |
114 | INSTALL_DATA_DATE = cp -p | |
115 | MAKEINFO = makeinfo | |
116 | TEXI2DVI = texi2dvi | |
fbf5a39b | 117 | GNATBIND = $(STAGE_PREFIX)gnatbind |
07fc65c4 | 118 | GNATBIND_FLAGS = -static -x |
84481f76 | 119 | ADA_CFLAGS = |
67f28219 | 120 | ADAFLAGS = -W -Wall -gnatpg -gnata |
84481f76 RK |
121 | SOME_ADAFLAGS =-gnata |
122 | FORCE_DEBUG_ADAFLAGS = -g | |
a336eaca | 123 | GNATLIBFLAGS = -gnatpg -nostdinc |
07fc65c4 GB |
124 | GNATLIBCFLAGS = -g -O2 |
125 | GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \ | |
126 | -DIN_RTS | |
b303008e JDA |
127 | ALL_ADA_CFLAGS = $(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS) |
128 | ALL_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \ | |
129 | $(ADAFLAGS) | |
130 | MOST_ADAFLAGS = $(CFLAGS) $(ALL_ADA_CFLAGS) $(X_ADAFLAGS) $(T_ADAFLAGS) \ | |
131 | $(SOME_ADAFLAGS) | |
07fc65c4 GB |
132 | THREAD_KIND = native |
133 | THREADSLIB = | |
134 | GMEM_LIB = | |
84481f76 | 135 | MISCLIB = |
fbf5a39b AC |
136 | SYMDEPS = $(LIBINTL_DEP) |
137 | OUTPUT_OPTION = @OUTPUT_OPTION@ | |
84481f76 RK |
138 | |
139 | objext = .o | |
140 | exeext = | |
141 | arext = .a | |
142 | soext = .so | |
143 | shext = | |
adc04486 | 144 | hyphen = - |
84481f76 | 145 | |
84481f76 RK |
146 | # Define this as & to perform parallel make on a Sequent. |
147 | # Note that this has some bugs, and it seems currently necessary | |
148 | # to compile all the gen* files first by hand to avoid erroneous results. | |
149 | P = | |
150 | ||
151 | # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET. | |
152 | # It omits XCFLAGS, and specifies -B./. | |
153 | # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler. | |
07fc65c4 | 154 | GCC_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) |
84481f76 RK |
155 | |
156 | # Tools to use when building a cross-compiler. | |
157 | # These are used because `configure' appends `cross-make' | |
158 | # to the makefile when making a cross-compiler. | |
159 | ||
160 | # We don't use cross-make. Instead we use the tools from the build tree, | |
161 | # if they are available. | |
162 | # program_transform_name and objdir are set by configure.in. | |
163 | program_transform_name = | |
164 | objdir = . | |
165 | ||
3536d406 | 166 | target_alias=@target_alias@ |
84481f76 | 167 | target=@target@ |
2ed26f6b ZW |
168 | xmake_file = @xmake_file@ |
169 | tmake_file = @tmake_file@ | |
4665e56c | 170 | host_canonical=@host@ |
84481f76 RK |
171 | #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c` |
172 | #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c` | |
173 | ||
174 | # Directory where sources are, from where we are. | |
175 | srcdir = @srcdir@ | |
fbf5a39b | 176 | VPATH = $(srcdir) |
84481f76 | 177 | |
8c90b13a L |
178 | fsrcdir := $(shell cd $(srcdir);${PWD_COMMAND}) |
179 | fsrcpfx := $(shell cd $(srcdir);${PWD_COMMAND})/ | |
180 | fcurdir := $(shell ${PWD_COMMAND}) | |
181 | fcurpfx := $(shell ${PWD_COMMAND})/ | |
84481f76 RK |
182 | |
183 | # Top build directory, relative to here. | |
fbf5a39b | 184 | top_builddir = ../.. |
84481f76 RK |
185 | |
186 | # Internationalization library. | |
fbf5a39b AC |
187 | LIBINTL = @LIBINTL@ |
188 | LIBINTL_DEP = @LIBINTL_DEP@ | |
84481f76 RK |
189 | |
190 | # Any system libraries needed just for GNAT. | |
191 | SYSLIBS = @GNAT_LIBEXC@ | |
192 | ||
84481f76 | 193 | # List of extra object files linked in with various programs. |
fbf5a39b | 194 | EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o |
84481f76 | 195 | |
fbf5a39b AC |
196 | # List of target dependent sources, overridden below as necessary |
197 | TARGET_ADA_SRCS = | |
198 | ||
199 | # Type of tools build we are doing; default is not compiling tools. | |
200 | TOOLSCASE = | |
201 | ||
84481f76 RK |
202 | # End of variables for you to override. |
203 | ||
84481f76 RK |
204 | all: all.indirect |
205 | ||
206 | # This tells GNU Make version 3 not to put all variables in the environment. | |
207 | .NOEXPORT: | |
208 | ||
2ed26f6b ZW |
209 | # tmake_file and xmake_file expand to lists with entries of the form |
210 | # $(srcdir)/config/... but here $(srcdir) is the ada subdirectory so we | |
211 | # need to adjust the paths. There can't be spaces in the subst arguments | |
212 | # or we get spurious spaces in the actual list of files to include. | |
84481f76 | 213 | |
2ed26f6b ZW |
214 | # target overrides |
215 | ifneq ($(tmake_file),) | |
216 | include $(subst /config,/../config,$(tmake_file)) | |
217 | endif | |
218 | ||
219 | # host overrides | |
220 | ifneq ($(xmake_file),) | |
221 | include $(subst /config,/../config,$(xmake_file)) | |
222 | endif | |
84481f76 RK |
223 | \f |
224 | # Now figure out from those variables how to compile and link. | |
225 | ||
226 | all.indirect: Makefile ../gnat1$(exeext) | |
227 | ||
a078a589 ZW |
228 | # IN_GCC distinguishes between code compiled into GCC itself and other |
229 | # programs built during a bootstrap. | |
230 | # autoconf inserts -DCROSS_COMPILE if we are building a cross compiler. | |
231 | INTERNAL_CFLAGS = @CROSS@ -DIN_GCC | |
84481f76 RK |
232 | |
233 | # This is the variable actually used when we compile. | |
234 | LOOSE_CFLAGS = `echo $(CFLAGS) $(WARN2_CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'` | |
235 | ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS) \ | |
236 | $(XCFLAGS) | |
237 | ||
238 | # Likewise. | |
239 | ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) | |
240 | ||
c625c898 KC |
241 | # This is where we get libiberty.a from. |
242 | LIBIBERTY = ../../libiberty/libiberty.a | |
84481f76 RK |
243 | |
244 | # How to link with both our special library facilities | |
245 | # and the system's installed libraries. | |
fbf5a39b AC |
246 | LIBS = $(LIBINTL) $(LIBIBERTY) $(SYSLIBS) |
247 | LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY) | |
c625c898 | 248 | TOOLS_LIBS = $(LIBGNAT) $(EXTRA_GNATTOOLS_OBJS) link.o ../../../libiberty/libiberty.a $(SYSLIBS) |
84481f76 RK |
249 | |
250 | # Specify the directories to be searched for header files. | |
251 | # Both . and srcdir are used, in that order, | |
252 | # so that tm.h and config.h will be found in the compilation | |
253 | # subdirectory rather than in the source directory. | |
254 | INCLUDES = -I- -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config \ | |
255 | -I$(srcdir)/../../include | |
256 | ||
257 | ADA_INCLUDES = -I- -I. -I$(srcdir) | |
258 | ||
fbf5a39b AC |
259 | INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir) -I$(fsrcdir)/../config \ |
260 | -I$(fsrcdir)/../../include -I$(fsrcdir)/.. | |
84481f76 RK |
261 | ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir) |
262 | ||
263 | # Avoid a lot of time thinking about remaking Makefile.in and *.def. | |
264 | .SUFFIXES: .in .def | |
265 | ||
266 | # Say how to compile Ada programs. | |
fbf5a39b | 267 | .SUFFIXES: .ada .adb .ads .asm |
84481f76 RK |
268 | |
269 | # Always use -I$(srcdir)/config when compiling. | |
fbf5a39b AC |
270 | .asm.o: |
271 | $(CC) -c -x assembler $< $(OUTPUT_OPTION) | |
272 | ||
84481f76 | 273 | .c.o: |
fbf5a39b AC |
274 | $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< \ |
275 | $(OUTPUT_OPTION) | |
276 | ||
84481f76 | 277 | .adb.o: |
fbf5a39b AC |
278 | $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION) |
279 | ||
84481f76 | 280 | .ads.o: |
fbf5a39b | 281 | $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION) |
84481f76 | 282 | |
2ed26f6b ZW |
283 | # how to regenerate this file |
284 | Makefile: ../config.status $(srcdir)/Makefile.in $(srcdir)/../version.c | |
285 | cd ..; \ | |
286 | LANGUAGES="$(CONFIG_LANGUAGES)" \ | |
287 | CONFIG_HEADERS= \ | |
288 | CONFIG_FILES=ada/Makefile $(SHELL) config.status | |
289 | ||
84481f76 RK |
290 | # This tells GNU make version 3 not to export all the variables |
291 | # defined in this file into the environment. | |
292 | .NOEXPORT: | |
293 | \f | |
294 | # Lists of files for various purposes. | |
295 | ||
af4b9434 | 296 | GNATLINK_OBJS = gnatlink.o \ |
7324bf49 | 297 | a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o gnatvsn.o \ |
5d09245e | 298 | hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o osint.o output.o rident.o \ |
7324bf49 AC |
299 | s-exctab.o s-secsta.o s-stalib.o s-stoele.o sdefault.o stylesw.o switch.o system.o \ |
300 | table.o tree_io.o types.o validsw.o widechar.o | |
84481f76 | 301 | |
7324bf49 | 302 | GNATMAKE_OBJS = a-except.o ctrl_c.o ali.o ali-util.o s-casuti.o \ |
fbf5a39b AC |
303 | alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\ |
304 | erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \ | |
af4b9434 | 305 | gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \ |
7324bf49 | 306 | make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-utl.o \ |
07fc65c4 | 307 | namet.o nlists.o opt.o osint.o osint-m.o output.o \ |
c885d7a1 | 308 | prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o prj-err.o prj-ext.o prj-nmsc.o \ |
84481f76 | 309 | prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \ |
7324bf49 AC |
310 | rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \ |
311 | scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o \ | |
fbf5a39b | 312 | sinfo.o sinput.o sinput-c.o sinput-p.o \ |
7324bf49 | 313 | snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o switch.o switch-m.o \ |
fbf5a39b AC |
314 | table.o targparm.o tempdir.o tree_io.o types.o \ |
315 | uintp.o uname.o urealp.o usage.o widechar.o \ | |
316 | $(EXTRA_GNATMAKE_OBJS) | |
84481f76 RK |
317 | |
318 | # Convert the target variable into a space separated list of architecture, | |
319 | # manufacturer, and operating system and assign each of those to its own | |
320 | # variable. | |
321 | ||
07fc65c4 | 322 | host:=$(subst -, ,$(host_canonical)) |
84481f76 RK |
323 | targ:=$(subst -, ,$(target)) |
324 | arch:=$(word 1,$(targ)) | |
325 | ifeq ($(words $(targ)),2) | |
326 | manu:= | |
327 | osys:=$(word 2,$(targ)) | |
328 | else | |
329 | manu:=$(word 2,$(targ)) | |
330 | osys:=$(word 3,$(targ)) | |
331 | endif | |
332 | ||
333 | # LIBGNAT_TARGET_PAIRS is a list of pairs of filenames. | |
334 | # The members of each pair must be separated by a '<' and no whitespace. | |
335 | # Each pair must be separated by some amount of whitespace from the following | |
336 | # pair. | |
337 | ||
338 | # Non-tasking case: | |
339 | ||
340 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
341 | a-intnam.ads<a-intnam-dummy.ads \ |
342 | s-inmaop.adb<s-inmaop-dummy.adb \ | |
343 | s-intman.adb<s-intman-dummy.adb \ | |
344 | s-osinte.ads<s-osinte-dummy.ads \ | |
345 | s-osprim.adb<s-osprim-posix.adb \ | |
346 | s-taprop.adb<s-taprop-dummy.adb \ | |
347 | s-taspri.ads<s-taspri-dummy.ads | |
84481f76 RK |
348 | |
349 | # Default shared object option. Note that we rely on the fact that the "soname" | |
350 | # option will always be present and last in this flag, so that we can have | |
351 | # $(SO_OPTS)libgnat-x.xx | |
352 | ||
07fc65c4 | 353 | SO_OPTS = -Wl,-soname, |
84481f76 RK |
354 | |
355 | # Default gnatlib-shared target. | |
fbf5a39b AC |
356 | # By default, equivalent to gnatlib. |
357 | # Set to gnatlib-shared-default, gnatlib-shared-dual, or a platform specific | |
358 | # target when supported. | |
359 | GNATLIB_SHARED = gnatlib | |
84481f76 | 360 | |
44d6a706 | 361 | # default value for gnatmake's target dependent file |
07fc65c4 | 362 | MLIB_TGT = mlib-tgt |
84481f76 | 363 | |
fbf5a39b AC |
364 | # By default, do not distribute prefix.o (in libgccprefix), since it is only |
365 | # needed by external GNAT tools such as gnatdist and Glide. | |
366 | # Override this variable on native platforms when needed. | |
367 | PREFIX_OBJS = | |
368 | ||
369 | # To avoid duplicate code, use this variable to set PREFIX_OBJS when needed: | |
370 | PREFIX_REAL_OBJS = ../prefix.o \ | |
371 | ../../libiberty/concat.o \ | |
372 | ../../libiberty/xmalloc.o \ | |
373 | ../../libiberty/xstrdup.o \ | |
374 | ../../libiberty/xexit.o | |
375 | ||
efdfd311 AC |
376 | LIB_VERSION = $(strip $(shell grep ' Library_Version :' $(fsrcpfx)gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/')) |
377 | ||
84481f76 RK |
378 | # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT. |
379 | # $(strip STRING) removes leading and trailing spaces from STRING. | |
380 | # If what's left is null then it's a match. | |
381 | ||
382 | ifeq ($(strip $(filter-out %86 os2 OS2 os2_emx,$(arch) $(osys))),) | |
383 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
384 | a-excpol.adb<a-excpol-abort.adb \ |
385 | a-intnam.ads<a-intnam-dummy.ads \ | |
386 | a-numaux.adb<a-numaux-x86.adb \ | |
387 | a-numaux.ads<a-numaux-x86.ads \ | |
388 | s-inmaop.adb<s-inmaop-dummy.adb \ | |
389 | s-interr.adb<s-interr-dummy.adb \ | |
390 | s-intman.adb<s-intman-dummy.adb \ | |
391 | s-mastop.adb<s-mastop-x86.adb \ | |
392 | s-osinte.adb<s-osinte-os2.adb \ | |
393 | s-osinte.ads<s-osinte-os2.ads \ | |
394 | s-osprim.adb<s-osprim-os2.adb \ | |
395 | s-parame.adb<s-parame-os2.adb \ | |
396 | system.ads<system-os2.ads \ | |
397 | s-taprop.adb<s-taprop-os2.adb \ | |
398 | s-taspri.ads<s-taspri-os2.ads | |
84481f76 RK |
399 | |
400 | EXTRA_GNATRTL_NONTASKING_OBJS = \ | |
401 | i-os2err.o \ | |
402 | i-os2lib.o \ | |
403 | i-os2syn.o \ | |
404 | i-os2thr.o | |
405 | endif | |
406 | ||
07fc65c4 | 407 | ifeq ($(strip $(filter-out %86 interix%,$(arch) $(osys))),) |
84481f76 | 408 | LIBGNAT_TARGET_PAIRS = \ |
084c663c AC |
409 | a-excpol.adb<a-excpol-interix.adb \ |
410 | a-intnam.ads<a-intnam-interix.ads \ | |
411 | a-numaux.adb<a-numaux-x86.adb \ | |
412 | a-numaux.ads<a-numaux-x86.ads \ | |
413 | g-soccon.ads<g-soccon-interix.ads \ | |
414 | s-inmaop.adb<s-inmaop-posix.adb \ | |
415 | s-intman.adb<s-intman-posix.adb \ | |
416 | s-mastop.adb<s-mastop-x86.adb \ | |
417 | s-osinte.adb<s-osinte-fsu.adb \ | |
418 | s-osinte.ads<s-osinte-interix.ads \ | |
419 | s-osprim.adb<s-osprim-unix.adb \ | |
420 | s-taprop.adb<s-taprop-posix.adb \ | |
421 | system.ads<system-interix.ads \ | |
422 | s-taspri.ads<s-taspri-posix.ads \ | |
423 | s-tpopsp.adb<s-tpopsp-posix.adb | |
84481f76 | 424 | |
07fc65c4 | 425 | THREADSLIB = -lgthreads -lmalloc |
fbf5a39b | 426 | PREFIX_OBJS=$(PREFIX_REAL_OBJS) |
84481f76 RK |
427 | endif |
428 | ||
429 | # sysv5uw is SCO UnixWare 7 | |
430 | ifeq ($(strip $(filter-out %86 sysv5uw%,$(arch) $(osys))),) | |
431 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
432 | a-excpol.adb<a-excpol-abort.adb \ |
433 | a-intnam.ads<a-intnam-unixware.ads \ | |
434 | a-numaux.adb<a-numaux-x86.adb \ | |
435 | a-numaux.ads<a-numaux-x86.ads \ | |
436 | s-inmaop.adb<s-inmaop-posix.adb \ | |
437 | s-intman.adb<s-intman-posix.adb \ | |
438 | s-mastop.adb<s-mastop-x86.adb \ | |
439 | s-osinte.ads<s-osinte-unixware.ads \ | |
440 | s-osinte.adb<s-osinte-unixware.adb \ | |
441 | s-osprim.adb<s-osprim-unix.adb \ | |
442 | s-taprop.adb<s-taprop-posix.adb \ | |
443 | s-taspri.ads<s-taspri-posix.ads \ | |
444 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ | |
445 | system.ads<system-unixware.ads \ | |
446 | g-soccon.ads<g-soccon-unixware.ads \ | |
447 | g-soliop.ads<g-soliop-unixware.ads | |
84481f76 | 448 | |
07fc65c4 | 449 | THREADSLIB = -lthread |
fbf5a39b | 450 | PREFIX_OBJS=$(PREFIX_REAL_OBJS) |
07fc65c4 GB |
451 | SO_OPTS = -Wl,-h, |
452 | GNATLIB_SHARED = gnatlib-shared-dual | |
efdfd311 | 453 | LIBRARY_VERSION := $(LIB_VERSION) |
84481f76 RK |
454 | endif |
455 | ||
84481f76 RK |
456 | ifeq ($(strip $(filter-out alpha% dec vx%,$(targ))),) |
457 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
458 | a-sytaco.ads<a-sytaco-vxworks.ads \ |
459 | a-sytaco.adb<a-sytaco-vxworks.adb \ | |
460 | a-intnam.ads<a-intnam-vxworks.ads \ | |
461 | a-numaux.ads<a-numaux-vxworks.ads \ | |
462 | s-inmaop.adb<s-inmaop-posix.adb \ | |
463 | s-interr.adb<s-interr-vxworks.adb \ | |
464 | s-intman.ads<s-intman-vxworks.ads \ | |
465 | s-intman.adb<s-intman-vxworks.adb \ | |
466 | s-osinte.adb<s-osinte-vxworks.adb \ | |
467 | s-osinte.ads<s-osinte-vxworks.ads \ | |
468 | s-osprim.adb<s-osprim-vxworks.adb \ | |
469 | s-parame.ads<s-parame-vxworks.ads \ | |
470 | s-stchop.adb<s-stchop-vxworks.adb \ | |
471 | s-taprop.adb<s-taprop-vxworks.adb \ | |
472 | s-tpopsp.adb<s-tpopsp-vxworks.adb \ | |
473 | s-taspri.ads<s-taspri-vxworks.ads \ | |
474 | s-vxwork.ads<s-vxwork-alpha.ads \ | |
475 | g-soccon.ads<g-soccon-vxworks.ads \ | |
476 | g-socthi.ads<g-socthi-vxworks.ads \ | |
477 | g-socthi.adb<g-socthi-vxworks.adb \ | |
478 | system.ads<system-vxworks-alpha.ads | |
84481f76 | 479 | |
07fc65c4 | 480 | EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o |
84481f76 RK |
481 | EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o |
482 | endif | |
483 | ||
484 | ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),) | |
485 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
486 | a-sytaco.ads<a-sytaco-vxworks.ads \ |
487 | a-sytaco.adb<a-sytaco-vxworks.adb \ | |
488 | a-intnam.ads<a-intnam-vxworks.ads \ | |
489 | a-numaux.ads<a-numaux-vxworks.ads \ | |
490 | s-inmaop.adb<s-inmaop-posix.adb \ | |
491 | s-interr.adb<s-interr-vxworks.adb \ | |
492 | s-intman.ads<s-intman-vxworks.ads \ | |
493 | s-intman.adb<s-intman-vxworks.adb \ | |
494 | s-osinte.adb<s-osinte-vxworks.adb \ | |
495 | s-osinte.ads<s-osinte-vxworks.ads \ | |
496 | s-osprim.adb<s-osprim-vxworks.adb \ | |
497 | s-parame.ads<s-parame-vxworks.ads \ | |
498 | s-stchop.adb<s-stchop-vxworks.adb \ | |
499 | s-taprop.adb<s-taprop-vxworks.adb \ | |
500 | s-taspri.ads<s-taspri-vxworks.ads \ | |
501 | s-tpopsp.adb<s-tpopsp-vxworks.adb \ | |
502 | s-vxwork.ads<s-vxwork-m68k.ads \ | |
503 | g-soccon.ads<g-soccon-vxworks.ads \ | |
504 | g-socthi.ads<g-socthi-vxworks.ads \ | |
505 | g-socthi.adb<g-socthi-vxworks.adb \ | |
506 | system.ads<system-vxworks-m68k.ads | |
507 | ||
508 | TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-vxworks.adb | |
fbf5a39b | 509 | |
07fc65c4 | 510 | EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o |
84481f76 RK |
511 | EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o |
512 | ||
07fc65c4 GB |
513 | ifeq ($(strip $(filter-out yes,$(TRACE))),) |
514 | LIBGNAT_TARGET_PAIRS += \ | |
084c663c AC |
515 | s-traces.adb<s-traces-default.adb \ |
516 | s-tratas.adb<s-tratas-default.adb \ | |
517 | s-trafor.adb<s-trafor-default.adb \ | |
518 | s-trafor.ads<s-trafor-default.ads \ | |
519 | s-tfsetr.adb<s-tfsetr-vxworks.adb | |
07fc65c4 | 520 | endif |
84481f76 RK |
521 | endif |
522 | ||
fbf5a39b | 523 | ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),) |
84481f76 | 524 | LIBGNAT_TARGET_PAIRS = \ |
084c663c AC |
525 | a-sytaco.ads<a-sytaco-vxworks.ads \ |
526 | a-sytaco.adb<a-sytaco-vxworks.adb \ | |
527 | a-intnam.ads<a-intnam-vxworks.ads \ | |
528 | a-numaux.ads<a-numaux-vxworks.ads \ | |
529 | s-inmaop.adb<s-inmaop-posix.adb \ | |
530 | s-interr.adb<s-interr-vxworks.adb \ | |
531 | s-intman.ads<s-intman-vxworks.ads \ | |
532 | s-intman.adb<s-intman-vxworks.adb \ | |
533 | s-osinte.adb<s-osinte-vxworks.adb \ | |
534 | s-osinte.ads<s-osinte-vxworks.ads \ | |
535 | s-osprim.adb<s-osprim-vxworks.adb \ | |
536 | s-parame.ads<s-parame-vxworks.ads \ | |
537 | s-stchop.adb<s-stchop-vxworks.adb \ | |
538 | s-taprop.adb<s-taprop-vxworks.adb \ | |
539 | s-taspri.ads<s-taspri-vxworks.ads \ | |
540 | s-tpopsp.adb<s-tpopsp-vxworks.adb \ | |
541 | s-vxwork.ads<s-vxwork-ppc.ads \ | |
542 | g-soccon.ads<g-soccon-vxworks.ads \ | |
543 | g-socthi.ads<g-socthi-vxworks.ads \ | |
544 | g-socthi.adb<g-socthi-vxworks.adb \ | |
545 | system.ads<system-vxworks-ppc.ads | |
546 | ||
547 | TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-vxworks.adb | |
fbf5a39b | 548 | |
fbf5a39b AC |
549 | ifeq ($(strip $(filter-out yes,$(TRACE))),) |
550 | LIBGNAT_TARGET_PAIRS += \ | |
084c663c AC |
551 | s-traces.adb<s-traces-default.adb \ |
552 | s-trafor.adb<s-trafor-default.adb \ | |
553 | s-trafor.ads<s-trafor-default.ads \ | |
554 | s-tratas.adb<s-tratas-default.adb \ | |
555 | s-tfsetr.adb<s-tfsetr-vxworks.adb | |
fbf5a39b | 556 | endif |
0ab80019 | 557 | |
c4820158 | 558 | EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o |
0ab80019 | 559 | EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o |
fbf5a39b AC |
560 | endif |
561 | ||
84481f76 RK |
562 | ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),) |
563 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
564 | a-sytaco.ads<a-sytaco-vxworks.ads \ |
565 | a-sytaco.adb<a-sytaco-vxworks.adb \ | |
566 | a-intnam.ads<a-intnam-vxworks.ads \ | |
567 | a-numaux.ads<a-numaux-vxworks.ads \ | |
568 | s-inmaop.adb<s-inmaop-posix.adb \ | |
569 | s-interr.adb<s-interr-vxworks.adb \ | |
570 | s-intman.ads<s-intman-vxworks.ads \ | |
571 | s-intman.adb<s-intman-vxworks.adb \ | |
572 | s-osinte.adb<s-osinte-vxworks.adb \ | |
573 | s-osinte.ads<s-osinte-vxworks.ads \ | |
574 | s-osprim.adb<s-osprim-vxworks.adb \ | |
575 | s-parame.ads<s-parame-vxworks.ads \ | |
576 | s-stchop.adb<s-stchop-vxworks.adb \ | |
577 | s-taprop.adb<s-taprop-vxworks.adb \ | |
578 | s-taspri.ads<s-taspri-vxworks.ads \ | |
579 | s-tpopsp.adb<s-tpopsp-vxworks.adb \ | |
580 | s-vxwork.ads<s-vxwork-sparcv9.ads \ | |
581 | g-soccon.ads<g-soccon-vxworks.ads \ | |
582 | g-socthi.ads<g-socthi-vxworks.ads \ | |
583 | g-socthi.adb<g-socthi-vxworks.adb \ | |
584 | system.ads<system-vxworks-sparcv9.ads \ | |
585 | ||
586 | TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-vxworks.adb | |
fbf5a39b AC |
587 | |
588 | EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o | |
589 | EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o | |
590 | endif | |
591 | ||
5d09245e AC |
592 | ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),) |
593 | LIBGNAT_TARGET_PAIRS = \ | |
594 | a-sytaco.ads<a-sytaco-vxworks.ads \ | |
595 | a-sytaco.adb<a-sytaco-vxworks.adb \ | |
596 | a-intnam.ads<a-intnam-vxworks.ads \ | |
71c10a83 | 597 | i-vxwork.ads<i-vxwork-x86.ads \ |
5d09245e AC |
598 | s-inmaop.adb<s-inmaop-posix.adb \ |
599 | s-interr.adb<s-interr-vxworks.adb \ | |
600 | s-intman.ads<s-intman-vxworks.ads \ | |
601 | s-intman.adb<s-intman-vxworks.adb \ | |
602 | a-numaux.adb<a-numaux-x86.adb \ | |
603 | a-numaux.ads<a-numaux-x86.ads \ | |
604 | s-osinte.adb<s-osinte-vxworks.adb \ | |
605 | s-osinte.ads<s-osinte-vxworks.ads \ | |
606 | s-osprim.adb<s-osprim-vxworks.adb \ | |
607 | s-parame.ads<s-parame-vxworks.ads \ | |
608 | s-stchop.adb<s-stchop-vxworks.adb \ | |
609 | s-taprop.adb<s-taprop-vxworks.adb \ | |
610 | s-taspri.ads<s-taspri-vxworks.ads \ | |
611 | s-tpopsp.adb<s-tpopsp-vxworks.adb \ | |
612 | s-vxwork.ads<s-vxwork-x86.ads \ | |
613 | g-soccon.ads<g-soccon-vxworks.ads \ | |
614 | g-socthi.ads<g-socthi-vxworks.ads \ | |
615 | g-socthi.adb<g-socthi-vxworks.adb \ | |
616 | system.ads<system-vxworks-x86.ads | |
617 | ||
618 | TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-vxworks.adb | |
619 | ||
620 | ifeq ($(strip $(filter-out yes,$(TRACE))),) | |
621 | LIBGNAT_TARGET_PAIRS += \ | |
622 | s-traces.adb<s-traces-default.adb \ | |
623 | s-trafor.adb<s-trafor-default.adb \ | |
624 | s-trafor.ads<s-trafor-default.ads \ | |
625 | s-tratas.adb<s-tratas-default.adb \ | |
626 | s-tfsetr.adb<s-tfsetr-vxworks.adb | |
627 | endif | |
628 | ||
629 | EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o | |
630 | EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o | |
631 | endif | |
632 | ||
fbf5a39b AC |
633 | ifeq ($(strip $(filter-out xscale% coff wrs vx%,$(targ))),) |
634 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
635 | a-sytaco.ads<a-sytaco-vxworks.ads \ |
636 | a-sytaco.adb<a-sytaco-vxworks.adb \ | |
637 | a-intnam.ads<a-intnam-vxworks.ads \ | |
638 | a-numaux.ads<a-numaux-vxworks.ads \ | |
639 | s-inmaop.adb<s-inmaop-posix.adb \ | |
640 | s-interr.adb<s-interr-vxworks.adb \ | |
641 | s-intman.ads<s-intman-vxworks.ads \ | |
642 | s-intman.adb<s-intman-vxworks.adb \ | |
643 | s-osinte.adb<s-osinte-vxworks.adb \ | |
644 | s-osinte.ads<s-osinte-vxworks.ads \ | |
645 | s-osprim.adb<s-osprim-vxworks.adb \ | |
646 | s-parame.ads<s-parame-vxworks.ads \ | |
647 | s-stchop.adb<s-stchop-vxworks.adb \ | |
648 | s-taprop.adb<s-taprop-vxworks.adb \ | |
649 | s-taspri.ads<s-taspri-vxworks.ads \ | |
650 | s-tpopsp.adb<s-tpopsp-vxworks.adb \ | |
651 | s-vxwork.ads<s-vxwork-xscale.ads \ | |
652 | g-soccon.ads<g-soccon-vxworks.ads \ | |
653 | g-socthi.ads<g-socthi-vxworks.ads \ | |
654 | g-socthi.adb<g-socthi-vxworks.adb \ | |
655 | system.ads<system-elf-sparc.ads | |
656 | ||
657 | TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-vxworks.adb | |
84481f76 | 658 | |
fbf5a39b | 659 | EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o |
84481f76 RK |
660 | EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o |
661 | endif | |
662 | ||
663 | ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),) | |
664 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
665 | a-sytaco.ads<a-sytaco-vxworks.ads \ |
666 | a-sytaco.adb<a-sytaco-vxworks.adb \ | |
667 | a-intnam.ads<a-intnam-vxworks.ads \ | |
668 | a-numaux.ads<a-numaux-vxworks.ads \ | |
669 | s-inmaop.adb<s-inmaop-posix.adb \ | |
670 | s-interr.adb<s-interr-vxworks.adb \ | |
671 | s-intman.ads<s-intman-vxworks.ads \ | |
672 | s-intman.adb<s-intman-vxworks.adb \ | |
673 | s-osinte.adb<s-osinte-vxworks.adb \ | |
674 | s-osinte.ads<s-osinte-vxworks.ads \ | |
675 | s-osprim.adb<s-osprim-vxworks.adb \ | |
676 | s-parame.ads<s-parame-vxworks.ads \ | |
677 | s-stchop.adb<s-stchop-vxworks.adb \ | |
678 | s-taprop.adb<s-taprop-vxworks.adb \ | |
679 | s-taspri.ads<s-taspri-vxworks.ads \ | |
680 | s-tpopsp.adb<s-tpopsp-vxworks.adb \ | |
681 | s-vxwork.ads<s-vxwork-mips.ads \ | |
682 | g-soccon.ads<g-soccon-vxworks.ads \ | |
683 | g-socthi.ads<g-socthi-vxworks.ads \ | |
684 | g-socthi.adb<g-socthi-vxworks.adb \ | |
685 | system.ads<system-vxworks-mips.ads | |
686 | ||
687 | TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-vxworks.adb | |
84481f76 | 688 | |
fbf5a39b | 689 | EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o |
84481f76 RK |
690 | EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o |
691 | endif | |
692 | ||
fbf5a39b | 693 | ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),) |
84481f76 | 694 | LIBGNAT_TARGET_PAIRS = \ |
084c663c AC |
695 | a-intnam.ads<a-intnam-solaris.ads \ |
696 | s-inmaop.adb<s-inmaop-posix.adb \ | |
697 | s-intman.adb<s-intman-solaris.adb \ | |
698 | s-osinte.adb<s-osinte-solaris.adb \ | |
699 | s-osinte.ads<s-osinte-solaris.ads \ | |
700 | s-osprim.adb<s-osprim-solaris.adb \ | |
701 | s-parame.adb<s-parame-solaris.adb \ | |
702 | s-taprop.adb<s-taprop-solaris.adb \ | |
703 | s-tasinf.adb<s-tasinf-solaris.adb \ | |
704 | s-tasinf.ads<s-tasinf-solaris.ads \ | |
705 | s-taspri.ads<s-taspri-solaris.ads \ | |
706 | s-tpopsp.adb<s-tpopsp-solaris.adb \ | |
707 | g-soccon.ads<g-soccon-solaris.ads \ | |
708 | g-soliop.ads<g-soliop-solaris.ads \ | |
709 | system.ads<system-solaris-sparc.ads | |
710 | ||
711 | TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-solaris.adb | |
fbf5a39b | 712 | |
07fc65c4 GB |
713 | THREADSLIB = -lposix4 -lthread |
714 | MISCLIB = -lposix4 -lnsl -lsocket | |
07fc65c4 GB |
715 | SO_OPTS = -Wl,-h, |
716 | GNATLIB_SHARED = gnatlib-shared-dual | |
717 | GMEM_LIB = gmemlib | |
fbf5a39b | 718 | PREFIX_OBJS = $(PREFIX_REAL_OBJS) |
efdfd311 | 719 | LIBRARY_VERSION := $(LIB_VERSION) |
84481f76 RK |
720 | |
721 | ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),) | |
722 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
723 | a-intnam.ads<a-intnam-solaris.ads \ |
724 | s-inmaop.adb<s-inmaop-posix.adb \ | |
725 | s-intman.adb<s-intman-solaris.adb \ | |
726 | s-osinte.adb<s-osinte-fsu.adb \ | |
727 | s-osinte.ads<s-osinte-solaris-fsu.ads \ | |
728 | s-osprim.adb<s-osprim-solaris.adb \ | |
729 | s-taprop.adb<s-taprop-posix.adb \ | |
730 | s-taspri.ads<s-taspri-posix.ads \ | |
731 | s-tpopsp.adb<s-tpopsp-posix.adb \ | |
732 | g-soccon.ads<g-soccon-solaris.ads \ | |
733 | g-soliop.ads<g-soliop-solaris.ads \ | |
734 | system.ads<system-solaris-sparc.ads | |
84481f76 | 735 | |
07fc65c4 | 736 | THREADSLIB = -lgthreads -lmalloc |
84481f76 RK |
737 | endif |
738 | ||
739 | ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),) | |
740 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
741 | a-intnam.ads<a-intnam-solaris.ads \ |
742 | s-inmaop.adb<s-inmaop-posix.adb \ | |
743 | s-intman.adb<s-intman-posix.adb \ | |
744 | s-osinte.adb<s-osinte-posix.adb \ | |
745 | s-osinte.ads<s-osinte-solaris-posix.ads \ | |
746 | s-osprim.adb<s-osprim-solaris.adb \ | |
747 | s-taprop.adb<s-taprop-posix.adb \ | |
748 | s-taspri.ads<s-taspri-posix.ads \ | |
749 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ | |
750 | g-soccon.ads<g-soccon-solaris.ads \ | |
751 | g-soliop.ads<g-soliop-solaris.ads \ | |
752 | system.ads<system-solaris-sparc.ads | |
84481f76 | 753 | |
07fc65c4 | 754 | THREADSLIB = -lposix4 -lpthread |
84481f76 | 755 | endif |
fbf5a39b AC |
756 | |
757 | ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),) | |
758 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
759 | a-intnam.ads<a-intnam-solaris.ads \ |
760 | s-inmaop.adb<s-inmaop-posix.adb \ | |
761 | s-intman.adb<s-intman-solaris.adb \ | |
762 | s-osinte.adb<s-osinte-solaris.adb \ | |
763 | s-osinte.ads<s-osinte-solaris.ads \ | |
764 | s-osprim.adb<s-osprim-solaris.adb \ | |
765 | s-parame.adb<s-parame-solaris.adb \ | |
766 | s-taprop.adb<s-taprop-solaris.adb \ | |
767 | s-tasinf.adb<s-tasinf-solaris.adb \ | |
768 | s-tasinf.ads<s-tasinf-solaris.ads \ | |
769 | s-taspri.ads<s-taspri-solaris.ads \ | |
770 | s-tpopsp.adb<s-tpopsp-solaris.adb \ | |
771 | g-soccon.ads<g-soccon-solaris.ads \ | |
772 | g-soliop.ads<g-soliop-solaris.ads \ | |
773 | system.ads<system-solaris-sparcv9.ads | |
fbf5a39b | 774 | endif |
84481f76 RK |
775 | endif |
776 | ||
777 | ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),) | |
778 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
779 | a-numaux.adb<a-numaux-x86.adb \ |
780 | a-numaux.ads<a-numaux-x86.ads \ | |
781 | a-intnam.ads<a-intnam-solaris.ads \ | |
782 | s-inmaop.adb<s-inmaop-posix.adb \ | |
783 | s-intman.adb<s-intman-solaris.adb \ | |
784 | s-mastop.adb<s-mastop-x86.adb \ | |
785 | s-osinte.adb<s-osinte-solaris.adb \ | |
786 | s-osinte.ads<s-osinte-solaris.ads \ | |
787 | s-osprim.adb<s-osprim-solaris.adb \ | |
788 | s-parame.adb<s-parame-solaris.adb \ | |
789 | s-taprop.adb<s-taprop-solaris.adb \ | |
790 | s-tasinf.adb<s-tasinf-solaris.adb \ | |
791 | s-tasinf.ads<s-tasinf-solaris.ads \ | |
792 | s-taspri.ads<s-taspri-solaris.ads \ | |
793 | s-tpopsp.adb<s-tpopsp-solaris.adb \ | |
794 | g-soccon.ads<g-soccon-solaris.ads \ | |
795 | g-soliop.ads<g-soliop-solaris.ads \ | |
796 | system.ads<system-solaris-x86.ads | |
84481f76 | 797 | |
e6d50a9e AC |
798 | TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-solaris.adb |
799 | ||
07fc65c4 GB |
800 | THREADSLIB = -lposix4 -lthread |
801 | MISCLIB = -lposix4 -lnsl -lsocket | |
802 | SO_OPTS = -Wl,-h, | |
803 | GNATLIB_SHARED = gnatlib-shared-dual | |
e6d50a9e | 804 | GMEM_LIB = gmemlib |
fbf5a39b | 805 | PREFIX_OBJS = $(PREFIX_REAL_OBJS) |
efdfd311 | 806 | LIBRARY_VERSION := $(LIB_VERSION) |
84481f76 RK |
807 | endif |
808 | ||
809 | ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),) | |
810 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
811 | a-intnam.ads<a-intnam-linux.ads \ |
812 | a-numaux.adb<a-numaux-x86.adb \ | |
813 | a-numaux.ads<a-numaux-x86.ads \ | |
814 | s-inmaop.adb<s-inmaop-posix.adb \ | |
815 | s-intman.adb<s-intman-posix.adb \ | |
816 | s-mastop.adb<s-mastop-x86.adb \ | |
817 | s-osinte.adb<s-osinte-posix.adb \ | |
818 | s-osinte.ads<s-osinte-linux.ads \ | |
819 | s-osprim.adb<s-osprim-posix.adb \ | |
820 | s-taprop.adb<s-taprop-linux.adb \ | |
821 | s-taspri.ads<s-taspri-linux.ads \ | |
822 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ | |
823 | s-parame.adb<s-parame-linux.adb \ | |
824 | system.ads<system-linux-x86.ads | |
84481f76 | 825 | |
6e937c1c | 826 | TOOLS_TARGET_PAIRS = \ |
5d09245e AC |
827 | mlib-tgt.adb<mlib-tgt-linux.adb \ |
828 | indepsw.adb<indepsw-linux.adb | |
6e937c1c | 829 | |
07fc65c4 GB |
830 | THREADSLIB = -lpthread |
831 | GNATLIB_SHARED = gnatlib-shared-dual | |
832 | GMEM_LIB = gmemlib | |
fbf5a39b | 833 | PREFIX_OBJS = $(PREFIX_REAL_OBJS) |
efdfd311 | 834 | LIBRARY_VERSION := $(LIB_VERSION) |
84481f76 RK |
835 | |
836 | ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),) | |
837 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
838 | a-intnam.ads<a-intnam-linux.ads \ |
839 | a-numaux.adb<a-numaux-x86.adb \ | |
840 | a-numaux.ads<a-numaux-x86.ads \ | |
841 | s-inmaop.adb<s-inmaop-posix.adb \ | |
842 | s-intman.adb<s-intman-posix.adb \ | |
843 | s-mastop.adb<s-mastop-x86.adb \ | |
844 | s-osinte.adb<s-osinte-fsu.adb \ | |
845 | s-osinte.ads<s-osinte-linux-fsu.ads \ | |
846 | s-osprim.adb<s-osprim-posix.adb \ | |
847 | s-taprop.adb<s-taprop-posix.adb \ | |
848 | s-taspri.ads<s-taspri-posix.ads \ | |
849 | s-tpopsp.adb<s-tpopsp-posix.adb \ | |
850 | system.ads<system-linux-x86.ads | |
84481f76 | 851 | |
07fc65c4 | 852 | THREADSLIB = -lgthreads -lmalloc |
84481f76 | 853 | endif |
84481f76 RK |
854 | endif |
855 | ||
19f0526a AC |
856 | ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),) |
857 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
858 | a-intnam.ads<a-intnam-freebsd.ads \ |
859 | a-numaux.adb<a-numaux-x86.adb \ | |
860 | a-numaux.ads<a-numaux-x86.ads \ | |
861 | g-soccon.ads<g-soccon-freebsd.ads \ | |
862 | s-inmaop.adb<s-inmaop-posix.adb \ | |
863 | s-intman.adb<s-intman-posix.adb \ | |
864 | s-mastop.adb<s-mastop-x86.adb \ | |
865 | s-osinte.adb<s-osinte-freebsd.adb \ | |
866 | s-osinte.ads<s-osinte-freebsd.ads \ | |
867 | s-osprim.adb<s-osprim-posix.adb \ | |
868 | s-taprop.adb<s-taprop-posix.adb \ | |
869 | s-taspri.ads<s-taspri-posix.ads \ | |
870 | s-tpopsp.adb<s-tpopsp-posix.adb \ | |
871 | system.ads<system-freebsd-x86.ads | |
19f0526a | 872 | |
a336eaca | 873 | TOOLS_TARGET_PAIRS = \ |
084c663c | 874 | mlib-tgt.adb<mlib-tgt-linux.adb |
a336eaca AC |
875 | GNATLIB_SHARED = gnatlib-shared-dual |
876 | ||
a336eaca AC |
877 | THREADSLIB= -lc_r |
878 | GMEM_LIB = gmemlib | |
879 | PREFIX_OBJS = $(PREFIX_REAL_OBJS) | |
efdfd311 | 880 | LIBRARY_VERSION := $(LIB_VERSION) |
19f0526a AC |
881 | endif |
882 | ||
ea16c81b UW |
883 | ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),) |
884 | ifeq ($(strip $(filter-out s390x,$(arch))),) | |
885 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
886 | a-intnam.ads<a-intnam-linux.ads \ |
887 | s-inmaop.adb<s-inmaop-posix.adb \ | |
888 | s-intman.adb<s-intman-posix.adb \ | |
889 | s-osinte.adb<s-osinte-posix.adb \ | |
890 | s-osinte.ads<s-osinte-linux.ads \ | |
891 | s-osprim.adb<s-osprim-posix.adb \ | |
892 | s-taprop.adb<s-taprop-linux.adb \ | |
893 | s-taspri.ads<s-taspri-linux.ads \ | |
894 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ | |
895 | s-parame.adb<s-parame-linux.adb \ | |
ea16c81b UW |
896 | system.ads<system-linux-s390x.ads |
897 | else | |
898 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
899 | a-intnam.ads<a-intnam-linux.ads \ |
900 | s-inmaop.adb<s-inmaop-posix.adb \ | |
901 | s-intman.adb<s-intman-posix.adb \ | |
902 | s-osinte.adb<s-osinte-posix.adb \ | |
903 | s-osinte.ads<s-osinte-linux.ads \ | |
904 | s-osprim.adb<s-osprim-posix.adb \ | |
905 | s-taprop.adb<s-taprop-linux.adb \ | |
906 | s-taspri.ads<s-taspri-linux.ads \ | |
907 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ | |
908 | s-parame.adb<s-parame-linux.adb \ | |
ea16c81b UW |
909 | system.ads<system-linux-s390.ads |
910 | endif | |
911 | ||
912 | TOOLS_TARGET_PAIRS = \ | |
084c663c | 913 | mlib-tgt.adb<mlib-tgt-linux.adb |
ea16c81b UW |
914 | |
915 | THREADSLIB = -lpthread | |
916 | GNATLIB_SHARED = gnatlib-shared-dual | |
917 | PREFIX_OBJS = $(PREFIX_REAL_OBJS) | |
918 | LIBRARY_VERSION := $(LIB_VERSION) | |
919 | endif | |
920 | ||
84481f76 RK |
921 | ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),) |
922 | ifeq ($(strip $(filter-out mips sgi irix6%,$(targ))),) | |
923 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
924 | a-intnam.ads<a-intnam-irix.ads \ |
925 | s-inmaop.adb<s-inmaop-posix.adb \ | |
926 | s-intman.adb<s-intman-irix.adb \ | |
927 | s-mastop.adb<s-mastop-irix.adb \ | |
928 | s-osinte.adb<s-osinte-irix.adb \ | |
929 | s-osinte.ads<s-osinte-irix.ads \ | |
930 | s-osprim.adb<s-osprim-posix.adb \ | |
931 | s-proinf.adb<s-proinf-irix-athread.adb \ | |
932 | s-proinf.ads<s-proinf-irix-athread.ads \ | |
933 | s-taprop.adb<s-taprop-irix.adb \ | |
934 | s-tasinf.ads<s-tasinf-irix.ads \ | |
935 | s-taspri.ads<s-taspri-posix.ads \ | |
936 | s-tpopsp.adb<s-tpopsp-posix.adb \ | |
937 | s-traceb.adb<s-traceb-mastop.adb \ | |
938 | g-soccon.ads<g-soccon-irix.ads \ | |
939 | system.ads<system-irix-n32.ads | |
84481f76 | 940 | |
07fc65c4 | 941 | THREADSLIB = -lpthread |
fbf5a39b | 942 | GNATLIB_SHARED = gnatlib-shared-default |
84481f76 RK |
943 | |
944 | else | |
945 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
946 | a-intnam.ads<a-intnam-irix.ads \ |
947 | s-inmaop.adb<s-inmaop-dummy.adb \ | |
948 | s-interr.adb<s-interr-sigaction.adb \ | |
949 | s-intman.adb<s-intman-irix-athread.adb \ | |
950 | s-mastop.adb<s-mastop-irix.adb \ | |
951 | s-osinte.adb<s-osinte-irix.adb \ | |
952 | s-osinte.ads<s-osinte-irix-athread.ads \ | |
953 | s-osprim.adb<s-osprim-posix.adb \ | |
954 | s-proinf.adb<s-proinf-irix-athread.adb \ | |
955 | s-proinf.ads<s-proinf-irix-athread.ads \ | |
956 | s-taprop.adb<s-taprop-irix-athread.adb \ | |
957 | s-tasinf.adb<s-tasinf-irix-athread.adb \ | |
958 | s-tasinf.ads<s-tasinf-irix-athread.ads \ | |
959 | s-taspri.ads<s-taspri-posix.ads \ | |
960 | s-traceb.adb<s-traceb-mastop.adb \ | |
961 | g-soccon.ads<g-soccon-irix.ads \ | |
962 | system.ads<system-irix-o32.ads | |
84481f76 RK |
963 | endif |
964 | ||
084c663c | 965 | TOOLS_TARGET_PAIRS = mlib-tgt.adb<mlib-tgt-irix.adb |
07fc65c4 GB |
966 | TGT_LIB = -lexc |
967 | MISCLIB = -lexc | |
fbf5a39b | 968 | PREFIX_OBJS = $(PREFIX_REAL_OBJS) |
efdfd311 | 969 | LIBRARY_VERSION := $(LIB_VERSION) |
84481f76 RK |
970 | endif |
971 | ||
940bbb74 OH |
972 | ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),) |
973 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
974 | a-excpol.adb<a-excpol-abort.adb \ |
975 | a-intnam.ads<a-intnam-hpux.ads \ | |
976 | s-inmaop.adb<s-inmaop-posix.adb \ | |
977 | s-interr.adb<s-interr-sigaction.adb \ | |
978 | s-intman.adb<s-intman-posix.adb \ | |
979 | s-osinte.adb<s-osinte-hpux-dce.adb \ | |
980 | s-osinte.ads<s-osinte-hpux-dce.ads \ | |
981 | s-parame.ads<s-parame-hpux.ads \ | |
982 | s-osprim.adb<s-osprim-posix.adb \ | |
983 | s-taprop.adb<s-taprop-hpux-dce.adb \ | |
984 | s-taspri.ads<s-taspri-hpux-dce.ads \ | |
985 | s-tpopsp.adb<s-tpopsp-posix.adb \ | |
986 | g-soccon.ads<g-soccon-hpux.ads \ | |
987 | system.ads<system-hpux.ads | |
fbf5a39b AC |
988 | |
989 | PREFIX_OBJS = $(PREFIX_REAL_OBJS) | |
940bbb74 OH |
990 | endif |
991 | ||
992 | ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),) | |
84481f76 | 993 | LIBGNAT_TARGET_PAIRS = \ |
084c663c AC |
994 | a-intnam.ads<a-intnam-hpux.ads \ |
995 | s-inmaop.adb<s-inmaop-posix.adb \ | |
996 | s-intman.adb<s-intman-posix.adb \ | |
997 | s-osinte.adb<s-osinte-posix.adb \ | |
998 | s-osinte.ads<s-osinte-hpux.ads \ | |
999 | s-parame.ads<s-parame-hpux.ads \ | |
1000 | s-osprim.adb<s-osprim-posix.adb \ | |
1001 | s-traceb.adb<s-traceb-hpux.adb \ | |
1002 | s-taprop.adb<s-taprop-posix.adb \ | |
1003 | s-taspri.ads<s-taspri-posix.ads \ | |
1004 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ | |
1005 | g-soccon.ads<g-soccon-hpux.ads \ | |
1006 | system.ads<system-hpux.ads | |
1007 | ||
1008 | TOOLS_TARGET_PAIRS = mlib-tgt.adb<mlib-tgt-hpux.adb | |
940bbb74 | 1009 | TGT_LIB = /usr/lib/libcl.a |
fbf5a39b | 1010 | THREADSLIB = -lpthread |
fbf5a39b | 1011 | GMEM_LIB = gmemlib |
07fc65c4 GB |
1012 | soext = .sl |
1013 | SO_OPTS = -Wl,+h, | |
fbf5a39b | 1014 | PREFIX_OBJS = $(PREFIX_REAL_OBJS) |
07fc65c4 | 1015 | GNATLIB_SHARED = gnatlib-shared-dual |
efdfd311 | 1016 | LIBRARY_VERSION := $(LIB_VERSION) |
84481f76 RK |
1017 | |
1018 | ifeq ($(strip $(filter-out dce DCE,$(THREAD_KIND))),) | |
1019 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
1020 | a-excpol.adb<a-excpol-abort.adb \ |
1021 | a-intnam.ads<a-intnam-hpux.ads \ | |
1022 | s-inmaop.adb<s-inmaop-posix.adb \ | |
1023 | s-interr.adb<s-interr-sigaction.adb \ | |
1024 | s-intman.adb<s-intman-posix.adb \ | |
1025 | s-osinte.adb<s-osinte-hpux-dce.adb \ | |
1026 | s-osinte.ads<s-osinte-hpux-dce.ads \ | |
1027 | s-parame.ads<s-parame-hpux.ads \ | |
1028 | s-osprim.adb<s-osprim-posix.adb \ | |
1029 | s-taprop.adb<s-taprop-hpux-dce.adb \ | |
1030 | s-taspri.ads<s-taspri-hpux-dce.ads \ | |
1031 | s-tpopsp.adb<s-tpopsp-posix.adb \ | |
1032 | g-soccon.ads<g-soccon-hpux.ads \ | |
1033 | system.ads<system-hpux.ads | |
84481f76 | 1034 | |
940bbb74 | 1035 | TGT_LIB = |
07fc65c4 | 1036 | THREADSLIB = -lcma |
84481f76 RK |
1037 | endif |
1038 | endif | |
1039 | ||
fbf5a39b | 1040 | ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),) |
84481f76 | 1041 | LIBGNAT_TARGET_PAIRS = \ |
084c663c AC |
1042 | a-intnam.ads<a-intnam-aix.ads \ |
1043 | s-inmaop.adb<s-inmaop-posix.adb \ | |
1044 | s-intman.adb<s-intman-posix.adb \ | |
1045 | s-osinte.adb<s-osinte-aix.adb \ | |
1046 | s-osinte.ads<s-osinte-aix.ads \ | |
1047 | s-osprim.adb<s-osprim-posix.adb \ | |
1048 | s-taprop.adb<s-taprop-posix.adb \ | |
1049 | s-taspri.ads<s-taspri-posix.ads \ | |
1050 | s-tpopsp.adb<s-tpopsp-posix.adb \ | |
1051 | g-soccon.ads<g-soccon-aix.ads \ | |
1052 | system.ads<system-aix.ads | |
84481f76 | 1053 | |
07fc65c4 | 1054 | THREADSLIB = -lpthreads |
fbf5a39b AC |
1055 | PREFIX_OBJS=$(PREFIX_REAL_OBJS) |
1056 | ||
84481f76 RK |
1057 | ifeq ($(strip $(filter-out fsu FSU,$(THREAD_KIND))),) |
1058 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
1059 | a-intnam.ads<a-intnam-aix.ads \ |
1060 | s-inmaop.adb<s-inmaop-posix.adb \ | |
1061 | s-intman.adb<s-intman-posix.adb \ | |
1062 | s-osinte.adb<s-osinte-fsu.adb \ | |
1063 | s-osinte.ads<s-osinte-aix-fsu.ads \ | |
1064 | s-osprim.adb<s-osprim-posix.adb \ | |
1065 | s-taprop.adb<s-taprop-posix.adb \ | |
1066 | s-taspri.ads<s-taspri-posix.ads \ | |
1067 | s-tpopsp.adb<s-tpopsp-posix.adb \ | |
1068 | g-soccon.ads<g-soccon-aix.ads \ | |
1069 | system.ads<system-aix.ads | |
84481f76 | 1070 | |
07fc65c4 | 1071 | THREADSLIB = -lgthreads -lmalloc |
84481f76 | 1072 | endif |
fbf5a39b | 1073 | |
5d09245e AC |
1074 | TOOLS_TARGET_PAIRS = \ |
1075 | mlib-tgt.adb<mlib-tgt-aix.adb \ | |
1076 | indepsw.adb<indepsw-aix.adb | |
1077 | ||
fbf5a39b | 1078 | GMEM_LIB = gmemlib |
84481f76 RK |
1079 | endif |
1080 | ||
1081 | ifeq ($(strip $(filter-out lynxos,$(osys))),) | |
e6d50a9e AC |
1082 | TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-lynxos.adb |
1083 | ||
84481f76 RK |
1084 | ifeq ($(strip $(filter-out %86 lynxos,$(arch) $(osys))),) |
1085 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
1086 | a-numaux.adb<a-numaux-x86.adb \ |
1087 | a-numaux.ads<a-numaux-x86.ads \ | |
1088 | a-intnam.ads<a-intnam-lynxos.ads \ | |
1089 | s-mastop.adb<s-mastop-x86.adb \ | |
1090 | s-inmaop.adb<s-inmaop-posix.adb \ | |
1091 | s-intman.adb<s-intman-posix.adb \ | |
1092 | s-osinte.adb<s-osinte-lynxos.adb \ | |
1093 | s-osinte.ads<s-osinte-lynxos.ads \ | |
1094 | s-osprim.adb<s-osprim-posix.adb \ | |
1095 | s-taprop.adb<s-taprop-lynxos.adb \ | |
1096 | s-taspri.ads<s-taspri-lynxos.ads \ | |
1097 | s-tpopsp.adb<s-tpopsp-lynxos.adb \ | |
1098 | system.ads<system-lynxos-x86.ads | |
fbf5a39b AC |
1099 | |
1100 | PREFIX_OBJS=$(PREFIX_REAL_OBJS) | |
1101 | ||
1102 | else | |
1103 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
1104 | a-intnam.ads<a-intnam-lynxos.ads \ |
1105 | s-inmaop.adb<s-inmaop-posix.adb \ | |
1106 | s-intman.adb<s-intman-posix.adb \ | |
1107 | s-osinte.adb<s-osinte-lynxos-3.adb \ | |
1108 | s-osinte.ads<s-osinte-lynxos-3.ads \ | |
1109 | s-osprim.adb<s-osprim-posix.adb \ | |
1110 | s-taprop.adb<s-taprop-posix.adb \ | |
1111 | s-taspri.ads<s-taspri-posix.ads \ | |
1112 | s-tpopsp.adb<s-tpopsp-posix.adb \ | |
1113 | system.ads<system-lynxos-ppc.ads | |
84481f76 RK |
1114 | |
1115 | ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),) | |
1116 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
1117 | a-intnam.ads<a-intnam-lynxos.ads \ |
1118 | s-inmaop.adb<s-inmaop-posix.adb \ | |
1119 | s-intman.adb<s-intman-posix.adb \ | |
1120 | s-osinte.adb<s-osinte-lynxos.adb \ | |
1121 | s-osinte.ads<s-osinte-lynxos.ads \ | |
1122 | s-osprim.adb<s-osprim-posix.adb \ | |
1123 | s-taprop.adb<s-taprop-lynxos.adb \ | |
1124 | s-taspri.ads<s-taspri-lynxos.ads \ | |
1125 | s-tpopsp.adb<s-tpopsp-lynxos.adb \ | |
1126 | system.ads<system-lynxos-ppc.ads | |
84481f76 | 1127 | endif |
84481f76 RK |
1128 | endif |
1129 | endif | |
1130 | ||
fbf5a39b | 1131 | ifeq ($(strip $(filter-out rtems%,$(osys))),) |
84481f76 | 1132 | LIBGNAT_TARGET_PAIRS = \ |
74a22497 | 1133 | a-intnam.ads<a-intnam-rtems.ads \ |
084c663c AC |
1134 | s-inmaop.adb<s-inmaop-posix.adb \ |
1135 | s-intman.adb<s-intman-posix.adb \ | |
7d921ba4 LG |
1136 | s-osinte.adb<s-osinte-rtems.adb \ |
1137 | s-osinte.ads<s-osinte-rtems.ads \ | |
084c663c | 1138 | s-osprim.adb<s-osprim-posix.adb \ |
7d921ba4 | 1139 | s-parame.adb<s-parame-rtems.adb \ |
084c663c AC |
1140 | s-taprop.adb<s-taprop-posix.adb \ |
1141 | s-taspri.ads<s-taspri-posix.ads \ | |
7d921ba4 | 1142 | s-tpopsp.adb<s-tpopsp-rtems.adb |
84481f76 RK |
1143 | endif |
1144 | ||
84481f76 RK |
1145 | ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),) |
1146 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
1147 | a-intnam.ads<a-intnam-tru64.ads \ |
1148 | s-inmaop.adb<s-inmaop-posix.adb \ | |
1149 | s-intman.adb<s-intman-posix.adb \ | |
1150 | s-mastop.adb<s-mastop-tru64.adb \ | |
1151 | s-osinte.adb<s-osinte-tru64.adb \ | |
1152 | s-osinte.ads<s-osinte-tru64.ads \ | |
1153 | s-osprim.adb<s-osprim-unix.adb \ | |
1154 | s-taprop.adb<s-taprop-tru64.adb \ | |
1155 | s-tasinf.ads<s-tasinf-tru64.ads \ | |
1156 | s-taspri.ads<s-taspri-tru64.ads \ | |
1157 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ | |
1158 | s-traceb.adb<s-traceb-mastop.adb \ | |
1159 | g-soccon.ads<g-soccon-tru64.ads \ | |
1160 | system.ads<system-tru64.ads | |
1161 | ||
1162 | TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-tru64.adb | |
fbf5a39b AC |
1163 | |
1164 | GMEM_LIB=gmemlib | |
07fc65c4 | 1165 | THREADSLIB = -lpthread -lmach -lexc -lrt |
fbf5a39b AC |
1166 | PREFIX_OBJS = $(PREFIX_REAL_OBJS) |
1167 | GNATLIB_SHARED = gnatlib-shared-default | |
efdfd311 | 1168 | LIBRARY_VERSION := $(LIB_VERSION) |
84481f76 RK |
1169 | endif |
1170 | ||
a336eaca | 1171 | ifeq ($(strip $(filter-out alpha% ia64 dec hp vms% openvms% alphavms%,$(host))),) |
07fc65c4 | 1172 | |
fbf5a39b | 1173 | soext = .exe |
adc04486 | 1174 | hyphen = _ |
3536d406 AC |
1175 | LN = cp -p |
1176 | LN_S = cp -p | |
07fc65c4 | 1177 | |
aa720a54 AC |
1178 | ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),) |
1179 | AR = iar | |
1180 | endif | |
1181 | ||
fbf5a39b | 1182 | .SUFFIXES: .sym |
07fc65c4 | 1183 | |
fbf5a39b AC |
1184 | .o.sym: |
1185 | @ gnu:[bin]vmssymvec $< | |
1186 | endif | |
07fc65c4 | 1187 | |
fbf5a39b | 1188 | ifeq ($(strip $(filter-out alpha% ia64 dec hp vms% openvms% alphavms%,$(targ))),) |
a336eaca AC |
1189 | ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),) |
1190 | LIBGNAT_TARGET_PAIRS_AUX1 = \ | |
3536d406 | 1191 | g-enblsp.adb<g-enblsp-vms-ia64.adb \ |
0ab80019 | 1192 | s-auxdec.ads<s-auxdec-vms_64.ads \ |
084c663c AC |
1193 | s-crtl.ads<s-crtl-vms.ads \ |
1194 | s-osinte.adb<s-osinte-vms-ia64.adb \ | |
1195 | s-osinte.ads<s-osinte-vms-ia64.ads \ | |
0ab80019 | 1196 | system.ads<system-vms_64.ads |
209db2bf | 1197 | else |
a336eaca AC |
1198 | ifeq ($(strip $(filter-out alpha% dec vms% openvms% alphavms%,$(targ))),) |
1199 | LIBGNAT_TARGET_PAIRS_AUX1 = \ | |
3536d406 AC |
1200 | g-enblsp.adb<g-enblsp-vms-alpha.adb \ |
1201 | s-asthan.adb<s-asthan-vms-alpha.adb \ | |
084c663c AC |
1202 | s-crtl.ads<s-crtl-vms.ads \ |
1203 | s-osinte.adb<s-osinte-vms.adb \ | |
1204 | s-osinte.ads<s-osinte-vms.ads \ | |
0ab80019 | 1205 | s-vaflop.adb<s-vaflop-vms-alpha.adb \ |
084c663c | 1206 | system.ads<system-vms-zcx.ads |
a336eaca AC |
1207 | endif |
1208 | endif | |
07fc65c4 | 1209 | ifeq ($(strip $(filter-out express EXPRESS,$(THREAD_KIND))),) |
a336eaca | 1210 | LIBGNAT_TARGET_PAIRS_AUX2 = \ |
084c663c | 1211 | s-parame.ads<s-parame-vms-restrict.ads |
07fc65c4 | 1212 | else |
a336eaca | 1213 | LIBGNAT_TARGET_PAIRS_AUX2 = \ |
084c663c | 1214 | s-parame.ads<s-parame-vms.ads |
07fc65c4 GB |
1215 | endif |
1216 | ||
84481f76 | 1217 | LIBGNAT_TARGET_PAIRS = \ |
084c663c AC |
1218 | a-caldel.adb<a-caldel-vms.adb \ |
1219 | a-calend.adb<a-calend-vms.adb \ | |
1220 | a-calend.ads<a-calend-vms.ads \ | |
1221 | a-dirval.adb<a-dirval-vms.adb \ | |
1222 | a-excpol.adb<a-excpol-abort.adb \ | |
1223 | a-intnam.ads<a-intnam-vms.ads \ | |
1224 | a-numaux.ads<a-numaux-vms.ads \ | |
1225 | g-expect.adb<g-expect-vms.adb \ | |
1226 | g-soccon.ads<g-soccon-vms.adb \ | |
1227 | g-socthi.ads<g-socthi-vms.ads \ | |
1228 | g-socthi.adb<g-socthi-vms.adb \ | |
1229 | g-trasym.adb<g-trasym-vms.adb \ | |
1230 | i-cstrea.adb<i-cstrea-vms.adb \ | |
1231 | i-cpp.adb<i-cpp-vms.adb \ | |
1232 | interfac.ads<interfac-vms.ads \ | |
084c663c AC |
1233 | s-inmaop.adb<s-inmaop-vms.adb \ |
1234 | s-interr.adb<s-interr-vms.adb \ | |
1235 | s-intman.adb<s-intman-vms.adb \ | |
1236 | s-intman.ads<s-intman-vms.ads \ | |
1237 | s-osprim.adb<s-osprim-vms.adb \ | |
1238 | s-osprim.ads<s-osprim-vms.ads \ | |
1239 | s-taprop.adb<s-taprop-vms.adb \ | |
1240 | s-taspri.ads<s-taspri-vms.ads \ | |
bd94e912 | 1241 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ |
084c663c AC |
1242 | s-tpopde.adb<s-tpopde-vms.adb \ |
1243 | s-tpopde.ads<s-tpopde-vms.ads \ | |
1244 | s-traent.adb<s-traent-vms.adb \ | |
1245 | s-traent.ads<s-traent-vms.ads \ | |
a336eaca AC |
1246 | $(LIBGNAT_TARGET_PAIRS_AUX1) \ |
1247 | $(LIBGNAT_TARGET_PAIRS_AUX2) | |
07fc65c4 | 1248 | |
0ab80019 | 1249 | ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),) |
0da2c8ac AC |
1250 | TOOLS_TARGET_PAIRS= \ |
1251 | mlib-tgt.adb<mlib-tgt-vms-ia64.adb \ | |
0ab80019 AC |
1252 | symbols.adb<symbols-vms-ia64.adb |
1253 | else | |
1254 | TOOLS_TARGET_PAIRS= \ | |
1255 | mlib-tgt.adb<mlib-tgt-vms-alpha.adb \ | |
1256 | symbols.adb<symbols-vms-alpha.adb | |
1257 | endif | |
fbf5a39b | 1258 | |
07fc65c4 | 1259 | GNATLIB_SHARED=gnatlib-shared-vms |
a336eaca | 1260 | ifeq ($(strip $(filter-out alpha% dec vms% openvms% alphavms%,$(targ))),) |
07fc65c4 GB |
1261 | EXTRA_LIBGNAT_SRCS=vmshandler.asm |
1262 | EXTRA_LIBGNAT_OBJS=vmshandler.o | |
a336eaca | 1263 | endif |
07fc65c4 | 1264 | EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o |
fbf5a39b AC |
1265 | EXTRA_GNATTOOLS = \ |
1266 | ../../gnatlbr$(exeext) \ | |
3536d406 | 1267 | ../../gnatsym$(exeext) |
fbf5a39b | 1268 | # This command transforms (YYYYMMDD) into YY,MMDD |
efdfd311 | 1269 | GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\)/\2,\3/') |
fbf5a39b | 1270 | TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe |
91b1417d | 1271 | LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION)) |
84481f76 RK |
1272 | endif |
1273 | ||
1274 | ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),) | |
1275 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
1276 | a-calend.adb<a-calend-mingw.adb \ |
1277 | a-dirval.adb<a-dirval-mingw.adb \ | |
1278 | a-excpol.adb<a-excpol-abort.adb \ | |
1279 | a-intnam.ads<a-intnam-mingw.ads \ | |
1280 | a-numaux.adb<a-numaux-x86.adb \ | |
1281 | a-numaux.ads<a-numaux-x86.ads \ | |
1282 | s-gloloc.adb<s-gloloc-mingw.adb \ | |
1283 | s-inmaop.adb<s-inmaop-dummy.adb \ | |
1284 | s-interr.adb<s-interr-sigaction.adb \ | |
1285 | s-intman.adb<s-intman-mingw.adb \ | |
1286 | s-mastop.adb<s-mastop-x86.adb \ | |
1287 | s-memory.adb<s-memory-mingw.adb \ | |
1288 | s-osinte.ads<s-osinte-mingw.ads \ | |
1289 | s-osprim.adb<s-osprim-mingw.adb \ | |
1290 | s-taprop.adb<s-taprop-mingw.adb \ | |
1291 | s-taspri.ads<s-taspri-mingw.ads \ | |
0da2c8ac | 1292 | s-parame.adb<s-parame-mingw.adb \ |
084c663c AC |
1293 | g-socthi.ads<g-socthi-mingw.ads \ |
1294 | g-socthi.adb<g-socthi-mingw.adb \ | |
1295 | g-soccon.ads<g-soccon-mingw.ads \ | |
1296 | g-soliop.ads<g-soliop-mingw.ads \ | |
1297 | system.ads<system-mingw.ads | |
1298 | ||
5d09245e AC |
1299 | TOOLS_TARGET_PAIRS= \ |
1300 | mlib-tgt.adb<mlib-tgt-mingw.adb \ | |
1301 | indepsw.adb<indepsw-mingw.adb | |
1302 | ||
07fc65c4 | 1303 | MISCLIB = -lwsock32 |
07fc65c4 | 1304 | GMEM_LIB = gmemlib |
fbf5a39b | 1305 | PREFIX_OBJS = $(PREFIX_REAL_OBJS) |
07fc65c4 | 1306 | EXTRA_GNATTOOLS = ../../gnatdll$(exeext) |
fbf5a39b | 1307 | EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o |
84481f76 | 1308 | EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o |
fbf5a39b | 1309 | soext = .dll |
91b1417d AC |
1310 | # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT auto-import |
1311 | # support for array/record will be done. | |
fbf5a39b | 1312 | GNATLIB_SHARED = gnatlib-shared-win32 |
efdfd311 | 1313 | LIBRARY_VERSION := $(LIB_VERSION) |
fbf5a39b AC |
1314 | endif |
1315 | ||
71c10a83 BB |
1316 | ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),) |
1317 | LIBGNAT_TARGET_PAIRS = \ | |
1318 | a-intnam.ads<a-intnam-linux.ads \ | |
1319 | s-inmaop.adb<s-inmaop-posix.adb \ | |
1320 | s-intman.adb<s-intman-posix.adb \ | |
1321 | s-osinte.adb<s-osinte-posix.adb \ | |
1322 | s-osinte.ads<s-osinte-linux.ads \ | |
1323 | s-osprim.adb<s-osprim-posix.adb \ | |
1324 | s-taprop.adb<s-taprop-linux.adb \ | |
1325 | s-taspri.ads<s-taspri-linux.ads \ | |
1326 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ | |
1327 | s-parame.adb<s-parame-linux.adb \ | |
1328 | system.ads<system-linux-ppc.ads | |
1329 | ||
1330 | TOOLS_TARGET_PAIRS = \ | |
1331 | mlib-tgt.adb<mlib-tgt-linux.adb \ | |
1332 | indepsw.adb<indepsw-linux.adb | |
1333 | ||
71c10a83 BB |
1334 | THREADSLIB = -lpthread |
1335 | GNATLIB_SHARED = gnatlib-shared-dual | |
1336 | GMEM_LIB = gmemlib | |
1337 | PREFIX_OBJS = $(PREFIX_REAL_OBJS) | |
1338 | LIBRARY_VERSION := $(LIB_VERSION) | |
71c10a83 BB |
1339 | endif |
1340 | ||
fbf5a39b AC |
1341 | ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),) |
1342 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c | 1343 | a-intnam.ads<a-intnam-linux.ads \ |
8a36a0cc | 1344 | a-numaux.ads<a-numaux-libc-x86.ads \ |
084c663c AC |
1345 | s-inmaop.adb<s-inmaop-posix.adb \ |
1346 | s-intman.adb<s-intman-posix.adb \ | |
1347 | s-osinte.ads<s-osinte-linux.ads \ | |
1348 | s-osinte.adb<s-osinte-posix.adb \ | |
1349 | s-osprim.adb<s-osprim-posix.adb \ | |
1350 | s-taprop.adb<s-taprop-linux.adb \ | |
1351 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ | |
1352 | s-taspri.ads<s-taspri-linux.ads \ | |
0fb2ea01 | 1353 | system.ads<system-linux-ia64.ads |
8d5e1df2 RH |
1354 | |
1355 | TOOLS_TARGET_PAIRS = \ | |
1356 | mlib-tgt.adb<mlib-tgt-linux.adb \ | |
1357 | indepsw.adb<indepsw-linux.adb | |
1358 | ||
1359 | MISCLIB= | |
1360 | THREADSLIB=-lpthread | |
1361 | GNATLIB_SHARED=gnatlib-shared-dual | |
1362 | PREFIX_OBJS=$(PREFIX_REAL_OBJS) | |
1363 | LIBRARY_VERSION := $(LIB_VERSION) | |
1364 | endif | |
1365 | ||
1366 | ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),) | |
1367 | LIBGNAT_TARGET_PAIRS = \ | |
3f38e738 | 1368 | a-intnam.ads<a-intnam-linux.ads \ |
8d5e1df2 RH |
1369 | s-inmaop.adb<s-inmaop-posix.adb \ |
1370 | s-intman.adb<s-intman-posix.adb \ | |
1371 | s-osinte.ads<s-osinte-linux-alpha.ads \ | |
1372 | s-osinte.adb<s-osinte-posix.adb \ | |
1373 | s-osprim.adb<s-osprim-posix.adb \ | |
1374 | s-taprop.adb<s-taprop-linux.adb \ | |
1375 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ | |
1376 | s-taspri.ads<s-taspri-linux.ads \ | |
3f38e738 | 1377 | system.ads<system-linux-alpha.ads |
084c663c | 1378 | |
e6d50a9e AC |
1379 | TOOLS_TARGET_PAIRS = \ |
1380 | mlib-tgt.adb<mlib-tgt-linux.adb \ | |
1381 | indepsw.adb<indepsw-linux.adb | |
1382 | ||
fbf5a39b AC |
1383 | MISCLIB= |
1384 | THREADSLIB=-lpthread | |
1385 | GNATLIB_SHARED=gnatlib-shared-dual | |
1386 | PREFIX_OBJS=$(PREFIX_REAL_OBJS) | |
efdfd311 | 1387 | LIBRARY_VERSION := $(LIB_VERSION) |
84481f76 RK |
1388 | endif |
1389 | ||
c0040397 AJ |
1390 | ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),) |
1391 | LIBGNAT_TARGET_PAIRS = \ | |
084c663c AC |
1392 | a-intnam.ads<a-intnam-linux.ads \ |
1393 | a-numaux.adb<a-numaux-x86.adb \ | |
1394 | a-numaux.ads<a-numaux-x86.ads \ | |
1395 | s-inmaop.adb<s-inmaop-posix.adb \ | |
1396 | s-intman.adb<s-intman-posix.adb \ | |
1397 | s-osinte.ads<s-osinte-linux.ads \ | |
1398 | s-osinte.adb<s-osinte-posix.adb \ | |
1399 | s-osprim.adb<s-osprim-posix.adb \ | |
1400 | s-taprop.adb<s-taprop-linux.adb \ | |
1401 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ | |
1402 | s-taspri.ads<s-taspri-linux.ads \ | |
1403 | system.ads<system-linux-x86_64.ads | |
1404 | ||
1405 | TOOLS_TARGET_PAIRS=mlib-tgt.adb<mlib-tgt-linux.adb | |
c0040397 AJ |
1406 | THREADSLIB=-lpthread |
1407 | GNATLIB_SHARED=gnatlib-shared-dual | |
26fd4eae | 1408 | GMEM_LIB = gmemlib |
c0040397 | 1409 | PREFIX_OBJS=$(PREFIX_REAL_OBJS) |
efdfd311 | 1410 | LIBRARY_VERSION := $(LIB_VERSION) |
c470d7c9 | 1411 | endif |
26fd4eae | 1412 | |
c470d7c9 AC |
1413 | ifeq ($(strip $(filter-out powerpc darwin%,$(arch) $(osys))),) |
1414 | LIBGNAT_TARGET_PAIRS = \ | |
1415 | a-intnam.ads<a-intnam-darwin.ads \ | |
084c663c AC |
1416 | s-inmaop.adb<s-inmaop-posix.adb \ |
1417 | s-intman.adb<s-intman-posix.adb \ | |
c470d7c9 AC |
1418 | s-osinte.adb<s-osinte-darwin.adb \ |
1419 | s-osinte.ads<s-osinte-darwin.ads \ | |
084c663c AC |
1420 | s-osprim.adb<s-osprim-posix.adb \ |
1421 | s-taprop.adb<s-taprop-posix.adb \ | |
1422 | s-taspri.ads<s-taspri-posix.ads \ | |
1423 | s-tpopsp.adb<s-tpopsp-posix-foreign.adb \ | |
e6d50a9e AC |
1424 | g-soccon.ads<g-soccon-darwin.ads \ |
1425 | a-numaux.ads<a-numaux-darwin.ads \ | |
1426 | a-numaux.adb<a-numaux-darwin.adb \ | |
c470d7c9 | 1427 | system.ads<system-darwin-ppc.ads |
c4820158 NS |
1428 | |
1429 | TOOLS_TARGET_PAIRS = \ | |
1430 | mlib-tgt.adb<mlib-tgt-darwin.adb | |
1431 | ||
1432 | GNATLIB_SHARED = gnatlib-shared-darwin | |
1433 | SO_OPTS = -Wl,-flat_namespace | |
1434 | RANLIB = ranlib -c | |
d10ad8ff AC |
1435 | GMEM_LIB = gmemlib |
1436 | ||
c4820158 | 1437 | LIBRARY_VERSION := $(LIB_VERSION) |
bb342a77 | 1438 | soext = .dylib |
c0040397 AJ |
1439 | endif |
1440 | ||
84481f76 RK |
1441 | # The runtime library for gnat comprises two directories. One contains the |
1442 | # Ada source files that the compiler (gnat1) needs -- these files are listed | |
1443 | # by ADA_INCLUDE_SRCS -- and the other contains the object files and their | |
1444 | # corresponding .ali files for the parts written in Ada, libgnat.a for | |
1445 | # the parts of the runtime written in C, and libgthreads.a for the pthreads | |
1446 | # emulation library. LIBGNAT_OBJS lists the objects that go into libgnat.a, | |
1447 | # while GNATRTL_OBJS lists the object files compiled from Ada sources that | |
1448 | # go into the directory. The pthreads emulation is built in the threads | |
1449 | # subdirectory and copied. | |
1450 | LIBGNAT_SRCS = ada.h adaint.c adaint.h argv.c cio.c cstreams.c \ | |
fbf5a39b | 1451 | errno.c exit.c cal.c ctrl_c.c \ |
3536d406 | 1452 | raise.h raise.c sysdep.c aux-io.c init.c seh_init.c \ |
e6d50a9e | 1453 | final.c tracebak.c tb-alvms.c tb-alvxw.c expect.c mkdir.c socket.c gsocket.h \ |
fbf5a39b | 1454 | $(EXTRA_LIBGNAT_SRCS) |
84481f76 | 1455 | |
fbf5a39b | 1456 | LIBGNAT_OBJS = adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o \ |
3536d406 | 1457 | raise.o sysdep.o aux-io.o init.o seh_init.o cal.o final.o \ |
fbf5a39b | 1458 | tracebak.o expect.o mkdir.o socket.o $(EXTRA_LIBGNAT_OBJS) |
84481f76 RK |
1459 | |
1460 | # NOTE ??? - when the -I option for compiling Ada code is made to work, | |
1461 | # the library installation will change and there will be a | |
1462 | # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS | |
1463 | # from ADA_INCLUDE_SRCS. | |
1464 | ||
fbf5a39b AC |
1465 | # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in |
1466 | # the following include file: | |
1467 | ||
1468 | include $(fsrcdir)/Makefile.rtl | |
1469 | ||
1470 | GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \ | |
1471 | g-trasym.o memtrack.o | |
84481f76 | 1472 | |
84481f76 RK |
1473 | # Default run time files |
1474 | ||
1475 | ADA_INCLUDE_SRCS =\ | |
1476 | ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \ | |
1477 | machcode.ads text_io.ads unchconv.ads unchdeal.ads \ | |
5395b47b | 1478 | sequenio.ads system.ads memtrack.adb \ |
84481f76 RK |
1479 | a-*.adb a-*.ads g-*.ad? i-*.ad? \ |
1480 | s-[a-o]*.adb s-[p-z]*.adb \ | |
1481 | s-[a-o]*.ads s-[p-z]*.ads | |
1482 | ||
07fc65c4 | 1483 | LIBGNAT=../rts/libgnat.a |
3536d406 AC |
1484 | GCC_LINK="$(CC) -static-libgcc $(ADA_INCLUDES)" |
1485 | ||
07fc65c4 GB |
1486 | # when compiling the tools, the runtime has to be first on the path so that |
1487 | # it hides the runtime files lying with the rest of the sources | |
1488 | ifeq ($(TOOLSCASE),native) | |
1489 | vpath %.ads ../rts ../ | |
1490 | vpath %.adb ../rts ../ | |
1491 | vpath %.c ../rts ../ | |
1492 | vpath %.h ../rts ../ | |
1493 | endif | |
84481f76 | 1494 | |
07fc65c4 GB |
1495 | # in the cross tools case, everything is compiled with the native |
1496 | # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES | |
1497 | ifeq ($(TOOLSCASE),cross) | |
1498 | vpath %.ads ../ | |
1499 | vpath %.adb ../ | |
1500 | vpath %.c ../ | |
1501 | vpath %.h ../ | |
1502 | endif | |
84481f76 | 1503 | |
fbf5a39b | 1504 | |
5395b47b | 1505 | ../../gnatchop$(exeext): |
07fc65c4 GB |
1506 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)" |
1507 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatchop | |
3536d406 | 1508 | $(GNATLINK) -v gnatchop -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
07fc65c4 | 1509 | |
5395b47b | 1510 | ../../gnat$(exeext): |
07fc65c4 GB |
1511 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatcmd --GCC="$(CC) $(ALL_ADAFLAGS)" |
1512 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatcmd | |
3536d406 | 1513 | $(GNATLINK) -v gnatcmd -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
07fc65c4 | 1514 | |
5395b47b | 1515 | ../../gnatkr$(exeext): |
07fc65c4 GB |
1516 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatkr --GCC="$(CC) $(ALL_ADAFLAGS)" |
1517 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatkr | |
3536d406 | 1518 | $(GNATLINK) -v gnatkr -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
07fc65c4 | 1519 | |
5395b47b | 1520 | ../../gnatls$(exeext): |
07fc65c4 GB |
1521 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatls --GCC="$(CC) $(ALL_ADAFLAGS)" |
1522 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatls | |
3536d406 | 1523 | $(GNATLINK) -v gnatls -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
07fc65c4 | 1524 | |
5395b47b | 1525 | ../../gnatname$(exeext): |
07fc65c4 GB |
1526 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatname --GCC="$(CC) $(ALL_ADAFLAGS)" |
1527 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatname | |
3536d406 | 1528 | $(GNATLINK) -v gnatname -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
fbf5a39b | 1529 | |
5395b47b | 1530 | ../../gprmake$(exeext): |
9f4fd324 AC |
1531 | $(GNATMAKE) -c $(ADA_INCLUDES) gprmake --GCC="$(CC) $(ALL_ADAFLAGS)" |
1532 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gprmake | |
3536d406 | 1533 | $(GNATLINK) -v gprmake -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
9f4fd324 | 1534 | |
5395b47b | 1535 | ../../gnatprep$(exeext): |
07fc65c4 GB |
1536 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatprep --GCC="$(CC) $(ALL_ADAFLAGS)" |
1537 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatprep | |
3536d406 | 1538 | $(GNATLINK) -v gnatprep -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
07fc65c4 | 1539 | |
5395b47b | 1540 | ../../gnatxref$(exeext): |
07fc65c4 GB |
1541 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatxref --GCC="$(CC) $(ALL_ADAFLAGS)" |
1542 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatxref | |
3536d406 | 1543 | $(GNATLINK) -v gnatxref -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
07fc65c4 | 1544 | |
5395b47b | 1545 | ../../gnatfind$(exeext): |
07fc65c4 GB |
1546 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatfind --GCC="$(CC) $(ALL_ADAFLAGS)" |
1547 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatfind | |
3536d406 | 1548 | $(GNATLINK) -v gnatfind -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
fbf5a39b | 1549 | |
5395b47b | 1550 | ../../gnatclean$(exeext): |
fbf5a39b AC |
1551 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatclean --GCC="$(CC) $(ALL_ADAFLAGS)" |
1552 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatclean | |
3536d406 | 1553 | $(GNATLINK) -v gnatclean -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
fbf5a39b | 1554 | |
5395b47b | 1555 | ../../gnatsym$(exeext): |
fbf5a39b AC |
1556 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)" |
1557 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym | |
3536d406 | 1558 | $(GNATLINK) -v gnatsym -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
fbf5a39b | 1559 | |
5395b47b | 1560 | ../../gnatdll$(exeext): |
07fc65c4 GB |
1561 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)" |
1562 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) $(GNATBIND_FLAGS) gnatdll | |
3536d406 | 1563 | $(GNATLINK) -v gnatdll -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
07fc65c4 | 1564 | |
5395b47b | 1565 | ../../vxaddr2line$(exeext): |
fbf5a39b AC |
1566 | $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)" |
1567 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line | |
3536d406 | 1568 | $(GNATLINK) -v vxaddr2line -o $@ --GCC=$(GCC_LINK) $(CLIB) |
fbf5a39b | 1569 | |
5395b47b | 1570 | gnatmake-re: link.o |
07fc65c4 GB |
1571 | $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)" |
1572 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)" | |
1573 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake | |
1574 | $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \ | |
3536d406 | 1575 | --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
07fc65c4 GB |
1576 | |
1577 | # Note the use of the "mv" command in order to allow gnatlink to be linked with | |
1578 | # with the former version of gnatlink itself which cannot override itself. | |
5395b47b | 1579 | gnatlink-re: link.o |
07fc65c4 GB |
1580 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)" |
1581 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink | |
1582 | $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \ | |
3536d406 | 1583 | --GCC=$(GCC_LINK) $(TOOLS_LIBS) |
07fc65c4 GB |
1584 | $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext) |
1585 | ||
84481f76 RK |
1586 | # Needs to be built with CC=gcc |
1587 | # Since the RTL should be built with the latest compiler, remove the | |
1588 | # stamp target in the parent directory whenever gnat1 is rebuilt | |
fbf5a39b | 1589 | |
07fc65c4 | 1590 | # Likewise for the tools |
af4b9434 | 1591 | ../../gnatmake$(exeext): $(P) b_gnatm.o link.o $(GNATMAKE_OBJS) |
07fc65c4 GB |
1592 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \ |
1593 | $(TOOLS_LIBS) | |
84481f76 | 1594 | |
af4b9434 | 1595 | ../../gnatlink$(exeext): $(P) b_gnatl.o link.o $(GNATLINK_OBJS) |
07fc65c4 GB |
1596 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \ |
1597 | $(TOOLS_LIBS) | |
84481f76 | 1598 | |
07fc65c4 GB |
1599 | ../../gnatbl$(exeext): gnatbl.o |
1600 | $(CC) -o $@ $(ALL_CFLAGS) $(LDFLAGS) gnatbl.o $(TOOLS_LIBS) | |
84481f76 | 1601 | |
07fc65c4 | 1602 | gnatbl.o: gnatbl.c adaint.h |
fbf5a39b AC |
1603 | $(CC) $(ALL_CFLAGS) $(INCLUDES) -c $< $(OUTPUT_OPTION) |
1604 | ||
84481f76 RK |
1605 | ../stamp-gnatlib: |
1606 | @if [ ! -f stamp-gnatlib ] ; \ | |
1607 | then \ | |
1608 | $(ECHO) You must first build the GNAT library: make gnatlib; \ | |
1609 | false; \ | |
1610 | else \ | |
1611 | true; \ | |
1612 | fi | |
1613 | ||
07fc65c4 | 1614 | install-gnatlib: ../stamp-gnatlib |
84481f76 RK |
1615 | # Create the directory before deleting it, in case the directory is |
1616 | # a list of directories (as it may be on VMS). This ensures we are | |
1617 | # deleting the right one. | |
1d27195c CC |
1618 | -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR) |
1619 | -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR) | |
1620 | $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR) | |
1621 | $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR) | |
1622 | -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR) | |
1623 | -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR) | |
5348742b | 1624 | for file in rts/*.ali; do \ |
91b1417d | 1625 | $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \ |
84481f76 | 1626 | done |
fbf5a39b | 1627 | -$(INSTALL_DATA) rts/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR) |
5a944040 | 1628 | -cd rts; for file in *$(arext);do \ |
1d27195c | 1629 | $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \ |
426e7d28 | 1630 | $(RANLIB) $(RANLIB_FLAGS) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \ |
84481f76 | 1631 | done |
5453d5bd AC |
1632 | -$(foreach file, $(EXTRA_ADALIB_FILES), \ |
1633 | $(INSTALL_DATA_DATE) rts/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \ | |
1634 | ) true | |
fbf5a39b AC |
1635 | # Install the shared libraries, if any, using $(INSTALL) instead |
1636 | # of $(INSTALL_DATA). The latter may force a mode inappropriate | |
1637 | # for shared libraries on some targets, e.g. on HP-UX where the x | |
1638 | # permission is required. | |
acd47d2a | 1639 | for file in gnat gnarl; do \ |
b7e429ab AC |
1640 | if [ -f rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \ |
1641 | $(INSTALL) rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \ | |
fbf3e0dd | 1642 | $(DESTDIR)$(ADA_RTL_OBJ_DIR); \ |
acd47d2a | 1643 | fi; \ |
b7e429ab AC |
1644 | if [ -f rts/lib$${file}$(soext) ]; then \ |
1645 | $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \ | |
1646 | $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \ | |
acd47d2a | 1647 | fi; \ |
84481f76 | 1648 | done |
84481f76 | 1649 | # This copy must be done preserving the date on the original file. |
5348742b | 1650 | for file in rts/*.adb rts/*.ads; do \ |
1d27195c | 1651 | $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \ |
84481f76 | 1652 | done |
1d27195c CC |
1653 | cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb |
1654 | cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads | |
84481f76 RK |
1655 | |
1656 | ../stamp-gnatlib2: | |
1657 | $(RM) rts/s-*.ali | |
1658 | $(RM) rts/s-*$(objext) | |
1659 | $(RM) rts/a-*.ali | |
1660 | $(RM) rts/a-*$(objext) | |
1661 | $(RM) rts/*.ali | |
1662 | $(RM) rts/*$(objext) | |
1663 | $(RM) rts/*$(arext) | |
1664 | $(RM) rts/*$(soext) | |
1665 | touch ../stamp-gnatlib2 | |
1666 | $(RM) ../stamp-gnatlib | |
1667 | ||
1668 | # NOTE: The $(foreach ...) commands assume ";" is the valid separator between | |
1669 | # successive target commands. Although the Gnu make documentation | |
1670 | # implies this is true on all systems, I suspect it may not be, So care | |
1671 | # has been taken to allow a sed script to look for ";)" and substitue | |
1672 | # for ";" the appropriate character in the range of lines below | |
1673 | # beginning with "GNULLI Begin" and ending with "GNULLI End" | |
1674 | ||
1675 | # GNULLI Begin ########################################################### | |
1676 | ||
1677 | ../stamp-gnatlib1: Makefile ../stamp-gnatlib2 | |
1678 | $(RMDIR) rts | |
1679 | $(MKDIR) rts | |
1680 | $(CHMOD) u+w rts | |
1681 | # Copy target independent sources | |
1682 | $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \ | |
1683 | $(LN_S) $(fsrcpfx)$(f) rts ;) true | |
1684 | # Remove files to be replaced by target dependent sources | |
1685 | $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \ | |
1686 | rts/$(word 1,$(subst <, ,$(PAIR)))) | |
0fb2ea01 | 1687 | $(RM) rts/*-*-*.ads rts/*-*-*.adb |
84481f76 RK |
1688 | # Copy new target dependent sources |
1689 | $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \ | |
1690 | $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \ | |
1691 | rts/$(word 1,$(subst <, ,$(PAIR)));) | |
1692 | $(RM) ../stamp-gnatlib | |
1693 | touch ../stamp-gnatlib1 | |
1694 | ||
1695 | # GNULLI End ############################################################# | |
1696 | ||
1697 | # Don't use semicolon separated shell commands that involve list expansions. | |
1698 | # The semicolon triggers a call to DCL on VMS and DCL can't handle command | |
1699 | # line lengths in excess of 256 characters. | |
1700 | # Example: cd rts; ar rc libfoo.a $(LONG_LIST_OF_OBJS) | |
1701 | # is guaranteed to overflow the buffer. | |
1702 | ||
1703 | gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2 | |
84481f76 RK |
1704 | $(MAKE) -C rts CC="../../xgcc -B../../" \ |
1705 | INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \ | |
07fc65c4 | 1706 | CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \ |
fbf5a39b AC |
1707 | srcdir=$(fsrcdir) \ |
1708 | -f ../Makefile $(LIBGNAT_OBJS) | |
84481f76 | 1709 | $(MAKE) -C rts CC="../../xgcc -B../../" \ |
fbf5a39b AC |
1710 | ADA_INCLUDES="" \ |
1711 | CFLAGS="$(GNATLIBCFLAGS)" \ | |
84481f76 | 1712 | ADAFLAGS="$(GNATLIBFLAGS)" \ |
fbf5a39b | 1713 | srcdir=$(fsrcdir) \ |
84481f76 RK |
1714 | -f ../Makefile \ |
1715 | $(GNATRTL_OBJS) | |
1716 | $(RM) rts/libgnat$(arext) rts/libgnarl$(arext) | |
1717 | $(AR) $(AR_FLAGS) rts/libgnat$(arext) \ | |
fbf5a39b AC |
1718 | $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS)) |
1719 | ifneq ($(PREFIX_OBJS),) | |
1720 | $(AR) $(AR_FLAGS) rts/libgccprefix$(arext) $(PREFIX_OBJS); | |
1721 | endif | |
110aba14 | 1722 | -$(RANLIB) $(RANLIB_FLAGS) rts/libgnat$(arext) |
84481f76 RK |
1723 | $(AR) $(AR_FLAGS) rts/libgnarl$(arext) \ |
1724 | $(addprefix rts/,$(GNATRTL_TASKING_OBJS)) | |
110aba14 | 1725 | -$(RANLIB) $(RANLIB_FLAGS) rts/libgnarl$(arext) |
84481f76 | 1726 | ifeq ($(GMEM_LIB),gmemlib) |
5a944040 | 1727 | $(AR) $(AR_FLAGS) rts/libgmem$(arext) rts/memtrack.o |
110aba14 | 1728 | -$(RANLIB) $(RANLIB_FLAGS) rts/libgmem$(arext) |
84481f76 RK |
1729 | endif |
1730 | $(CHMOD) a-wx rts/*.ali | |
1731 | touch ../stamp-gnatlib | |
1732 | ||
84481f76 RK |
1733 | # Warning: this target assumes that LIBRARY_VERSION has been set correctly. |
1734 | gnatlib-shared-default: | |
1735 | $(MAKE) $(FLAGS_TO_PASS) \ | |
1736 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ | |
1737 | GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \ | |
1738 | THREAD_KIND="$(THREAD_KIND)" \ | |
1739 | gnatlib | |
c470d7c9 | 1740 | $(RM) rts/libgna*$(soext) |
84481f76 | 1741 | cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \ |
adc04486 | 1742 | -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ |
07fc65c4 | 1743 | $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ |
adc04486 AC |
1744 | $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ |
1745 | $(MISCLIB) -lm | |
84481f76 | 1746 | cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \ |
adc04486 | 1747 | -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ |
07fc65c4 | 1748 | $(GNATRTL_TASKING_OBJS) \ |
adc04486 AC |
1749 | $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ |
1750 | $(THREADSLIB) | |
1751 | cd rts; $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ | |
1752 | libgnat$(soext) | |
1753 | cd rts; $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ | |
1754 | libgnarl$(soext) | |
84481f76 RK |
1755 | |
1756 | gnatlib-shared-dual: | |
1757 | $(MAKE) $(FLAGS_TO_PASS) \ | |
1758 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ | |
1759 | GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ | |
1760 | THREAD_KIND="$(THREAD_KIND)" \ | |
fbf5a39b AC |
1761 | gnatlib-shared-default |
1762 | $(MV) rts/libgna*$(soext) . | |
84481f76 RK |
1763 | $(RM) ../stamp-gnatlib2 |
1764 | $(MAKE) $(FLAGS_TO_PASS) \ | |
1765 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ | |
1766 | GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ | |
1767 | THREAD_KIND="$(THREAD_KIND)" \ | |
fbf5a39b AC |
1768 | gnatlib |
1769 | $(MV) libgna*$(soext) rts | |
1770 | ||
91b1417d AC |
1771 | gnatlib-shared-dual-win32: |
1772 | $(MAKE) $(FLAGS_TO_PASS) \ | |
1773 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ | |
1774 | GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \ | |
1775 | THREAD_KIND="$(THREAD_KIND)" \ | |
1776 | gnatlib-shared-win32 | |
1777 | $(MV) rts/libgna*$(soext) . | |
1778 | $(RM) ../stamp-gnatlib2 | |
1779 | $(MAKE) $(FLAGS_TO_PASS) \ | |
1780 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ | |
1781 | GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ | |
1782 | THREAD_KIND="$(THREAD_KIND)" \ | |
1783 | gnatlib | |
1784 | $(MV) libgna*$(soext) rts | |
1785 | ||
1786 | # ??? we need to add the option to support auto-import of arrays/records to | |
1787 | # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will | |
1788 | # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on | |
1789 | # Windows. | |
fbf5a39b AC |
1790 | gnatlib-shared-win32: |
1791 | $(MAKE) $(FLAGS_TO_PASS) \ | |
1792 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ | |
1793 | GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \ | |
1794 | THREAD_KIND="$(THREAD_KIND)" \ | |
1795 | gnatlib | |
c470d7c9 | 1796 | $(RM) rts/libgna*$(soext) |
fbf5a39b | 1797 | cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \ |
adc04486 | 1798 | -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ |
fbf5a39b | 1799 | $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ |
adc04486 | 1800 | $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB) |
fbf5a39b | 1801 | cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \ |
adc04486 | 1802 | -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ |
fbf5a39b | 1803 | $(GNATRTL_TASKING_OBJS) \ |
adc04486 AC |
1804 | $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ |
1805 | $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) | |
84481f76 | 1806 | |
c4820158 NS |
1807 | gnatlib-shared-darwin: |
1808 | $(MAKE) $(FLAGS_TO_PASS) \ | |
1809 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ | |
e6d50a9e AC |
1810 | GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \ |
1811 | -fno-common" \ | |
c4820158 NS |
1812 | THREAD_KIND="$(THREAD_KIND)" \ |
1813 | gnatlib | |
1814 | $(RM) rts/libgnat$(soext) rts/libgnarl$(soext) | |
1815 | cd rts; ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \ | |
1816 | -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ | |
1817 | $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ | |
1818 | $(SO_OPTS) \ | |
1819 | $(MISCLIB) -lm | |
1820 | cd rts; ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \ | |
1821 | -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ | |
1822 | $(GNATRTL_TASKING_OBJS) \ | |
1823 | $(SO_OPTS) \ | |
1824 | $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) | |
1825 | cd rts; $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ | |
1826 | libgnat$(soext) | |
1827 | cd rts; $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ | |
1828 | libgnarl$(soext) | |
1829 | ||
84481f76 RK |
1830 | gnatlib-shared-vms: |
1831 | $(MAKE) $(FLAGS_TO_PASS) \ | |
1832 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ | |
1833 | GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ | |
1834 | THREAD_KIND="$(THREAD_KIND)" \ | |
1835 | gnatlib | |
c470d7c9 | 1836 | $(RM) rts/libgna*$(soext) |
fbf5a39b AC |
1837 | cd rts && echo "case_sensitive=yes" > SYMVEC_$$$$.opt && \ |
1838 | objdump --syms $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) | \ | |
1839 | $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt && \ | |
1840 | echo "case_sensitive=NO" >> SYMVEC_$$$$.opt && \ | |
1841 | ../../xgcc -g -B../../ -nostartfiles -shared -shared-libgcc \ | |
adc04486 | 1842 | -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \ |
fbf5a39b AC |
1843 | sys\$$library:trace.exe \ |
1844 | --for-linker=/noinform \ | |
1845 | --for-linker=SYMVEC_$$$$.opt \ | |
1846 | --for-linker=gsmatch=equal,$(GSMATCH_VERSION) | |
1847 | cd rts && echo "case_sensitive=yes" > SYMVEC_$$$$.opt && \ | |
1848 | objdump --syms $(GNATRTL_TASKING_OBJS) | \ | |
1849 | $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt && \ | |
1850 | echo "case_sensitive=NO" >> SYMVEC_$$$$.opt && \ | |
1851 | ../../xgcc -g -B../../ -nostartfiles -shared -shared-libgcc \ | |
adc04486 AC |
1852 | -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ |
1853 | libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ | |
fbf5a39b AC |
1854 | sys\$$library:trace.exe \ |
1855 | --for-linker=/noinform \ | |
1856 | --for-linker=SYMVEC_$$$$.opt \ | |
1857 | --for-linker=gsmatch=equal,$(GSMATCH_VERSION) | |
84481f76 RK |
1858 | |
1859 | gnatlib-shared: | |
1860 | $(MAKE) $(FLAGS_TO_PASS) \ | |
1861 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ | |
1862 | GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ | |
1863 | THREAD_KIND="$(THREAD_KIND)" \ | |
07fc65c4 | 1864 | TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \ |
84481f76 RK |
1865 | $(GNATLIB_SHARED) |
1866 | ||
fbf5a39b AC |
1867 | gnatlib-sjlj: ../stamp-gnatlib1 |
1868 | sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' rts/system.ads > rts/s.ads | |
1869 | $(MV) rts/s.ads rts/system.ads | |
1870 | $(MAKE) $(FLAGS_TO_PASS) \ | |
1871 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ | |
1872 | GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ | |
1873 | THREAD_KIND="$(THREAD_KIND)" \ | |
1874 | TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib | |
1875 | ||
7324bf49 AC |
1876 | gnatlib-zcx: ../stamp-gnatlib1 |
1877 | sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' rts/system.ads > rts/s.ads | |
1878 | $(MV) rts/s.ads rts/system.ads | |
1879 | $(MAKE) $(FLAGS_TO_PASS) \ | |
1880 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ | |
1881 | GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ | |
1882 | THREAD_KIND="$(THREAD_KIND)" \ | |
1883 | TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib | |
1884 | ||
84481f76 RK |
1885 | # .s files for cross-building |
1886 | gnat-cross: force | |
fbf5a39b | 1887 | make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp" |
84481f76 RK |
1888 | |
1889 | # Compiling object files from source files. | |
1890 | ||
fbf5a39b AC |
1891 | # Note that dependencies on obstack.h are not written |
1892 | # because that file is not part of GCC. | |
1893 | # Dependencies on gvarargs.h are not written | |
1894 | # because all that file does, when not compiling with GCC, | |
1895 | # is include the system varargs.h. | |
84481f76 | 1896 | |
84481f76 | 1897 | b_gnatl.c : $(GNATLINK_OBJS) |
fbf5a39b | 1898 | $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali |
84481f76 RK |
1899 | b_gnatl.o : b_gnatl.c |
1900 | ||
84481f76 | 1901 | b_gnatm.c : $(GNATMAKE_OBJS) |
fbf5a39b | 1902 | $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali |
84481f76 RK |
1903 | b_gnatm.o : b_gnatm.c |
1904 | ||
fbf5a39b AC |
1905 | ADA_INCLUDE_DIR = $(libsubdir)/adainclude |
1906 | ADA_RTL_OBJ_DIR = $(libsubdir)/adalib | |
84481f76 | 1907 | |
fbf5a39b AC |
1908 | # force no sibling call optimization on s-traceb.o so the number of stack |
1909 | # frames to be skipped when computing a call chain is not modified by | |
1910 | # optimization. However we can do that only when building the runtime | |
1911 | # (not the compiler) because the -fno-optimize-sibling-calls exists | |
1912 | # only in GCC 3. | |
84481f76 | 1913 | |
fbf5a39b AC |
1914 | ifneq (,$(findstring xgcc,$(CC))) |
1915 | NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls | |
1916 | else | |
1917 | NO_SIBLING_ADAFLAGS= | |
1918 | endif | |
84481f76 | 1919 | |
fbf5a39b AC |
1920 | s-traceb.o : s-traceb.adb |
1921 | $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \ | |
1922 | $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \ | |
246d2ceb AC |
1923 | $< $(OUTPUT_OPTION) |
1924 | ||
1925 | # force debugging information on s-tasdeb.o so that it is always | |
1926 | # possible to set conditional breakpoints on tasks. | |
1927 | ||
1928 | s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads | |
1929 | $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \ | |
1930 | $< $(OUTPUT_OPTION) | |
1931 | ||
1932 | # force debugging information on a-except.o so that it is always | |
1933 | # possible to set conditional breakpoints on exceptions. | |
1934 | # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets. | |
1935 | ||
1936 | a-except.o : a-except.adb a-except.ads | |
1937 | $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \ | |
1938 | $(ADA_INCLUDES) $< $(OUTPUT_OPTION) | |
1939 | ||
1940 | # force debugging information on s-assert.o so that it is always | |
1941 | # possible to set breakpoint on assert failures. | |
1942 | ||
1943 | s-assert.o : s-assert.adb s-assert.ads a-except.ads | |
1944 | $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \ | |
fbf5a39b | 1945 | $< $(OUTPUT_OPTION) |
07fc65c4 | 1946 | |
fbf5a39b | 1947 | adadecode.o : adadecode.c adadecode.h |
07fc65c4 | 1948 | aux-io.o : aux-io.c |
84481f76 RK |
1949 | argv.o : argv.c |
1950 | cal.o : cal.c | |
84481f76 RK |
1951 | deftarg.o : deftarg.c |
1952 | errno.o : errno.c | |
1953 | exit.o : raise.h exit.c | |
07fc65c4 | 1954 | expect.o : expect.c |
fbf5a39b | 1955 | final.o : raise.h final.c |
84481f76 | 1956 | gmem.o : gmem.c |
07fc65c4 GB |
1957 | link.o : link.c |
1958 | mkdir.o : mkdir.c | |
e6d50a9e | 1959 | socket.o : socket.c gsocket.h |
07fc65c4 | 1960 | sysdep.o : sysdep.c |
84481f76 | 1961 | |
3536d406 AC |
1962 | gen-soccon: gen-soccon.c gsocket.h |
1963 | $(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \ | |
1964 | $(ALL_CPPFLAGS) $(INCLUDES) -DTARGET=\"$(target_alias)\" \ | |
1965 | $< $(OUTPUT_OPTION) | |
1966 | ||
1967 | cio.o : cio.c | |
fbf5a39b AC |
1968 | $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \ |
1969 | $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) | |
84481f76 | 1970 | |
84481f76 | 1971 | init.o : init.c ada.h types.h raise.h |
fbf5a39b AC |
1972 | $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \ |
1973 | $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) | |
07fc65c4 | 1974 | |
3536d406 AC |
1975 | # No optimization to compile this file as optimizations (-O1 or above) breaks |
1976 | # the SEH handling on Windows. The reasons are not clear. | |
1977 | seh_init.o : seh_init.c raise.h | |
1978 | $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) -O0 \ | |
1979 | $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) | |
1980 | ||
07fc65c4 | 1981 | raise.o : raise.c raise.h |
fbf5a39b AC |
1982 | $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(RT_FLAGS) \ |
1983 | $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) | |
84481f76 | 1984 | |
07fc65c4 GB |
1985 | # Need to keep the frame pointer in this file to pop the stack properly on |
1986 | # some targets. | |
fbf5a39b AC |
1987 | tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c |
1988 | $(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ | |
1989 | -fno-omit-frame-pointer $< $(OUTPUT_OPTION) | |
07fc65c4 GB |
1990 | |
1991 | # In GNU Make, ignore whether `stage*' exists. | |
1992 | .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap | |
1993 | .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4 | |
1994 | ||
1995 | force: | |
1996 | ||
1997 | # Gnatlbr is only used on VMS | |
1998 | ||
fbf5a39b AC |
1999 | ../../gnatlbr$(exeext): ../../prefix.o |
2000 | $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)" | |
2001 | $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr | |
3536d406 | 2002 | $(GNATLINK) -v gnatlbr -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS) |