fix mssid support
[openwrt.git] / package / alsa / 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 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=alsa-driver
13 PKG_VERSION:=1.0.11
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/
18 PKG_MD5SUM:=57534e4297cd683371402220e3753885
19 PKG_CAT:=bzcat
20
21 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/kmod-alsa
26 SECTION:=kernel
27 CATEGORY:=Kernel drivers
28 DEPENDS:=@USB_SUPPORT
29 TITLE:=Advanced Linux Sound Architecture
30 URL:=http://alsa-project.org/
31 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
32 endef
33
34 ifeq ($(KERNEL),2.4)
35 ifeq ($(LINUX_KARCH),i386)
36 KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time
37 endif
38 ifeq ($(LINUX_KARCH),mips)
39 KERNEL_C_OPTS:= -Os -G 0 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap
40 endif
41 endif
42 ifeq ($(LINUX_KARCH),i386)
43 KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default
44 endif
45 ifeq ($(LINUX_KARCH),mips)
46 KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-mips/mach-generic
47 endif
48
49 define Build/Configure
50 (cd $(PKG_BUILD_DIR); \
51 CFLAGS="$(KERNEL_C_INCS)" \
52 ./configure \
53 --with-build="$(LINUX_DIR)" \
54 --with-kernel="$(LINUX_DIR)" \
55 --with-cross="$(KERNEL_CROSS)" \
56 --with-redhat=no \
57 --with-suse=no \
58 --with-oss=yes \
59 --with-isapnp=no \
60 --with-sequencer=no \
61 --with-cards=usb-audio \
62 );
63 endef
64
65 define Build/Compile
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 ARCH="$(LINUX_KARCH)" \
68 CROSS_COMPILE="$(TARGET_CROSS)" \
69 c_opts="$(KERNEL_C_OPTS)" \
70 CP="$(CP)" \
71 all
72 endef
73
74 define Package/kmod-alsa/install
75 install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION)
76 install -m0644 $(PKG_BUILD_DIR)/modules/*.$(LINUX_KMOD_SUFFIX) \
77 $(1)/lib/modules/$(LINUX_VERSION)/
78 install -d -m0755 $(1)/etc/modules.d
79 install -m0644 ./files/alsa.modules $(1)/etc/modules.d/70-alsa
80 endef
81
82 $(eval $(call BuildPackage,kmod-alsa))
This page took 0.052926 seconds and 5 git commands to generate.