summaryrefslogtreecommitdiff
path: root/devel/SDL/Makefile
blob: 7aea9ad0e54426bce1ef474bcbad373273edd760 (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
53
54
55
56
57
58
59
60
61
62
63
64
# $NetBSD: Makefile,v 1.39 2002/08/25 19:22:17 jlam Exp $
#

DISTNAME=	SDL-1.2.3
PKGREVISION=	2
CATEGORIES=	devel games
MASTER_SITES=	http://www.libsdl.org/release/

MAINTAINER=	wiz@netbsd.org
HOMEPAGE=	http://www.libsdl.org/
COMMENT=	Simple DirectMedia Layer, a cross-platform multimedia library

BUILD_DEPENDS+=		nasm>=0.98:../../devel/nasm

USE_BUILDLINK_ONLY=	YES

GNU_CONFIGURE=		YES
USE_GMAKE=		YES
PTHREAD_OPTS+=		require

USE_LIBTOOL=		YES
LTCONFIG_OVERRIDE=	${WRKSRC}/ltconfig

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

.if ${OBJECT_FMT} == "ELF"
NASMFLAGS=		-f elf
.else
NASMFLAGS=		-f aoutb
.endif

.ifdef SDL_USE_NAS
.include "../../audio/nas/buildlink.mk"
.else
CONFIGURE_ARGS+=	--disable-nas
.endif

CONFIGURE_ARGS+=	--disable-arts
CONFIGURE_ARGS+=	--disable-pthread-sem
CONFIGURE_ARGS+=	--enable-video-aalib
CONFIGURE_ENV+=		NASMFLAGS="${NASMFLAGS}"
MAKE_ENV+=		NASMFLAGS="${NASMFLAGS}"

# Pass in LDFLAGS via SYSTEM_LIBS as it's used as the linker options for
# finding various libraries.  This ensure that any unusual -Wl,-R options
# are noted correctly in the generated sdl-config.
#
CONFIGURE_ENV+=		SYSTEM_LIBS="${LDFLAGS}"

pre-patch:
	cd ${WRKSRC} && ${MKDIR} src/audio/netbsd
	cd ${WRKSRC} && ${MKDIR} src/joystick/bsd
	${CP} ${FILESDIR}/[MS]* ${WRKSRC}/src/joystick/bsd

post-configure:
	cd ${WRKSRC}/src/audio && ${CP} *.[ch] netbsd/

.include "../../audio/esound/buildlink.mk"
.include "../../graphics/Mesa/buildlink.mk"
.include "../../graphics/aalib-x11/buildlink.mk"
.include "../../mk/pthread.buildlink.mk"
.include "../../mk/ossaudio.buildlink.mk"
.include "../../mk/x11.buildlink.mk"
.include "../../mk/bsd.pkg.mk"