OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [Makefile.in] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
#
2
# Makefile for directory with subdirs to build.
3
#   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
4
#   Free Software Foundation
5
#
6
# This file 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 of the License, or
9
# (at your option) any later version.
10
#
11
# This program 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 this program; if not, write to the Free Software
18
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
#
20
 
21
srcdir = .
22
 
23
prefix = /usr/local
24
exec_prefix = $(prefix)
25
 
26
bindir=${exec_prefix}/bin
27
sbindir=${exec_prefix}/sbin
28
libexecdir=${exec_prefix}/libexec
29
datadir=${prefix}/share
30
sysconfdir=${prefix}/etc
31
sharedstatedir=${prefix}/com
32
localstatedir=${prefix}/var
33
libdir=${exec_prefix}/lib
34
includedir=${prefix}/include
35
oldincludedir=/usr/include
36
infodir=${prefix}/info
37
mandir=${prefix}/man
38 56 joel
gxx_include_dir=${includedir}/g++
39 39 lampret
 
40 56 joel
tooldir = $(exec_prefix)/$(target_alias)
41
build_tooldir = $(exec_prefix)/$(target_alias)
42 39 lampret
 
43 56 joel
 
44 39 lampret
program_transform_name =
45
 
46
man1dir = $(mandir)/man1
47
man2dir = $(mandir)/man2
48
man3dir = $(mandir)/man3
49
man4dir = $(mandir)/man4
50
man5dir = $(mandir)/man5
51
man6dir = $(mandir)/man6
52
man7dir = $(mandir)/man7
53
man8dir = $(mandir)/man8
54
man9dir = $(mandir)/man9
55 56 joel
infodir = $(prefix)/info
56
includedir = $(prefix)/include
57
# Directory in which the compiler finds executables, libraries, etc.
58
libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
59 39 lampret
GDB_NLM_DEPS =
60
 
61
SHELL = /bin/sh
62
 
63
# INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
64 56 joel
# cygwin host.
65 39 lampret
INSTALL_PROGRAM_ARGS =
66
 
67
INSTALL = $(SHELL) $$s/install-sh -c
68
INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
69
INSTALL_SCRIPT = $(INSTALL)
70
INSTALL_DATA = $(INSTALL) -m 644
71
 
72
INSTALL_DOSREL = install-dosrel-fake
73
 
74
AS = as
75
AR = ar
76
AR_FLAGS = rc
77
CC = cc
78
 
79
# Special variables passed down in EXTRA_GCC_FLAGS.  They are defined
80
# here so that they can be overridden by Makefile fragments.
81
HOST_CC = $(CC_FOR_BUILD)
82
HOST_PREFIX =
83
HOST_PREFIX_1 = loser-
84
 
85
# These flag values are normally overridden by the configure script.
86
CFLAGS = -g
87
CXXFLAGS = -g -O2
88
 
89
LIBCFLAGS = $(CFLAGS)
90
CFLAGS_FOR_TARGET = $(CFLAGS)
91
LDFLAGS_FOR_TARGET =
92
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
93
PICFLAG =
94
PICFLAG_FOR_TARGET =
95
 
96 56 joel
CHILLFLAGS = $(CFLAGS)
97
CHILL_LIB = -lchill
98 39 lampret
CXX = c++
99
 
100
# Use -O2 to stress test the compiler.
101 56 joel
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fexceptions
102 39 lampret
CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
103 56 joel
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -fexceptions
104 39 lampret
 
105
RANLIB = ranlib
106
 
107
DLLTOOL = dlltool
108
WINDRES = windres
109
 
110
NM = nm
111
 
112
LD = ld
113
 
114
# Not plain GZIP, since gzip looks there for extra command-line options.
115
GZIPPROG = gzip
116
 
117
# These values are substituted by configure.
118
DEFAULT_YACC = yacc
119
DEFAULT_LEX = lex
120 56 joel
DEFAULT_M4 = m4
121 39 lampret
 
122
BISON = `if [ -f $$r/bison/bison ] ; then \
123
            echo $$r/bison/bison -L $$s/bison/ ; \
124
         else \
125
            echo bison ; \
126
         fi`
127
 
128
YACC = `if [ -f $$r/bison/bison ] ; then \
129
            echo $$r/bison/bison -y -L $$s/bison/ ; \
130
        elif [ -f $$r/byacc/byacc ] ; then \
131
            echo $$r/byacc/byacc ; \
132
        else \
133
            echo ${DEFAULT_YACC} ; \
134
        fi`
135
 
136
LEX = `if [ -f $$r/flex/flex ] ; \
137
        then echo $$r/flex/flex ; \
138
        else echo ${DEFAULT_LEX} ; fi`
139
 
140
M4 = `if [ -f $$r/m4/m4 ] ; \
141
        then echo $$r/m4/m4 ; \
142 56 joel
        else echo ${DEFAULT_M4} ; fi`
143 39 lampret
 
144
MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
145
        then echo $$r/texinfo/makeinfo/makeinfo ; \
146
        else echo makeinfo ; fi`
147
 
148
# This just becomes part of the MAKEINFO definition passed down to
149
# sub-makes.  It lets flags be given on the command line while still
150
# using the makeinfo from the object tree.
151
MAKEINFOFLAGS =
152
 
153
EXPECT = `if [ -f $$r/expect/expect ] ; \
154
        then echo $$r/expect/expect ; \
155
        else echo expect ; fi`
156
 
157
RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
158
        then echo $$s/dejagnu/runtest ; \
159
        else echo runtest ; fi`
160
 
161
 
162
# compilers to use to create programs which must be run in the build
163
# environment.
164
CC_FOR_BUILD = $(CC)
165
CXX_FOR_BUILD = $(CXX)
166
 
167
SUBDIRS = "this is set via configure, don't edit this"
168
OTHERS =
169
 
170
# This is set by the configure script to the list of directories which
171
# should be built using the target tools.
172
 
173 56 joel
 
174
TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon
175
 
176 39 lampret
# Target libraries are put under this directory:
177
# Changed by configure to $(target_alias) if cross.
178
TARGET_SUBDIR = .
179
 
180
# This is set by the configure script to the arguments passed to configure.
181
CONFIG_ARGUMENTS =
182
 
183
# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
184
# was used.
185
SET_LIB_PATH =
186
 
187
# This is the name of the environment variable used for the path to
188
# the libraries.  This may be changed by configure.in.
189
RPATH_ENVVAR = LD_LIBRARY_PATH
190
 
191
# configure.in sets SET_LIB_PATH to this if --enable-shared was used.
192
REALLY_SET_LIB_PATH = \
193 56 joel
  if [ x"$$$(RPATH_ENVVAR)" != x ]; then \
194
    $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
195
  else \
196
    $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes; \
197
  fi; \
198 39 lampret
  export $(RPATH_ENVVAR);
199
 
200
ALL = all.normal
201
INSTALL_TARGET = installdirs \
202
        install-gcc \
203
        $(INSTALL_MODULES) \
204
        $(INSTALL_TARGET_MODULES) \
205
        $(INSTALL_X11_MODULES) \
206
        $(INSTALL_DOSREL)
207
 
208 56 joel
INSTALL_TARGET_CROSS = installdirs \
209
        install-gcc-cross \
210
        $(INSTALL_MODULES) \
211
        $(INSTALL_TARGET_MODULES) \
212
        $(INSTALL_X11_MODULES) \
213
        $(INSTALL_DOSREL)
214 39 lampret
 
215
CC_FOR_TARGET = ` \
216
  if [ -f $$r/gcc/xgcc ] ; then \
217
    if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
218 56 joel
      case "$(target_canonical)" in \
219
        i[3456]86-*-cygwin*) \
220
          echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
221
          ;; \
222
        *) \
223
          echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
224
          ;; \
225
      esac \
226 39 lampret
    else \
227 56 joel
      echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/; \
228 39 lampret
    fi; \
229
  else \
230
    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
231
      echo $(CC); \
232
    else \
233
      t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
234
    fi; \
235
  fi`
236
 
237
# If CC_FOR_TARGET is not overriden on the command line, then this
238
# variable is passed down to the gcc Makefile, where it is used to
239
# build libgcc2.a.  We define it here so that it can itself be
240
# overridden on the command line.
241 56 joel
GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -I$(build_tooldir)/include
242 39 lampret
 
