Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright (C) 2012 OpenWrt.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. include $(TOPDIR)/rules.mk
  6. include $(INCLUDE_DIR)/kernel.mk
  7. PKG_NAME:=ltq-vdsl-vr9-mei
  8. PKG_VERSION:=1.2.0
  9. PKG_RELEASE:=1
  10. PKG_BASE_NAME:=drv_mei_cpe
  11. PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION)
  13. PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
  14. PKG_MD5SUM:=cf2fccc1bc72390b2aec46650abf2f20
  15. PKG_FIXUP:=autoreconf
  16. PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
  17. PKG_USE_MIPS16:=0
  18. PKG_CHECK_FORMAT_SECURITY:=0
  19. include $(INCLUDE_DIR)/package.mk
  20. define KernelPackage/ltq-vdsl-vr9-mei
  21. TITLE:=mei driver for vdsl
  22. SECTION:=sys
  23. SUBMENU:=Network Devices
  24. DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-ifxos
  25. FILES:=$(PKG_BUILD_DIR)/src/drv_mei_cpe.ko
  26. AUTOLOAD:=$(call AutoLoad,50,drv_mei_cpe)
  27. endef
  28. define KernelPackage/ltq-vdsl-vr9-mei/description
  29. Lantiq MEI CPE Kernel Module Driver
  30. endef
  31. #DEBUG=-DDEBUG_PRINT=1
  32. MAKE_FLAGS += \
  33. SHELL="$(BASH)"
  34. CONFIGURE_ARGS += \
  35. --enable-kernelincl="$(LINUX_DIR)/include" \
  36. --enable-device=vr9 \
  37. --with-max-device=1 \
  38. --with-lines-per-device=1 \
  39. --enable-debug \
  40. --enable-error_print \
  41. --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos/" \
  42. --enable-ifxos-library="-L$(STAGING_DIR)/usr/lib" \
  43. --enable-add_drv_cflags="$(DEBUG) -DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1 -fno-pic -mno-abicalls -mlong-calls -O2 -g0" \
  44. --enable-linux-26 \
  45. --enable-kernelbuild="$(LINUX_DIR)" \
  46. ARCH=$(LINUX_KARCH)
  47. define Build/InstallDev
  48. $(INSTALL_DIR) $(1)/usr/include/vdsl
  49. $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_api_intern.h $(1)/usr/include/vdsl/
  50. $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_api_atm_ptm_intern.h $(1)/usr/include/vdsl/
  51. $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_interface.h $(1)/usr/include/vdsl
  52. $(CP) $(PKG_BUILD_DIR)/src/drv_mei_cpe_config.h $(1)/usr/include/vdsl/
  53. $(CP) $(PKG_BUILD_DIR)/src/cmv_message_format.h $(1)/usr/include/vdsl/
  54. endef
  55. $(eval $(call KernelPackage,ltq-vdsl-vr9-mei))