Initial import from FreeBSD RELENG_4:
[dragonfly.git] / gnu / usr.bin / cc / Makefile.inc
1 # $FreeBSD: src/gnu/usr.bin/cc/Makefile.inc,v 1.49.2.6 2002/11/15 18:18:38 ru Exp $
2
3 .include "../Makefile.inc"
4
5 # Sometimes this is .include'd several times...
6 .if !defined(__CC_MAKEFILE_INC__)
7 __CC_MAKEFILE_INC__= ${MFILE}
8
9 GCCDIR=         ${.CURDIR}/../../../../contrib/gcc
10
11 TARGET_ARCH?=   ${MACHINE_ARCH}
12
13 # Machine description.
14 MD_FILE=        ${GCCDIR}/config/${TARGET_ARCH}/${TARGET_ARCH}.md
15 target=         ${TARGET_ARCH}-unknown-freebsd
16
17 # These architectures are Cygnus's default for enabling Haifa.
18 .if ${TARGET_ARCH} == "alpha"
19 USE_EGCS_HAIFA= 1
20 .endif
21
22 version!=       grep version_string ${GCCDIR}/version.c \
23                     | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'
24
25 CFLAGS+=        -DIN_GCC -DHAVE_CONFIG_H
26 CFLAGS+=        -DPREFIX=\"${TOOLS_PREFIX}/usr\"
27
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}
32 .endif
33
34 .if defined(USE_EGCS_HAIFA)
35 CFLAGS+=        -DHAIFA
36 .endif
37
38 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
39 CFLAGS+=        -DCROSS_COMPILE
40 .endif
41
42 .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE)
43 CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE}
44 .endif
45
46 .if exists(${.OBJDIR}/../cc_tools)
47 CFLAGS+=        -I${.OBJDIR}/../cc_tools
48 .endif
49 CFLAGS+=        -I${.CURDIR}/../cc_tools
50 # This must go after the -I for cc_tools to resolve ambiguities for hash.h
51 # correctly.
52 CFLAGS+=        -I${GCCDIR} -I${GCCDIR}/config
53
54 .if exists(${.OBJDIR}/../cc_int)
55 LIBCC_INT=      ${.OBJDIR}/../cc_int/libcc_int.a
56 .else
57 LIBCC_INT=      ${.CURDIR}/../cc_int/libcc_int.a
58 .endif
59
60 .endif # !__CC_MAKEFILE_INC__