gcc47: Add DragonFly READMEs and world makefiles
[dragonfly.git] / gnu / usr.bin / cc47 / Makefile.inc
1 .if !target(__<cc.Makefile.inc>__)
2 __<cc.Makefile.inc>__:
3
4 GCCCOMPLETEVER= 4.7.2
5 GCCDATESTAMP=   2012-09-20
6 GCCPOINTVER=    ${GCCCOMPLETEVER:R}
7 GCCSHORTVER=    ${GCCPOINTVER:S/.//}
8
9 GCCDOCSUFFIX=   ${GCCSHORTVER}
10
11
12 CFLAGS+=        -DGCCPOINTVER=\"${GCCPOINTVER}\"
13 CFLAGS+=        -DGCCSHORTVER=\"${GCCSHORTVER}\"
14 CFLAGS+=        -DBASEVER=\"${GCCCOMPLETEVER}\"
15
16 CFLAGS+=        -DDEFAULT_TARGET_VERSION=\"${version}\"
17 CFLAGS+=        -DDEFAULT_TARGET_MACHINE=\"${target_machine}\"
18
19 BINDIR?=        /usr/libexec/gcc${GCCSHORTVER}
20
21 GCCDIR=         ${.CURDIR}/${TOP_PREFIX}../../../../contrib/gcc-${GCCPOINTVER}
22 OTOPDIR=        ${.OBJDIR}/${TOP_PREFIX}..
23 STOPDIR=        ${.CURDIR}/${TOP_PREFIX}..
24
25 TOOLDIR=        ${OTOPDIR}/cc_tools/tools
26
27 .if defined(LOCAL_CONFIG)
28 CFLAGS+=        -I${.CURDIR}
29 CFLAGS+=        -I${.OBJDIR}
30 .endif
31 CFLAGS+=        -I${OTOPDIR}/cc_prep
32 CFLAGS+=        -I${STOPDIR}/cc_prep
33 CFLAGS+=        -I${STOPDIR}/cc_prep/config
34 CFLAGS+=        -I${GCCDIR}/gcc
35 CFLAGS+=        -I${GCCDIR}/gcc/config
36 CFLAGS+=        -I${GCCDIR}/include
37 CFLAGS+=        -I${GCCDIR}/libcpp/include
38 CFLAGS+=        -I${GCCDIR}/libdecnumber
39 CFLAGS+=        -I${GCCDIR}/libdecnumber/dpd
40 CFLAGS+=        -I${OTOPDIR}/libdecnumber
41 CFLAGS+=        -I${STOPDIR}/../gmp
42 CFLAGS+=        -I${STOPDIR}/../../../contrib/mpfr/src
43 CFLAGS+=        -I${STOPDIR}/../mpfr
44 CFLAGS+=        -I${STOPDIR}/../../../contrib/mpc/src
45 CFLAGS+=        -I${GCCDIR}/gcc/config/${GCC_CPU}
46 CFLAGS+=        -I${TOOLDIR}
47
48 CFLAGS+=        -DIN_GCC -DHAVE_CONFIG_H
49 CFLAGS+=        -DPREFIX1=\"${TOOLS_PREFIX}/usr\"
50 CFLAGS+=        -DPREFIX2=\"${USRDATA_PREFIX}/usr\"
51
52 .include "Makefile.tgt"
53
54 .if ${TARGET_ARCH} != ${MACHINE_ARCH}
55 CFLAGS+= -DCROSS_COMPILE
56 .endif
57
58 .if defined(GCC_LANG_DIR)
59 .PATH: ${GCCDIR}/${GCC_LANG_DIR}
60 .endif
61
62 .if !defined(GCC_NO_PATH)
63 .PATH: ${OTOPDIR}/cc_prep
64 .PATH: ${STOPDIR}/cc_prep
65 .PATH: ${GCCDIR}/gcc
66 .PATH: ${GCCDIR}/gcc/c-family
67 .PATH: ${GCCDIR}/gcc/config 
68 .PATH: ${GCCDIR}/gcc/config/${GCC_CPU}
69 .PATH: ${TOOLDIR}
70 .endif
71
72 LIBIBERTY=      ${OTOPDIR}/libiberty/libiberty.a
73 LIBBACKEND=     ${OTOPDIR}/libbackend/libbackend.a
74 LIBCPP=         ${OTOPDIR}/libcpp/libcpp.a
75 LIBDECNUMBER=   ${OTOPDIR}/libdecnumber/libdecnumber.a
76 LIBCOMMON=      ${OTOPDIR}/libcommon/libcommon.a
77 LIBCOMMONTARG=  ${OTOPDIR}/libcommon-target/libcommon-target.a
78
79 LIBGMP=         ${OTOPDIR}/../gmp/libgmp.a
80 LIBMPFR=        ${OTOPDIR}/../mpfr/libmpfr.a
81 LIBMPC=         ${OTOPDIR}/../mpc/libmpc.a
82 LIBZ=           ${OTOPDIR}/../../../lib/libz/libz.a
83
84 GMPLIBS=        ${LIBMPC} ${LIBMPFR} ${LIBGMP}
85 STDLIBS=        ${LIBCOMMONTARG} ${LIBCOMMON} ${LIBCPP} ${LIBIBERTY} ${LIBDECNUMBER} 
86 BACKENDLIBS=    ${GMPLIBS} ${LIBZ}
87
88 .if !defined(GCC_NO_LIBS)
89 LDADD+= ${STDLIBS}
90 DPADD+= ${STDLIBS}
91 .endif
92
93 .endif