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