blob: 0091f3f7343eadc5631086444573447f49982cfc [file] [log] [blame]
The Android Open Source Project88b60792009-03-03 19:28:42 -08001
Ying Wang6feb6d52014-04-17 10:03:35 -07002my_prefix := HOST_
3include $(BUILD_SYSTEM)/multilib.mk
4
Ying Wang6e85f8b2014-06-10 16:21:50 -07005ifndef LOCAL_MODULE_HOST_ARCH
Ying Wang6feb6d52014-04-17 10:03:35 -07006ifndef my_module_multilib
Ying Wang966c1e02014-05-20 14:43:51 -07007ifeq ($(HOST_PREFER_32_BIT),true)
8my_module_multilib := 32
9else
Ying Wang6feb6d52014-04-17 10:03:35 -070010# By default we only build host module for the first arch.
11my_module_multilib := first
The Android Open Source Project88b60792009-03-03 19:28:42 -080012endif
Ying Wang966c1e02014-05-20 14:43:51 -070013endif
Ying Wang6e85f8b2014-06-10 16:21:50 -070014endif
The Android Open Source Project88b60792009-03-03 19:28:42 -080015
Tim Murray595d0db2014-09-03 15:01:46 -070016ifeq ($(LOCAL_NO_FPIE),)
17LOCAL_LDFLAGS += $(HOST_FPIE_FLAGS)
18endif
19
Ying Wang6feb6d52014-04-17 10:03:35 -070020ifeq ($(my_module_multilib),both)
21ifeq ($(LOCAL_MODULE_PATH_32)$(LOCAL_MODULE_STEM_32),)
22$(error $(LOCAL_PATH): LOCAL_MODULE_STEM_32 or LOCAL_MODULE_PATH_32 is required for LOCAL_MULTILIB := both for module $(LOCAL_MODULE))
Ying Wang63d94fa2012-12-13 18:23:01 -080023endif
Ying Wang6feb6d52014-04-17 10:03:35 -070024ifeq ($(LOCAL_MODULE_PATH_64)$(LOCAL_MODULE_STEM_64),)
25$(error $(LOCAL_PATH): LOCAL_MODULE_STEM_64 or LOCAL_MODULE_PATH_64 is required for LOCAL_MULTILIB := both for module $(LOCAL_MODULE))
26endif
27else #!LOCAL_MULTILIB == both
28LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true
Ying Wang63d94fa2012-12-13 18:23:01 -080029endif
30
Ying Wang6feb6d52014-04-17 10:03:35 -070031LOCAL_2ND_ARCH_VAR_PREFIX :=
32include $(BUILD_SYSTEM)/module_arch_supported.mk
Ying Wang63d94fa2012-12-13 18:23:01 -080033
Ying Wang6feb6d52014-04-17 10:03:35 -070034ifeq ($(my_module_arch_supported),true)
35include $(BUILD_SYSTEM)/host_executable_internal.mk
36endif
The Android Open Source Project88b60792009-03-03 19:28:42 -080037
Ying Wang6feb6d52014-04-17 10:03:35 -070038ifdef HOST_2ND_ARCH
39LOCAL_2ND_ARCH_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX)
40include $(BUILD_SYSTEM)/module_arch_supported.mk
41ifeq ($(my_module_arch_supported),true)
42# Build for HOST_2ND_ARCH
43OVERRIDE_BUILT_MODULE_PATH :=
44LOCAL_BUILT_MODULE :=
45LOCAL_INSTALLED_MODULE :=
Ying Wang6feb6d52014-04-17 10:03:35 -070046LOCAL_INTERMEDIATE_TARGETS :=
Ying Wang63d94fa2012-12-13 18:23:01 -080047
Ying Wang6feb6d52014-04-17 10:03:35 -070048include $(BUILD_SYSTEM)/host_executable_internal.mk
49endif
50LOCAL_2ND_ARCH_VAR_PREFIX :=
51endif # HOST_2ND_ARCH
52
53LOCAL_NO_2ND_ARCH_MODULE_SUFFIX :=
54my_module_arch_supported :=