File:  [DragonFly] / src / gnu / usr.bin / cc / Attic / Makefile.inc
Revision 1.3: download - view: text, annotated - select for diffs
Wed Nov 19 00:51:37 2003 UTC (11 years ago) by dillon
Branches: MAIN
CVS tags: HEAD
Change the system name from 'FreeBSD' to 'DragonFly'.  We are now officially
DragonFly 1.0-CURRENT.  The change is fairly straight forward but involves
adding support for the 'DragonFly' OS type in various gnu contributed pieces
(typically configure based), as well as compiler and BFD support for building
GCC and friends (basically just copied the FreeBSD files for DragonFly).

Additionally, hack the ports makefiles with UNAME_xxx environment variables
so ports builds think its still a FreeBSD-4.8 system.  Otherwise most of the
ports will fail.

# $FreeBSD: src/gnu/usr.bin/cc/Makefile.inc,v 1.49.2.6 2002/11/15 18:18:38 ru Exp $
# $DragonFly: src/gnu/usr.bin/cc/Makefile.inc,v 1.3 2003/11/19 00:51:37 dillon Exp $

.include "../Makefile.inc"

# Sometimes this is .include'd several times...
.if !defined(__CC_MAKEFILE_INC__)
__CC_MAKEFILE_INC__= ${MFILE}

GCCDIR=		${.CURDIR}/../../../../contrib/gcc

TARGET_ARCH?=	${MACHINE_ARCH}

# Machine description.
MD_FILE=	${GCCDIR}/config/${TARGET_ARCH}/${TARGET_ARCH}.md
target=		${TARGET_ARCH}-unknown-dragonfly

# These architectures are Cygnus's default for enabling Haifa.
.if ${TARGET_ARCH} == "alpha"
USE_EGCS_HAIFA=	1
.endif

version!=	grep version_string ${GCCDIR}/version.c \
		    | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'

CFLAGS+=	-DIN_GCC -DHAVE_CONFIG_H
CFLAGS+=	-DPREFIX=\"${TOOLS_PREFIX}/usr\"

# If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined
# to get the proper sizes in limits.h
.if defined(LONG_TYPE_SIZE)
CFLAGS+=	-DLONG_TYPE_SIZE=${LONG_TYPE_SIZE}
.endif

.if defined(USE_EGCS_HAIFA)
CFLAGS+=	-DHAIFA
.endif

.if ${TARGET_ARCH} != ${MACHINE_ARCH}
CFLAGS+=	-DCROSS_COMPILE
.endif

.if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE)
CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE}
.endif

.if exists(${.OBJDIR}/../cc_tools)
CFLAGS+=	-I${.OBJDIR}/../cc_tools
.endif
CFLAGS+=	-I${.CURDIR}/../cc_tools
# This must go after the -I for cc_tools to resolve ambiguities for hash.h
# correctly.
CFLAGS+=	-I${GCCDIR} -I${GCCDIR}/config

.if exists(${.OBJDIR}/../cc_int)
LIBCC_INT=	${.OBJDIR}/../cc_int/libcc_int.a
.else
LIBCC_INT=	${.CURDIR}/../cc_int/libcc_int.a
.endif

.endif # !__CC_MAKEFILE_INC__