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