Created
February 23, 2013 21:32
-
-
Save jnslxndr/5021451 to your computer and use it in GitHub Desktop.
OpenWRT Makefile for librs232
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Copyright (C) 2007-2009 OpenWrt.org | |
| # | |
| # This is free software, licensed under the GNU General Public License v2. | |
| # See /LICENSE for more information. | |
| # | |
| include $(TOPDIR)/rules.mk | |
| PKG_NAME:=luars232 | |
| PKG_VERSION:=1.0.1 | |
| PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |
| PKG_FIXUP:=libtool | |
| include $(INCLUDE_DIR)/package.mk | |
| PKG_INSTALL=1 | |
| define Package/luars232 | |
| SECTION:=libs | |
| CATEGORY:=Libraries | |
| TITLE:=Lua lib for serial communication over rs-232 | |
| endef | |
| define Package/luars232/description | |
| Lua lib for serial communication over rs-232 | |
| endef | |
| TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) | |
| define Build/Configure | |
| $(call Build/Configure/Default, \ | |
| CFLAGS="$(TARGET_CFLAGS)" \ | |
| ) | |
| endef | |
| define Build/InstallDev | |
| $(INSTALL_DIR) $(1)/usr/include | |
| $(CP) $(PKG_INSTALL_DIR)/usr/include/librs232 $(1)/usr/include/ | |
| $(INSTALL_DIR) $(1)/usr/lib/lua | |
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.{a,so*} $(1)/usr/lib/lua/ | |
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/luars232.{a,so*} $(1)/usr/lib/lua/ | |
| $(INSTALL_DIR) $(1)/usr/lib/pkgconfig | |
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/librs232.pc $(1)/usr/lib/pkgconfig/ | |
| endef | |
| define Package/luars232/install | |
| $(INSTALL_DIR) $(1)/usr/lib/lua | |
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.so* $(1)/usr/lib/ | |
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/luars232.so* $(1)/usr/lib/ | |
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.so* $(1)/usr/lib/lua | |
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/luars232.so* $(1)/usr/lib/lua | |
| endef | |
| $(eval $(call BuildPackage,luars232)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment