Makefile.inc revision 73306
1# $FreeBSD: head/gnu/usr.bin/cc/Makefile.inc 73306 2001-03-02 02:56:59Z obrien $
2
3.include "../Makefile.inc"
4
5# Sometimes this is .include'd several times...
6.if !defined(GCCDIR)
7GCCDIR=		${.CURDIR}/../../../../contrib/gcc.295
8
9TARGET_ARCH?=	${MACHINE_ARCH}
10
11.if ${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb"
12GCC_ARCH=	mips
13.else
14GCC_ARCH=	${TARGET_ARCH}
15.endif
16
17# Machine description.
18MD_FILE=	${GCCDIR}/config/${GCC_ARCH}/${GCC_ARCH}.md
19OUT_FILE=	${GCC_ARCH}.c
20OUT_OBJ=	${GCC_ARCH}
21target=		${TARGET_ARCH}-unknown-freebsd
22
23# These architectures are Cygnus's default for enabling Haifa.
24.if ${GCC_ARCH} == "alpha" || ${GCC_ARCH} == "sparc" || ${GCC_ARCH} == "sparc64"
25USE_EGCS_HAIFA=	1
26.endif
27
28version!=	sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${GCCDIR}/version.c
29
30CFLAGS+=	-DIN_GCC -DHAVE_CONFIG_H
31CFLAGS+=	-DPREFIX=\"${TOOLS_PREFIX}/usr\"
32
33# If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined
34# to get the proper sizes in limits.h
35.if defined(LONG_TYPE_SIZE)
36CFLAGS+=	-DLONG_TYPE_SIZE=${LONG_TYPE_SIZE}
37.endif
38
39.if defined(USE_EGCS_HAIFA)
40CFLAGS+=	-DHAIFA
41.endif
42
43.if ${TARGET_ARCH} != ${MACHINE_ARCH}
44CFLAGS+=	-DCROSS_COMPILE
45.endif
46
47.if exists(${.OBJDIR}/../cc_tools)
48CFLAGS+=	-I${.OBJDIR}/../cc_tools
49.endif
50CFLAGS+=	-I${.CURDIR}/../cc_tools
51# This must go after the -I for cc_tools to resolve ambiguities for hash.h
52# correctly.
53CFLAGS+=	-I${GCCDIR} -I${GCCDIR}/config
54
55.if exists(${.OBJDIR}/../cc_fbsd)
56LIBCC_FBSD=	${.OBJDIR}/../cc_fbsd/libcc_fbsd.a
57.else
58LIBCC_FBSD=	${.CURDIR}/../cc_fbsd/libcc_fbsd.a
59.endif
60
61.if exists(${.OBJDIR}/../cc_int)
62LIBCC_INT=	${.OBJDIR}/../cc_int/libcc_int.a
63.else
64LIBCC_INT=	${.CURDIR}/../cc_int/libcc_int.a
65.endif
66
67.endif # !GCCDIR
68