Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. include $(TOPDIR)/rules.mk
  9. include $(INCLUDE_DIR)/kernel.mk
  10. PKG_NAME:=alsa-driver
  11. PKG_VERSION:=1.0.14rc1
  12. PKG_RELEASE:=1
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  14. PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/
  15. PKG_MD5SUM:=4cff99be4b225e96663fbd61cabe3182
  16. PKG_CAT:=bzcat
  17. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  18. include $(INCLUDE_DIR)/package.mk
  19. define KernelPackage/alsa
  20. SUBMENU:=Other modules
  21. DEPENDS:=@USB_SUPPORT @LINUX_2_4
  22. TITLE:=Advanced Linux Sound Architecture
  23. DESCRIPTION:=
  24. FILES:=$(PKG_BUILD_DIR)/modules/*.$(LINUX_KMOD_SUFFIX)
  25. AUTOLOAD=$(call AutoLoad,70,$(shell cat ./files/alsa.modules))
  26. endef
  27. ifeq ($(KERNEL),2.4)
  28. ifeq ($(LINUX_KARCH),i386)
  29. KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time
  30. endif
  31. ifeq ($(LINUX_KARCH),mips)
  32. KERNEL_C_OPTS:= -Os -G 0 -mlong-calls -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap
  33. endif
  34. endif
  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. endif
  38. ifeq ($(LINUX_KARCH),mips)
  39. KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-mips/mach-generic
  40. endif
  41. CONFIGURE_VARS:= \
  42. CFLAGS="$(KERNEL_C_INCS)"
  43. CONFIGURE_ARGS:= \
  44. --with-build="$(LINUX_DIR)" \
  45. --with-kernel="$(LINUX_DIR)" \
  46. --with-cross="$(KERNEL_CROSS)" \
  47. --with-redhat=no \
  48. --with-suse=no \
  49. --with-oss=yes \
  50. --with-isapnp=no \
  51. --with-sequencer=no \
  52. --with-cards=usb-audio
  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. CP="$(CP)" \
  59. all
  60. endef
  61. $(eval $(call KernelPackage,alsa))