summaryrefslogtreecommitdiff
path: root/graphics/Mesa/Makefile.lib
blob: 10ab059b885d4af7d5b5975eae2a7ab41bdf15b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# $NetBSD: Makefile.lib,v 1.2 2006/10/09 12:52:35 joerg Exp $
#
# This Makefile fragment is included by all packages that build libraries
# from the Mesa sources.
#

.include "../../graphics/Mesa/Makefile.common"

DISTFILES+=	MesaLib-${MESA_VERSION}${EXTRACT_SUFX}
DISTFILES+=	MesaGLUT-${MESA_VERSION}${EXTRACT_SUFX}
DISTFILES+=	MesaDemos-${MESA_VERSION}${EXTRACT_SUFX}

PKG_INSTALLATION_TYPES=	overwrite pkgviews

USE_LANGUAGES=		c c++
USE_LIBTOOL=		yes
USE_TOOLS+=		makedepend

PATCHDIR=		${.CURDIR}/../MesaLib/patches
DISTINFO_FILE=		${.CURDIR}/../MesaLib/distinfo

INSTALLATION_DIRS+=	lib

.include "../../mk/compiler.mk"
.include "../../mk/bsd.prefs.mk"

# Mesa has proper support for Solaris and SunPro, use it.
.if ${OPSYS} == "SunOS"
.  if ${MACHINE_ARCH} == "sparc"
.    if !empty(PKGSRC_COMPILER:Msunpro)
BUILD_TARGET=		sunos5
.    else
BUILD_TARGET=		sunos5-gcc
.    endif
.  else	# i386
BUILD_TARGET=		pkgsrc
.  endif
.elif ${OPSYS} == "Interix"
BUILD_TARGET=		interix3
.else
BUILD_TARGET=		pkgsrc
.endif

.PHONY: Mesa-install-libs
pre-install: Mesa-install-libs
Mesa-install-libs:
	@${TEST} -z ${INSTLIBS:M*:Q}"" || ${ECHO_MSG} "Installing libraries."
	@for lib in "" ${INSTLIBS}; do					\
		${TEST} -n "$$lib" || continue;				\
		${LIBTOOL} --mode=install ${INSTALL_LIB}		\
			$$lib ${DESTDIR}${PREFIX}/lib;			\
	done