33a47582526de2dd550b97e726e9a9accc1b6935
[openwrt.git] / package / libs / libnl-tiny / Makefile
1 #
2 # Copyright (C) 2006-2012 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
10 PKG_NAME:=libnl-tiny
11 PKG_VERSION:=0.1
12 PKG_RELEASE:=5
13
14 PKG_LICENSE:=LGPL-2.1
15 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/libnl-tiny
20   SECTION:=libs
21   CATEGORY:=Libraries
22   TITLE:=netlink socket library
23 endef
24
25 define Package/libnl-tiny/description
26  This package contains a stripped down version of libnl
27 endef
28
29 define Build/Prepare
30         mkdir -p $(PKG_BUILD_DIR)
31         $(CP) ./src/* $(PKG_BUILD_DIR)/
32 endef
33
34 TARGET_CFLAGS += $(FPIC)
35
36 define Build/Compile
37         $(MAKE) -C $(PKG_BUILD_DIR) \
38                 $(TARGET_CONFIGURE_OPTS) \
39                 CFLAGS="$(TARGET_CFLAGS)" \
40                 all
41 endef
42
43 define Build/InstallDev
44         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(1)/usr/include/libnl-tiny
45         $(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include/libnl-tiny
46         $(CP) $(PKG_BUILD_DIR)/libnl-tiny.so $(1)/usr/lib/
47         $(CP) ./files/libnl-tiny.pc $(1)/usr/lib/pkgconfig
48 endef
49
50 define Package/libnl-tiny/install
51         $(INSTALL_DIR) $(1)/usr/lib
52         $(CP) $(PKG_BUILD_DIR)/libnl-tiny.so $(1)/usr/lib/
53 endef
54
55 $(eval $(call BuildPackage,libnl-tiny))