summaryrefslogtreecommitdiff
path: root/package/multimedia/alsa-lib/alsa-lib.mk
blob: 517021d1b9295cc5097a1fd21a78af0a02aaa76d (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
#############################################################
#
# alsa-lib
#
#############################################################
ALSA_LIB_VERSION = 1.0.18
ALSA_LIB_SOURCE = alsa-lib-$(ALSA_LIB_VERSION).tar.bz2
ALSA_LIB_SITE = ftp://ftp.alsa-project.org/pub/lib
ALSA_LIB_INSTALL_STAGING = YES
ALSA_LIB_INSTALL_TARGET = YES

ALSA_LIB_CFLAGS=$(TARGET_CFLAGS)

ALSA_LIB_CONF_OPT = --enable-shared \
		    --enable-static \
		    --without-versioned

ifeq ($(BR2_ENABLE_DEBUG),y)
# install-exec doesn't install the config files
ALSA_LIB_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
ALSA_LIB_CONF_OPT += --enable-debug
endif

ifeq ($(BR2_avr32),y)
ALSA_LIB_CFLAGS+=-DAVR32_INLINE_BUG
endif

ifeq ($(BR2_PACKAGE_ALSA_LIB_PYTHON),y)
ALSA_LIB_CONF_OPT += --with-pythonlibs=-lpython$(PYTHON_VERSION_MAJOR)
ALSA_LIB_CFLAGS+=-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)
ALSA_LIB_DEPENDENCIES = libpython
else
ALSA_LIB_CONF_OPT += --disable-python
endif

ifeq ($(BR2_SOFT_FLOAT),y)
ALSA_LIB_CONF_OPT += --with-softfloat
endif

ALSA_LIB_CONF_ENV = CFLAGS="$(ALSA_LIB_CFLAGS)" \
		    LDFLAGS="$(TARGET_LDFLAGS) -lm"
# the above doesn't work with shared config.cache
ALSA_LIB_USE_CONFIG_CACHE = NO

$(eval $(call AUTOTARGETS,package/multimedia,alsa-lib))