home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD2.bin
/
bbs
/
gnu
/
gnu-misc-src.lha
/
GNU
/
src
/
amiga
/
Makefile.in
< prev
next >
Wrap
Makefile
|
1995-01-08
|
35KB
|
1,239 lines
#
# Makefile for directory with subdirs to build.
# Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#
srcdir = .
prefix = /gnu
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
tooldir = $(exec_prefix)/$(target)
program_transform_name =
datadir = $(prefix)/lib
mandir = $(prefix)/man
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
man4dir = $(mandir)/man4
man5dir = $(mandir)/man5
man6dir = $(mandir)/man6
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
infodir = $(prefix)/info
includedir = $(prefix)/include
docdir = $(datadir)/doc
SHELL = /bin/sh
INSTALL = /bin/install -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
AS = as
AR = ar
AR_FLAGS = rc
CC = gcc
# We don't specify -g -O because many compilers don't support -g -O,
# and/or -O is broken in and of itself.
CFLAGS = -O2
CXX = gcc
# Use -O to stress test the compiler.
CXXFLAGS = -O2 -fexternal-templates
RANLIB = ranlib
NM = nm
# Not plain GZIP, since gzip looks there for extra command-line options.
GZIPPROG = gzip
# BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
BISON = `if [ -f $$r/bison-1.22/bison ] ; \
then echo $$r/bison-1.22/bison -y ; \
else echo bison -y ; \
fi`
LEX = `if [ -f $$r/flex-2.4.7/flex ] ; \
then echo $$r/flex-2.4.7/flex ; \
else echo flex ; fi`
M4 = `if [ -f $$r/m4-1.4/m4 ] ; \
then echo $$r/m4-1.4/m4 ; \
else echo m4 ; fi`
MAKEINFO = `if [ -f $$r/texinfo-3.1/makeinfo/makeinfo ] ; \
then echo $$r/texinfo-3.1/makeinfo/makeinfo ; \
else echo makeinfo ; fi`
# This just becomes part of the MAKEINFO definition passed down to
# sub-makes. It lets flags be given on the command line while still
# using the makeinfo from the object tree.
MAKEINFOFLAGS =
EXPECT = `if [ -f $$r/expect/expect ] ; \
then echo $$r/expect/expect ; \
else echo expect ; fi`
RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \
then echo $${srcroot}/dejagnu/runtest ; \
else echo runtest ; fi`
# libraries that may need to be augmented on a system-by-system basis
X11_LIB = -lX11
# compilers to use to create programs which must be run in the build
# environment.
CC_FOR_BUILD = $(CC)
CXX_FOR_BUILD = $(CXX)
SUBDIRS = "this is set via configure, don't edit this"
OTHERS =
ALL = all.normal
INSTALL_TARGET = install-dirs \
$(INSTALL_MODULES) \
$(INSTALL_TARGET_MODULES) \
$(INSTALL_X11_MODULES) \
install-gcc-2.6.3
CC_FOR_TARGET = ` \
if [ -f $$r/gcc-2.6.3/Makefile ] ; then \
echo $$r/gcc-2.6.3/xgcc -B$$r/gcc-2.6.3/; \
else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(CC); \
else \
t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \
fi; \
fi`
CXX_FOR_TARGET = ` \
if [ -f $$r/gcc-2.6.3/Makefile ] ; then \
echo $$r/gcc-2.6.3/xgcc -B$$r/gcc-2.6.3/; \
else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(CXX); \
else \
t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \
fi; \
fi`
AS_FOR_TARGET = ` \
if [ -f $$r/gas-2.3/Makefile ] ; then \
echo $$r/gas-2.3/gas ; \
else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(AS); \
else \
t='$(program_transform_name)'; echo as | sed -e 's/brokensed/brokensed/' $$t ; \
fi; \
fi`
AR_FOR_TARGET = ` \
if [ -f $$r/binutils-1.8.x/ar ] ; then \
echo $$r/binutils-1.8.x/ar ; \
else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(AR); \
else \
t='$(program_transform_name)'; echo ar | sed -e 's/brokensed/brokensed/' $$t ; \
fi; \
fi`
RANLIB_FOR_TARGET = ` \
if [ -f $$r/binutils-1.8.x/ranlib ] ; then \
echo $$r/binutils-1.8.x/ranlib ; \
else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(RANLIB); \
else \
t='$(program_transform_name)'; echo ranlib | sed -e 's/brokensed/brokensed/' $$t ; \
fi; \
fi`
NM_FOR_TARGET = ` \
if [ -f $$r/binutils-1.8.x/Makefile ] ; then \
echo $$r/binutils-1.8.x/nm.new ; \
else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(NM); \
else \
t='$(program_transform_name)'; echo nm | sed -e 's/brokensed/brokensed/' $$t ; \
fi; \
fi`
# FIXME: This is badly named.
XTRAFLAGS = ` \
if [ -f $$r/gcc-2.6.3/Makefile ] ; then \
if [ -f $$r/newlib/Makefile ] ; then \
/bin/echo -I$$r/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$$r/gcc-2.6.3/include -nostdinc ; \
else \
/bin/echo -I$$r/gcc-2.6.3/include ; \
fi ; \
else \
echo ; \
fi`
#### host and target specific makefile fragments come in here.
###
# Flags to pass down to all sub-makes.
# Please keep these in alphabetical order.
BASE_FLAGS_TO_PASS = \
"AR_FLAGS=$(AR_FLAGS)" \
"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
"BISON=$(BISON)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS=$(CFLAGS)" \
"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
"GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_XFORM=$(INSTALL_XFORM)" \
"LDFLAGS=$(LDFLAGS)" \
"LEX=$(LEX)" \
"M4=$(M4)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"EXPECT=$(EXPECT)" \
"RUNTEST=$(RUNTEST)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
"YACC=$(BISON)" \
"exec_prefix=$(exec_prefix)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)"
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
# If any variables are added here, they must be added to do-*, below.
EXTRA_HOST_FLAGS = \
'AR=$(AR)' \
'AS=$(AS)' \
'CC=$(CC)' \
'CXX=$(CXX)' \
'NM=$(NM)' \
'RANLIB=$(RANLIB)' \
'XTRAFLAGS='
FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
# Flags that are concerned with the location of the X11 include files
# and library files
X11_FLAGS_TO_PASS = \
"X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
"X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
"X11_LIB=$(X11_LIB)"
# Flags to pass down to makes which are built with the target environment.
# The double $ decreases the length of the command line; the variables
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
# If any variables are added here, they must be added to do-*, below.
EXTRA_TARGET_FLAGS = \
'AR=$$(AR_FOR_TARGET)' \
'AS=$$(AS_FOR_TARGET)' \
'CC=$$(CC_FOR_TARGET)' \
'CXX=$$(CXX_FOR_TARGET)' \
'NM=$$(NM_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
# unfortunately needs the native compiler and the target ar and
# ranlib.
# If any variables are added here, they must be added to do-*, below.
# The HOST_* variables are a special case, which are used for the gcc
# cross-building scheme.
HOST_CC = $(CC_FOR_BUILD)
HOST_PREFIX =
HOST_PREFIX_1 = loser-
EXTRA_GCC_FLAGS = \
'AR=$$(AR_FOR_TARGET)' \
'AS=$(AS)' \
'CC=$(CC)' \
'CXX=$(CXX)' \
'HOST_CC=$(CC_FOR_BUILD)' \
'HOST_PREFIX=$(HOST_PREFIX)'