243 56 joel
CHILL_FOR_TARGET = ` \
244
  if [ -f $$r/gcc/xgcc ] ; then \
245
    echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -L$$r/gcc/ch/runtime/; \
246
  else \
247
    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
248
      echo $(CC); \
249
    else \
250
      t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
251
    fi; \
252
  fi`
253 39 lampret
 
254
CXX_FOR_TARGET = ` \
255
  if [ -f $$r/gcc/xgcc ] ; then \
256
    if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
257 56 joel
      case "$(target_canonical)" in \
258
        i[3456]86-*-cygwin*) \
259
          echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
260
          ;; \
261
        *) \
262
          echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
263
          ;; \
264
      esac \
265 39 lampret
    else \
266 56 joel
      echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/; \
267 39 lampret
    fi; \
268
  else \
269
    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
270
      echo $(CXX); \
271
    else \
272
      t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
273
    fi; \
274
  fi`
275
 
276
AS_FOR_TARGET = ` \
277
  if [ -f $$r/gas/as-new ] ; then \
278
    echo $$r/gas/as-new ; \
279
  else \
280
    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
281
      echo $(AS); \
282
    else \
283
       t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
284
    fi; \
285
  fi`
286
 
287
LD_FOR_TARGET = ` \
288
  if [ -f $$r/ld/ld-new ] ; then \
289
    echo $$r/ld/ld-new ; \
290
  else \
291
    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
292
      echo $(LD); \
293
    else \
294
       t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
295
    fi; \
296
  fi`
297
 
298
DLLTOOL_FOR_TARGET = ` \
299
  if [ -f $$r/binutils/dlltool ] ; then \
300
    echo $$r/binutils/dlltool ; \
301
  else \
302
    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
303
      echo $(DLLTOOL); \
304
    else \
305
       t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
306
    fi; \
307
  fi`
308
 
309
WINDRES_FOR_TARGET = ` \
310
  if [ -f $$r/binutils/windres ] ; then \
311
    echo $$r/binutils/windres ; \
312
  else \
313
    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
314
      echo $(WINDRES); \
315
    else \
316
       t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
317
    fi; \
318
  fi`
319
 
320
AR_FOR_TARGET = ` \
321
  if [ -f $$r/binutils/ar ] ; then \
322
    echo $$r/binutils/ar ; \
323
  else \
324
    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
325
      echo $(AR); \
326
    else \
327
       t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
328
    fi; \
329
  fi`
330
 
331
RANLIB_FOR_TARGET = ` \
332
  if [ -f $$r/binutils/ranlib ] ; then \
333
    echo $$r/binutils/ranlib ; \
334
  else \
335
    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
336
      echo $(RANLIB); \
337
    else \
338
       t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
339
    fi; \
340
  fi`
341
 
342
NM_FOR_TARGET = ` \
343
  if [ -f $$r/binutils/nm-new ] ; then \
344
    echo $$r/binutils/nm-new ; \
345
  else \
346
    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
347
      echo $(NM); \
348
    else \
349
       t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
350
    fi; \
351
  fi`
352
 
353 56 joel
# The first rule in the file had better be this one.  Don't put any above it.
354
# This lives here to allow makefile fragments to contain dependencies.
355
all: all.normal
356
.PHONY: all
357
 
358
# These can be overridden by config/mt-*.
359
# The _TARGET_ is because they're specified in mt-foo.
360
# The _HOST_ is because they're programs that run on the host.
361
EXTRA_TARGET_HOST_ALL_MODULES =
362
EXTRA_TARGET_HOST_INSTALL_MODULES =
363
EXTRA_TARGET_HOST_CHECK_MODULES =
364
 
365 39 lampret
#### host and target specific makefile fragments come in here.
366
###
367
 
368
# Flags to pass down to all sub-makes.
369
# Please keep these in alphabetical order.
370
BASE_FLAGS_TO_PASS = \
371
        "AR_FLAGS=$(AR_FLAGS)" \
372
        "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
373
        "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
374
        "BISON=$(BISON)" \
375
        "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
376
        "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
377
        "CFLAGS=$(CFLAGS)" \
378
        "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
379 56 joel
        "CHILLFLAGS=$(CHILLFLAGS)" \
380
        "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
381
        "CHILL_LIB=$(CHILL_LIB)" \
382 39 lampret
        "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
383
        "CXXFLAGS=$(CXXFLAGS)" \
384
        "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
385
        "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
386
        "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
387
        "INSTALL=$(INSTALL)" \
388
        "INSTALL_DATA=$(INSTALL_DATA)" \
389
        "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
390
        "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
391
        "LDFLAGS=$(LDFLAGS)" \
392
        "LEX=$(LEX)" \
393
        "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
394
        "LIBCFLAGS=$(LIBCFLAGS)" \
395
        "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
396
        "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
397
        "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
398
        "M4=$(M4)" \
399
        "MAKE=$(MAKE)" \
400
        "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
401
        "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
402
        "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
403
        "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
404
        "SHELL=$(SHELL)" \
405
        "EXPECT=$(EXPECT)" \
406
        "RUNTEST=$(RUNTEST)" \
407
        "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
408 56 joel
        "TARGET_SUBDIR=$(TARGET_SUBDIR)" \
409 39 lampret
        "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
410
        "YACC=$(YACC)" \
411
        "bindir=$(bindir)" \
412
        "datadir=$(datadir)" \
413
        "exec_prefix=$(exec_prefix)" \
414
        "includedir=$(includedir)" \
415
        "infodir=$(infodir)" \
416
        "libdir=$(libdir)" \
417
        "libexecdir=$(libexecdir)" \
418
        "lispdir=$(lispdir)" \
419
        "localstatedir=$(localstatedir)" \
420
        "mandir=$(mandir)" \
421
        "oldincludedir=$(oldincludedir)" \
422
        "prefix=$(prefix)" \
423
        "sbindir=$(sbindir)" \
424
        "sharedstatedir=$(sharedstatedir)" \
425
        "sysconfdir=$(sysconfdir)" \
426 56 joel
        "tooldir=$(tooldir)" \
427
        "build_tooldir=$(build_tooldir)" \
428
        "gxx_include_dir=$(gxx_include_dir)" \
429
        "gcc_version=$(gcc_version)" \
430
        "gcc_version_trigger=$(gcc_version_trigger)" \
431
        "target_alias=$(target_alias)" \
432
        "libsubdir=$(libsubdir)"
433 39 lampret
 
434
# Flags to pass down to most sub-makes, in which we're building with
435
# the host environment.
436
# If any variables are added here, they must be added to do-*, below.
437
EXTRA_HOST_FLAGS = \
438
        'AR=$(AR)' \
439
        'AS=$(AS)' \
440
        'CC=$(CC)' \
441
        'CXX=$(CXX)' \
442
        'DLLTOOL=$(DLLTOOL)' \
443
        'LD=$(LD)' \
444
        'NM=$(NM)' \
445
        'RANLIB=$(RANLIB)' \
446
        'WINDRES=$(WINDRES)'
447
 
448
FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
449
 
450
# Flags that are concerned with the location of the X11 include files
451
# and library files
452
#
453
# NOTE: until the top-level is getting the values via autoconf, it only
454
# causes problems to have this top-level Makefile overriding the autoconf-set
455
# values in child directories.  Only variables that don't conflict with
456
# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
457
#
458
X11_FLAGS_TO_PASS = \
459
        'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
460
        'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
461
 
462
# Flags to pass down to makes which are built with the target environment.
463
# The double $ decreases the length of the command line; the variables
464
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
465
# If any variables are added here, they must be added to do-*, below.
466
EXTRA_TARGET_FLAGS = \
467
        'AR=$$(AR_FOR_TARGET)' \
468
        'AS=$$(AS_FOR_TARGET)' \
469
        'CC=$$(CC_FOR_TARGET)' \
470
        'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
471
        'CXX=$$(CXX_FOR_TARGET)' \
472
        'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
473
        'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
474
        'LD=$$(LD_FOR_TARGET)' \
475
        'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
476
        'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
477
        'NM=$$(NM_FOR_TARGET)' \
478
        'RANLIB=$$(RANLIB_FOR_TARGET)' \
479
        'WINDRES=$$(WINDRES_FOR_TARGET)'
480
 
481
TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
482
 
