Merge from vendor branch DIFFUTILS:
[dragonfly.git] / gnu / usr.bin / cc3 / Makefile.inc
1 # $FreeBSD: src/gnu/usr.bin/cc/Makefile.inc,v 1.63 2002/06/04 19:45:08 obrien Exp $
2 # $DragonFly: src/gnu/usr.bin/cc3/Attic/Makefile.inc,v 1.9 2004/04/07 17:48:03 dillon Exp $
3
4 BINDIR?=/usr/libexec/gcc3
5 MY_CCVER=gcc3
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 CFLAGS+=        -I${.CURDIR}/../cc_int -I${.OBJDIR}/../cc_int
13
14 GCCDIR= ${.CURDIR}/../../../../contrib/gcc-3.3
15
16 .include "Makefile.tgt"
17
18 # Machine description.
19 MD_FILE=        ${GCCDIR}/gcc/config/${GCC_CPU}/${GCC_CPU}.md
20 target=         ${TARGET_ARCH}-undermydesk-freebsd
21
22 CFLAGS+=        -DIN_GCC -DHAVE_CONFIG_H
23 CFLAGS+=        -DPREFIX=\"${TOOLS_PREFIX}/usr\"
24 CFLAGS+=        -DPREFIX1=\"${TOOLS_PREFIX}/usr\"
25 CFLAGS+=        -DPREFIX2=\"${USRDATA_PREFIX}/usr\"
26 #CFLAGS+=       -DWANT_COMPILER_INVARIANTS
27 CFLAGS+=        -DSTACK_PROTECTOR
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 ${TARGET_ARCH} != ${MACHINE_ARCH}
36 CFLAGS+=        -DCROSS_COMPILE
37 .endif
38
39 .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE)
40 CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE}
41 .endif
42
43 .if exists(${.OBJDIR}/../cc_tools)
44 CFLAGS+=        -I${.OBJDIR}/../cc_tools
45 .endif
46 CFLAGS+=        -I${.CURDIR}/../cc_tools
47 # This must go after the -I for cc_tools to resolve ambiguities for hash.h
48 # correctly.
49 CFLAGS+=        -I${GCCDIR} -I${GCCDIR}/include 
50 CFLAGS+=        -I${GCCDIR}/gcc -I${GCCDIR}/gcc/config
51
52
53 .if exists(${.OBJDIR}/../cc_int)
54 LIBCC_INT=      ${.OBJDIR}/../cc_int/libcc_int.a
55 .else
56 LIBCC_INT=      ${.CURDIR}/../cc_int/libcc_int.a
57 .endif
58
59 gcc_local.c : gcc.c
60         sed -e 's%startfile_prefix_1 = "/lib/"%startfile_prefix_1 = STANDARD_STARTFILE_PREFIX_1%' < ${.ALLSRC:M*c} > ${.TARGET}.new
61         mv -f ${.TARGET}.new ${.TARGET}
62
63 version_local.c : version.c
64         sed -e 's/\(const char version.*".*\) (/\1 [DragonFly] (propolice, /' < ${.ALLSRC:M*c} > ${.TARGET}.new
65         mv -f ${.TARGET}.new ${.TARGET}
66
67 CLEANFILES+=    version_local.c
68
69 .endif # !__CC_MAKEFILE_INC__