920cc694d12ea33b0d613af7892fe2f80f35764f
[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.12 2004/06/16 01:14:07 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${.OBJDIR}/../cc_int/config \
51                 -I${GCCDIR}/gcc/config
52
53
54 .if exists(${.OBJDIR}/../cc_int)
55 LIBCC_INT=      ${.OBJDIR}/../cc_int/libcc_int.a
56 .else
57 LIBCC_INT=      ${.CURDIR}/../cc_int/libcc_int.a
58 .endif
59
60 gcc_local.c : gcc.c
61         cp ${.ALLSRC:M*c} ${.TARGET}.new
62         patch ${.TARGET}.new ${.CURDIR}/../gcc.c.patch
63         mv -f ${.TARGET}.new ${.TARGET}
64
65 version_local.c : version.c
66         sed -e 's/\(const char version.*".*\) (/\1 [DragonFly] (propolice, /' < ${.ALLSRC:M*c} > ${.TARGET}.new
67         mv -f ${.TARGET}.new ${.TARGET}
68
69 CLEANFILES+=    version_local.c gcc_local.c gcc_local.c.new.orig
70
71 .endif # !__CC_MAKEFILE_INC__