483
# Flags to pass down to gcc.  gcc builds a library, libgcc.a, so it
484
# unfortunately needs the native compiler and the target ar and
485
# ranlib.
486
# If any variables are added here, they must be added to do-*, below.
487
# The HOST_* variables are a special case, which are used for the gcc
488
# cross-building scheme.
489
EXTRA_GCC_FLAGS = \
490 56 joel
        'AR=$(AR)' \
491 39 lampret
        'AS=$(AS)' \
492
        'CC=$(CC)' \
493
        'CXX=$(CXX)' \
494
        'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
495
        'HOST_CC=$(CC_FOR_BUILD)' \
496
        'HOST_PREFIX=$(HOST_PREFIX)' \
497
        'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
498
        'NM=$(NM)' \
499 56 joel
        'RANLIB=$(RANLIB)' \
500 39 lampret
        'WINDRES=$$(WINDRES_FOR_TARGET)' \
501
        "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
502
        "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
503
        "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
504
        "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
505
        "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
506
        "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
507
        "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
508
        "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
509
        "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
510
        "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
511
 
512
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
513
 
514
# This is a list of the targets for all of the modules which are compiled
515
# using $(FLAGS_TO_PASS).
516
ALL_MODULES = \
517
        all-apache \
518
        all-ash \
519
        all-autoconf \
520
        all-automake \
521
        all-bash \
522
        all-bfd \
523
        all-binutils \
524
        all-bison \
525
        all-byacc \
526 56 joel
        all-bzip2 \
527 39 lampret
        all-cvssrc \
528
        all-db \
529
        all-dejagnu \
530
        all-diff \
531
        all-dosutils \
532
        all-etc \
533
        all-fileutils \
534
        all-findutils \
535
        all-find \
536
        all-flex \
537
        all-gas \
538
        all-gawk \
539
        all-gettext \
540
        all-gnuserv \
541
        all-gprof \
542
        all-grep \
543
        all-grez \
544
        all-gzip \
545
        all-hello \
546
        all-indent \
547
        all-inet \
548
        all-intl \
549
        all-ispell \
550
        all-itcl \
551
        all-ld \
552
        all-libgui \
553
        all-libiberty \
554
        all-libtool \
555
        all-m4 \
556
        all-make \
557
        all-mmalloc \
558
        all-opcodes \
559
        all-patch \
560
        all-perl \
561
        all-prms \
562
        all-rcs \
563
        all-readline \
564
        all-release \
565
        all-recode \
566
        all-sed \
567
        all-send-pr \
568
        all-shellutils \
569
        all-sim \
570
        all-tar \
571
        all-tcl \
572 56 joel
        all-tcl8.1 \
573 39 lampret
        all-texinfo \
574
        all-textutils \
575
        all-tgas \
576
        all-time \
577
        all-uudecode \
578 56 joel
        all-wdiff \
579
        all-zip \
580
        $(EXTRA_TARGET_HOST_ALL_MODULES)
581 39 lampret
 
582
# This is a list of the check targets for all of the modules which are
583
# compiled using $(FLAGS_TO_PASS).
584
#
585
# The list is in two parts.  The first lists those tools which
586
# are tested as part of the host's native tool-chain, and not
587
# tested in a cross configuration.
588
NATIVE_CHECK_MODULES = \
589
        check-bison \
590
        check-byacc \
591 56 joel
        check-flex \
592
        check-zip
593 39 lampret
 
594
CROSS_CHECK_MODULES = \
595
        check-apache \
596
        check-ash \
597
        check-autoconf \
598
        check-automake \
599
        check-bash \
600
        check-bfd \
601
        check-binutils \
602 56 joel
        check-bzip2 \
603 39 lampret
        check-cvssrc \
604
        check-db \
605
        check-dejagnu \
606
        check-diff \
607
        check-etc \
608
        check-fileutils \
609
        check-findutils \
610
        check-find \
611
        check-gas \
612
        check-gawk \
613
        check-gettext \
614
        check-gnuserv \
615
        check-gprof \
616
        check-grep \
617
        check-gzip \
618
        check-hello \
619
        check-indent \
620
        check-inet \
621
        check-intl \
622
        check-ispell \
623
        check-itcl \
624
        check-ld \
625
        check-libgui \
626
        check-libiberty \
627
        check-libtool \
628
        check-m4 \
629
        check-make \
630
        check-mmcheckoc \
631
        check-opcodes \
632
        check-patch \
633
        check-perl \
634
        check-prms \
635
        check-rcs \
636
        check-readline \
637
        check-recode \
638
        check-sed \
639
        check-send-pr \
640
        check-shellutils \
641
        check-sim \
642
        check-tar \
643
        check-tcl \
644
        check-texinfo \
645
        check-textutils \
646
        check-tgas \
647
        check-time \
648
        check-uudecode \
649 56 joel
        check-wdiff \
650
        $(EXTRA_TARGET_HOST_CHECK_MODULES)
651 39 lampret
 
652
CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
653
 
654
# This is a list of the install targets for all of the modules which are
655
# compiled using $(FLAGS_TO_PASS).
656
# We put install-opcodes before install-binutils because the installed
657
# binutils might be on PATH, and they might need the shared opcodes
658
# library.
659
# We put install-tcl before install-itcl because itcl wants to run a
660
# program on installation which uses the Tcl libraries.
661
INSTALL_MODULES = \
662
        install-apache \
663
        install-ash \
664
        install-autoconf \
665
        install-automake \
666
        install-bash \
667
        install-bfd \
668 56 joel
        install-bzip2 \
669 39 lampret
        install-opcodes \
670
        install-binutils \
671
        install-bison \
672
        install-byacc \
673
        install-cvssrc \
674
        install-db \
675
        install-dejagnu \
676
        install-diff \
677
        install-dosutils \
678
        install-etc \
679
        install-fileutils \
680
        install-findutils \
681
        install-find \
682
        install-flex \
683
        install-gas \
684
        install-gawk \
685
        install-gettext \
686
        install-gnuserv \
687
        install-gprof \
688
        install-grep \
689
        install-grez \
690
        install-gzip \
691
        install-hello \
692
        install-indent \
693
        install-inet \
694
        install-intl \
695
        install-ispell \
696
        install-tcl \
697 56 joel
        install-tcl8.1 \
698 39 lampret
        install-itcl \
699
        install-ld \
700
        install-libgui \
701
        install-libiberty \
702
        install-libtool \
703
        install-m4 \
704
        install-make \
705
        install-mmalloc \
706
        install-patch \
707
        install-perl \
708
        install-prms \
709
        install-rcs \
710
        install-readline \
711
        install-recode \
712
        install-sed \
713
        install-send-pr \
714
        install-shellutils \
715
        install-sim \
716
        install-tar \
717
        install-textutils \
718
        install-tgas \
719
        install-time \
720
        install-uudecode \
721 56 joel
        install-wdiff \
722
        install-zip \
723
        $(EXTRA_TARGET_HOST_INSTALL_MODULES)
724 39 lampret
 
725
# This is a list of the targets for all of the modules which are compiled
726
# using $(X11_FLAGS_TO_PASS).
727
ALL_X11_MODULES = \
728
        all-emacs \
729
        all-emacs19 \
730
        all-gdb \
731
        all-expect \
732
        all-gash \
733
        all-guile \
734
        all-tclX \
735
        all-tk \
736 56 joel
        all-tk8.1 \
737 39 lampret
        all-tix
738
 
739
# This is a list of the check targets for all of the modules which are
740
# compiled using $(X11_FLAGS_TO_PASS).
741
CHECK_X11_MODULES = \
742
        check-emacs \
743
        check-gdb \
744
        check-guile \
745
        check-expect \
746
        check-gash \
747
        check-tclX \
748
        check-tk \
749
        check-tix
750
 
751
# This is a list of the install targets for all the modules which are
752
# compiled using $(X11_FLAGS_TO_PASS).
753
INSTALL_X11_MODULES = \
754
        install-emacs \
755
        install-emacs19 \
756
        install-gdb \
757
        install-guile \
758
        install-expect \
759
        install-gash \
760
        install-tclX \
761
        install-tk \
762 56 joel
        install-tk8.1 \
763 39 lampret
        install-tix
764
 
765
# This is a list of the targets for all of the modules which are compiled
766
# using $(TARGET_FLAGS_TO_PASS).
767
ALL_TARGET_MODULES = \
768
        all-target-libio \
769
        all-target-libstdc++ \
