summaryrefslogtreecommitdiff
path: root/audio/mpg123/Makefile
blob: 287a9165e2084db49111985c928fd14c6f73624f (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
# $NetBSD: Makefile,v 1.47 2010/03/30 09:12:04 martin Exp $

PKGNAME=	${DISTNAME:C/[^[:alnum:]]*//}
COMMENT=	MPEG layer 1, 2, and 3 audio player

PKGCONFIG_OVERRIDE+=	libmpg123.pc.in

MPG123_SUBDIRS=		src doc
MPG123_SUBDIRS.src=	output libmpg123

MAKE_ENV+=		MPG123_PROGRAM=mpg123
MAKE_ENV+=		EXTRA_INSTALL_TARGETS="install-exec-am install-data-am"

MPG123_BUILDING_BASE=	# empty

PKG_DESTDIR_SUPPORT=	user-destdir

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

PLIST_VARS+=	oss
PLIST_VARS+=	sun
PLIST_VARS+=	coreaudio

.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" \
	|| ${OPSYS} == "SunOS" || ${OPSYS} == "DragonFly"
MPG123_DEFAULT_MODULE=	sun
PLIST.sun	=	yes
.elif ${OPSYS} == "Darwin"
MPG123_DEFAULT_MODULE=	coreaudio
PLIST.coreaudio	=	yes
.else
MPG123_DEFAULT_MODULE=	oss
PLIST.oss	=	yes
LIBS+=		-lossaudio
CPPFLAGS+=	-DDEVOSSAUDIO="\"${DEVOSSAUDIO}\""
CPPFLAGS+=	-DDEVOSSSOUND="\"${DEVOSSSOUND}\""
.endif

# MPG123_MODULE is not finally set yet, to avoid NOT_FOR_PLATFORM triggers
.include "Makefile.common"

.include "options.mk"
.include "../../mk/bsd.pkg.mk"

# now we can set the default module
MPG123_MODULE=		${MPG123_DEFAULT_MODULE}