diff options
| author | Mike Pall <mike> | 2015-10-24 19:30:55 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2015-10-24 19:30:55 +0200 |
| commit | 3ad77346dfc12a910a806ccf3ec6d54f49d54672 (patch) | |
| tree | b281228340fb5578987aa47a578d1c5f8d395a10 /src/Makefile | |
| parent | ffb124ec77f7881de374c3f4dca8c418a89c6cbc (diff) | |
| parent | 1393b2f681df3a71cb381b958e8e3221d2dd427d (diff) | |
| download | luajit-3ad77346dfc12a910a806ccf3ec6d54f49d54672.tar.gz luajit-3ad77346dfc12a910a806ccf3ec6d54f49d54672.tar.bz2 luajit-3ad77346dfc12a910a806ccf3ec6d54f49d54672.zip | |
Merge branch 'master' into v2.1
Diffstat (limited to 'src/Makefile')
| -rw-r--r-- | src/Makefile | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/src/Makefile b/src/Makefile index 532da6e9..9845f6a0 100644 --- a/src/Makefile +++ b/src/Makefile | |||
| @@ -24,11 +24,13 @@ NODOTABIVER= 51 | |||
| 24 | # removing the '#' in front of them. Make sure you force a full recompile | 24 | # removing the '#' in front of them. Make sure you force a full recompile |
| 25 | # with "make clean", followed by "make" if you change any options. | 25 | # with "make clean", followed by "make" if you change any options. |
| 26 | # | 26 | # |
| 27 | DEFAULT_CC = gcc | ||
| 28 | # | ||
| 27 | # LuaJIT builds as a native 32 or 64 bit binary by default. | 29 | # LuaJIT builds as a native 32 or 64 bit binary by default. |
| 28 | CC= gcc | 30 | CC= $(DEFAULT_CC) |
| 29 | # | 31 | # |
| 30 | # Use this if you want to force a 32 bit build on a 64 bit multilib OS. | 32 | # Use this if you want to force a 32 bit build on a 64 bit multilib OS. |
| 31 | #CC= gcc -m32 | 33 | #CC= $(DEFAULT_CC) -m32 |
| 32 | # | 34 | # |
| 33 | # Since the assembler part does NOT maintain a frame pointer, it's pointless | 35 | # Since the assembler part does NOT maintain a frame pointer, it's pointless |
| 34 | # to slow down the C part by not omitting it. Debugging, tracebacks and | 36 | # to slow down the C part by not omitting it. Debugging, tracebacks and |
| @@ -148,6 +150,29 @@ XCFLAGS= | |||
| 148 | ############################################################################## | 150 | ############################################################################## |
| 149 | 151 | ||
| 150 | ############################################################################## | 152 | ############################################################################## |
| 153 | # Host system detection. | ||
| 154 | ############################################################################## | ||
| 155 | |||
| 156 | ifeq (Windows,$(findstring Windows,$(OS))$(MSYSTEM)$(TERM)) | ||
| 157 | HOST_SYS= Windows | ||
| 158 | HOST_RM= del | ||
| 159 | else | ||
| 160 | HOST_SYS:= $(shell uname -s) | ||
| 161 | ifneq (,$(findstring MINGW,$(HOST_SYS))) | ||
| 162 | HOST_SYS= Windows | ||
| 163 | HOST_MSYS= mingw | ||
| 164 | endif | ||
| 165 | ifneq (,$(findstring CYGWIN,$(HOST_SYS))) | ||
| 166 | HOST_SYS= Windows | ||
| 167 | HOST_MSYS= cygwin | ||
| 168 | endif | ||
| 169 | # Use Clang for OSX host. | ||
| 170 | ifeq (Darwin,$(HOST_SYS)) | ||
| 171 | DEFAULT_CC= clang | ||
| 172 | endif | ||
| 173 | endif | ||
| 174 | |||
| 175 | ############################################################################## | ||
| 151 | # Flags and options for host and target. | 176 | # Flags and options for host and target. |
| 152 | ############################################################################## | 177 | ############################################################################## |
| 153 | 178 | ||
| @@ -268,24 +293,9 @@ ifneq (,$(LMULTILIB)) | |||
| 268 | endif | 293 | endif |
| 269 | 294 | ||
| 270 | ############################################################################## | 295 | ############################################################################## |
| 271 | # System detection. | 296 | # Target system detection. |
| 272 | ############################################################################## | 297 | ############################################################################## |
| 273 | 298 | ||
| 274 | ifeq (Windows,$(findstring Windows,$(OS))$(MSYSTEM)$(TERM)) | ||
| 275 | HOST_SYS= Windows | ||
| 276 | HOST_RM= del | ||
| 277 | else | ||
| 278 | HOST_SYS:= $(shell uname -s) | ||
| 279 | ifneq (,$(findstring MINGW,$(HOST_SYS))) | ||
| 280 | HOST_SYS= Windows | ||
| 281 | HOST_MSYS= mingw | ||
| 282 | endif | ||
| 283 | ifneq (,$(findstring CYGWIN,$(HOST_SYS))) | ||
| 284 | HOST_SYS= Windows | ||
| 285 | HOST_MSYS= cygwin | ||
| 286 | endif | ||
| 287 | endif | ||
| 288 | |||
| 289 | TARGET_SYS?= $(HOST_SYS) | 299 | TARGET_SYS?= $(HOST_SYS) |
| 290 | ifeq (Windows,$(TARGET_SYS)) | 300 | ifeq (Windows,$(TARGET_SYS)) |
| 291 | TARGET_STRIP+= --strip-unneeded | 301 | TARGET_STRIP+= --strip-unneeded |
