2001-01-09 11:52:56 +03:00
|
|
|
# $NetBSD: Makefile.inc,v 1.29 2001/01/09 08:52:58 enami Exp $
|
1998-03-29 15:34:19 +04:00
|
|
|
|
|
|
|
.if !defined(GCC_MAKEFILE_INC)
|
|
|
|
GCC_MAKEFILE_INC=1
|
|
|
|
|
1998-08-17 06:25:44 +04:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
1998-08-18 22:59:46 +04:00
|
|
|
# These architectures are Cygnus's default for enabling Haifa
|
|
|
|
.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "powerpc") || \
|
1998-11-29 01:44:22 +03:00
|
|
|
(${MACHINE_ARCH} == "sparc") || (${MACHINE_ARCH} == "sparc64")
|
1998-08-18 22:59:46 +04:00
|
|
|
USE_EGCS_HAIFA=1
|
|
|
|
.endif
|
1999-02-13 05:54:17 +03:00
|
|
|
#MKMAN=no
|
1998-08-18 22:59:46 +04:00
|
|
|
|
1998-08-18 17:31:50 +04:00
|
|
|
# gcc has files with a "rs6000" prefix for powerpc
|
|
|
|
GNU_ARCH.powerpc=rs6000
|
|
|
|
|
1998-08-17 06:25:44 +04:00
|
|
|
DIST= ${.CURDIR}/../../../dist/gcc
|
|
|
|
COMMON= ${.CURDIR}/../common
|
2001-01-09 11:52:56 +03:00
|
|
|
COMMONOBJ!= cd ${.CURDIR}/../common && ${PRINTOBJDIR}
|
1998-08-17 06:25:44 +04:00
|
|
|
|
2001-01-08 11:29:59 +03:00
|
|
|
.if exists(${.CURDIR}/../arch/${MACHINE_ARCH})
|
1999-02-24 20:48:42 +03:00
|
|
|
ARCHSUBDIR= ${MACHINE_ARCH}
|
2001-01-08 11:29:59 +03:00
|
|
|
.elif exists(${.CURDIR}/../arch/${MACHINE_CPU})
|
|
|
|
ARCHSUBDIR= ${MACHINE_CPU}
|
|
|
|
.else
|
|
|
|
.BEGIN:
|
|
|
|
@echo no ../arch/${MACHINE_ARCH} nor ../arch/${MACHINE_CPU} exists
|
|
|
|
@false
|
1999-02-24 20:48:42 +03:00
|
|
|
.endif
|
|
|
|
|
1998-08-17 06:25:44 +04:00
|
|
|
CPPFLAGS+= -I${.CURDIR}/../arch \
|
1999-02-24 20:48:42 +03:00
|
|
|
-I${.CURDIR}/../arch/${ARCHSUBDIR} \
|
1998-08-17 06:25:44 +04:00
|
|
|
-I${COMMONOBJ} \
|
|
|
|
-I${DIST} \
|
|
|
|
-I${DIST}/config \
|
|
|
|
-DIN_GCC -DNETBSD_NATIVE
|
1999-10-09 20:10:19 +04:00
|
|
|
HOST_CPPFLAGS+= -I${.CURDIR}/../arch \
|
|
|
|
-I${.CURDIR}/../arch/${ARCHSUBDIR} \
|
|
|
|
-I${COMMONOBJ} \
|
|
|
|
-I${DIST} \
|
|
|
|
-I${DIST}/config \
|
|
|
|
-DIN_GCC -DNETBSD_NATIVE
|
1999-01-11 13:59:25 +03:00
|
|
|
|
1999-03-17 03:46:35 +03:00
|
|
|
.if (${OBJECT_FMT} == "ELF" || defined(BOOTSTRAP_ELF))
|
1999-01-11 13:59:25 +03:00
|
|
|
CPPFLAGS+=-DDEFAULT_ELF
|
|
|
|
.endif
|
|
|
|
|
2001-01-08 11:29:59 +03:00
|
|
|
.if (${MACHINE_ARCH} == "mipseb") || (${MACHINE_ARCH} == "sh3eb")
|
2000-02-19 03:44:31 +03:00
|
|
|
CPPFLAGS+=-DTARGET_BIG_ENDIAN_DEFAULT
|
|
|
|
.endif
|
|
|
|
|
2001-01-08 11:29:59 +03:00
|
|
|
.if (${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "sh3el")
|
2000-02-19 03:44:31 +03:00
|
|
|
CPPFLAGS+=-DTARGET_LITTLE_ENDIAN_DEFAULT
|
|
|
|
.endif
|
|
|
|
|
1998-08-17 06:25:44 +04:00
|
|
|
.PATH: ${.CURDIR}/../arch \
|
|
|
|
${DIST} \
|
|
|
|
${DIST}/config
|
1998-04-16 01:54:05 +04:00
|
|
|
|
1998-08-17 06:25:44 +04:00
|
|
|
EGCS_VERSION!= sed -e 's/.*\(egcs-[0-9\.]*\).*/\1/' ${DIST}/version.c
|
1998-03-29 15:34:19 +04:00
|
|
|
|
2000-11-09 09:25:52 +03:00
|
|
|
.if !defined(COMPILER_EXEC_PREFIX)
|
|
|
|
COMPILER_EXEC_PREFIX=
|
|
|
|
.endif
|
|
|
|
|
1998-08-17 06:25:44 +04:00
|
|
|
CPPFLAGS+= -DHAVE_CONFIG_H -DPREFIX=\"/usr\" \
|
|
|
|
-DDEFAULT_TARGET_VERSION=\"${EGCS_VERSION}\" \
|
|
|
|
-DDEFAULT_TARGET_MACHINE=\"${MACHINE_GNU_ARCH}-netbsd\" \
|
|
|
|
-DSTANDARD_STARTFILE_PREFIX=\"/usr/lib/\" \
|
|
|
|
-DSTANDARD_EXEC_PREFIX=\"/usr/libexec/\" \
|
2000-11-09 09:25:52 +03:00
|
|
|
-DTOOLDIR_BASE_PREFIX=\"/usr/libexec/\" \
|
|
|
|
-DNBSD_EXEC_PREFIX=\"${COMPILER_EXEC_PREFIX}/usr/libexec/\"
|
1998-03-29 15:34:19 +04:00
|
|
|
|
1998-08-17 06:25:44 +04:00
|
|
|
.if defined(USE_EGCS_HAIFA)
|
|
|
|
CPPFLAGS+= -DHAIFA
|
|
|
|
.endif
|
1998-03-29 15:34:19 +04:00
|
|
|
.endif
|