Propolice for GCC 3.3 based on:
[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.7 2004/03/05 21:38:44 joerg 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+=       -DWANT_COMPILER_INVARIANTS
25
26 # If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined
27 # to get the proper sizes in limits.h
28 .if defined(LONG_TYPE_SIZE)
29 CFLAGS+=        -DLONG_TYPE_SIZE=${LONG_TYPE_SIZE}
30 .endif
31
32 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
33 CFLAGS+=        -DCROSS_COMPILE
34 .endif
35
36 .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE)
37 CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE}
38 .endif
39
40 .if exists(${.OBJDIR}/../cc_tools)
41 CFLAGS+=        -I${.OBJDIR}/../cc_tools
42 .endif
43 CFLAGS+=        -I${.CURDIR}/../cc_tools
44 # This must go after the -I for cc_tools to resolve ambiguities for hash.h
45 # correctly.
46 CFLAGS+=        -I${GCCDIR} -I${GCCDIR}/include 
47 CFLAGS+=        -I${GCCDIR}/gcc -I${GCCDIR}/gcc/config
48
49
50 .if exists(${.OBJDIR}/../cc_int)
51 LIBCC_INT=      ${.OBJDIR}/../cc_int/libcc_int.a
52 .else
53 LIBCC_INT=      ${.CURDIR}/../cc_int/libcc_int.a
54 .endif
55
56 gcc_local.c : gcc.c
57         sed -e 's%startfile_prefix_1 = "/lib/"%startfile_prefix_1 = STANDARD_STARTFILE_PREFIX_1%' < ${.ALLSRC:M*c} > ${.TARGET}.new
58         mv -f ${.TARGET}.new ${.TARGET}
59
60 version_local.c : version.c
61         sed -e 's/\(const char version.*".*\) (/\1 [DragonFly] (propolice, /' < ${.ALLSRC:M*c} > ${.TARGET}.new
62         mv -f ${.TARGET}.new ${.TARGET}
63
64 CLEANFILES+=    version_local.c
65
66 .endif # !__CC_MAKEFILE_INC__