Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #
  2. # Copyright (C) 2006-2008 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:=qc-usb
  11. PKG_VERSION:=0.6.6
  12. PKG_RELEASE:=1
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=@SF/qce-ga
  15. PKG_MD5SUM:=9eab8fb3a75326d1565d59b0c7256075
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/qc-usb/Default
  18. URL:=http://qce-ga.sourceforge.net/
  19. endef
  20. define Package/qc-usb-utils
  21. $(call Package/qc-usb/Default)
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=Utility programs for the qc-usb kernel module
  25. endef
  26. define Package/qc-usb-utils/description
  27. Utilities to tweak parameters of your QuickCam Express or similar webcam.
  28. These programs are completely useless without a qc-usb-modules package.
  29. endef
  30. define KernelPackage/video-quickcam
  31. $(call Package/qc-usb/Default)
  32. SUBMENU:=Video Support
  33. TITLE:=QuickCam Express USB webcam support
  34. DEPENDS:=@USB_SUPPORT +kmod-usb-core kmod-video-core
  35. FILES:=$(PKG_BUILD_DIR)/quickcam.$(LINUX_KMOD_SUFFIX)
  36. AUTOLOAD:=$(call AutoLoad,90,quickcam)
  37. endef
  38. define KernelPackage/video-quickcam/description
  39. Kernel support for Logitech's QuickCam Express webcam and other webcams
  40. with similar chipsets.
  41. endef
  42. ifeq ($(KERNEL),2.4)
  43. ifeq ($(LINUX_KARCH),i386)
  44. KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time
  45. endif
  46. ifeq ($(LINUX_KARCH),mips)
  47. 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
  48. endif
  49. endif
  50. ifneq ($(CONFIG_PACKAGE_kmod-video-quickcam),)
  51. define Build/Compile/kmod
  52. $(MAKE) -C $(PKG_BUILD_DIR) \
  53. LINUX_DIR="$(LINUX_DIR)" \
  54. ARCH="$(LINUX_KARCH)" \
  55. CROSS_COMPILE="$(TARGET_CROSS)" \
  56. CC="$(TARGET_CC)" \
  57. LD="$(TARGET_CC) -nodefaultlibs -nostartfiles" \
  58. USER_OPT="$(KERNEL_C_OPTS)" \
  59. quickcam.$(LINUX_KMOD_SUFFIX)
  60. endef
  61. endif
  62. define Build/Compile/user
  63. $(MAKE) -C $(PKG_BUILD_DIR) \
  64. CFLAGS="$(TARGET_CFLAGS)" \
  65. qcset
  66. endef
  67. define Build/Compile
  68. $(call Build/Compile/kmod)
  69. $(call Build/Compile/user)
  70. endef
  71. define Package/qc-usb-utils/install
  72. $(INSTALL_DIR) $(1)/usr/bin
  73. $(INSTALL_BIN) $(PKG_BUILD_DIR)/qcset $(1)/usr/bin/
  74. endef
  75. $(eval $(call BuildPackage,qc-usb-utils))
  76. $(eval $(call KernelPackage,video-quickcam))