diff options
author | Mike Pall <mike> | 2011-04-29 09:23:00 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-04-29 09:23:00 +0200 |
commit | b4cfaa62ac5039fa8ee4c80d001ea5b7cae01a5d (patch) | |
tree | 49ac53c2ed3f8eb345385eea5d16328be62cb201 /src | |
parent | 0ba34ffe50e9572e27cebb8c2fae4d46862114ef (diff) | |
download | luajit-b4cfaa62ac5039fa8ee4c80d001ea5b7cae01a5d.tar.gz luajit-b4cfaa62ac5039fa8ee4c80d001ea5b7cae01a5d.tar.bz2 luajit-b4cfaa62ac5039fa8ee4c80d001ea5b7cae01a5d.zip |
Improve target OS selection for buildvm.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile index 4e426c30..6ac05c49 100644 --- a/src/Makefile +++ b/src/Makefile | |||
@@ -287,7 +287,6 @@ ifeq (iOS,$(TARGET_SYS)) | |||
287 | TARGET_STRIP+= -x | 287 | TARGET_STRIP+= -x |
288 | TARGET_AR+= 2>/dev/null | 288 | TARGET_AR+= 2>/dev/null |
289 | TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC | 289 | TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC |
290 | HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OSX | ||
291 | ifneq (,$(TARGET_DYNXLDOPTS)) | 290 | ifneq (,$(TARGET_DYNXLDOPTS)) |
292 | TARGET_DYNXLDOPTS= | 291 | TARGET_DYNXLDOPTS= |
293 | TARGET_XSHLDFLAGS+= -install_name $(PREFIX)/lib/$(TARGET_DYLIBNAME) | 292 | TARGET_XSHLDFLAGS+= -install_name $(PREFIX)/lib/$(TARGET_DYLIBNAME) |
@@ -304,6 +303,26 @@ endif | |||
304 | endif | 303 | endif |
305 | endif | 304 | endif |
306 | 305 | ||
306 | ifneq ($(HOST_SYS),$(TARGET_SYS)) | ||
307 | ifeq (Windows,$(TARGET_SYS)) | ||
308 | HOST_XCFLAGS+= -malign-double -DLUAJIT_OS=LUAJIT_OS_WINDOWS | ||
309 | else | ||
310 | ifeq (Linux,$(TARGET_SYS)) | ||
311 | HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_LINUX | ||
312 | else | ||
313 | ifeq (Darwin,$(TARGET_SYS)) | ||
314 | HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OSX | ||
315 | else | ||
316 | ifeq (iOS,$(TARGET_SYS)) | ||
317 | HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OSX | ||
318 | else | ||
319 | HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OTHER | ||
320 | endif | ||
321 | endif | ||
322 | endif | ||
323 | endif | ||
324 | endif | ||
325 | |||
307 | ifneq (,$(CCDEBUG)) | 326 | ifneq (,$(CCDEBUG)) |
308 | TARGET_STRIP= @: | 327 | TARGET_STRIP= @: |
309 | endif | 328 | endif |
@@ -388,9 +407,6 @@ ifeq (Windows,$(TARGET_SYS)) | |||
388 | LJVM_MODE= coffasm | 407 | LJVM_MODE= coffasm |
389 | LUAJIT_SO= $(TARGET_DLLNAME) | 408 | LUAJIT_SO= $(TARGET_DLLNAME) |
390 | LUAJIT_T= luajit.exe | 409 | LUAJIT_T= luajit.exe |
391 | ifneq ($(HOST_SYS),$(TARGET_SYS)) | ||
392 | HOST_XCFLAGS+= -malign-double -DLUAJIT_OS=LUAJIT_OS_WINDOWS | ||
393 | endif | ||
394 | # Mixed mode is not supported on Windows. And static mode doesn't work well. | 410 | # Mixed mode is not supported on Windows. And static mode doesn't work well. |
395 | # C modules cannot be loaded, because they bind to lua51.dll. | 411 | # C modules cannot be loaded, because they bind to lua51.dll. |
396 | ifneq (static,$(BUILDMODE)) | 412 | ifneq (static,$(BUILDMODE)) |