Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # Copyright (C) 2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=luabitop
  9. PKG_VERSION:=1.0.2
  10. PKG_RELEASE:=1
  11. _BASENAME:=LuaBitOp
  12. PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
  13. PKG_SOURCE:=$(_BASENAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=http://bitop.luajit.org/download/
  15. PKG_MD5SUM:=d0c1080fe0c844e8477279668e2d0d06
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(_BASENAME)-$(PKG_VERSION)
  17. PKG_LICENSE:=MIT
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/luabitop
  20. SUBMENU:=Lua
  21. SECTION:=lang
  22. CATEGORY:=Languages
  23. TITLE:=luabitop
  24. URL:=http://bitop.luajit.org/
  25. DEPENDS:=+liblua
  26. endef
  27. define Package/luabitop/description
  28. Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers.
  29. endef
  30. define Build/Configure
  31. endef
  32. TARGET_CFLAGS += $(FPIC) -DLUA_USE_LINUX -DLUA_NUMBER_DOUBLE
  33. define Build/Compile
  34. $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_CPPFLAGS) -std=gnu99 $(FPIC) -DLUA_USE_LINUX -shared -o $(PKG_BUILD_DIR)/bit.so $(PKG_BUILD_DIR)/bit.c
  35. endef
  36. define Package/luabitop/install
  37. $(INSTALL_DIR) $(1)/usr/lib/lua
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/bit.so $(1)/usr/lib/lua
  39. endef
  40. $(eval $(call BuildPackage,luabitop))