2 # Copyright (C) 2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
16 PKG_MAINTAINER
:=Maxim Storchak
<m.storchak@gmail.com
>
17 PKG_SOURCE
:=$(_BASENAME
)-$(PKG_VERSION
).
tar.gz
18 PKG_SOURCE_URL
:=http
://bitop.luajit.org
/download
/
19 PKG_HASH
:=1207c9293dcd52eb9dca6538d1b87352bd510f4e760938f5048433f7f272ce99
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(_BASENAME
)-$(PKG_VERSION
)
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/luabitop
30 URL
:=http
://bitop.luajit.org
/
34 define Package
/luabitop
/description
35 Lua BitOp is a C extension module for Lua
5.1/5.2 which adds bitwise operations on numbers.
38 define Build
/Configure
42 TARGET_CFLAGS
+= $(FPIC
) -DLUA_USE_LINUX
-DLUA_NUMBER_DOUBLE
45 $(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
48 define Package
/luabitop
/install
49 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
50 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/bit.so
$(1)/usr
/lib
/lua
53 $(eval
$(call BuildPackage
,luabitop
))