[tools] ipkg-utils: utilize the tar -p flag to preserve permissions (#7667)
[openwrt.git] / package / i2c-gpio-custom / Makefile
1 #
2 # Copyright (C) 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
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=i2c-gpio-custom
12 PKG_RELEASE:=2
13
14 include $(INCLUDE_DIR)/package.mk
15
16 define KernelPackage/i2c-gpio-custom
17 SUBMENU:=I2C support
18 TITLE:=Custom GPIO-based I2C device
19 DEPENDS:=@GPIO_SUPPORT +kmod-i2c-core +kmod-i2c-gpio
20 FILES:=$(PKG_BUILD_DIR)/i2c-gpio-custom.ko
21 KCONFIG:=
22 endef
23
24 define KernelPackage/i2c-gpio-custom/description
25 Kernel module for register a custom i2c-gpio platform device.
26 endef
27
28 EXTRA_KCONFIG:= \
29 CONFIG_I2C_GPIO_CUSTOM=m
30
31 EXTRA_CFLAGS:= \
32 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
33 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
34
35 MAKE_OPTS:= \
36 ARCH="$(LINUX_KARCH)" \
37 CROSS_COMPILE="$(TARGET_CROSS)" \
38 SUBDIRS="$(PKG_BUILD_DIR)" \
39 EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
40 $(EXTRA_KCONFIG)
41
42 define Build/Prepare
43 mkdir -p $(PKG_BUILD_DIR)
44 $(CP) ./src/* $(PKG_BUILD_DIR)/
45 endef
46
47 define Build/Compile
48 $(MAKE) -C "$(LINUX_DIR)" \
49 $(MAKE_OPTS) \
50 modules
51 endef
52
53 $(eval $(call KernelPackage,i2c-gpio-custom))
This page took 0.043504 seconds and 5 git commands to generate.