Skip to content

Commit 1f9e749

Browse files
Andrew HsiehJean-Baptiste Queru
authored andcommitted
Added rules to build f/b/libs/utils in 64-bit: lib64utils.a
It's needed to build four shared libraries in 64-bit for 64-bit emulator with "-gpu on" lib64OpenglRender.so lib64EGL_translator.so lib64GLES_CM_translator.so lib64GLES_V2_translator.so Change-Id: Ia6c05b23df1e9cd9e7f2e94e4cd5bde4be5d336b
1 parent 42c6d16 commit 1f9e749

1 file changed

Lines changed: 25 additions & 14 deletions

File tree

libs/utils/Android.mk

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,30 +51,41 @@ commonSources:= \
5151
ZipUtils.cpp \
5252
misc.cpp
5353

54-
55-
# For the host
56-
# =====================================================
57-
58-
include $(CLEAR_VARS)
59-
60-
LOCAL_SRC_FILES:= $(commonSources)
61-
62-
LOCAL_MODULE:= libutils
63-
64-
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
65-
LOCAL_C_INCLUDES += external/zlib
54+
host_commonCflags := -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
6655

6756
ifeq ($(HOST_OS),windows)
6857
ifeq ($(strip $(USE_CYGWIN),),)
6958
# Under MinGW, ctype.h doesn't need multi-byte support
70-
LOCAL_CFLAGS += -DMB_CUR_MAX=1
59+
host_commonCflags += -DMB_CUR_MAX=1
7160
endif
7261
endif
7362

63+
host_commonLdlibs :=
64+
7465
ifeq ($(TARGET_OS),linux)
75-
LOCAL_LDLIBS += -lrt -ldl
66+
host_commonLdlibs += -lrt -ldl
7667
endif
7768

69+
70+
# For the host
71+
# =====================================================
72+
include $(CLEAR_VARS)
73+
LOCAL_SRC_FILES:= $(commonSources)
74+
LOCAL_MODULE:= libutils
75+
LOCAL_CFLAGS += $(host_commonCflags)
76+
LOCAL_LDLIBS += $(host_commonLdlibs)
77+
LOCAL_C_INCLUDES += external/zlib
78+
include $(BUILD_HOST_STATIC_LIBRARY)
79+
80+
81+
# For the host, 64-bit
82+
# =====================================================
83+
include $(CLEAR_VARS)
84+
LOCAL_SRC_FILES:= $(commonSources)
85+
LOCAL_MODULE:= lib64utils
86+
LOCAL_CFLAGS += $(host_commonCflags) -m64
87+
LOCAL_LDLIBS += $(host_commonLdlibs)
88+
LOCAL_C_INCLUDES += external/zlib
7889
include $(BUILD_HOST_STATIC_LIBRARY)
7990

8091

0 commit comments

Comments
 (0)