Makefile (1541B)
1 # 2 # Copyright (C) 2007-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:=lualanes 11 PKG_REV:=aa9bfcf2dd49f55f11b27e7c21d5b75d81ccfc7e 12 PKG_VERSION:=3.9.4 13 PKG_RELEASE=1 14 15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz 16 PKG_SOURCE_URL:=https://github.com/LuaLanes/lanes.git 17 PKG_SOURCE_PROTO:=git 18 PKG_SOURCE_VERSION:=$(PKG_REV) 19 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) 20 21 PKG_INSTALL:=1 22 PKG_BUILD_PARALLEL:=1 23 24 PKG_BUILD_DEPENDS:=lua/host luac/host 25 26 include $(INCLUDE_DIR)/package.mk 27 28 define Package/lualanes 29 SUBMENU:=Lua 30 SECTION:=lang 31 CATEGORY:=Languages 32 TITLE:=LuaLanes 33 URL:=http://luaforge.net/projects/lanes/ 34 DEPENDS:=+lua +luac +liblua +libpthread 35 MAINTAINER:=Vladimir Malyutin <first-leon@yandex.ru> 36 endef 37 38 define Package/lualanes/description 39 Lanes is a lightweight, native, lazy evaluating multithreading library for Lua 5.1 and 5.2. 40 endef 41 42 define Build/Compile 43 $(MAKE) -C $(PKG_BUILD_DIR) all \ 44 CC="$(TARGET_CC)" \ 45 LUA="$(STAGING_DIR_HOSTPKG)/bin/lua" \ 46 LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \ 47 OPT_FLAGS="$(TARGET_CFLAGS) --std=c99 -Dpthread_yield=sched_yield" 48 endef 49 50 define Package/lualanes/install 51 $(INSTALL_DIR) $(1)/usr/lib/lua 52 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lanes.lua $(1)/usr/lib/lua/ 53 $(INSTALL_DIR) $(1)/usr/lib/lua/lanes 54 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lanes/core.so $(1)/usr/lib/lua/lanes/core.so 55 endef 56 57 $(eval $(call BuildPackage,lualanes))