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