2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
17 PKG_SOURCE_URL
:=ftp
://ftp.alsa-project.org
/pub
/driver
/
18 PKG_MD5SUM
:=57534e4297cd683371402220e3753885
21 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/kmod-alsa
27 CATEGORY
:=Kernel drivers
29 TITLE
:=Advanced Linux Sound Architecture
30 URL
:=http
://alsa-project.org
/
31 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
35 ifeq ($(LINUX_KARCH
),i386
)
36 KERNEL_C_INCS
:= -I
$(LINUX_DIR
)/include/asm-i386
/mach-generic
-I
$(LINUX_DIR
)/include/asm-i386
/mach-default
37 KERNEL_C_OPTS
:= -Os
-mpreferred-stack-boundary
=2 -march
=i486
-fno-unit-at-a-time
39 ifeq ($(LINUX_KARCH
),mips
)
40 KERNEL_C_INCS
:= -I
$(LINUX_DIR
)/include/asm-mips
/mach-generic
41 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
45 define Build
/Configure
46 (cd
$(PKG_BUILD_DIR
); \
47 CFLAGS
="$(KERNEL_C_INCS)" \
49 --with-build
="$(LINUX_DIR)" \
50 --with-kernel
="$(LINUX_DIR)" \
51 --with-cross
="$(KERNEL_CROSS)" \
57 --with-cards
=usb-audio \
62 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
63 ARCH
="$(LINUX_KARCH)" \
64 CROSS_COMPILE
="$(TARGET_CROSS)" \
65 c_opts
="$(KERNEL_C_OPTS)" \
69 define Package
/kmod-alsa
/install
70 install -d
-m0755
$(1)/lib
/modules
/$(LINUX_VERSION
)
71 install -m0644
$(PKG_BUILD_DIR
)/modules
/*.
$(LINUX_KMOD_SUFFIX
) \
72 $(1)/lib
/modules
/$(LINUX_VERSION
)/
73 install -d
-m0755
$(1)/etc
/modules.d
74 install -m0644 .
/files
/alsa.modules
$(1)/etc
/modules.d
/70-alsa
77 $(eval
$(call BuildPackage
,kmod-alsa
))