Merge from vendor branch OPENSSH:
[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.9 2004/06/21 03:48:04 dillon Exp $
3
4 MY_BINUTILS=binutils212
5 BINDIR?=/usr/libexec/gcc2
6 .include "../Makefile.inc"
7
8 # Sometimes this is .include'd several times...
9 .if !defined(__CC_MAKEFILE_INC__)
10 __CC_MAKEFILE_INC__= ${MFILE}
11
12 GCCDIR=         ${.CURDIR}/../../../../contrib/gcc
13
14 TARGET_ARCH?=   ${MACHINE_ARCH}
15
16 # Machine description.
17 MD_FILE=        ${GCCDIR}/config/${TARGET_ARCH}/${TARGET_ARCH}.md
18 target=         ${TARGET_ARCH}-unknown-dragonfly
19
20 # These architectures are Cygnus's default for enabling Haifa.
21 .if ${TARGET_ARCH} == "alpha"
22 USE_EGCS_HAIFA= 1
23 .endif
24
25 version!=       grep version_string ${GCCDIR}/version.c \
26                     | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'
27
28 CFLAGS+=        -DIN_GCC -DHAVE_CONFIG_H
29 CFLAGS+=        -DPREFIX=\"${TOOLS_PREFIX}/usr\"
30 CFLAGS+=        -DPREFIX1=\"${TOOLS_PREFIX}/usr\"
31 CFLAGS+=        -DPREFIX2=\"${USRDATA_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)
36 CFLAGS+=        -DLONG_TYPE_SIZE=${LONG_TYPE_SIZE}
37 .endif
38
39 .if defined(USE_EGCS_HAIFA)
40 CFLAGS+=        -DHAIFA
41 .endif
42
43 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
44 CFLAGS+=        -DCROSS_COMPILE
45 .endif
46
47 .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE)
48 CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE}
49 .endif
50
51 .if exists(${.OBJDIR}/../cc_tools)
52 CFLAGS+=        -I${.OBJDIR}/../cc_tools
53 .endif
54 CFLAGS+=        -I${.CURDIR}/../cc_tools
55 # This must go after the -I for cc_tools to resolve ambiguities for hash.h
56 # correctly.
57 CFLAGS+=        -I${GCCDIR} -I${GCCDIR}/config
58
59 .if exists(${.OBJDIR}/../cc_int)
60 LIBCC_INT=      ${.OBJDIR}/../cc_int/libcc_int.a
61 .else
62 LIBCC_INT=      ${.CURDIR}/../cc_int/libcc_int.a
63 .endif
64
65 .endif # !__CC_MAKEFILE_INC__