Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. FILES:=$(PKG_BUILD_DIR)/modules/*.$(LINUX_KMOD_SUFFIX)
  22. AUTOLOAD=$(call AutoLoad,70,$(shell cat ./files/alsa.modules))
  23. endef
  24. ifeq ($(KERNEL),2.4)
  25. ifeq ($(LINUX_KARCH),i386)
  26. KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time
  27. endif
  28. ifeq ($(LINUX_KARCH),mips)
  29. 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
  30. endif
  31. endif
  32. ifeq ($(LINUX_KARCH),i386)
  33. KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default
  34. endif
  35. ifeq ($(LINUX_KARCH),mips)
  36. KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-mips/mach-generic
  37. endif
  38. CONFIGURE_VARS:= \
  39. CFLAGS="$(KERNEL_C_INCS)"
  40. CONFIGURE_ARGS:= \
  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. define Build/Compile
  51. $(MAKE) -C $(PKG_BUILD_DIR) \
  52. ARCH="$(LINUX_KARCH)" \
  53. CROSS_COMPILE="$(TARGET_CROSS)" \
  54. c_opts="$(KERNEL_C_OPTS)" \
  55. CP="$(CP)" \
  56. all
  57. endef
  58. $(eval $(call KernelPackage,alsa))