diff options
author | jlam <jlam> | 2001-06-11 01:59:33 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-06-11 01:59:33 +0000 |
commit | fd9688151b15b136e8bb62a77ec3f4c6abf839da (patch) | |
tree | 28cba132a7d0ee13850a4a1787701a2980ea61e4 /graphics/Mesa | |
parent | 627b1ed81a4f271f81bce18f3d9e5faab71bc824 (diff) | |
download | pkgsrc-fd9688151b15b136e8bb62a77ec3f4c6abf839da.tar.gz |
Use bsd.buildlink.mk instead of duplicating code all over the place.
Diffstat (limited to 'graphics/Mesa')
-rw-r--r-- | graphics/Mesa/buildlink.mk | 69 |
1 files changed, 20 insertions, 49 deletions
diff --git a/graphics/Mesa/buildlink.mk b/graphics/Mesa/buildlink.mk index ca1fa68a8df..67d4992da62 100644 --- a/graphics/Mesa/buildlink.mk +++ b/graphics/Mesa/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.3 2001/06/10 00:09:31 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.4 2001/06/11 01:59:36 jlam Exp $ # # This Makefile fragment is included by packages that use Mesa. # @@ -6,10 +6,9 @@ # # (1) Optionally define MESA_REQD to the version of Mesa desired. # (2) Include this Makefile fragment in the package Makefile, -# (3) Optionally define BUILDLINK_INCDIR and BUILDLINK_LIBDIR, -# (4) Add ${BUILDLINK_INCDIR} to the front of the C preprocessor's header +# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header # search path, and -# (5) Add ${BUILDLINK_LIBDIR} to the front of the linker's library search +# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search # path. .if !defined(MESA_BUILDLINK_MK) @@ -20,56 +19,28 @@ MESA_REQD?= 3.2.1 # We double-list because we're not sure if the files are in ${X11BASE} # or in ${LOCALBASE}. -MESA_HEADERS= ${X11BASE}/include/GL/* -MESA_HEADERS+= ${LOCALBASE}/include/GL/* +BUILDLINK_PREFIX.Mesa-1= ${X11BASE} +BUILDLINK_FILES.Mesa-1= include/GL/* +BUILDLINK_FILES.Mesa-1+= lib/libGL.* +BUILDLINK_FILES.Mesa-1+= lib/libGLU.* +BUILDLINK_FILES.Mesa-1+= lib/libglut.* -MESA_LIBS= ${X11BASE}/lib/libGL.* -MESA_LIBS+= ${X11BASE}/lib/libGLU.* -MESA_LIBS+= ${X11BASE}/lib/libglut.* -MESA_LIBS+= ${LOCALBASE}/lib/libGL.* -MESA_LIBS+= ${LOCALBASE}/lib/libGLU.* -MESA_LIBS+= ${LOCALBASE}/lib/libglut.* +BUILDLINK_TARGETS.Mesa= Mesa-1-buildlink -BUILDLINK_INCDIR?= ${WRKDIR}/include -BUILDLINK_LIBDIR?= ${WRKDIR}/lib +BUILDLINK_PREFIX.Mesa-2= ${LOCALBASE} +BUILDLINK_FILES.Mesa-2= include/GL/* +BUILDLINK_FILES.Mesa-2+= lib/libGL.* +BUILDLINK_FILES.Mesa-2+= lib/libGLU.* +BUILDLINK_FILES.Mesa-2+= lib/libglut.* -MESA_BUILDLINK_COOKIE= ${WRKDIR}/.Mesa_buildlink_done -MESA_BUILDLINK_TARGETS= link-Mesa-headers -MESA_BUILDLINK_TARGETS+= link-Mesa-libs -BUILDLINK_TARGETS+= ${MESA_BUILDLINK_COOKIE} +BUILDLINK_TARGETS.Mesa+= Mesa-2-buildlink -pre-configure: ${MESA_BUILDLINK_COOKIE} +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.Mesa} -${MESA_BUILDLINK_COOKIE}: ${MESA_BUILDLINK_TARGETS} - @${TOUCH} ${TOUCH_FLAGS} ${MESA_BUILDLINK_COOKIE} +pre-configure: ${BUILDLINK_TARGETS.Mesa} +Mesa-1-buildlink: _BUILDLINK_USE +Mesa-2-buildlink: _BUILDLINK_USE -# This target links the headers into ${BUILDLINK_INCDIR}, which should -# be searched first by the C preprocessor. -# -link-Mesa-headers: - @${ECHO} "Linking Mesa headers into ${BUILDLINK_INCDIR}." - @${MKDIR} ${BUILDLINK_INCDIR}/GL - @${RM} -f ${BUILDLINK_INCDIR}/GL/* - @for inc in ${MESA_HEADERS}; do \ - dest=${BUILDLINK_INCDIR}/GL/`${BASENAME} $${inc}`; \ - if [ -f $${inc} ]; then \ - ${RM} -f $${dest}; \ - ${LN} -sf $${inc} $${dest}; \ - fi; \ - done - -# This target links libraries into ${BUILDLINK_LIBDIR}, which should -# be searched first by the linker. -# -link-Mesa-libs: - @${ECHO} "Linking Mesa libraries into ${BUILDLINK_LIBDIR}." - @${MKDIR} ${BUILDLINK_LIBDIR} - @for lib in ${MESA_LIBS}; do \ - dest=${BUILDLINK_LIBDIR}/`${BASENAME} $${lib}`; \ - if [ -f $${lib} ]; then \ - ${RM} -f $${dest}; \ - ${LN} -sf $${lib} $${dest}; \ - fi; \ - done +.include "../../mk/bsd.buildlink.mk" .endif # MESA_BUILDLINK_MK |