[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / graphics / MesaLib

Annotation of pkgsrc/graphics/MesaLib/Makefile, Revision 1.72

1.72    ! wiz         1: # $NetBSD: Makefile,v 1.71 2008/08/23 01:27:10 dsainty Exp $
1.1       rh          2:
1.57      bjs         3: PKGNAME=       MesaLib-${MESA_PKGVERSION}
1.30      adam        4: COMMENT=       Graphics library similar to SGI's OpenGL
1.72    ! wiz         5: PKGREVISION=   2
1.30      adam        6:
1.57      bjs         7: MESA_HEADERS=  gl.h gl_mangle.h glext.h glx.h glxext.h \
                      8:                glx_mangle.h osmesa.h xmesa.h xmesa_x.h \
                      9:                xmesa_xf86.h
                     10:
1.65      bjs        11: MESA_HEADERS+= internal/dri_interface.h internal/sarea.h
                     12:
1.57      bjs        13: PKG_DESTDIR_SUPPORT=   user-destdir
                     14:
1.65      bjs        15: BUILD_DEFS+=           MESA_HZ
                     16: ###
                     17: ### XXX Older versions of xf86driproto installed dri_interface.h, which
                     18: ###    is now installed by Mesa.
                     19: ###
                     20: BUILDLINK_API_DEPENDS.driproto+=       xf86driproto>=2.0.4
1.57      bjs        21:
                     22: .include "../../mk/bsd.prefs.mk"
                     23:
                     24: CFLAGS.NetBSD+=        -D_NETBSD_SOURCE
1.70      bjs        25: CFLAGS.NetBSD+=        ${ATOMIC_OPS_CHECK}HAVE_NETBSD_ATOMIC_OPS
                     26:
                     27: .if ${OPSYS} == "NetBSD" && !target(netbsd-atomic-ops-check)
                     28: netbsd-atomic-ops-check:
                     29: ATOMIC_OPS_CHECK!=\
                     30:   if ( ${NM} /usr/lib/libc.so | ${GREP} -q atomic_cas_uint ); then     \
                     31:     ${ECHO} "-D";      \
                     32:   else \
                     33:     ${ECHO} "-U";      \
                     34:   fi
                     35: .endif
1.57      bjs        36:
                     37: .if (${MACHINE_ARCH} == "x86_64" || \
                     38:     ${MACHINE_ARCH} == "sparc64" || \
                     39:     ${MACHINE_ARCH} == "alpha")
                     40: CFLAGS+=       -D__GLX_ALIGN64
                     41: .endif
1.1       rh         42:
1.65      bjs        43: .if !empty(MACHINE_ARCH:Mi386) || !empty(MACHINE_ARCH:Mx86_64)
1.57      bjs        44: ###
                     45: ### This is taken from <sys/arch/i386/include/npx.h>.  If we don't override
                     46: ### it, the FPU control word will be restored to 0x037f.
                     47: ###
                     48: ### Also, see patch-aq about the libm functions required (float functions
                     49: ### such as floorf).  Proper configuration of this should be a goal of
                     50: ### the Mesa developers; alas, it obviously is not.
                     51: ###
                     52: ### XXX We need a reliable check for these functions.
                     53: ###
                     54: #/* NetBSD uses IEEE double precision. */
                     55: CFLAGS.NetBSD+=                -DDEFAULT_X86_FPU=0x127f
                     56: ###
                     57: ###
                     58: #/* FreeBSD leaves some exceptions unmasked as well. */
                     59: ###
                     60: CFLAGS.FreeBSD+=       -DDEFAULT_x86_FPU=0x1272
1.20      grant      61: .endif
1.15      jschauma   62:
1.57      bjs        63: CFLAGS.FreeBSD+=       -DUSE_NATIVE_LIBM_FUNCS
                     64: CFLAGS.Linux+=         -DUSE_NATIVE_LIBM_FUNCS
                     65: CFLAGS.NetBSD+=                -DUSE_NATIVE_LIBM_FUNCS
1.59      bjs        66: CFLAGS.DragonFly+=     -DUSE_NATIVE_LIBM_FUNCS
1.57      bjs        67:
                     68: PLIST_VARS=            dri nodri
                     69:
                     70: .include "../../graphics/Mesa/Makefile.lib"
                     71: .include "options.mk"
1.40      jlam       72:
1.47      drochner   73: .if !empty(MACHINE_PLATFORM:MNetBSD-[12].*)
1.67      dsainty    74: ##
                     75: ## NetBSD 2.x and earlier require pthread stubs
                     76: ##
1.57      bjs        77: .  include "../../devel/pthread-stublib/buildlink3.mk"
1.67      dsainty    78: PTHREAD_STUBLIB= -L${PREFIX}/lib -Wl,-R${PREFIX}/lib -lpthstub
                     79: .elif !empty(MACHINE_PLATFORM:MNetBSD-*)
                     80: ##
                     81: ## NetBSD 3.x and later have pthread stubs in libc
                     82: ##
                     83: PTHREAD_STUBLIB=
1.47      drochner   84: .else
1.67      dsainty    85: ##
                     86: ## Other platforms may or may not have stubs provided by libc, but pulling in
                     87: ## threading support via the pthread.buildlink3.mk definitions will provide
                     88: ## all the necessary interfaces.  This matches the standard configuration for
                     89: ## most platforms as they appear in "${WRKSRC}/configs", and is necessary
                     90: ## for successful linking with libGL under many platforms.
                     91: ##
1.68      dsainty    92: .include "../../mk/pthread.buildlink3.mk"
1.67      dsainty    93: PTHREAD_STUBLIB= ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}
1.47      drochner   94: .endif
1.67      dsainty    95: PKGSRC_MAKE_ENV+=      PTHREAD_STUBLIB=${PTHREAD_STUBLIB:Q}
1.47      drochner   96:
1.55      joerg      97: .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
                     98: MAKE_ENV+=     CROSS_COMPILING=yes
                     99: .endif
                    100:
1.57      bjs       101: RM_PATCH_BACKUP_DIRS=  docs src/mesa src/glut/glx \
                    102:                        progs/demos progs/xdemos progs/glsl
1.55      joerg     103: post-extract:
                    104:        ${CP} ${FILESDIR}/gen_matypes.awk ${WRKSRC}/src/mesa/x86
                    105:        ${CP} ${FILESDIR}/gen_matypes.sh ${WRKSRC}/src/mesa/x86
                    106:        ${CHMOD} a+x ${WRKSRC}/src/mesa/x86/gen_matypes.sh
1.57      bjs       107:        for fn in ${RM_PATCH_BACKUP_DIRS}; do \
                    108:                ${RM} -f ${WRKSRC}/$${fn}/*.orig; \
                    109:        done
1.55      joerg     110:
1.65      bjs       111: pre-install:
                    112:        ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/include/GL/internal
                    113:
1.28      jschauma  114: pre-build:
1.54      seb       115:        cd ${WRKSRC} && ${RM} -fr src/glu src/glut progs
1.28      jschauma  116:
1.1       rh        117: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>