add chaos_calmer branch
[15.05/openwrt.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.14
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_RELEASE:=3
13 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
14 PKG_MD5SUM:=bc107f9d8ff6bed4c2760a2817bbb029
15 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
16
17 PKG_USE_MIPS16:=0
18 PKG_FIXUP:=autoreconf
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define KernelPackage/ltq-ifxos
23   SECTION:=sys
24   CATEGORY:=Kernel modules
25   SUBMENU:=Libraries
26   TITLE:=Lantiq OS abstraction library
27   URL:=http://www.lantiq.com/
28   DEPENDS:=@TARGET_lantiq
29   FILES:=$(PKG_BUILD_DIR)/src/drv_ifxos.ko
30   AUTOLOAD:=$(call AutoLoad,10,drv_ifxos)
31 endef
32
33 CONFIGURE_ARGS += \
34         ARCH=$(LINUX_KARCH) \
35         --enable-linux-26 \
36         --enable-kernelbuild="$(LINUX_DIR)" \
37         --enable-kernelincl="$(LINUX_DIR)/include" \
38         --enable-add_drv_cflags="-fno-pic -mno-abicalls -mlong-calls -G 0"
39
40 ifdef CONFIG_TARGET_lantiq
41   define Build/InstallDev
42         $(INSTALL_DIR) $(1)/usr/{lib,include/ifxos}
43         $(CP) $(PKG_BUILD_DIR)/src/include/* $(1)/usr/include/ifxos
44         mkdir -p $(1)/usr/lib
45         $(CP) $(PKG_BUILD_DIR)/src/libifxos.a $(1)/usr/lib/libifxos.a
46   endef
47 endif
48
49 $(eval $(call KernelPackage,ltq-ifxos))