1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1994-08-02 20:15:59 +00:00
|
|
|
|
1999-04-18 09:36:11 +00:00
|
|
|
.include "../Makefile.inc"
|
|
|
|
|
1996-09-19 15:53:53 +00:00
|
|
|
# Sometimes this is .include'd several times...
|
|
|
|
.if !defined(GCCDIR)
|
1999-12-22 01:56:57 +00:00
|
|
|
GCCDIR= ${.CURDIR}/../../../../contrib/gcc
|
1996-09-19 15:53:53 +00:00
|
|
|
|
1999-12-29 14:42:46 +00:00
|
|
|
TARGET_ARCH?= ${MACHINE_ARCH}
|
|
|
|
|
|
|
|
.if ${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb"
|
1999-12-22 02:16:21 +00:00
|
|
|
GCC_ARCH= mips
|
1999-04-22 19:35:16 +00:00
|
|
|
.else
|
1999-12-29 14:42:46 +00:00
|
|
|
GCC_ARCH= ${TARGET_ARCH}
|
1999-04-22 19:35:16 +00:00
|
|
|
.endif
|
|
|
|
|
1996-09-19 15:53:53 +00:00
|
|
|
# Machine description.
|
1999-04-22 19:35:16 +00:00
|
|
|
MD_FILE= ${GCCDIR}/config/${GCC_ARCH}/${GCC_ARCH}.md
|
|
|
|
OUT_FILE= ${GCC_ARCH}.c
|
|
|
|
OUT_OBJ= ${GCC_ARCH}
|
1999-12-29 14:42:46 +00:00
|
|
|
target= ${TARGET_ARCH}-unknown-freebsd
|
1999-04-04 16:36:35 +00:00
|
|
|
|
1999-12-22 02:03:28 +00:00
|
|
|
# These architectures are Cygnus's default for enabling Haifa.
|
|
|
|
.if ${GCC_ARCH} == "alpha" || ${GCC_ARCH} == "sparc"
|
|
|
|
USE_EGCS_HAIFA= 1
|
1999-04-04 16:36:35 +00:00
|
|
|
.endif
|
|
|
|
|
1996-09-19 15:53:53 +00:00
|
|
|
version!= sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${GCCDIR}/version.c
|
|
|
|
|
1999-11-15 04:16:19 +00:00
|
|
|
CFLAGS+= -DFREEBSD_NATIVE -DIN_GCC -DHAVE_CONFIG_H
|
1999-12-29 14:42:46 +00:00
|
|
|
CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\"
|
1999-12-22 02:03:28 +00:00
|
|
|
.if defined(LONG_TYPE_SIZE)
|
|
|
|
CFLAGS+= -DLONG_TYPE_SIZE=${LONG_TYPE_SIZE}
|
|
|
|
.endif
|
1996-09-19 15:53:53 +00:00
|
|
|
|
1999-04-04 16:36:35 +00:00
|
|
|
.if defined(USE_EGCS_HAIFA)
|
|
|
|
CFLAGS+= -DHAIFA
|
|
|
|
.endif
|
|
|
|
|
1999-12-29 14:42:46 +00:00
|
|
|
.if ${TARGET_ARCH} != ${MACHINE_ARCH}
|
1999-04-22 19:35:16 +00:00
|
|
|
CFLAGS+= -DCROSS_COMPILE
|
|
|
|
.endif
|
|
|
|
|
1996-09-19 15:53:53 +00:00
|
|
|
.if exists(${.OBJDIR}/../cc_tools)
|
|
|
|
CFLAGS+= -I${.OBJDIR}/../cc_tools
|
|
|
|
.endif
|
1999-04-04 17:11:00 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../cc_tools
|
1999-12-22 02:03:28 +00:00
|
|
|
# This must go after the -I for cc_tools to resolve ambiguities for hash.h
|
|
|
|
# correctly.
|
1999-10-12 20:22:38 +00:00
|
|
|
CFLAGS+= -I${GCCDIR} -I${GCCDIR}/config
|
1994-08-28 18:49:06 +00:00
|
|
|
|
1999-12-22 01:56:57 +00:00
|
|
|
.if exists(${.OBJDIR}/../cc_fbsd)
|
1999-12-22 05:34:56 +00:00
|
|
|
LIBCC_FBSD= ${.OBJDIR}/../cc_fbsd/libcc_fbsd.a
|
1994-08-28 18:49:06 +00:00
|
|
|
.else
|
1999-12-22 05:34:56 +00:00
|
|
|
LIBCC_FBSD= ${.CURDIR}/../cc_fbsd/libcc_fbsd.a
|
1994-08-28 18:49:06 +00:00
|
|
|
.endif
|
|
|
|
|
1999-12-22 01:56:57 +00:00
|
|
|
.if exists(${.OBJDIR}/../cc_int)
|
|
|
|
LIBCC_INT= ${.OBJDIR}/../cc_int/libcc_int.a
|
|
|
|
.else
|
|
|
|
LIBCC_INT= ${.CURDIR}/../cc_int/libcc_int.a
|
|
|
|
.endif
|
1996-09-19 15:53:53 +00:00
|
|
|
|
1999-04-04 16:36:35 +00:00
|
|
|
.endif # !GCCDIR
|