1 # $FreeBSD: src/gnu/usr.bin/cc/Makefile.inc,v 1.49.2.6 2002/11/15 18:18:38 ru Exp $
3 .include "../Makefile.inc"
5 # Sometimes this is .include'd several times...
6 .if !defined(__CC_MAKEFILE_INC__)
7 __CC_MAKEFILE_INC__= ${MFILE}
9 GCCDIR= ${.CURDIR}/../../../../contrib/gcc
11 TARGET_ARCH?= ${MACHINE_ARCH}
13 # Machine description.
14 MD_FILE= ${GCCDIR}/config/${TARGET_ARCH}/${TARGET_ARCH}.md
15 target= ${TARGET_ARCH}-unknown-freebsd
17 # These architectures are Cygnus's default for enabling Haifa.
18 .if ${TARGET_ARCH} == "alpha"
22 version!= grep version_string ${GCCDIR}/version.c \
23 | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'
25 CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H
26 CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\"
28 # If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined
29 # to get the proper sizes in limits.h
30 .if defined(LONG_TYPE_SIZE)
31 CFLAGS+= -DLONG_TYPE_SIZE=${LONG_TYPE_SIZE}
34 .if defined(USE_EGCS_HAIFA)
38 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
39 CFLAGS+= -DCROSS_COMPILE
42 .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE)
43 CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE}
46 .if exists(${.OBJDIR}/../cc_tools)
47 CFLAGS+= -I${.OBJDIR}/../cc_tools
49 CFLAGS+= -I${.CURDIR}/../cc_tools
50 # This must go after the -I for cc_tools to resolve ambiguities for hash.h
52 CFLAGS+= -I${GCCDIR} -I${GCCDIR}/config
54 .if exists(${.OBJDIR}/../cc_int)
55 LIBCC_INT= ${.OBJDIR}/../cc_int/libcc_int.a
57 LIBCC_INT= ${.CURDIR}/../cc_int/libcc_int.a
60 .endif # !__CC_MAKEFILE_INC__