diff options
author | Mike Pall <mike> | 2016-03-22 22:16:12 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2016-03-22 22:22:43 +0100 |
commit | 7e05355a08255f508d334eded96095e0bde06e2e (patch) | |
tree | 6cd0deb5dc5d54f40c413636a1749823f95f55cf | |
parent | ddadbe80997bc1ebe12e986298d26bef07811e62 (diff) | |
download | luajit-7e05355a08255f508d334eded96095e0bde06e2e.tar.gz luajit-7e05355a08255f508d334eded96095e0bde06e2e.tar.bz2 luajit-7e05355a08255f508d334eded96095e0bde06e2e.zip |
Fix install for cross-builds.
-rw-r--r-- | Makefile | 28 | ||||
-rw-r--r-- | doc/install.html | 9 |
2 files changed, 23 insertions, 14 deletions
@@ -46,17 +46,18 @@ INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig | |||
46 | INSTALL_TNAME= luajit-$(VERSION) | 46 | INSTALL_TNAME= luajit-$(VERSION) |
47 | INSTALL_TSYMNAME= luajit | 47 | INSTALL_TSYMNAME= luajit |
48 | INSTALL_ANAME= libluajit-$(ABIVER).a | 48 | INSTALL_ANAME= libluajit-$(ABIVER).a |
49 | INSTALL_SONAME= libluajit-$(ABIVER).so.$(MAJVER).$(MINVER).$(RELVER) | 49 | INSTALL_SOSHORT1= libluajit-$(ABIVER).so |
50 | INSTALL_SOSHORT= libluajit-$(ABIVER).so | 50 | INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER) |
51 | INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).$(MINVER).$(RELVER).dylib | 51 | INSTALL_SONAME= $(INSTALL_SOSHORT2).$(MINVER).$(RELVER) |
52 | INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib | 52 | INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib |
53 | INSTALL_DYLIBSHORT2= libluajit-$(ABIVER).$(MAJVER).dylib | 53 | INSTALL_DYLIBSHORT2= libluajit-$(ABIVER).$(MAJVER).dylib |
54 | INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).$(MINVER).$(RELVER).dylib | ||
54 | INSTALL_PCNAME= luajit.pc | 55 | INSTALL_PCNAME= luajit.pc |
55 | 56 | ||
56 | INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME) | 57 | INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME) |
57 | INSTALL_DYN= $(INSTALL_LIB)/$(INSTALL_SONAME) | 58 | INSTALL_DYN= $(INSTALL_LIB)/$(INSTALL_SONAME) |
58 | INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT) | 59 | INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT1) |
59 | INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT) | 60 | INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT2) |
60 | INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME) | 61 | INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME) |
61 | INSTALL_TSYM= $(INSTALL_BIN)/$(INSTALL_TSYMNAME) | 62 | INSTALL_TSYM= $(INSTALL_BIN)/$(INSTALL_TSYMNAME) |
62 | INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME) | 63 | INSTALL_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 | ||
89 | ifeq (,$(findstring Windows,$(OS))) | 90 | ifeq (,$(findstring Windows,$(OS))) |
90 | ifeq (Darwin,$(shell uname -s)) | 91 | HOST_SYS:= $(shell uname -s) |
91 | INSTALL_SONAME= $(INSTALL_DYLIBNAME) | 92 | else |
92 | INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_DYLIBSHORT1) | 93 | HOST_SYS= Windows |
93 | INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_DYLIBSHORT2) | 94 | endif |
94 | LDCONFIG= : | 95 | TARGET_SYS?= $(HOST_SYS) |
95 | endif | 96 | |
97 | ifeq (Darwin,$(TARGET_SYS)) | ||
98 | INSTALL_SONAME= $(INSTALL_DYLIBNAME) | ||
99 | INSTALL_SOSHORT1= $(INSTALL_DYLIBSHORT1) | ||
100 | INSTALL_SOSHORT2= $(INSTALL_DYLIBSHORT2) | ||
101 | LDCONFIG= : | ||
96 | endif | 102 | endif |
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 | |||
344 | you're compiling on a Windows or OSX host for embedded Linux or Android, | 344 | you're compiling on a Windows or OSX host for embedded Linux or Android, |
345 | you need to add <tt>TARGET_SYS=Linux</tt> to the examples below. For a | 345 | you need to add <tt>TARGET_SYS=Linux</tt> to the examples below. For a |
346 | minimal target OS, you may need to disable the built-in allocator in | 346 | minimal 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 |
348 | below only show some popular targets — please check the comments | 348 | specify the same <tt>TARGET_SYS</tt> for the install step, too. |
349 | in <tt>src/Makefile</tt> for more details. | 349 | </p> |
350 | <p> | ||
351 | The examples below only show some popular targets — please check | ||
352 | the 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 |