• 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
Francois PerradFrancois Perrad committed ba296ab1eae17 Jan 2014
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
################################################################################
2
#
3
# lua
4
#
5
################################################################################
6
​
7
ifeq ($(BR2_PACKAGE_LUA_5_2),y)
8
LUA_VERSION = 5.2.3
9
else
10
LUA_VERSION = 5.1.5
11
endif
12
LUA_SITE = http://www.lua.org/ftp
13
LUA_INSTALL_STAGING = YES
14
LUA_LICENSE = MIT
15
LUA_LICENSE_FILES = COPYRIGHT
16
​
17
LUA_CFLAGS = -Wall -fPIC
18
LUA_MYLIBS += -ldl
19
​
20
ifeq ($(BR2_PACKAGE_LUA_5_2),y)
21
LUA_CFLAGS += -DLUA_COMPAT_ALL
22
ifneq ($(BR2_LARGEFILE),y)
23
LUA_CFLAGS += -D_FILE_OFFSET_BITS=32
24
endif
25
endif
26
​
27
ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_READLINE),y)
28
    LUA_DEPENDENCIES = readline ncurses
29
    LUA_MYLIBS += -lreadline -lhistory -lncurses
30
    LUA_CFLAGS += -DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_USE_READLINE
31
else
32
ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_LINENOISE),y)
33
    LUA_DEPENDENCIES = linenoise
34
    LUA_MYLIBS += -llinenoise
35
    LUA_CFLAGS += -DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_USE_LINENOISE
36
else
37
    LUA_CFLAGS += -DLUA_USE_POSIX -DLUA_USE_DLOPEN
38
endif
39
endif
40
​
41
# We never want to have host-readline and host-ncurses as dependencies
42
# of host-lua.
43
HOST_LUA_DEPENDENCIES =
44
HOST_LUA_CFLAGS = -Wall -fPIC -DLUA_USE_DLOPEN -DLUA_USE_POSIX
45
HOST_LUA_MYLIBS = -ldl
46
​
47
ifeq ($(BR2_PACKAGE_LUA_5_2),y)
48
HOST_LUA_CFLAGS += -DLUA_COMPAT_ALL
49
endif
50
​
51
define LUA_BUILD_CMDS
52
    $(MAKE) \
53
    CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" \
54
    CFLAGS="$(TARGET_CFLAGS) $(LUA_CFLAGS)" \
55
    MYLIBS="$(LUA_MYLIBS)" AR="$(TARGET_CROSS)ar rcu" \
56
    PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all
57
endef
58
​
59
define HOST_LUA_BUILD_CMDS
60
    $(MAKE) \
61
    CFLAGS="$(HOST_LUA_CFLAGS)" \
62
    MYLDFLAGS="$(HOST_LDFLAGS)" \
63
    MYLIBS="$(HOST_LUA_MYLIBS)" \
64
    PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all
65
endef
66
​
67
define LUA_INSTALL_STAGING_CMDS
68
    $(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \
69
        $(STAGING_DIR)/usr/lib/pkgconfig/lua.pc
70
    $(INSTALL) -m 0755 -D $(@D)/src/lua $(STAGING_DIR)/usr/bin/lua
71
    $(INSTALL) -m 0755 -D $(@D)/src/luac $(STAGING_DIR)/usr/bin/luac
72
    $(INSTALL) -m 0755 -D $(@D)/src/liblua.so.$(LUA_VERSION) \
73
        $(STAGING_DIR)/usr/lib/liblua.so.$(LUA_VERSION)
74
    ln -sf liblua.so.$(LUA_VERSION) $(STAGING_DIR)/usr/lib/liblua.so
75
    $(INSTALL) -m 0644 -D $(@D)/src/liblua.a $(STAGING_DIR)/usr/lib/liblua.a
76
    $(INSTALL) -m 0644 -D $(@D)/src/lua.h $(STAGING_DIR)/usr/include/lua.h
77
    $(INSTALL) -m 0644 -D $(@D)/src/luaconf.h $(STAGING_DIR)/usr/include/luaconf.h
78
    $(INSTALL) -m 0644 -D $(@D)/src/lualib.h $(STAGING_DIR)/usr/include/lualib.h
79
    $(INSTALL) -m 0644 -D $(@D)/src/lauxlib.h $(STAGING_DIR)/usr/include/lauxlib.h
80
endef
81
​
82
define LUA_INSTALL_TARGET_CMDS
83
    $(INSTALL) -m 0755 -D $(@D)/src/lua $(TARGET_DIR)/usr/bin/lua
84
    $(INSTALL) -m 0755 -D $(@D)/src/luac $(TARGET_DIR)/usr/bin/luac
85
    $(INSTALL) -m 0755 -D $(@D)/src/liblua.so.$(LUA_VERSION) \
86
        $(TARGET_DIR)/usr/lib/liblua.so.$(LUA_VERSION)
87
    ln -sf liblua.so.$(LUA_VERSION) $(TARGET_DIR)/usr/lib/liblua.so
88
    mkdir -p $(TARGET_DIR)/usr/lib/lua/$(LUAINTERPRETER_ABIVER)
89
    mkdir -p $(TARGET_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER)
90
endef
91
​
92
define HOST_LUA_INSTALL_CMDS
  • 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.