770
        all-target-librx \
771
        all-target-libg++ \
772
        all-target-newlib \
773 56 joel
        all-target-libtermcap \
774 39 lampret
        all-target-winsup \
775
        all-target-libgloss \
776
        all-target-libiberty \
777
        all-target-gperf \
778
        all-target-examples \
779
        all-target-libstub \
780 56 joel
        all-target-libjava \
781
        all-target-zlib \
782
        all-target-boehm-gc \
783
        all-target-qthreads \
784
        all-target-bsp \
785 39 lampret
        all-target-cygmon
786
 
787
# This is a list of the configure targets for all of the modules which
788
# are compiled using the target tools.
789
CONFIGURE_TARGET_MODULES = \
790
        configure-target-libio \
791
        configure-target-libstdc++ \
792
        configure-target-librx \
793
        configure-target-libg++ \
794
        configure-target-newlib \
795 56 joel
        configure-target-libtermcap \
796 39 lampret
        configure-target-winsup \
797
        configure-target-libgloss \
798
        configure-target-libiberty \
799
        configure-target-gperf \
800
        configure-target-examples \
801
        configure-target-libstub \
802 56 joel
        configure-target-libjava \
803
        configure-target-zlib \
804
        configure-target-boehm-gc \
805
        configure-target-qthreads \
806
        configure-target-bsp \
807 39 lampret
        configure-target-cygmon
808
 
809
# This is a list of the check targets for all of the modules which are
810
# compiled using $(TARGET_FLAGS_TO_PASS).
811
CHECK_TARGET_MODULES = \
812
        check-target-libio \
813
        check-target-libstdc++ \
814
        check-target-libg++ \
815
        check-target-newlib \
816
        check-target-winsup \
817
        check-target-libiberty \
818 56 joel
        check-target-libjava \
819
        check-target-zlib \
820
        check-target-boehm-gc \
821
        check-target-qthreads \
822 39 lampret
        check-target-gperf
823
 
824
# This is a list of the install targets for all of the modules which are
825
# compiled using $(TARGET_FLAGS_TO_PASS).
826
INSTALL_TARGET_MODULES = \
827
        install-target-libio \
828
        install-target-libstdc++ \
829
        install-target-libg++ \
830
        install-target-newlib \
831 56 joel
        install-target-libtermcap \
832 39 lampret
        install-target-winsup \
833
        install-target-libgloss \
834
        install-target-libiberty \
835 56 joel
        install-target-bsp \
836
        install-target-libjava \
837
        install-target-zlib \
838
        install-target-boehm-gc \
839
        install-target-qthreads \
840 39 lampret
        install-target-gperf
841
 
842
# This is a list of the targets for which we can do a clean-{target}.
843
CLEAN_MODULES = \
844
        clean-apache \
845
        clean-ash \
846
        clean-autoconf \
847
        clean-automake \
848
        clean-bash \
849
        clean-bfd \
850
        clean-binutils \
851
        clean-bison \
852
        clean-byacc \
853 56 joel
        clean-bzip2 \
854 39 lampret
        clean-cvssrc \
855
        clean-db \
856
        clean-dejagnu \
857
        clean-diff \
858
        clean-dosutils \
859
        clean-etc \
860
        clean-fileutils \
861
        clean-findutils \
862
        clean-find \
863
        clean-flex \
864
        clean-gas \
865
        clean-gawk \
866
        clean-gettext \
867
        clean-gnuserv \
868
        clean-gprof \
869
        clean-grep \
870
        clean-grez \
871
        clean-gzip \
872
        clean-hello \
873
        clean-indent \
874
        clean-inet \
875
        clean-intl \
876
        clean-ispell \
877
        clean-itcl \
878
        clean-ld \
879
        clean-libgui \
880
        clean-libiberty \
881
        clean-libtool \
882
        clean-m4 \
883
        clean-make \
884
        clean-mmalloc \
885
        clean-opcodes \
886
        clean-patch \
887
        clean-perl \
888
        clean-prms \
889
        clean-rcs \
890
        clean-readline \
891
        clean-release \
892
        clean-recode \
893
        clean-sed \
894
        clean-send-pr \
895
        clean-shellutils \
896
        clean-sim \
897
        clean-tar \
898
        clean-tcl \
899
        clean-texinfo \
900
        clean-textutils \
901
        clean-tgas \
902
        clean-time \
903
        clean-uudecode \
904 56 joel
        clean-wdiff \
905
        clean-zip
906 39 lampret
 
907
# All of the target modules that can be cleaned
908
CLEAN_TARGET_MODULES = \
909
        clean-target-libio \
910
        clean-target-libstdc++ \
911
        clean-target-librx \
912
        clean-target-libg++ \
913
        clean-target-newlib \
914
        clean-target-winsup \
915
        clean-target-libgloss \
916
        clean-target-libiberty \
917
        clean-target-gperf \
918
        clean-target-examples \
919
        clean-target-libstub \
920 56 joel
        clean-target-libjava \
921
        clean-target-zlib \
922
        clean-target-boehm-gc \
923
        clean-target-qthreads \
924
        clean-target-bsp \
925 39 lampret
        clean-target-cygmon
926
 
927
# All of the x11 modules that can be cleaned
928
CLEAN_X11_MODULES = \
929
        clean-emacs \
930
        clean-emacs19 \
931
        clean-gdb \
932
        clean-expect \
933
        clean-gash \
934
        clean-guile \
935
        clean-tclX \
936
        clean-tk \
937
        clean-tix
938
 
939
# The target built for a native build.
940
.PHONY: all.normal
941
all.normal: \
942
        $(ALL_MODULES) \
943
        $(ALL_X11_MODULES) \
944
        $(ALL_TARGET_MODULES) \
945
        all-gcc
946
 
947
# Do a target for all the subdirectories.  A ``make do-X'' will do a
948
# ``make X'' in all subdirectories (because, in general, there is a
949
# dependency (below) of X upon do-X, a ``make X'' will also do this,
950
# but it may do additional work as well).
951
# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
952
# because it is so large that it can easily overflow the command line
953
# length limit on some systems.
954
DO_X = \
955
        do-clean \
956
        do-distclean \
957
        do-dvi \
958
        do-info \
959
        do-install-info \
960
        do-installcheck \
961
        do-mostlyclean \
962
        do-maintainer-clean \
963
        do-TAGS
964
.PHONY: $(DO_X)
965
$(DO_X):
966
        @target=`echo $@ | sed -e 's/^do-//'`; \
967
        r=`pwd`; export r; \
968
        s=`cd $(srcdir); pwd`; export s; \
969
        $(SET_LIB_PATH) \
970
        for i in $(SUBDIRS) -dummy-; do \
971
          if [ -f ./$$i/Makefile ]; then \
972
            case $$i in \
973
            gcc) \
974
              for flag in $(EXTRA_GCC_FLAGS); do \
975
                eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
976
              done; \
977
              ;; \
978
            *) \
979
              for flag in $(EXTRA_HOST_FLAGS); do \
980
                eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
981
              done; \
982
              ;; \
983
            esac ; \
984
            export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
985
            if (cd ./$$i; \
986
                $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
987
                        "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
988
                        "RANLIB=$${RANLIB}" \
989
                        "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
990
                        $${target}); \
991
            then true; else exit 1; fi; \
992
          else true; fi; \
993
        done
994
        @target=`echo $@ | sed -e 's/^do-//'`; \
995
        r=`pwd`; export r; \
996
        s=`cd $(srcdir); pwd`; export s; \
997
        $(SET_LIB_PATH) \
998
        for i in $(TARGET_CONFIGDIRS) -dummy-; do \
999
          if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
1000
            for flag in $(EXTRA_TARGET_FLAGS); do \
1001
                eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
1002
            done; \
1003
            export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
1004
            if (cd $(TARGET_SUBDIR)/$$i; \
1005
                $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1006
                        "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1007
                        "RANLIB=$${RANLIB}" \
1008
                        "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1009
                        $${target}); \
1010
            then true; else exit 1; fi; \
1011
          else true; fi; \
1012
        done
1013
 
1014
# Here are the targets which correspond to the do-X targets.
1015
 
1016
.PHONY: info installcheck dvi install-info
1017
.PHONY: clean distclean mostlyclean maintainer-clean realclean
1018
.PHONY: local-clean local-distclean local-maintainer-clean
1019
info: do-info
1020
installcheck: do-installcheck
1021
dvi: do-dvi
1022
 
