| @@ -1,48 +1,64 @@ | | | @@ -1,48 +1,64 @@ |
1 | # $NetBSD: Makefile.lib,v 1.19 2014/10/09 14:06:34 wiz Exp $ | | 1 | # $NetBSD: Makefile.lib,v 1.20 2015/02/14 06:54:14 riastradh Exp $ |
2 | # | | 2 | # |
3 | # This Makefile fragment is included by all packages that build libraries | | 3 | # This Makefile fragment is included by all packages that build libraries |
4 | # from the Mesa sources. | | 4 | # from the Mesa sources. |
5 | # | | 5 | # |
6 | # used by graphics/glu/Makefile | | 6 | # used by graphics/glu/Makefile |
7 | # used by graphics/glut/Makefile | | 7 | # used by graphics/glut/Makefile |
8 | # used by graphics/MesaDemos/Makefile | | 8 | # used by graphics/MesaDemos/Makefile |
9 | # used by graphics/MesaLib/Makefile | | 9 | # used by graphics/MesaLib/Makefile |
10 | | | 10 | |
11 | .include "../../graphics/Mesa/Makefile.common" | | 11 | .include "../../graphics/Mesa/Makefile.common" |
12 | | | 12 | |
13 | DISTFILES+= MesaLib-${MESA_VERSION}${EXTRACT_SUFX} | | 13 | DISTFILES+= MesaLib-${MESA_VERSION}${EXTRACT_SUFX} |
14 | DISTFILES+= MesaGLUT-${MESA_VERSION}${EXTRACT_SUFX} | | 14 | DISTFILES+= MesaGLUT-${MESA_VERSION}${EXTRACT_SUFX} |
15 | #DISTFILES+= MesaDemos-${MESA_VERSION}${EXTRACT_SUFX} | | 15 | #DISTFILES+= MesaDemos-${MESA_VERSION}${EXTRACT_SUFX} |
16 | | | 16 | |
17 | GNU_CONFIGURE= yes | | 17 | GNU_CONFIGURE= yes |
18 | USE_LANGUAGES= c99 c++ | | 18 | USE_LANGUAGES= c99 c++ |
19 | USE_TOOLS+= automake bison flex gmake pkg-config makedepend | | 19 | USE_TOOLS+= automake bison flex gmake pkg-config makedepend |
20 | | | 20 | |
21 | PYTHON_FOR_BUILD_ONLY= yes | | 21 | PYTHON_FOR_BUILD_ONLY= tool |
22 | PYTHON_VERSIONS_INCOMPATIBLE= 33 34 # not yet ported as of 7.11.2 | | 22 | PYTHON_VERSIONS_INCOMPATIBLE= 33 34 # not yet ported as of 7.11.2 |
23 | .include "../../lang/python/tool.mk" | | 23 | .include "../../lang/python/tool.mk" |
24 | BUILDLINK_DEPMETHOD.libxml2?= build | | 24 | BUILDLINK_DEPMETHOD.libxml2?= build |
25 | .include "../../textproc/libxml2/buildlink3.mk" | | 25 | .include "../../textproc/libxml2/buildlink3.mk" |
26 | | | 26 | |
27 | PATCHDIR= ${.CURDIR}/../MesaLib/patches | | 27 | PATCHDIR= ${.CURDIR}/../MesaLib/patches |
28 | DISTINFO_FILE= ${.CURDIR}/../MesaLib/distinfo | | 28 | DISTINFO_FILE= ${.CURDIR}/../MesaLib/distinfo |
29 | | | 29 | |
30 | MAKE_ENV+= MAKE=${GMAKE:Q} | | 30 | MAKE_ENV+= MAKE=${GMAKE:Q} |
31 | | | 31 | |
32 | CONFIGURE_ARGS+= --with-gallium-drivers="" | | 32 | CONFIGURE_ARGS+= --with-gallium-drivers="" |
33 | CONFIGURE_ARGS+= --disable-gallium-llvm | | 33 | CONFIGURE_ARGS+= --disable-gallium-llvm |
34 | CONFIGURE_ARGS+= --disable-egl | | 34 | CONFIGURE_ARGS+= --disable-egl |
35 | | | 35 | |
36 | .include "../../mk/compiler.mk" | | 36 | .include "../../mk/compiler.mk" |
37 | | | 37 | |
38 | .if !empty(PKGSRC_COMPILER:Mccc) | | 38 | .if !empty(PKGSRC_COMPILER:Mccc) |
39 | CFLAGS+= -D__FUNCTION__=__FILE__ | | 39 | CFLAGS+= -D__FUNCTION__=__FILE__ |
40 | .endif | | 40 | .endif |
41 | | | 41 | |
42 | .include "../../mk/bsd.prefs.mk" | | 42 | .include "../../mk/bsd.prefs.mk" |
43 | .if ${OPSYS} == "MirBSD" | | 43 | .if ${OPSYS} == "MirBSD" |
44 | BUILDLINK_TRANSFORM+= rm:-fvisibility=hidden | | 44 | BUILDLINK_TRANSFORM+= rm:-fvisibility=hidden |
45 | .endif | | 45 | .endif |
46 | | | 46 | |
| | | 47 | .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) |
| | | 48 | # XXX This is not quite enough: we will need to patch the makefile |
| | | 49 | # because it bogusly tries to reuse objects for native tools and target |
| | | 50 | # libraries, and for cross-compiling the objects need to be built |
| | | 51 | # separately. Alternatively, we could just update Mesa to something |
| | | 52 | # less prehistoric... |
| | | 53 | SUBST_CLASSES+= nativecc |
| | | 54 | SUBST_STAGE.nativecc= pre-configure |
| | | 55 | SUBST_MESSAGE.nativecc= Fix makefiles to compile tools with native cc. |
| | | 56 | SUBST_FILES.nativecc+= src/glsl/Makefile |
| | | 57 | SUBST_SED.nativecc+= -e 's,$$(CC),$$(APP_CC),g' |
| | | 58 | SUBST_SED.nativecc+= -e 's,$$(CXX),$$(APP_CXX),g' |
| | | 59 | MAKE_FLAGS+= APP_CC=${NATIVE_CC:Q} |
| | | 60 | MAKE_FLAGS+= APP_CXX=${NATIVE_CXX:Q} |
| | | 61 | .endif |
| | | 62 | |
47 | pre-configure: | | 63 | pre-configure: |
48 | cd ${WRKSRC} && ${MAKE} configure | | 64 | cd ${WRKSRC} && ${MAKE} configure |