aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2016-03-22 22:16:12 +0100
committerMike Pall <mike>2016-03-22 22:22:43 +0100
commit7e05355a08255f508d334eded96095e0bde06e2e (patch)
tree6cd0deb5dc5d54f40c413636a1749823f95f55cf
parentddadbe80997bc1ebe12e986298d26bef07811e62 (diff)
downloadluajit-7e05355a08255f508d334eded96095e0bde06e2e.tar.gz
luajit-7e05355a08255f508d334eded96095e0bde06e2e.tar.bz2
luajit-7e05355a08255f508d334eded96095e0bde06e2e.zip
Fix install for cross-builds.
-rw-r--r--Makefile28
-rw-r--r--doc/install.html9
2 files changed, 23 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index d5b7d723..eb9572d8 100644
--- a/Makefile
+++ b/Makefile
@@ -46,17 +46,18 @@ INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig
46INSTALL_TNAME= luajit-$(VERSION) 46INSTALL_TNAME= luajit-$(VERSION)
47INSTALL_TSYMNAME= luajit 47INSTALL_TSYMNAME= luajit
48INSTALL_ANAME= libluajit-$(ABIVER).a 48INSTALL_ANAME= libluajit-$(ABIVER).a
49INSTALL_SONAME= libluajit-$(ABIVER).so.$(MAJVER).$(MINVER).$(RELVER) 49INSTALL_SOSHORT1= libluajit-$(ABIVER).so
50INSTALL_SOSHORT= libluajit-$(ABIVER).so 50INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER)
51INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).$(MINVER).$(RELVER).dylib 51INSTALL_SONAME= $(INSTALL_SOSHORT2).$(MINVER).$(RELVER)
52INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib 52INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib
53INSTALL_DYLIBSHORT2= libluajit-$(ABIVER).$(MAJVER).dylib 53INSTALL_DYLIBSHORT2= libluajit-$(ABIVER).$(MAJVER).dylib
54INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).$(MINVER).$(RELVER).dylib
54INSTALL_PCNAME= luajit.pc 55INSTALL_PCNAME= luajit.pc
55 56
56INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME) 57INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME)
57INSTALL_DYN= $(INSTALL_LIB)/$(INSTALL_SONAME) 58INSTALL_DYN= $(INSTALL_LIB)/$(INSTALL_SONAME)
58INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT) 59INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT1)
59INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT) 60INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT2)
60INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME) 61INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME)
61INSTALL_TSYM= $(INSTALL_BIN)/$(INSTALL_TSYMNAME) 62INSTALL_TSYM= $(INSTALL_BIN)/$(INSTALL_TSYMNAME)
62INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME) 63INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME)
@@ -87,12 +88,17 @@ FILES_JITLIB= bc.lua v.lua dump.lua dis_x86.lua dis_x64.lua dis_arm.lua \
87 dis_ppc.lua dis_mips.lua dis_mipsel.lua bcsave.lua vmdef.lua 88 dis_ppc.lua dis_mips.lua dis_mipsel.lua bcsave.lua vmdef.lua
88 89
89ifeq (,$(findstring Windows,$(OS))) 90ifeq (,$(findstring Windows,$(OS)))
90 ifeq (Darwin,$(shell uname -s)) 91 HOST_SYS:= $(shell uname -s)
91 INSTALL_SONAME= $(INSTALL_DYLIBNAME) 92else
92 INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_DYLIBSHORT1) 93 HOST_SYS= Windows
93 INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_DYLIBSHORT2) 94endif
94 LDCONFIG= : 95TARGET_SYS?= $(HOST_SYS)
95 endif 96
97ifeq (Darwin,$(TARGET_SYS))
98 INSTALL_SONAME= $(INSTALL_DYLIBNAME)
99 INSTALL_SOSHORT1= $(INSTALL_DYLIBSHORT1)
100 INSTALL_SOSHORT2= $(INSTALL_DYLIBSHORT2)
101 LDCONFIG= :
96endif 102endif
97 103
98############################################################################## 104##############################################################################
diff --git a/doc/install.html b/doc/install.html
index 6c0689ac..a34f39f0 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -344,9 +344,12 @@ target OS differ, or you'll get assembler or linker errors. E.g. if
344you're compiling on a Windows or OSX host for embedded Linux or Android, 344you're compiling on a Windows or OSX host for embedded Linux or Android,
345you need to add <tt>TARGET_SYS=Linux</tt> to the examples below. For a 345you need to add <tt>TARGET_SYS=Linux</tt> to the examples below. For a
346minimal target OS, you may need to disable the built-in allocator in 346minimal target OS, you may need to disable the built-in allocator in
347<tt>src/Makefile</tt> and use <tt>TARGET_SYS=Other</tt>. The examples 347<tt>src/Makefile</tt> and use <tt>TARGET_SYS=Other</tt>. Don't forget to
348below only show some popular targets &mdash; please check the comments 348specify the same <tt>TARGET_SYS</tt> for the install step, too.
349in <tt>src/Makefile</tt> for more details. 349</p>
350<p>
351The examples below only show some popular targets &mdash; please check
352the comments in <tt>src/Makefile</tt> for more details.
350</p> 353</p>
351<pre class="code"> 354<pre class="code">
352# Cross-compile to a 32 bit binary on a multilib x64 OS 355# Cross-compile to a 32 bit binary on a multilib x64 OS