1 # $NetBSD: builtin.mk,v 1.11 2006/04/06 06:22:02 reed Exp $
5 BUILTIN_FIND_FILES_VAR:= H_GLU
6 BUILTIN_FIND_FILES.H_GLU= ${X11BASE}/include/GL/glu.h
8 .include "../../mk/buildlink3/bsd.builtin.mk"
11 ### Determine if there is a built-in implementation of the package and
12 ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
14 .if !defined(IS_BUILTIN.glu)
16 . if empty(H_GLU:M__nonexistent__)
17 BUILTIN_IMAKE_CHECK:= glu:BuildGLULibrary
18 . include "../../mk/buildlink3/imake-check.mk"
19 IS_BUILTIN.glu= ${BUILTIN_IMAKE_CHECK.glu}
22 MAKEVARS+= IS_BUILTIN.glu
25 ### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
26 ### a package name to represent the built-in package.
28 .if !defined(BUILTIN_PKG.glu) && \
29 !empty(IS_BUILTIN.glu:M[yY][eE][sS]) && \
30 empty(H_GLU:M__nonexistent__)
31 . include "../../graphics/Mesa/version.mk"
32 BUILTIN_PKG.glu= glu-${BUILTIN_VERSION.Mesa}
34 MAKEVARS+= BUILTIN_PKG.glu
37 ### Determine whether we should use the built-in implementation if it
38 ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
40 .if !defined(USE_BUILTIN.glu)
41 . if ${PREFER.glu} == "pkgsrc"
44 USE_BUILTIN.glu= ${IS_BUILTIN.glu}
45 . if defined(BUILTIN_PKG.glu) && \
46 !empty(IS_BUILTIN.glu:M[yY][eE][sS])
48 . for dep in ${BUILDLINK_API_DEPENDS.glu}
49 . if !empty(USE_BUILTIN.glu:M[yY][eE][sS])
51 if ${PKG_ADMIN} pmatch ${dep:Q} ${BUILTIN_PKG.glu:Q}; then \
61 MAKEVARS+= USE_BUILTIN.glu
64 ### The section below only applies if we are not including this file
65 ### solely to determine whether a built-in implementation exists.
68 .include "../../mk/x11.builtin.mk"
70 CHECK_BUILTIN.glu?= no
71 .if !empty(CHECK_BUILTIN.glu:M[nN][oO])
73 . if !empty(USE_BUILTIN.glu:M[nN][oO])
74 BUILDLINK_API_DEPENDS.glu+= glu>=6.0
77 .endif # CHECK_BUILTIN.glu