02baa44b3457b62d5a36339ce45f87cb4da2ede7
[openwrt.git] / target / linux / package / alsa / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4 include ../../rules.mk
5
6 PKG_NAME:=alsa-driver
7 PKG_VERSION:=1.0.10
8 PKG_RELEASE:=1
9 PKG_MD5SUM:=e9e7c1ca664a14275d67185049f933f9
10
11 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
13 PKG_CAT:=bzcat
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16
17 ifeq ($(KERNEL_DIR),)
18 KERNEL_DIR:=$(LINUX_DIR)
19 endif
20
21 include $(TOPDIR)/package/rules.mk
22
23 ifeq ($(LINUX_KARCH),i386)
24 KERNEL_C_INCS:= -I$(KERNEL_DIR)/include/asm-i386/mach-generic
25 KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time
26 endif
27 ifeq ($(LINUX_KARCH),mips)
28 KERNEL_C_INCS:= -I$(KERNEL_DIR)/include/asm-mips/mach-generic
29 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
30 endif
31
32 $(eval $(call PKG_template,KMOD_ALSA,kmod-alsa,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel-$(LINUX_VERSION)-$(BOARD) ($(KERNEL_RELEASE))))
33
34 $(PKG_BUILD_DIR)/.configured:
35 (cd $(PKG_BUILD_DIR); \
36 CFLAGS="$(KERNEL_C_INCS)" \
37 ./configure \
38 --with-build=$(KERNEL_DIR) \
39 --with-kernel=$(KERNEL_DIR) \
40 --with-cross=$(KERNEL_CROSS) \
41 --with-redhat=no \
42 --with-suse=no \
43 --with-oss=yes \
44 --with-isapnp=no \
45 --with-sequencer=no \
46 --with-cards=usb-audio \
47 );
48 touch $@
49
50 $(PKG_BUILD_DIR)/.built:
51 $(MAKE) -C $(PKG_BUILD_DIR) \
52 ARCH="$(LINUX_KARCH)" \
53 CROSS_COMPILE="$(TARGET_CROSS)" \
54 c_opts="$(KERNEL_C_OPTS)" \
55 all
56 touch $@
57
58 $(IPKG_KMOD_ALSA):
59 install -d -m0755 $(IDIR_KMOD_ALSA)/etc/modules.d
60 install -m0644 ./files/alsa.modules $(IDIR_KMOD_ALSA)/etc/modules.d/70-alsa
61 install -d -m0755 $(IDIR_KMOD_ALSA)/lib/modules/$(LINUX_VERSION)
62 install -m0644 $(PKG_BUILD_DIR)/modules/*.$(LINUX_KMOD_SUFFIX) \
63 $(IDIR_KMOD_ALSA)/lib/modules/$(LINUX_VERSION)/
64 $(IPKG_BUILD) $(IDIR_KMOD_ALSA) $(PACKAGE_DIR)
This page took 0.04728 seconds and 3 git commands to generate.