ltq-ifxos: fix compilation against glibc
[openwrt/staging/wigyori.git] / package / kernel / lantiq / ltq-ifxos / Makefile
1 # Copyright (C) 2009-2012 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5
6 include $(TOPDIR)/rules.mk
7 include $(INCLUDE_DIR)/kernel.mk
8
9 PKG_NAME:=lib_ifxos
10 PKG_VERSION:=1.5.19
11 PKG_RELEASE:=3
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
14 PKG_SOURCE_URL:=https://github.com/xdarklight/$(PKG_NAME)/archive/v$(PKG_VERSION)
15 PKG_HASH:=ed7fe39311d7a4a13d23ed0ae2445c0d825b472b5a98da9b72bcaabcf5ed2d5f
16 PKG_MAINTAINER:=John Crispin <john@phrozen.org>
17 PKG_LICENSE:=GPL-2.0 BSD-2-Clause
18 PKG_LICENSE_FILES:=LICENSE
19
20
21 PKG_USE_MIPS16:=0
22 PKG_FIXUP:=autoreconf
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define KernelPackage/ltq-ifxos
27 SECTION:=sys
28 CATEGORY:=Kernel modules
29 SUBMENU:=Libraries
30 TITLE:=Lantiq OS abstraction library
31 URL:=http://www.lantiq.com/
32 DEPENDS:=@TARGET_lantiq
33 FILES:=$(PKG_BUILD_DIR)/src/drv_ifxos.ko
34 AUTOLOAD:=$(call AutoLoad,10,drv_ifxos)
35 endef
36
37 CONFIGURE_ARGS += \
38 ARCH=$(LINUX_KARCH) \
39 --enable-linux-26 \
40 --enable-kernelbuild="$(LINUX_DIR)" \
41 --enable-kernelincl="$(LINUX_DIR)/include" \
42 --with-kernel-module
43
44 ifdef CONFIG_TARGET_lantiq
45 define Build/InstallDev
46 $(INSTALL_DIR) $(1)/usr/{lib,include/ifxos}
47 $(CP) $(PKG_BUILD_DIR)/src/include/* $(1)/usr/include/ifxos
48 mkdir -p $(1)/usr/lib
49 $(CP) $(PKG_BUILD_DIR)/src/libifxos.a $(1)/usr/lib/libifxos.a
50 endef
51 endif
52
53 $(eval $(call KernelPackage,ltq-ifxos))