e379ad87cac43cf75eab74f6f49b616266c67843
[openwrt/svn-archive/archive.git] / libs / libmodbus / Makefile
1 #
2 # Copyright (C) 2006-2011 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:=libmodbus
11 PKG_VERSION:=2.0.3
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://github.com/downloads/stephane/libmodbus/
16 PKG_MD5SUM:=0646f3edca6d7783d0356dc2fc4f9f4c
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libmodbus
24 SECTION:=libs
25 CATEGORY:=Libraries
26 URL:=http://www.libmodbus.org
27 TITLE:=libmodbus
28 endef
29
30 define Package/libmodbus/description
31 A Modbus library for Linux, Mac OS X, FreeBSD, QNX and Win32
32 endef
33
34 TARGET_CFLAGS += $(FPIC)
35
36 define Build/InstallDev
37 $(INSTALL_DIR) $(1)/usr/include
38 $(CP) $(PKG_INSTALL_DIR)/usr/include/modbus $(1)/usr/include/
39 $(INSTALL_DIR) $(1)/usr/lib
40 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.{so*,la} $(1)/usr/lib/
41 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
42 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/modbus.pc $(1)/usr/lib/pkgconfig/
43 endef
44
45 define Package/libmodbus/install
46 $(INSTALL_DIR) $(1)/usr/lib
47 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmodbus.so.* $(1)/usr/lib/
48 endef
49
50 $(eval $(call BuildPackage,libmodbus))