perl: put -rdynamic in proper build variable
[feed/packages.git] / lang / luabitop / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=luabitop
11 PKG_VERSION:=1.0.2
12 PKG_RELEASE:=1
13
14 _BASENAME:=LuaBitOp
15
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)
21 PKG_LICENSE:=MIT
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/luabitop
26 SUBMENU:=Lua
27 SECTION:=lang
28 CATEGORY:=Languages
29 TITLE:=luabitop
30 URL:=http://bitop.luajit.org/
31 DEPENDS:=+liblua
32 endef
33
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.
36 endef
37
38 define Build/Configure
39 endef
40
41
42 TARGET_CFLAGS += $(FPIC) -DLUA_USE_LINUX -DLUA_NUMBER_DOUBLE
43
44 define Build/Compile
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
46 endef
47
48 define Package/luabitop/install
49 $(INSTALL_DIR) $(1)/usr/lib/lua
50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/bit.so $(1)/usr/lib/lua
51 endef
52
53 $(eval $(call BuildPackage,luabitop))