From 5640a5e3f899e84b1c58f2ec9bd1b3dd6bf456cd Mon Sep 17 00:00:00 2001 From: Grace Kloba Date: Mon, 6 Jul 2009 10:19:33 -0700 Subject: Fix Mac build of mksnapshot mksnapshot is a host program and it is platform dependent. Add rules to Makefiles so that it picks up the right file depending on the host platform. --- V8Binding/Android.libv8.mk | 5 +++++ V8Binding/Android.mksnapshot.mk | 20 ++++++++++++++++---- V8Binding/Android.v8common.mk | 5 +---- 3 files changed, 22 insertions(+), 8 deletions(-) (limited to 'V8Binding') diff --git a/V8Binding/Android.libv8.mk b/V8Binding/Android.libv8.mk index f85ba79..3bb348e 100644 --- a/V8Binding/Android.libv8.mk +++ b/V8Binding/Android.libv8.mk @@ -15,6 +15,11 @@ V8_LOCAL_SRC_FILES := V8_LOCAL_JS_LIBRARY_FILES := include $(LOCAL_PATH)/Android.v8common.mk +# Target can only be linux +V8_LOCAL_SRC_FILES += \ + src/platform-linux.cc \ + src/platform-posix.cc + LOCAL_SRC_FILES := $(addprefix v8/, $(V8_LOCAL_SRC_FILES)) LOCAL_JS_LIBRARY_FILES := $(addprefix $(LOCAL_PATH)/v8/, $(V8_LOCAL_JS_LIBRARY_FILES)) diff --git a/V8Binding/Android.mksnapshot.mk b/V8Binding/Android.mksnapshot.mk index ef18196..235f509 100644 --- a/V8Binding/Android.mksnapshot.mk +++ b/V8Binding/Android.mksnapshot.mk @@ -14,11 +14,23 @@ V8_LOCAL_SRC_FILES := V8_LOCAL_JS_LIBRARY_FILES := include $(LOCAL_PATH)/Android.v8common.mk +V8_LOCAL_SRC_FILES += \ + src/mksnapshot.cc \ + src/arm/simulator-arm.cc \ + src/snapshot-empty.cc + +ifeq ($(HOST_OS),linux) +V8_LOCAL_SRC_FILES += \ + src/platform-linux.cc \ + src/platform-posix.cc +endif +ifeq ($(HOST_OS),darwin) +V8_LOCAL_SRC_FILES += \ + src/platform-macos.cc \ + src/platform-posix.cc +endif + LOCAL_SRC_FILES := $(addprefix v8/, $(V8_LOCAL_SRC_FILES)) -LOCAL_SRC_FILES += \ - v8/src/mksnapshot.cc \ - v8/src/arm/simulator-arm.cc \ - v8/src/snapshot-empty.cc LOCAL_JS_LIBRARY_FILES := $(addprefix $(LOCAL_PATH)/v8/, $(V8_LOCAL_JS_LIBRARY_FILES)) diff --git a/V8Binding/Android.v8common.mk b/V8Binding/Android.v8common.mk index b75cdf2..bf2e796 100644 --- a/V8Binding/Android.v8common.mk +++ b/V8Binding/Android.v8common.mk @@ -64,10 +64,7 @@ V8_LOCAL_SRC_FILES := \ src/variables.cc \ src/virtual-frame.cc \ src/version.cc \ - src/zone.cc \ - \ - src/platform-linux.cc \ - src/platform-posix.cc + src/zone.cc ifeq ($(TARGET_ARCH),arm) V8_LOCAL_SRC_FILES += \ -- cgit v1.1