kernel: fix sanity check
[minix.git] / external / gpl3 / gcc / usr.bin / Makefile.inc
blob891b441e737be1f4046a51c21e5c06ebfb77e042
1 #       $NetBSD: Makefile.inc,v 1.11 2012/09/18 07:05:15 skrll Exp $
3 .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_
4 _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_=1
6 .include <bsd.own.mk>
8 TOP=            ${NETBSDSRCDIR}
9 DIST=           ${TOP}/external/gpl3/gcc/dist
11 GCCARCH=        ${.CURDIR}/../gcc/arch/${MACHINE_ARCH}
13 CPPFLAGS+=      -DLOCALEDIR=\"/usr/share/locale\" -DNETBSD_NATIVE
14 HOST_CPPFLAGS+= -I${.CURDIR}/..
16 # Link in the GMP/MPFR/MPC headers since we don't install them
17 BUILDSYMLINKS+= ${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp/arch/${MACHINE_ARCH}/gmp.h gmp.h
18 BUILDSYMLINKS+= ${NETBSDSRCDIR}/external/lgpl3/mpfr/dist/mpfr.h mpfr.h
19 BUILDSYMLINKS+= ${NETBSDSRCDIR}/external/lgpl3/mpfr/dist/mpf2mpfr.h mpf2mpfr.h
20 BUILDSYMLINKS+= ${NETBSDSRCDIR}/external/lgpl2/mpc/dist/src/mpc.h mpc.h
21 BUILDSYMLINKS+= ${NETBSDSRCDIR}/external/lgpl2/mpc/dist/src/mpc-log.h mpc-log.h
22 CPPFLAGS+=      -I.
23 # XXX
24 DPSRCS+= gmp.h mpfr.h mpf2mpfr.h mpc.h mpc-log.h
26 .if ${USETOOLS} == "yes"
27 COMPATOBJDIR!=  cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR}
28 NBCOMPATLIB=    -L${COMPATOBJDIR} -lnbcompat
29 .endif
31 GNUHOSTDIST=    ${DIST}
32 BUILD_PREFIX=   ${C_BUILD_PREFIX}
34 LIBIBERTYOBJ!=          cd ${.CURDIR}/../../lib/libiberty && ${PRINTOBJDIR}
35 FRONTENDOBJ!=           cd ${.CURDIR}/../frontend && ${PRINTOBJDIR}
36 BACKENDOBJ!=            cd ${.CURDIR}/../backend && ${PRINTOBJDIR}
37 LIBCPPOBJ!=             cd ${.CURDIR}/../libcpp && ${PRINTOBJDIR}
38 LIBDECNUMBEROBJ!=       cd ${.CURDIR}/../libdecnumber && ${PRINTOBJDIR}
40 HOSTLIBIBERTYOBJ!=      cd ${.CURDIR}/../host-libiberty && ${PRINTOBJDIR}
41 HOSTLIBIBERTY=          ${HOSTLIBIBERTYOBJ}/libiberty/libiberty.a
43 BASEVER!=               cat ${GNUHOSTDIST}/gcc/BASE-VER
44 # XXX
45 #DEVPHASE!=             cat ${GNUHOSTDIST}/gcc/DEV-PHASE
46 DEVPHASE=
47 .if ${DEVPHASE} == "release" || ${DEVPHASE} == ""
48 DATESTAMP=
49 .else
50 DATESTAMP!=             cat ${GNUHOSTDIST}/gcc/DATESTAMP
51 .endif
53 BASEVERSTR=             "\"$(BASEVER)\""
54 .if !empty(DEVPHASE)
55 DEVPHASESTR=            "\" $(DEVPHASE)\""
56 .else
57 DEVPHASESTR=            "\"\""
58 .endif
59 .if !empty(DATESTAMP)
60 DATESTAMPSTR=           "\" $(DATESTAMP)\""
61 .else
62 DATESTAMPSTR=           "\"\""
63 .endif
65 # XXX pull this out of our configs
66 G_BUGURL=<http://www.NetBSD.org/Misc/send-pr.html>
67 G_BUGURL_s="\"${G_BUG_URL}\""
68 G_PKGVERSION=(NetBSD nb1 20120916) 
69 G_PKGVERSION_s="\"${G_PKGVERSION} \""
71 VER_CPPFLAGS=                   -DBUGURL=${G_BUGURL_s} \
72                                 -DPKGVERSION=${G_PKGVERSION_s} \
73                                 -DBASEVER="\"${BASEVER}"\" \
74                                 -DDATESTAMP=${DATESTAMPSTR} \
75                                 -DDEVPHASE=${DEVPHASE} \
76                                 -DREVISION=${REVISION}
77 CPPFLAGS.version.c=             ${VER_CPPFLAGS}
79 .include "${GCCARCH}/defs.mk"
81 .if ${MKPIC} != "no"
82 .if ${G_ENABLE_SHARED} == "yes" && ${G_SHLIB_LINK} != ""
83 CPPFLAGS+=      -DENABLE_SHARED_LIBGCC
84 .endif
86 .if empty(G_SHLIB_MULTILIB)
87 CPPFLAGS+=      -DNO_SHARED_LIBGCC_MULTILIB
88 .endif
89 .endif
91 # This depends on the "extern inline" mess, so downgrade to something safe.
92 # CPPFLAGS is applied after CFLAGS, which gets the -std=gnu99
93 CPPFLAGS+=      -std=gnu89
95 NOCLANGERROR=   # defined
97 .endif