• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/lua/lua.mk
Thomas PetazzoniThomas Petazzoni committed 12d1aa4b69630 Jun 2013
Raw file
Source viewDiff to previous
 
1
################################################################################
2
#
3
# lua
4
#
5
################################################################################
6
​
7
LUA_VERSION = 5.1.5
8
LUA_SITE = http://www.lua.org/ftp
9
LUA_INSTALL_STAGING = YES
10
LUA_LICENSE = MIT
11
LUA_LICENSE_FILES = COPYRIGHT
12
​
13
LUA_CFLAGS = -Wall -fPIC
14
LUA_MYLIBS += -ldl
15
​
16
ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_READLINE),y)
17
    LUA_DEPENDENCIES = readline ncurses
18
    LUA_MYLIBS += -lreadline -lhistory -lncurses
19
    LUA_CFLAGS += -DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_USE_READLINE
20
else
21
ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_LINENOISE),y)
22
    LUA_DEPENDENCIES = linenoise
23
    LUA_MYLIBS += -llinenoise
24
    LUA_CFLAGS += -DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_USE_LINENOISE
25
else
26
    LUA_CFLAGS += -DLUA_USE_POSIX -DLUA_USE_DLOPEN
27
endif
28
endif
29
​
30
# We never want to have host-readline and host-ncurses as dependencies
31
# of host-lua.
32
HOST_LUA_DEPENDENCIES =
33
HOST_LUA_CFLAGS = -Wall -fPIC -DLUA_USE_DLOPEN -DLUA_USE_POSIX
34
HOST_LUA_MYLIBS = -ldl
35
​
36
define LUA_BUILD_CMDS
37
    $(MAKE) \
38
    CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" \
39
    CFLAGS="$(TARGET_CFLAGS) $(LUA_CFLAGS)" \
40
    MYLIBS="$(LUA_MYLIBS)" AR="$(TARGET_CROSS)ar rcu" \
41
    PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all
42
endef
43
​
44
define HOST_LUA_BUILD_CMDS
45
    $(MAKE) \
46
    CFLAGS="$(HOST_LUA_CFLAGS)" \
47
    MYLDFLAGS="$(HOST_LDFLAGS)" \
48
    MYLIBS="$(HOST_LUA_MYLIBS)" \
49
    PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all
50
endef
51
​
52
define LUA_INSTALL_STAGING_CMDS
53
    $(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \
54
        $(STAGING_DIR)/usr/lib/pkgconfig/lua.pc
55
    $(INSTALL) -m 0755 -D $(@D)/src/lua $(STAGING_DIR)/usr/bin/lua
56
    $(INSTALL) -m 0755 -D $(@D)/src/luac $(STAGING_DIR)/usr/bin/luac
57
    $(INSTALL) -m 0755 -D $(@D)/src/liblua.so.$(LUA_VERSION) \
58
        $(STAGING_DIR)/usr/lib/liblua.so.$(LUA_VERSION)
59
    ln -sf liblua.so.$(LUA_VERSION) $(STAGING_DIR)/usr/lib/liblua.so
60
    $(INSTALL) -m 0644 -D $(@D)/src/liblua.a $(STAGING_DIR)/usr/lib/liblua.a
61
    $(INSTALL) -m 0644 -D $(@D)/src/lua.h $(STAGING_DIR)/usr/include/lua.h
62
    $(INSTALL) -m 0644 -D $(@D)/src/luaconf.h $(STAGING_DIR)/usr/include/luaconf.h
63
    $(INSTALL) -m 0644 -D $(@D)/src/lualib.h $(STAGING_DIR)/usr/include/lualib.h
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.