5f99bca57f23f8072d18046a33bb0f4d7a1df143
[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 # $DragonFly: src/gnu/usr.bin/cc/Attic/Makefile.inc,v 1.7 2004/02/02 05:43:11 dillon Exp $
3
4 MY_CCVER=gcc2
5 MY_BINUTILS=binutils212
6 BINDIR?=/usr/libexec/gcc2
7 .include "../Makefile.inc"
8
9 # Sometimes this is .include'd several times...
10 .if !defined(__CC_MAKEFILE_INC__)
11 __CC_MAKEFILE_INC__= ${MFILE}
12
13 GCCDIR=         ${.CURDIR}/../../../../contrib/gcc
14
15 TARGET_ARCH?=   ${MACHINE_ARCH}
16
17 # Machine description.
18 MD_FILE=        ${GCCDIR}/config/${TARGET_ARCH}/${TARGET_ARCH}.md
19 target=         ${TARGET_ARCH}-unknown-dragonfly
20
21 # These architectures are Cygnus's default for enabling Haifa.
22 .if ${TARGET_ARCH} == "alpha"
23 USE_EGCS_HAIFA= 1
24 .endif
25
26 version!=       grep version_string ${GCCDIR}/version.c \
27                     | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'
28
29 CFLAGS+=        -DIN_GCC -DHAVE_CONFIG_H
30 CFLAGS+=        -DPREFIX=\"${TOOLS_PREFIX}/usr\"
31
32 # If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined
33 # to get the proper sizes in limits.h
34 .if defined(LONG_TYPE_SIZE)
35 CFLAGS+=        -DLONG_TYPE_SIZE=${LONG_TYPE_SIZE}
36 .endif
37
38 .if defined(USE_EGCS_HAIFA)
39 CFLAGS+=        -DHAIFA
40 .endif
41
42 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
43 CFLAGS+=        -DCROSS_COMPILE
44 .endif
45
46 .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE)
47 CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE}
48 .endif
49
50 .if exists(${.OBJDIR}/../cc_tools)
51 CFLAGS+=        -I${.OBJDIR}/../cc_tools
52 .endif
53 CFLAGS+=        -I${.CURDIR}/../cc_tools
54 # This must go after the -I for cc_tools to resolve ambiguities for hash.h
55 # correctly.
56 CFLAGS+=        -I${GCCDIR} -I${GCCDIR}/config
57
58 .if exists(${.OBJDIR}/../cc_int)
59 LIBCC_INT=      ${.OBJDIR}/../cc_int/libcc_int.a
60 .else
61 LIBCC_INT=      ${.CURDIR}/../cc_int/libcc_int.a
62 .endif
63
64 .endif # !__CC_MAKEFILE_INC__