cosmetic cleanups
[buildroot.git] / package / alsa-lib / alsa-lib.mk
blobaeef7347021bb602c177bb7895f343188f65cd93
1 #############################################################
3 # alsa-lib
5 #############################################################
6 ALSA_LIB_VERSION:=1.0.14a
7 ALSA_LIB_SOURCE:=alsa-lib-$(ALSA_LIB_VERSION).tar.bz2
8 ALSA_LIB_SITE:=ftp://ftp.alsa-project.org/pub/lib
9 ALSA_LIB_DIR:=$(BUILD_DIR)/alsa-lib-$(ALSA_LIB_VERSION)
10 ALSA_LIB_CAT:=$(BZCAT)
11 ALSA_LIB_BINARY:=libasound.so.2.0.0
12 ALSA_LIB_TARGET_BINARY:=usr/lib/$(ALSA_LIB_BINARY)
14 $(DL_DIR)/$(ALSA_LIB_SOURCE):
15 $(WGET) -P $(DL_DIR) $(ALSA_LIB_SITE)/$(ALSA_LIB_SOURCE)
17 $(ALSA_LIB_DIR)/.unpacked: $(DL_DIR)/$(ALSA_LIB_SOURCE)
18 $(ALSA_LIB_CAT) $(DL_DIR)/$(ALSA_LIB_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
19 toolchain/patch-kernel.sh $(ALSA_LIB_DIR) package/alsa-lib/ alsa-lib-$(ALSA_LIB_VERSION)\*.patch*
20 $(CONFIG_UPDATE) $(ALSA_LIB_DIR)
21 touch $@
23 $(ALSA_LIB_DIR)/.configured: $(ALSA_LIB_DIR)/.unpacked
24 (cd $(ALSA_LIB_DIR); rm -rf config.cache; \
25 $(TARGET_CONFIGURE_ARGS) \
26 $(TARGET_CONFIGURE_OPTS) \
27 CFLAGS="$(TARGET_CFLAGS)" \
28 LDFLAGS="$(TARGET_LDFLAGS)" \
29 ./configure \
30 --target=$(GNU_TARGET_NAME) \
31 --host=$(GNU_TARGET_NAME) \
32 --build=$(GNU_HOST_NAME) \
33 --prefix=/usr \
34 --sysconfdir=/etc \
35 --enable-shared \
36 --enable-static \
37 --disable-docs \
38 $(DISABLE_NLS) \
40 touch $@
42 $(ALSA_LIB_DIR)/src/.libs/$(ALSA_LIB_BINARY): $(ALSA_LIB_DIR)/.configured
43 $(MAKE) -C $(ALSA_LIB_DIR)
44 touch -c $@
46 $(STAGING_DIR)/$(ALSA_LIB_TARGET_BINARY): $(ALSA_LIB_DIR)/src/.libs/$(ALSA_LIB_BINARY)
47 $(MAKE) DESTDIR=$(STAGING_DIR) -C $(ALSA_LIB_DIR) install
48 $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libasound.la
50 $(TARGET_DIR)/$(ALSA_LIB_TARGET_BINARY): $(STAGING_DIR)/$(ALSA_LIB_TARGET_BINARY)
51 mkdir -p $(TARGET_DIR)/usr/share/alsa $(TARGET_DIR)/usr/lib/alsa-lib
52 cp -dpf $(STAGING_DIR)/usr/lib/libasound.so* $(TARGET_DIR)/usr/lib/
53 cp -rdpf $(STAGING_DIR)/usr/share/alsa/* $(TARGET_DIR)/usr/share/alsa/
54 cp -rdpf $(STAGING_DIR)/usr/lib/alsa-lib/* $(TARGET_DIR)/usr/lib/alsa-lib/
55 -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libasound.so*
56 -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/alsa-lib/smixer/*.so
57 touch -c $@
59 alsa-lib: uclibc $(TARGET_DIR)/$(ALSA_LIB_TARGET_BINARY)
61 alsa-lib-clean:
62 rm -f $(TARGET_DIR)/$(ALSA_LIB_TARGET_BINARY)
63 -$(MAKE) -C $(ALSA_LIB_DIR) clean
65 alsa-lib-dirclean:
66 rm -rf $(ALSA_LIB_DIR)
67 #############################################################
69 # Toplevel Makefile options
71 #############################################################
72 ifeq ($(strip $(BR2_PACKAGE_ALSA_LIB)),y)
73 TARGETS+=alsa-lib
74 endif