1LOCAL_PATH := $(call my-dir)
2
3host_OS_SRCS :=
4host_common_LDLIBS :=
5
6ifeq ($(HOST_OS),linux)
7    host_OS_SRCS = NativeLinuxSubWindow.cpp
8    host_common_LDLIBS += -lX11
9endif
10
11ifeq ($(HOST_OS),darwin)
12    host_OS_SRCS = NativeMacSubWindow.m
13    host_common_LDLIBS += -Wl,-framework,AppKit
14endif
15
16ifeq ($(HOST_OS),windows)
17    host_OS_SRCS = NativeWindowsSubWindow.cpp
18endif
19
20host_common_SRC_FILES := \
21    $(host_OS_SRCS) \
22    render_api.cpp \
23    ColorBuffer.cpp \
24    EGLDispatch.cpp \
25    FBConfig.cpp \
26    FrameBuffer.cpp \
27    GLDispatch.cpp \
28    GL2Dispatch.cpp \
29    RenderContext.cpp \
30    WindowSurface.cpp \
31    RenderControl.cpp \
32    ThreadInfo.cpp \
33    RenderThread.cpp \
34    ReadBuffer.cpp \
35    RenderServer.cpp
36
37host_common_CFLAGS :=
38
39#For gl debbuging
40#host_common_CFLAGS += -DCHECK_GL_ERROR
41
42
43### host libOpenglRender #################################################
44$(call emugl-begin-host-shared-library,libOpenglRender)
45
46$(call emugl-import,libGLESv1_dec libGLESv2_dec lib_renderControl_dec libOpenglCodecCommon libOpenglOsUtils)
47
48LOCAL_LDLIBS += $(host_common_LDLIBS)
49
50LOCAL_SRC_FILES := $(host_common_SRC_FILES)
51$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/host/include)
52$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
53
54# use Translator's egl/gles headers
55LOCAL_C_INCLUDES += $(EMUGL_PATH)/host/libs/Translator/include
56
57LOCAL_STATIC_LIBRARIES += libutils liblog
58
59$(call emugl-export,CFLAGS,$(host_common_CFLAGS))
60
61$(call emugl-end-module)
62
63
64### host libOpenglRender, 64-bit #########################################
65$(call emugl-begin-host-shared-library,lib64OpenglRender)
66
67$(call emugl-import,lib64GLESv1_dec lib64GLESv2_dec lib64_renderControl_dec lib64OpenglCodecCommon lib64OpenglOsUtils)
68
69#LOCAL_LDFLAGS += -m64  # adding -m64 here doesn't work, because it somehow appear BEFORE -m32 in command-line.
70LOCAL_LDLIBS += $(host_common_LDLIBS) -m64  # Put -m64 it in LOCAL_LDLIBS instead.
71
72LOCAL_SRC_FILES := $(host_common_SRC_FILES)
73$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/host/include)
74$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
75
76# use Translator's egl/gles headers
77LOCAL_C_INCLUDES += $(EMUGL_PATH)/host/libs/Translator/include
78
79LOCAL_STATIC_LIBRARIES += lib64utils lib64log
80
81$(call emugl-export,CFLAGS,$(host_common_CFLAGS) -m64)
82
83$(call emugl-end-module)
84