Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. include $(INCLUDE_DIR)/package.mk
  17. define KernelPackage/alsa
  18. SUBMENU:=Other modules
  19. DEPENDS:=@USB_SUPPORT @LINUX_2_4
  20. TITLE:=Advanced Linux Sound Architecture
  21. DESCRIPTION:=
  22. FILES:=$(PKG_BUILD_DIR)/modules/*.$(LINUX_KMOD_SUFFIX)
  23. AUTOLOAD=$(call AutoLoad,70,$(shell cat ./files/alsa.modules))
  24. endef
  25. ifeq ($(KERNEL),2.4)
  26. ifeq ($(LINUX_KARCH),i386)
  27. KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time
  28. endif
  29. ifeq ($(LINUX_KARCH),mips)
  30. 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
  31. endif
  32. endif
  33. ifeq ($(LINUX_KARCH),i386)
  34. KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default
  35. endif
  36. ifeq ($(LINUX_KARCH),mips)
  37. KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-mips/mach-generic
  38. endif
  39. CONFIGURE_VARS:= \
  40. CFLAGS="$(KERNEL_C_INCS)"
  41. CONFIGURE_ARGS:= \
  42. --with-build="$(LINUX_DIR)" \
  43. --with-kernel="$(LINUX_DIR)" \
  44. --with-cross="$(KERNEL_CROSS)" \
  45. --with-redhat=no \
  46. --with-suse=no \
  47. --with-oss=yes \
  48. --with-isapnp=no \
  49. --with-sequencer=no \
  50. --with-cards=usb-audio
  51. define Build/Compile
  52. $(MAKE) -C $(PKG_BUILD_DIR) \
  53. ARCH="$(LINUX_KARCH)" \
  54. CROSS_COMPILE="$(TARGET_CROSS)" \
  55. c_opts="$(KERNEL_C_OPTS)" \
  56. CP="$(CP)" \
  57. all
  58. endef
  59. $(eval $(call KernelPackage,alsa))