Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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:=qc-usb
  11. PKG_VERSION:=0.6.5
  12. PKG_RELEASE:=1
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=@SF/qce-ga
  15. PKG_MD5SUM:=6f6787e1dda11ca3b936ad434154f426
  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. define Build/Compile
  51. $(MAKE) -C $(PKG_BUILD_DIR) \
  52. LINUX_DIR="$(LINUX_DIR)" \
  53. ARCH="$(LINUX_KARCH)" \
  54. CROSS_COMPILE="$(TARGET_CROSS)" \
  55. CC="$(TARGET_CC)" \
  56. LD="$(TARGET_CC) -nodefaultlibs -nostartfiles" \
  57. USER_OPT="$(KERNEL_C_OPTS)" \
  58. quickcam.$(LINUX_KMOD_SUFFIX)
  59. $(MAKE) -C $(PKG_BUILD_DIR) \
  60. CFLAGS="$(TARGET_CFLAGS)" \
  61. qcset
  62. endef
  63. define Package/qc-usb-utils/install
  64. $(INSTALL_DIR) $(1)/usr/bin
  65. $(INSTALL_BIN) $(PKG_BUILD_DIR)/qcset $(1)/usr/bin/
  66. endef
  67. $(eval $(call BuildPackage,qc-usb-utils))
  68. $(eval $(call KernelPackage,video-quickcam))