[packages] lsqlite3: fix build failure with cs toolchain (same as [18192])
[openwrt/svn-archive/archive.git] / lang / lsqlite3 / Makefile
1 #
2 # Copyright (C) 2009 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:=lsqlite3
11 PKG_VERSION:=6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/2565
16 PKG_MD5SUM:=368da52fc52b9c5ba122f8f348db332b
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/lsqlite3
21 SUBMENU:=Lua
22 SECTION:=lang
23 CATEGORY:=Languages
24 TITLE:=LuaSQLite3
25 URL:=http://luasqlite.luaforge.net/lsqlite3.html
26 DEPENDS:=+lua +libsqlite3
27 endef
28
29 define Package/lsqlite3/description
30 LuaSQLite 3 is a thin wrapper around the public domain SQLite3 database engine.
31 endef
32
33 define Build/Configure
34 endef
35
36 TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS) -std=c99
37
38 TARGET_LDFLAGS += -llua
39
40 define Build/Compile
41 $(MAKE) -C $(PKG_BUILD_DIR) \
42 SQLITE3INC="$(STAGING_DIR)/usr/include/" \
43 SQLITE3LIB="$(STAGING_DIR)/usr/lib/" \
44 LUAINC="$(TARGET_CPPFLAGS)" \
45 LUALIB="$(TARGET_LDFLAGS)" \
46 LIBS="-shared $(TARGET_LDFLAGS)" \
47 CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
48 LD="$(TARGET_CROSS)ld -shared"
49 endef
50
51 define Package/lsqlite3/install
52 $(INSTALL_DIR) $(1)/usr/lib/lua
53 $(CP) $(PKG_BUILD_DIR)/lsqlite3.so $(1)/usr/lib/lua/
54 endef
55
56 $(eval $(call BuildPackage,lsqlite3))