enable $(FPIC) for a few more packages
[packages.git] / libs / alsa-lib / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=alsa-lib
12 PKG_VERSION:=1.0.13
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/
17 PKG_MD5SUM:=d55a9d7d2a79d738a1b7a511cffda4b6
18
19 PKG_FIXUP = libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 ifeq ($(KERNEL),2.4)
24 DEPENDS_KMOD:=+kmod-alsa
25 else
26 DEPENDS_KMOD:=+kmod-sound-core
27 endif
28
29 define Package/alsa-lib
30   SECTION:=libs
31   CATEGORY:=Libraries
32   TITLE:=ALSA (Advanced Linux Sound Architecture) library
33   URL:=http://www.alsa-project.org/
34   DEPENDS:=@USB_SUPPORT $(DEPENDS_KMOD)
35 endef
36
37 define Package/alsa-lib/description
38  This is the library package for alsa, needed by some userspace programs.
39  You must have enabled the ALSA support in the kernel.
40 endef
41
42 TARGET_CFLAGS += $(FPIC)
43 CONFIGURE_ARGS += \
44         --enable-shared \
45         --enable-static \
46         --disable-debugging \
47         --disable-profiling \
48         --with-softfloat \
49         --with-versioned=no \
50
51 define Build/Compile
52         # override AM_CFLAGS holding inappropriate optimization flags
53         $(MAKE) -C $(PKG_BUILD_DIR) AM_CFLAGS="" all
54         $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
55 endef
56
57 define Build/InstallDev
58         mkdir -p $(1)/usr/include
59         $(CP) $(PKG_INSTALL_DIR)/usr/include/alsa $(1)/usr/include/
60         mkdir -p $(1)/usr/lib
61         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasound.{la,a,so*} $(1)/usr/lib/
62         mkdir -p $(1)/usr/lib/pkgconfig
63         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/alsa.pc $(1)/usr/lib/pkgconfig/
64 endef
65
66 define Package/alsa-lib/install
67         $(INSTALL_DIR) $(1)/usr/lib
68         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libasound.so.* $(1)/usr/lib/
69         $(INSTALL_DIR) $(1)/usr/share/alsa/
70         $(CP) $(PKG_INSTALL_DIR)/usr/share/alsa/alsa.conf $(1)/usr/share/alsa/
71 endef
72
73 $(eval $(call BuildPackage,alsa-lib))