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