1023
# Make sure makeinfo is built before we do a `make info'.
1024
do-info: all-texinfo
1025
 
1026
install-info: do-install-info dir.info
1027
        s=`cd $(srcdir); pwd`; export s; \
1028
        if [ -f dir.info ] ; then \
1029
          $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
1030
        else true ; fi
1031
 
1032
local-clean:
1033 56 joel
        -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
1034 39 lampret
 
1035
local-distclean:
1036 56 joel
        -rm -f Makefile config.status config.cache mh-frag mt-frag
1037 39 lampret
        -if [ "$(TARGET_SUBDIR)" != "." ]; then \
1038
          rm -rf $(TARGET_SUBDIR); \
1039
        else true; fi
1040
 
1041
local-maintainer-clean:
1042
        @echo "This command is intended for maintainers to use;"
1043
        @echo "it deletes files that may require special tools to rebuild."
1044
 
1045
clean: do-clean local-clean
1046
mostlyclean: do-mostlyclean local-clean
1047
distclean: do-distclean local-clean local-distclean
1048
maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1049
maintainer-clean: local-distclean
1050
realclean: maintainer-clean
1051
 
1052
# This rule is used to clean specific modules.
1053
.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1054
$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1055
        @dir=`echo $@ | sed -e 's/clean-//'`; \
1056
        if [ -f ./$${dir}/Makefile ] ; then \
1057
          r=`pwd`; export r; \
1058
          s=`cd $(srcdir); pwd`; export s; \
1059
          $(SET_LIB_PATH) \
