xref: /OK3568_Linux_fs/buildroot/package/alsa-lib/alsa-lib.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# alsa-lib
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunALSA_LIB_VERSION = 1.2.7.2
8*4882a593SmuzhiyunALSA_LIB_SOURCE = alsa-lib-$(ALSA_LIB_VERSION).tar.bz2
9*4882a593SmuzhiyunALSA_LIB_SITE = https://www.alsa-project.org/files/pub/lib
10*4882a593SmuzhiyunALSA_LIB_LICENSE = LGPL-2.1+ (library), GPL-2.0+ (aserver)
11*4882a593SmuzhiyunALSA_LIB_LICENSE_FILES = COPYING aserver/COPYING
12*4882a593SmuzhiyunALSA_LIB_CPE_ID_VENDOR = alsa-project
13*4882a593SmuzhiyunALSA_LIB_INSTALL_STAGING = YES
14*4882a593SmuzhiyunALSA_LIB_CFLAGS = $(TARGET_CFLAGS)
15*4882a593SmuzhiyunALSA_LIB_AUTORECONF = YES
16*4882a593SmuzhiyunALSA_LIB_CONF_OPTS = \
17*4882a593Smuzhiyun	--with-alsa-devdir=$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_DEVDIR)) \
18*4882a593Smuzhiyun	--with-pcm-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_PCM_PLUGINS))" \
19*4882a593Smuzhiyun	--with-ctl-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_CTL_PLUGINS))"
20*4882a593Smuzhiyun
21*4882a593Smuzhiyunifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
22*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += --without-versioned
23*4882a593Smuzhiyunendif
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun# Can't build with static & shared at the same time (1.0.25+)
26*4882a593Smuzhiyunifeq ($(BR2_STATIC_LIBS),y)
27*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += \
28*4882a593Smuzhiyun	--enable-shared=no \
29*4882a593Smuzhiyun	--without-libdl
30*4882a593Smuzhiyunelse
31*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += --enable-static=no
32*4882a593Smuzhiyunendif
33*4882a593Smuzhiyun
34*4882a593Smuzhiyunifneq ($(BR2_PACKAGE_ALSA_LIB_ALOAD),y)
35*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += --disable-aload
36*4882a593Smuzhiyunendif
37*4882a593Smuzhiyunifneq ($(BR2_PACKAGE_ALSA_LIB_MIXER),y)
38*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += --disable-mixer
39*4882a593Smuzhiyunendif
40*4882a593Smuzhiyunifneq ($(BR2_PACKAGE_ALSA_LIB_PCM),y)
41*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += --disable-pcm
42*4882a593Smuzhiyunendif
43*4882a593Smuzhiyunifneq ($(BR2_PACKAGE_ALSA_LIB_RAWMIDI),y)
44*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += --disable-rawmidi
45*4882a593Smuzhiyunendif
46*4882a593Smuzhiyunifneq ($(BR2_PACKAGE_ALSA_LIB_HWDEP),y)
47*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += --disable-hwdep
48*4882a593Smuzhiyunendif
49*4882a593Smuzhiyunifneq ($(BR2_PACKAGE_ALSA_LIB_SEQ),y)
50*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += --disable-seq
51*4882a593Smuzhiyunendif
52*4882a593Smuzhiyunifneq ($(BR2_PACKAGE_ALSA_LIB_UCM),y)
53*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += --disable-ucm
54*4882a593Smuzhiyunendif
55*4882a593Smuzhiyunifneq ($(BR2_PACKAGE_ALSA_LIB_ALISP),y)
56*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += --disable-alisp
57*4882a593Smuzhiyunendif
58*4882a593Smuzhiyunifneq ($(BR2_PACKAGE_ALSA_LIB_OLD_SYMBOLS),y)
59*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += --disable-old-symbols
60*4882a593Smuzhiyunendif
61*4882a593Smuzhiyun
62*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_ALSA_LIB_PYTHON),y)
63*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += \
64*4882a593Smuzhiyun	--enable-mixer-pymods \
65*4882a593Smuzhiyun	--with-pythonlibs=-lpython$(PYTHON3_VERSION_MAJOR) \
66*4882a593Smuzhiyun	--with-pythonincludes=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)
67*4882a593SmuzhiyunALSA_LIB_CFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)
68*4882a593SmuzhiyunALSA_LIB_DEPENDENCIES += python3
69*4882a593Smuzhiyunelse
70*4882a593SmuzhiyunALSA_LIB_CONF_OPTS += --disable-python
71*4882a593Smuzhiyunendif
72*4882a593Smuzhiyun
73*4882a593SmuzhiyunALSA_LIB_CONF_ENV = \
74*4882a593Smuzhiyun	CFLAGS="$(ALSA_LIB_CFLAGS)" \
75*4882a593Smuzhiyun	LDFLAGS="$(TARGET_LDFLAGS) -lm"
76*4882a593Smuzhiyun
77*4882a593Smuzhiyun$(eval $(autotools-package))
78