2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
18 include $(INCLUDE_DIR)/package.mk
20 MAKEFLAGS_KMOD:= -C "$(LINUX_DIR)" \
21 CROSS_COMPILE="$(TARGET_CROSS)" \
22 ARCH="$(LINUX_KARCH)" \
23 PATH="$(TARGET_PATH)" \
24 SUBDIRS="$(PKG_BUILD_DIR)"
26 define KernelPackage/hmc5843
27 SUBMENU:=Other modules
28 DEPENDS:=+kmod-i2c-core +kmod-input-core
29 TITLE:=Kernel driver for HMC5843 3-axis magnetometer
31 FILES:=$(PKG_BUILD_DIR)/hmc5843.$(LINUX_KMOD_SUFFIX)
32 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE)
33 AUTOLOAD:=$(call AutoLoad,80,hmc5843)
34 $(call AddDepends/hwmon,+kmod-i2c-core,+kmod-input-core)
37 define KernelPackage/hmc5843/description
38 Kernel driver for HMC5843 i2c 3-axis magnetometers family
43 mkdir -p $(PKG_BUILD_DIR)
44 $(CP) ./src/* $(PKG_BUILD_DIR)/
48 $(MAKE) $(MAKEFLAGS_KMOD) \
52 $(eval $(call KernelPackage,hmc5843))