1060
          (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1061
        else \
1062
          true; \
1063
        fi
1064
 
1065
.PHONY: $(CLEAN_TARGET_MODULES)
1066
$(CLEAN_TARGET_MODULES):
1067
        @dir=`echo $@ | sed -e 's/clean-target-//'`; \
1068
        rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1069
        if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1070
          r=`pwd`; export r; \
1071
          s=`cd $(srcdir); pwd`; export s; \
1072
          $(SET_LIB_PATH) \
1073
          (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1074
        else \
1075
          true; \
1076
        fi
1077
 
1078
clean-target: $(CLEAN_TARGET_MODULES)
1079
 
1080
# Check target.
1081
 
1082
.PHONY: check
1083
check: $(CHECK_MODULES) \
1084
        $(CHECK_TARGET_MODULES) \
1085
        $(CHECK_X11_MODULES) \
1086
        check-gcc
1087
 
1088 56 joel
# Automated reporting of test results.
1089
 
1090
warning.log: build.log
1091
        $(srcdir)/contrib/warn_summary build.log > $@
1092
 
1093
mail-report.log:
1094
        if test x'$(BOOT_CFLAGS)' != x''; then \
1095
            BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1096
        fi; \
1097
        $(srcdir)/contrib/test_summary -t >$@
1098
        chmod +x $@
1099
        echo If you really want to send e-mail, run ./$@ now
1100
 
1101
mail-report-with-warnings.log: warning.log
1102
        if test x'$(BOOT_CFLAGS)' != x''; then \
1103
            BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \
1104
        fi; \
1105
        $(srcdir)/contrib/test_summary -t -i warning.log >$@
1106
        chmod +x $@
1107
        echo If you really want to send e-mail, run ./$@ now
1108
 
1109 39 lampret
# Installation targets.
1110
 
1111 56 joel
.PHONY: install install-cross uninstall source-vault binary-vault vault-install
1112 39 lampret
install: $(INSTALL_TARGET)
1113 56 joel
install-cross: $(INSTALL_TARGET_CROSS)
1114 39 lampret
 
1115
uninstall:
1116
        @echo "the uninstall target is not supported in this tree"
1117
 
1118
source-vault:
1119
        $(MAKE) -f ./release/Build-A-Release \
1120
                host=$(host_alias) source-vault
1121
 
1122
binary-vault:
1123
        $(MAKE) -f ./release/Build-A-Release \
1124
                host=$(host_alias) target=$(target_alias)
1125
 
1126
vault-install:
1127
        @if [ -f ./release/vault-install ] ; then \
1128
          ./release/vault-install $(host_alias) $(target_alias) ; \
1129
        else \
1130
          true ; \
1131
        fi
1132
 
1133
.PHONY: install.all
1134
install.all: install-no-fixedincludes
1135
        @if [ -f ./gcc/Makefile ] ; then \
1136
                r=`pwd` ; export r ; \
1137
                $(SET_LIB_PATH) \
1138
                (cd ./gcc; \
1139
                $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1140
        else \
1141
                true ; \
1142
        fi
1143
 
1144
# inet-install is used because the I*Net wants DejaGNU installed but
1145
# not built.  Similarly, gzip is built but not installed.
1146
inet-install:
1147
        $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1148
 
1149
# install-no-fixedincludes is used because Cygnus can not distribute
1150
# the fixed header files.
1151
.PHONY: install-no-fixedincludes
1152
install-no-fixedincludes: \
1153
        installdirs \
1154
        $(INSTALL_MODULES) \
1155
        $(INSTALL_TARGET_MODULES) \
1156
        $(INSTALL_X11_MODULES) \
1157
        gcc-no-fixedincludes
1158
 
1159
# Install the gcc headers files, but not the fixed include files,
1160
# which Cygnus is not allowed to distribute.  This rule is very
1161
# dependent on the workings of the gcc Makefile.in.
1162
.PHONY: gcc-no-fixedincludes
1163
gcc-no-fixedincludes:
1164
        @if [ -f ./gcc/Makefile ]; then \
1165
          rm -rf gcc/tmp-include; \
1166
          mv gcc/include gcc/tmp-include 2>/dev/null; \
1167
          mkdir gcc/include; \
1168
          cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1169
          touch gcc/stmp-fixinc gcc/include/fixed; \
1170
          rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1171
          r=`pwd`; export r; \
1172
          s=`cd $(srcdir); pwd` ; export s; \
1173
          $(SET_LIB_PATH) \
1174
          (cd ./gcc; \
1175
           $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1176
          rm -rf gcc/include; \
1177
          mv gcc/tmp-include gcc/include 2>/dev/null; \
1178
        else true; fi
1179
 
1180
# This rule is used to build the modules which use FLAGS_TO_PASS.  To
1181
# build a target all-X means to cd to X and make all.
1182
#
1183
# all-gui, and all-libproc are handled specially because
1184
# they are still experimental, and if they fail to build, that
1185
# shouldn't stop "make all".
1186
.PHONY: $(ALL_MODULES) all-gui all-libproc
1187
$(ALL_MODULES) all-gui all-libproc:
1188
        @dir=`echo $@ | sed -e 's/all-//'`; \
1189
        if [ -f ./$${dir}/Makefile ] ; then \
1190
          r=`pwd`; export r; \
1191
          s=`cd $(srcdir); pwd`; export s; \
1192
          $(SET_LIB_PATH) \
1193
          (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1194
        else \
1195
          true; \
1196
        fi
1197
 
1198
# These rules are used to check the modules which use FLAGS_TO_PASS.
1199
# To build a target check-X means to cd to X and make check.  Some
1200
# modules are only tested in a native toolchain.
1201
 
1202
.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1203
$(NATIVE_CHECK_MODULES):
1204
        @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1205
          dir=`echo $@ | sed -e 's/check-//'`; \
1206
          if [ -f ./$${dir}/Makefile ] ; then \
1207
            r=`pwd`; export r; \
1208
            s=`cd $(srcdir); pwd`; export s; \
1209
            $(SET_LIB_PATH) \
1210
            (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1211
          else \
1212
            true; \
1213
          fi; \
1214
        fi
1215
 
1216
$(CROSS_CHECK_MODULES):
1217
        @dir=`echo $@ | sed -e 's/check-//'`; \
1218
        if [ -f ./$${dir}/Makefile ] ; then \
1219
          r=`pwd`; export r; \
1220
          s=`cd $(srcdir); pwd`; export s; \
1221
          $(SET_LIB_PATH) \
1222
          (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1223
        else \
1224
          true; \
1225
        fi
1226
 
1227
# This rule is used to install the modules which use FLAGS_TO_PASS.
1228
# To build a target install-X means to cd to X and make install.
1229
.PHONY: $(INSTALL_MODULES)
1230
$(INSTALL_MODULES): installdirs
1231
        @dir=`echo $@ | sed -e 's/install-//'`; \
1232
        if [ -f ./$${dir}/Makefile ] ; then \
1233
          r=`pwd`; export r; \
1234
          s=`cd $(srcdir); pwd`; export s; \
1235
          $(SET_LIB_PATH) \
1236
          (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1237
        else \
1238
          true; \
1239
        fi
1240
 
1241
# This rule is used to configure the modules which are built with the
1242
# target tools.
1243
.PHONY: $(CONFIGURE_TARGET_MODULES)
1244
$(CONFIGURE_TARGET_MODULES):
1245
        @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1246
        if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1247
          r=`pwd`; export r; \
1248
          $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1249
          if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1250
            if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1251
              if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1252
                rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1253
              else \
1254
                echo "Multilibs changed for $${dir}, reconfiguring"; \
1255
                rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1256
                mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1257
              fi; \
1258
            else \
1259
              mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1260
            fi; \
1261
          fi; \
1262
        fi; exit 0      # break command into two pieces
1263
        @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1264
        if [ ! -d $(TARGET_SUBDIR) ]; then \
1265
          true; \
1266
        elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1267
          true; \
1268
        elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1269
          if [ -d $(srcdir)/$${dir} ]; then \
1270
            [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1271
            r=`pwd`; export r; \
1272
            s=`cd $(srcdir); pwd`; export s; \
1273
            $(SET_LIB_PATH) \
1274
            AR="$(AR_FOR_TARGET)"; export AR; \
1275
            AS="$(AS_FOR_TARGET)"; export AS; \
1276
            CC="$(CC_FOR_TARGET)"; export CC; \
1277
            CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1278
            CXX="$(CXX_FOR_TARGET)"; export CXX; \
1279
            CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1280
            DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1281
            LD="$(LD_FOR_TARGET)"; export LD; \
1282
            LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1283
            NM="$(NM_FOR_TARGET)"; export NM; \
1284
            RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1285
            WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1286
            echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1287
            cd $(TARGET_SUBDIR)/$${dir}; \
1288
            case $(srcdir) in \
1289
            /*) \
1290
              topdir=$(srcdir) ;; \
1291
            *) \
1292
              case "$(TARGET_SUBDIR)" in \
1293
              .) topdir="../$(srcdir)" ;; \
1294
              *) topdir="../../$(srcdir)" ;; \
1295
              esac ;; \
1296
            esac; \
1297
            if [ "$(srcdir)" = "." ] ; then \
1298
              if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1299
                if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1300
                  if [ -f Makefile ]; then \
1301
                    if $(MAKE) distclean; then \
1302
                      true; \
1303
                    else \
1304
                      exit 1; \
1305
                    fi; \
1306
                  else \
1307
                    true; \
1308
                  fi; \
1309
                else \
1310
                  exit 1; \
1311
                fi; \
1312
              else \
1313
                true; \
1314
              fi; \
1315
              srcdiroption="--srcdir=."; \
1316
              libsrcdir="."; \
1317
            else \
1318
              srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1319
              libsrcdir="$$s/$${dir}"; \
1320
            fi; \
1321
            if [ -f $${libsrcdir}/configure ] ; then \
1322 56 joel
              rm -f no-such-file skip-this-dir; \
1323
              CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
1324 39 lampret
                $(CONFIG_ARGUMENTS) $${srcdiroption} \
1325
                --with-target-subdir="$(TARGET_SUBDIR)"; \
1326
            else \
1327 56 joel
              rm -f no-such-file skip-this-dir; \
1328
              CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
1329 39 lampret
                $(CONFIG_ARGUMENTS) $${srcdiroption} \
1330
                --with-target-subdir="$(TARGET_SUBDIR)"; \
1331
            fi; \
1332 56 joel
            if [ -f skip-this-dir ] ; then \
1333
              sh skip-this-dir; \
1334
              rm -f skip-this-dir; \
1335
              cd ..; rmdir $${dir} || true; \
1336
            else \
1337
              true; \
1338
            fi; \
1339 39 lampret
          else \
1340
            true; \
1341
          fi; \
1342
        else \
1343
          true; \
1344
        fi
1345
 
1346
# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1347
# To build a target all-X means to cd to X and make all.
1348
.PHONY: $(ALL_TARGET_MODULES)
1349
$(ALL_TARGET_MODULES):
1350
        @dir=`echo $@ | sed -e 's/all-target-//'`; \
1351
        if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1352
          r=`pwd`; export r; \
1353
          s=`cd $(srcdir); pwd`; export s; \
1354
          $(SET_LIB_PATH) \
1355
          (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1356
        else \
1357
          true; \
1358
        fi
1359
 
1360
# This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1361
# To build a target install-X means to cd to X and make install.
1362
.PHONY: $(CHECK_TARGET_MODULES)
1363
$(CHECK_TARGET_MODULES):
1364
        @dir=`echo $@ | sed -e 's/check-target-//'`; \
1365
        if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1366
          r=`pwd`; export r; \
1367
          s=`cd $(srcdir); pwd`; export s; \
1368
          $(SET_LIB_PATH) \
1369
          (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1370
        else \
1371
          true; \
1372
        fi
1373
 
1374
# This rule is used to install the modules which use
1375
# TARGET_FLAGS_TO_PASS.  To build a target install-X means to cd to X
1376
# and make install.
1377
.PHONY: $(INSTALL_TARGET_MODULES)
1378
$(INSTALL_TARGET_MODULES): installdirs
1379
        @dir=`echo $@ | sed -e 's/install-target-//'`; \
1380
        if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1381
          r=`pwd`; export r; \
1382
          s=`cd $(srcdir); pwd`; export s; \
1383
          $(SET_LIB_PATH) \
1384
          (cd $(TARGET_SUBDIR)/$${dir}; \
1385
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1386
        else \
1387
          true; \
1388
        fi
1389
 
1390
# This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1391
# To build a target all-X means to cd to X and make all.
1392
.PHONY: $(ALL_X11_MODULES)
1393
$(ALL_X11_MODULES):
1394
        @dir=`echo $@ | sed -e 's/all-//'`; \
1395
        if [ -f ./$${dir}/Makefile ] ; then \
1396
          r=`pwd`; export r; \
1397
          s=`cd $(srcdir); pwd`; export s; \
1398
          $(SET_LIB_PATH) \
1399
          (cd $${dir}; \
1400
           $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1401
        else \
1402
          true; \
1403
        fi
1404
 
1405
# This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1406
# To build a target check-X means to cd to X and make all.
1407
.PHONY: $(CHECK_X11_MODULES)
1408
$(CHECK_X11_MODULES):
1409
        @dir=`echo $@ | sed -e 's/check-//'`; \
1410
        if [ -f ./$${dir}/Makefile ] ; then \
1411
          r=`pwd`; export r; \
1412
          s=`cd $(srcdir); pwd`; export s; \
1413
          $(SET_LIB_PATH) \
1414
          (cd $${dir}; \
1415
           $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1416
        else \
1417
          true; \
1418
        fi
1419
 
1420
# This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1421
# To build a target install-X means to cd to X and make install.
1422
.PHONY: $(INSTALL_X11_MODULES)
1423
$(INSTALL_X11_MODULES): installdirs
1424
        @dir=`echo $@ | sed -e 's/install-//'`; \
1425
        if [ -f ./$${dir}/Makefile ] ; then \
1426
          r=`pwd`; export r; \
1427
          s=`cd $(srcdir); pwd`; export s; \
1428
          $(SET_LIB_PATH) \
1429
          (cd $${dir}; \
1430
           $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1431
        else \
1432
          true; \
1433
        fi
1434
 
1435
# gcc is the only module which uses GCC_FLAGS_TO_PASS.
1436
.PHONY: all-gcc
1437
all-gcc:
1438
        @if [ -f ./gcc/Makefile ] ; then \
1439
          r=`pwd`; export r; \
1440
          s=`cd $(srcdir); pwd`; export s; \
1441
          $(SET_LIB_PATH) \
1442
          (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1443
        else \
1444
          true; \
1445
        fi
1446
 
1447 56 joel
# Building GCC uses some tools for rebuilding "source" files
1448
# like texinfo, bison/byacc, etc.  So we must depend on those.
1449
#
1450
# While building GCC, it may be necessary to run various target
1451
# programs like the assembler, linker, etc.  So we depend on
1452
# those too.
1453
#
1454
# In theory, on an SMP all those dependencies can be resolved
1455
# in parallel.
1456
#
1457
.PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
1458
bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1459
        @r=`pwd`; export r; \
1460
        s=`cd $(srcdir); pwd`; export s; \
1461
        $(SET_LIB_PATH) \
1462
        echo "Bootstrapping the compiler"; \
1463
        cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@
1464
        @r=`pwd`; export r; \
1465
        s=`cd $(srcdir); pwd`; export s; \
1466
        case "$@" in \
1467
          *bootstrap4-lean ) \
1468
                        msg="Comparing stage3 and stage4 of the compiler"; \
1469
                        compare=compare3-lean ;; \
1470
          *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
1471
                        compare=compare3 ;; \
1472
          *-lean )      msg="Comparing stage2 and stage3 of the compiler"; \
1473
                        compare=compare-lean ;; \
1474
          * )           msg="Comparing stage2 and stage3 of the compiler"; \
1475
                        compare=compare ;; \
1476
        esac; \
1477
        $(SET_LIB_PATH) \
1478
        echo "$$msg"; \
1479
        cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
1480
        @r=`pwd`; export r; \
1481
        s=`cd $(srcdir); pwd` ; export s; \
1482
        $(SET_LIB_PATH) \
1483
        echo "Building runtime libraries"; \
1484
        $(MAKE) $(BASE_FLAGS_TO_PASS) all
1485
 
1486
.PHONY: cross
1487
cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
1488
        @r=`pwd`; export r; \
1489
        s=`cd $(srcdir); pwd`; export s; \
1490
        $(SET_LIB_PATH) \
1491
        echo "Building the C and C++ compiler"; \
1492
        cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
1493
        @r=`pwd`; export r; \
1494
        s=`cd $(srcdir); pwd` ; export s; \
1495
        $(SET_LIB_PATH) \
1496
        echo "Building runtime libraries"; \
1497
        $(MAKE) $(BASE_FLAGS_TO_PASS) all LANGUAGES="c c++"
1498
 
1499
.PHONY: check-gcc
1500
check-gcc:
1501 39 lampret
        @if [ -f ./gcc/Makefile ] ; then \
1502
          r=`pwd`; export r; \
1503
          s=`cd $(srcdir); pwd`; export s; \
1504
          $(SET_LIB_PATH) \
1505 56 joel
          (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1506 39 lampret
        else \
1507
          true; \
1508
        fi
1509
 
1510 56 joel
.PHONY: install-gcc
1511
install-gcc:
1512 39 lampret
        @if [ -f ./gcc/Makefile ] ; then \
1513
          r=`pwd`; export r; \
1514
          s=`cd $(srcdir); pwd`; export s; \
1515
          $(SET_LIB_PATH) \
1516 56 joel
          (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1517 39 lampret
        else \
1518
          true; \
1519
        fi
1520
 
1521 56 joel
.PHONY: install-gcc-cross
1522
install-gcc-cross:
1523 39 lampret
        @if [ -f ./gcc/Makefile ] ; then \
1524
          r=`pwd`; export r; \
1525
          s=`cd $(srcdir); pwd`; export s; \
1526
          $(SET_LIB_PATH) \
1527 56 joel
          (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
1528 39 lampret
        else \
1529
          true; \
1530
        fi
1531
# EXPERIMENTAL STUFF
1532
# This rule is used to install the modules which use FLAGS_TO_PASS.
1533
# To build a target install-X means to cd to X and make install.
1534
.PHONY: install-dosrel
1535
install-dosrel: installdirs info
1536
        @dir=`echo $@ | sed -e 's/install-//'`; \
1537
        if [ -f ./$${dir}/Makefile ] ; then \
1538
          r=`pwd`; export r; \
1539
          s=`cd $(srcdir); pwd`; export s; \
1540
          $(SET_LIB_PATH) \
1541
          (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1542
        else \
1543
          true; \
1544
        fi
1545
 
1546
install-dosrel-fake:
1547
 
1548
 
1549
# This is a list of inter-dependencies among modules.
1550
all-apache:
1551
all-ash:
1552
all-autoconf: all-m4 all-texinfo
1553 56 joel
all-automake: all-m4 all-texinfo
1554 39 lampret
all-bash:
1555
all-bfd: all-libiberty all-intl
1556
all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1557
all-bison: all-texinfo
1558 56 joel
configure-target-bsp: $(ALL_GCC)
1559
all-target-bsp: configure-target-bsp all-gcc all-binutils all-target-newlib
1560
configure-target-boehm-gc: configure-target-newlib configure-target-qthreads
1561
all-target-boehm-gc: configure-target-boehm-gc
1562 39 lampret
all-byacc:
1563 56 joel
all-bzip2:
1564 39 lampret
all-cvssrc:
1565 56 joel
configure-target-cygmon: configure-target-bsp $(ALL_GCC)
1566
all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub all-target-bsp
1567 39 lampret
all-db:
1568
all-dejagnu: all-tcl all-expect all-tk
1569
all-diff: all-libiberty
1570
all-emacs:
1571
all-emacs19: all-bison all-byacc
1572
all-etc:
1573
configure-target-examples: $(ALL_GCC)
1574
all-target-examples: configure-target-examples
1575
all-expect: all-tcl all-tk
1576
all-fileutils: all-libiberty
1577
all-findutils:
1578
all-find:
1579
all-flex: all-libiberty all-bison all-byacc
1580
all-gas: all-libiberty all-opcodes all-bfd all-intl
1581
all-gash: all-tcl
1582
all-gawk:
1583
ALL_GCC = all-gcc
1584
all-gcc: all-bison all-byacc all-binutils all-gas all-ld
1585
all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1586
GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
1587
all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1588
all-gettext:
1589
all-gnuserv:
1590
configure-target-gperf: $(ALL_GCC)
1591
all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
1592
all-gprof: all-libiberty all-bfd all-opcodes all-intl
1593
all-grez: all-libiberty all-bfd all-opcodes
1594
all-gui: all-gdb all-libproc all-target-librx
1595
all-guile:
1596
all-gzip: all-libiberty
1597
all-hello: all-libiberty
1598
all-indent:
1599
all-inet: all-tcl all-send-pr all-perl
1600
all-intl:
1601
all-ispell: all-emacs19
1602 56 joel
all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1
1603 39 lampret
all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1604
configure-target-libg++: $(ALL_GCC) configure-target-librx
1605
all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++
1606
configure-target-libgloss: $(ALL_GCC)
1607
all-target-libgloss: configure-target-libgloss configure-target-newlib
1608
configure-target-libio: $(ALL_GCC)
1609
all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1610
check-target-libio: all-target-libstdc++
1611 56 joel
all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
1612 39 lampret
all-libiberty:
1613 56 joel
configure-target-libjava: $(ALL_GCC) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-newlib
1614
all-target-libjava: configure-target-libjava all-gcc all-zip all-target-newlib all-target-zlib all-target-boehm-gc all-target-qthreads
1615 39 lampret
configure-target-librx: $(ALL_GCC) configure-target-newlib
1616
all-target-librx: configure-target-librx
1617
configure-target-libstdc++: $(ALL_GCC)
1618
all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1619
configure-target-libstub: $(ALL_GCC)
1620
all-target-libstub: configure-target-libstub
1621
all-libtool:
1622
all-m4: all-libiberty
1623
all-make: all-libiberty
1624
all-mmalloc:
1625
configure-target-newlib: $(ALL_GCC)
1626 56 joel
configure-target-libtermcap: $(ALL_GCC)
1627 39 lampret
all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1628 56 joel
all-target-libtermcap: configure-target-libtermcap all-binutils all-gas all-gcc
1629 39 lampret
all-opcodes: all-bfd all-libiberty
1630
all-patch: all-libiberty
1631
all-perl:
1632
all-prms: all-libiberty
1633 56 joel
configure-target-qthreads: configure-target-newlib
1634
all-target-qthreads: configure-target-qthreads
1635 39 lampret
all-rcs:
1636
all-readline:
1637
all-recode: all-libiberty
1638
all-sed: all-libiberty
1639
all-send-pr: all-prms
1640
all-shellutils:
1641
all-sim: all-libiberty all-bfd all-opcodes all-readline
1642
all-tar: all-libiberty
1643
all-tcl:
1644 56 joel
all-tcl8.1:
1645 39 lampret
all-tclX: all-tcl all-tk
1646
all-tk: all-tcl
1647 56 joel
all-tk8.1: all-tcl8.1
1648 39 lampret
all-texinfo: all-libiberty
1649
all-textutils:
1650
all-tgas: all-libiberty all-bfd all-opcodes
1651
all-time:
1652 56 joel
all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1
1653 39 lampret
all-wdiff:
1654 56 joel
all-target-winsup: all-target-newlib all-target-libiberty all-target-libtermcap configure-target-winsup
1655 39 lampret
configure-target-winsup: configure-target-newlib
1656
all-uudecode: all-libiberty
1657 56 joel
all-zip:
1658
configure-target-zlib: $(ALL_GCC)
1659
all-target-zlib: configure-target-zlib
1660
configure-target-libiberty: $(ALL_GCC) configure-target-newlib
1661 39 lampret
all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1662
all-target: $(ALL_TARGET_MODULES)
1663
install-target: $(INSTALL_TARGET_MODULES)
1664
install-gdb: install-tcl install-tk install-itcl install-tix install-libgui
1665
### other supporting targets
1666
 
1667
MAKEDIRS= \
1668
        $(prefix) \
1669
        $(exec_prefix)
1670
.PHONY: installdirs
1671
installdirs: mkinstalldirs
1672
        $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1673
 
1674
dir.info: do-install-info
1675
        if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1676
          $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1677
          mv -f dir.info.new dir.info ; \
1678
        else true ; \
1679
        fi
1680
 
1681
dist:
1682
        @echo "Building a full distribution of this tree isn't done"
1683
        @echo "via 'make dist'.  Check out the etc/ subdirectory"
1684
 
1685
etags tags: TAGS
1686
 
1687
# Right now this just builds TAGS in each subdirectory.  emacs19 has the
1688
# ability to use several tags files at once, so there is probably no need
1689
# to combine them into one big TAGS file (like CVS 1.3 does).  We could
1690
# (if we felt like it) have this Makefile write a piece of elisp which
1691
# the user could load to tell emacs19 where all the TAGS files we just
1692
# built are.
1693
TAGS: do-TAGS
1694
 
1695
# with the gnu make, this is done automatically.
1696
 
1697 56 joel
Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
1698 39 lampret
        $(SHELL) ./config.status
1699
 
1700
#
1701
# Support for building net releases
1702
 
1703
# Files in devo used in any net release.
1704
# ChangeLog omitted because it may refer to files which are not in this
1705
# distribution (perhaps it would be better to include it anyway).
1706
DEVO_SUPPORT= README Makefile.in configure configure.in \
1707 56 joel
        config.guess config.if config.sub config move-if-change \
1708 39 lampret
        mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1709
        COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1710
        mkinstalldirs ltconfig ltmain.sh missing ylwrap
1711
 
1712
# Files in devo/etc used in any net release.
1713
# ChangeLog omitted because it may refer to files which are not in this
1714
# distribution (perhaps it would be better to include it anyway).
1715
ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1716
        make-stds.texi standards.info*
1717
 
1718
# When you use `make setup-dirs' or `make taz' you should always redefine
1719
# this macro.
1720
SUPPORT_FILES = list-of-support-files-for-tool-in-question
1721
 
1722
.PHONY: taz
1723
 
1724
taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1725
  texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1726
        # Take out texinfo from a few places.
1727
        sed -e '/^all\.normal: /s/\all-texinfo //' \
1728
            -e '/^      install-texinfo /d' \
1729
        tmp
1730
        mv -f tmp Makefile.in
1731
        #
1732
        ./configure sun4
1733
        [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1734
          || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1735
            CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1736
        # Make links, and run "make diststuff" or "make info" when needed.
1737
        rm -rf proto-toplev ; mkdir proto-toplev
1738
        set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1739
        for d in $$dirs ; do \
1740
          if [ -d $$d ]; then \
1741
            if [ ! -f $$d/Makefile ] ; then true ; \
1742
            elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1743
                (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1744
            elif grep '^info:' $$d/Makefile >/dev/null ; then \
1745
                (cd $$d ; $(MAKE) info ) || exit 1 ; \
1746
            fi ; \
1747
            if [ -d $$d/proto-$$d.dir ]; then \
1748
              ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1749
            else \
1750
              ln -s ../$$d proto-toplev/$$d ; \
1751
            fi ; \
1752
          else ln -s ../$$d proto-toplev/$$d ; fi ; \
1753
        done
1754
        cd etc ; $(MAKE) info
1755
        $(MAKE) distclean
1756
        #
1757
        mkdir proto-toplev/etc
1758
        (cd proto-toplev/etc; \
1759
         for i in $(ETC_SUPPORT); do \
1760
                ln -s ../../etc/$$i . ; \
1761
         done)
1762
        #
1763
        # Take out texinfo from configurable dirs
1764
        rm proto-toplev/configure.in
1765
        sed -e '/^host_tools=/s/texinfo //' \
1766
            proto-toplev/configure.in
1767
        #
1768
        mkdir proto-toplev/texinfo
1769
        ln -s ../../texinfo/texinfo.tex         proto-toplev/texinfo/
1770
        ln -s ../../texinfo/gpl.texinfo         proto-toplev/texinfo/
1771
        ln -s ../../texinfo/lgpl.texinfo        proto-toplev/texinfo/
1772
        if test -r texinfo/util/tex3patch ; then \
1773
          mkdir proto-toplev/texinfo/util && \
1774
          ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1775
        else true; fi
1776 56 joel
        chmod -R og=u . || chmod og=u `find . -print`
1777 39 lampret
        if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1778
          ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1779
        else \
1780
          ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1781
        fi; \
1782
        $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver
1783
 
1784
do-tar-gz:
1785
        echo "==> Making $(TOOL)-$(VER).tar.gz"
1786
        -rm -f $(TOOL)-$(VER)
1787
        ln -s proto-toplev $(TOOL)-$(VER)
1788
        tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1789
        $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
1790
 
1791
TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1792
DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1793
 
1794
.PHONY: gas.tar.gz
1795
GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms
1796
gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1797
        $(MAKE) -f Makefile.in taz TOOL=gas \
1798
                SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1799
 
1800
# The FSF "binutils" release includes gprof and ld.
1801
.PHONY: binutils.tar.gz
1802
BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms
1803
binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1804
        $(MAKE) -f Makefile.in taz TOOL=binutils \
1805
                SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1806
 
1807
.PHONY: gas+binutils.tar.gz
1808
GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1809
gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1810
        $(MAKE) -f Makefile.in taz TOOL=gas \
1811
                SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1812
 
1813
.PHONY: libg++.tar.gz
1814
LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1815
libg++.tar.gz: $(DIST_SUPPORT) libg++
1816
        $(MAKE) -f Makefile.in taz TOOL=libg++ \
1817
                SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1818
 
1819
GNATS_SUPPORT_DIRS=include libiberty send-pr
1820
gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1821
        $(MAKE) -f  Makefile.in taz TOOL=gnats \
1822
                SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1823
 
1824
.PHONY: gdb.tar.gz
1825
GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
1826
GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1827
gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1828
        $(MAKE) -f Makefile.in taz TOOL=gdb \
1829
                SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1830
 
1831
.PHONY: newlib.tar.gz
1832
NEWLIB_SUPPORT_DIRS=libgloss
1833
# taz configures for the sun4 target which won't configure newlib.
1834
# We need newlib configured so that the .info files are made.
1835
# Unfortunately, it is not enough to just configure newlib separately:
1836
# taz will build the .info files but since SUBDIRS won't contain newlib,
1837
# distclean won't be run (leaving Makefile, config.status, and the tmp files
1838
# used in building the .info files, eg: *.def, *.ref).
1839
# The problem isn't solvable however without a lot of extra work because
1840
# target libraries are built in subdir $(target_alias) which gets nuked during
1841
# the make distclean.  For now punt on the issue of shipping newlib info files
1842
# with newlib net releases and wait for a day when some native target (sun4?)
1843
# supports newlib (if only minimally).
1844
newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1845
        $(MAKE) -f Makefile.in taz TOOL=newlib \
1846
                SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1847
                DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1848
 
1849
.NOEXPORT:
1850
MAKEOVERRIDES=
1851
 
1852
# end of Makefile.in

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.