am 76780669: Added rules to build 64-bit libraries for 64-bit emulator
* commit '76780669f9867587693563358ccdc903e9cdcbba': Added rules to build 64-bit libraries for 64-bit emulator
This commit is contained in:
@@ -1,5 +1,13 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
|
host_common_debug_CFLAGS :=
|
||||||
|
|
||||||
|
#For gl debbuging
|
||||||
|
#host_common_debug_CFLAGS += -DCHECK_GL_ERROR
|
||||||
|
#host_common_debug_CFLAGS += -DDEBUG_PRINTOUT
|
||||||
|
|
||||||
|
|
||||||
|
### host library #########################################
|
||||||
$(call emugl-begin-host-static-library,libGLESv1_dec)
|
$(call emugl-begin-host-static-library,libGLESv1_dec)
|
||||||
|
|
||||||
$(call emugl-import, libOpenglCodecCommon libOpenglOsUtils)
|
$(call emugl-import, libOpenglCodecCommon libOpenglOsUtils)
|
||||||
@@ -12,8 +20,24 @@ LOCAL_SRC_FILES := GLDecoder.cpp
|
|||||||
# for gl_types.h !
|
# for gl_types.h !
|
||||||
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/system/GLESv1_enc)
|
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/system/GLESv1_enc)
|
||||||
|
|
||||||
#For gl debbuging
|
$(call emugl-export,CFLAGS,$(host_common_debug_CFLAGS))
|
||||||
#$(call emugl-export,CFLAGS,-DCHECK_GL_ERROR)
|
|
||||||
#$(call emugl-export,CFLAGS,-DDEBUG_PRINTOUT)
|
$(call emugl-end-module)
|
||||||
|
|
||||||
|
|
||||||
|
### host library, 64-bit ####################################
|
||||||
|
$(call emugl-begin-host-static-library,lib64GLESv1_dec)
|
||||||
|
|
||||||
|
$(call emugl-import, lib64OpenglCodecCommon lib64OpenglOsUtils)
|
||||||
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||||
|
|
||||||
|
$(call emugl-gen-decoder,$(EMUGL_PATH)/system/GLESv1_enc,gl)
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := GLDecoder.cpp
|
||||||
|
|
||||||
|
# for gl_types.h !
|
||||||
|
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/system/GLESv1_enc)
|
||||||
|
|
||||||
|
$(call emugl-export,CFLAGS,$(host_common_debug_CFLAGS) -m64)
|
||||||
|
|
||||||
$(call emugl-end-module)
|
$(call emugl-end-module)
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
|
host_common_debug_CFLAGS :=
|
||||||
|
|
||||||
|
#For gl debbuging
|
||||||
|
#host_common_debug_CFLAGS += -DCHECK_GL_ERROR
|
||||||
|
#host_common_debug_CFLAGS += -DDEBUG_PRINTOUT
|
||||||
|
|
||||||
|
|
||||||
|
### host library ##########################################
|
||||||
$(call emugl-begin-host-static-library,libGLESv2_dec)
|
$(call emugl-begin-host-static-library,libGLESv2_dec)
|
||||||
$(call emugl-import, libOpenglCodecCommon libOpenglOsUtils)
|
$(call emugl-import, libOpenglCodecCommon libOpenglOsUtils)
|
||||||
$(call emugl-gen-decoder,$(EMUGL_PATH)/system/GLESv2_enc,gl2)
|
$(call emugl-gen-decoder,$(EMUGL_PATH)/system/GLESv2_enc,gl2)
|
||||||
@@ -8,9 +16,22 @@ $(call emugl-gen-decoder,$(EMUGL_PATH)/system/GLESv2_enc,gl2)
|
|||||||
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/system/GLESv2_enc)
|
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/system/GLESv2_enc)
|
||||||
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||||
|
|
||||||
#For gl debbuging
|
$(call emugl-export,CFLAGS,$(host_common_debug_CFLAGS))
|
||||||
#$(call emugl-export,CFLAGS,-DCHECK_GL_ERROR)
|
|
||||||
#$(call emugl-export,CFLAGS,-DDEBUG_PRINTOUT)
|
LOCAL_SRC_FILES := GL2Decoder.cpp
|
||||||
|
|
||||||
|
$(call emugl-end-module)
|
||||||
|
|
||||||
|
### host library, 64-bit ####################################
|
||||||
|
$(call emugl-begin-host-static-library,lib64GLESv2_dec)
|
||||||
|
$(call emugl-import, lib64OpenglCodecCommon lib64OpenglOsUtils)
|
||||||
|
$(call emugl-gen-decoder,$(EMUGL_PATH)/system/GLESv2_enc,gl2)
|
||||||
|
|
||||||
|
# For gl2_types.h !
|
||||||
|
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/system/GLESv2_enc)
|
||||||
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||||
|
|
||||||
|
$(call emugl-export,CFLAGS,$(host_common_debug_CFLAGS) -m64)
|
||||||
|
|
||||||
LOCAL_SRC_FILES := GL2Decoder.cpp
|
LOCAL_SRC_FILES := GL2Decoder.cpp
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,28 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
### EGL host implementation ########################
|
host_OS_SRCS :=
|
||||||
$(call emugl-begin-host-shared-library,libEGL_translator)
|
host_common_LDLIBS :=
|
||||||
$(call emugl-import,libGLcommon)
|
|
||||||
|
|
||||||
OS_SRCS:=
|
|
||||||
|
|
||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
OS_SRCS = EglX11Api.cpp
|
host_OS_SRCS = EglX11Api.cpp
|
||||||
LOCAL_LDLIBS += -lX11 -lGL -ldl -lpthread
|
host_common_LDLIBS += -lX11 -lGL -ldl -lpthread
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HOST_OS),darwin)
|
ifeq ($(HOST_OS),darwin)
|
||||||
OS_SRCS = EglMacApi.cpp \
|
host_OS_SRCS = EglMacApi.cpp \
|
||||||
MacNative.m \
|
MacNative.m \
|
||||||
MacPixelFormatsAttribs.m
|
MacPixelFormatsAttribs.m
|
||||||
|
|
||||||
LOCAL_LDLIBS += -Wl,-framework,AppKit
|
host_common_LDLIBS += -Wl,-framework,AppKit
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HOST_OS),windows)
|
ifeq ($(HOST_OS),windows)
|
||||||
OS_SRCS = EglWindowsApi.cpp
|
host_OS_SRCS = EglWindowsApi.cpp
|
||||||
LOCAL_LDLIBS += -lopengl32 -lgdi32
|
host_common_LDLIBS += -lopengl32 -lgdi32
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
host_common_SRC_FILES := \
|
||||||
$(OS_SRCS) \
|
$(host_OS_SRCS) \
|
||||||
ThreadInfo.cpp \
|
ThreadInfo.cpp \
|
||||||
EglImp.cpp \
|
EglImp.cpp \
|
||||||
EglConfig.cpp \
|
EglConfig.cpp \
|
||||||
@@ -40,5 +37,21 @@ LOCAL_SRC_FILES := \
|
|||||||
EglDisplay.cpp \
|
EglDisplay.cpp \
|
||||||
ClientAPIExts.cpp
|
ClientAPIExts.cpp
|
||||||
|
|
||||||
|
### EGL host implementation ########################
|
||||||
|
$(call emugl-begin-host-shared-library,libEGL_translator)
|
||||||
|
$(call emugl-import,libGLcommon)
|
||||||
|
|
||||||
|
LOCAL_LDLIBS += $(host_common_LDLIBS)
|
||||||
|
LOCAL_SRC_FILES := $(host_common_SRC_FILES)
|
||||||
|
|
||||||
|
$(call emugl-end-module)
|
||||||
|
|
||||||
|
### EGL host implementation, 64-bit ########################
|
||||||
|
$(call emugl-begin-host-shared-library,lib64EGL_translator)
|
||||||
|
$(call emugl-import,lib64GLcommon)
|
||||||
|
|
||||||
|
LOCAL_LDLIBS += $(host_common_LDLIBS) -m64
|
||||||
|
LOCAL_SRC_FILES := $(host_common_SRC_FILES)
|
||||||
|
|
||||||
$(call emugl-end-module)
|
$(call emugl-end-module)
|
||||||
|
|
||||||
|
|||||||
@@ -183,16 +183,8 @@ static __translator_getGLESIfaceFunc loadIfaces(const char* libName){
|
|||||||
return func;
|
return func;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#define LIB_GLES_CM_NAME EMUGL_LIBNAME("GLES_CM_translator")
|
||||||
#define LIB_GLES_CM_NAME "libGLES_CM_translator"
|
#define LIB_GLES_V2_NAME EMUGL_LIBNAME("GLES_V2_translator")
|
||||||
#define LIB_GLES_V2_NAME "libGLES_V2_translator"
|
|
||||||
#elif __linux__
|
|
||||||
#define LIB_GLES_CM_NAME "libGLES_CM_translator.so"
|
|
||||||
#define LIB_GLES_V2_NAME "libGLES_V2_translator.so"
|
|
||||||
#elif __APPLE__
|
|
||||||
#define LIB_GLES_CM_NAME "libGLES_CM_translator.dylib"
|
|
||||||
#define LIB_GLES_V2_NAME "libGLES_V2_translator.dylib"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay display, EGLint *major, EGLint *minor) {
|
EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay display, EGLint *major, EGLint *minor) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,28 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
|
host_common_SRC_FILES := \
|
||||||
|
GLEScmImp.cpp \
|
||||||
|
GLEScmUtils.cpp \
|
||||||
|
GLEScmContext.cpp \
|
||||||
|
GLEScmValidate.cpp
|
||||||
|
|
||||||
|
|
||||||
### GLES_CM host implementation (On top of OpenGL) ########################
|
### GLES_CM host implementation (On top of OpenGL) ########################
|
||||||
$(call emugl-begin-host-shared-library,libGLES_CM_translator)
|
$(call emugl-begin-host-shared-library,libGLES_CM_translator)
|
||||||
|
|
||||||
$(call emugl-import,libGLcommon)
|
$(call emugl-import,libGLcommon)
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := $(host_common_SRC_FILES)
|
||||||
GLEScmImp.cpp \
|
|
||||||
GLEScmUtils.cpp \
|
$(call emugl-end-module)
|
||||||
GLEScmContext.cpp \
|
|
||||||
GLEScmValidate.cpp
|
|
||||||
|
### GLES_CM host implementation, 64-bit ########################
|
||||||
|
$(call emugl-begin-host-shared-library,lib64GLES_CM_translator)
|
||||||
|
|
||||||
|
$(call emugl-import,lib64GLcommon)
|
||||||
|
|
||||||
|
LOCAL_LDLIBS += -m64
|
||||||
|
LOCAL_SRC_FILES := $(host_common_SRC_FILES)
|
||||||
|
|
||||||
$(call emugl-end-module)
|
$(call emugl-end-module)
|
||||||
|
|||||||
@@ -1,14 +1,27 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
### GLES_CM host implementation (On top of OpenGL) ########################
|
host_common_SRC_FILES := \
|
||||||
|
GLESv2Imp.cpp \
|
||||||
|
GLESv2Context.cpp \
|
||||||
|
GLESv2Validate.cpp \
|
||||||
|
ShaderParser.cpp \
|
||||||
|
ProgramData.cpp
|
||||||
|
|
||||||
|
|
||||||
|
### GLES_V2 host implementation (On top of OpenGL) ########################
|
||||||
$(call emugl-begin-host-shared-library,libGLES_V2_translator)
|
$(call emugl-begin-host-shared-library,libGLES_V2_translator)
|
||||||
$(call emugl-import, libGLcommon)
|
$(call emugl-import, libGLcommon)
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := $(host_common_SRC_FILES)
|
||||||
GLESv2Imp.cpp \
|
|
||||||
GLESv2Context.cpp \
|
$(call emugl-end-module)
|
||||||
GLESv2Validate.cpp \
|
|
||||||
ShaderParser.cpp \
|
|
||||||
ProgramData.cpp
|
### GLES_V2 host implementation, 64-bit ##############################
|
||||||
|
$(call emugl-begin-host-shared-library,lib64GLES_V2_translator)
|
||||||
|
$(call emugl-import, lib64GLcommon)
|
||||||
|
|
||||||
|
LOCAL_LDLIBS += -m64
|
||||||
|
LOCAL_SRC_FILES := $(host_common_SRC_FILES)
|
||||||
|
|
||||||
$(call emugl-end-module)
|
$(call emugl-end-module)
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
### EGL host implementation ########################
|
host_common_SRC_FILES := \
|
||||||
$(call emugl-begin-host-static-library,libGLcommon)
|
|
||||||
|
|
||||||
$(call emugl-import,libOpenglOsUtils)
|
|
||||||
|
|
||||||
translator_path := $(LOCAL_PATH)/..
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
GLDispatch.cpp \
|
GLDispatch.cpp \
|
||||||
GLutils.cpp \
|
GLutils.cpp \
|
||||||
GLEScontext.cpp \
|
GLEScontext.cpp \
|
||||||
@@ -22,20 +15,47 @@ LOCAL_SRC_FILES := \
|
|||||||
objectNameManager.cpp \
|
objectNameManager.cpp \
|
||||||
FramebufferData.cpp
|
FramebufferData.cpp
|
||||||
|
|
||||||
|
host_GL_COMMON_LINKER_FLAGS :=
|
||||||
|
host_common_LDLIBS :=
|
||||||
|
host_common_LDFLAGS :=
|
||||||
|
|
||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
# $(call emugl-export,LDFLAGS,-Wl,--whole-archive)
|
# host_common_LDFLAGS += -Wl,--whole-archive
|
||||||
$(call emugl-export,LDLIBS,-lGL -ldl)
|
host_common_LDLIBS += -lGL -ldl
|
||||||
GL_COMMON_LINKER_FLAGS := -Wl,-Bsymbolic
|
host_common_LDFLAGS += -Wl,-Bsymbolic
|
||||||
$(call emugl-export,LDFLAGS,$(GL_COMMON_LINKER_FLAGS))
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HOST_OS),windows)
|
ifeq ($(HOST_OS),windows)
|
||||||
$(call emugl-export,LDLIBS,-lopengl32 -lgdi32)
|
host_common_LDLIBS += -lopengl32 -lgdi32
|
||||||
GL_COMMON_LINKER_FLAGS := -Wl,--add-stdcall-alias
|
host_common_LDFLAGS += -Wl,--add-stdcall-alias
|
||||||
$(call emugl-export,LDFLAGS,$(GL_COMMON_LINKER_FLAGS))
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
### EGL host implementation ########################
|
||||||
|
|
||||||
|
$(call emugl-begin-host-static-library,libGLcommon)
|
||||||
|
|
||||||
|
$(call emugl-import,libOpenglOsUtils)
|
||||||
|
translator_path := $(LOCAL_PATH)/..
|
||||||
|
LOCAL_SRC_FILES := $(host_common_SRC_FILES)
|
||||||
|
$(call emugl-export,LDLIBS,$(host_common_LDLIBS))
|
||||||
|
$(call emugl-export,LDFLAGS,$(host_common_LDFLAGS))
|
||||||
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)/../include $(EMUGL_PATH)/shared)
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)/../include $(EMUGL_PATH)/shared)
|
||||||
$(call emugl-export,STATIC_LIBRARIES, libcutils libutils liblog)
|
$(call emugl-export,STATIC_LIBRARIES, libcutils libutils liblog)
|
||||||
|
|
||||||
$(call emugl-end-module)
|
$(call emugl-end-module)
|
||||||
|
|
||||||
|
|
||||||
|
### EGL host implementation, 64-bit ################
|
||||||
|
|
||||||
|
$(call emugl-begin-host-static-library,lib64GLcommon)
|
||||||
|
|
||||||
|
$(call emugl-import,lib64OpenglOsUtils)
|
||||||
|
translator_path := $(LOCAL_PATH)/..
|
||||||
|
LOCAL_SRC_FILES := $(host_common_SRC_FILES)
|
||||||
|
$(call emugl-export,LDLIBS,$(host_common_LDLIBS))
|
||||||
|
$(call emugl-export,LDFLAGS,$(host_common_LDFLAGS))
|
||||||
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)/../include $(EMUGL_PATH)/shared)
|
||||||
|
$(call emugl-export,STATIC_LIBRARIES, lib64cutils lib64utils lib64log)
|
||||||
|
|
||||||
|
$(call emugl-end-module)
|
||||||
|
|||||||
@@ -1,28 +1,24 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
### libOpenglRender #################################################
|
host_OS_SRCS :=
|
||||||
$(call emugl-begin-host-shared-library,libOpenglRender)
|
host_common_LDLIBS :=
|
||||||
|
|
||||||
$(call emugl-import,libGLESv1_dec libGLESv2_dec lib_renderControl_dec libOpenglCodecCommon libOpenglOsUtils)
|
|
||||||
|
|
||||||
OS_SRCS:=
|
|
||||||
|
|
||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
OS_SRCS = NativeLinuxSubWindow.cpp
|
host_OS_SRCS = NativeLinuxSubWindow.cpp
|
||||||
LOCAL_LDLIBS += -lX11
|
host_common_LDLIBS += -lX11
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HOST_OS),darwin)
|
ifeq ($(HOST_OS),darwin)
|
||||||
OS_SRCS = NativeMacSubWindow.m
|
host_OS_SRCS = NativeMacSubWindow.m
|
||||||
LOCAL_LDLIBS += -Wl,-framework,AppKit
|
host_common_LDLIBS += -Wl,-framework,AppKit
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HOST_OS),windows)
|
ifeq ($(HOST_OS),windows)
|
||||||
OS_SRCS = NativeWindowsSubWindow.cpp
|
host_OS_SRCS = NativeWindowsSubWindow.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
host_common_SRC_FILES := \
|
||||||
$(OS_SRCS) \
|
$(host_OS_SRCS) \
|
||||||
render_api.cpp \
|
render_api.cpp \
|
||||||
ColorBuffer.cpp \
|
ColorBuffer.cpp \
|
||||||
EGLDispatch.cpp \
|
EGLDispatch.cpp \
|
||||||
@@ -38,6 +34,20 @@ LOCAL_SRC_FILES := \
|
|||||||
ReadBuffer.cpp \
|
ReadBuffer.cpp \
|
||||||
RenderServer.cpp
|
RenderServer.cpp
|
||||||
|
|
||||||
|
host_common_CFLAGS :=
|
||||||
|
|
||||||
|
#For gl debbuging
|
||||||
|
#host_common_CFLAGS += -DCHECK_GL_ERROR
|
||||||
|
|
||||||
|
|
||||||
|
### host libOpenglRender #################################################
|
||||||
|
$(call emugl-begin-host-shared-library,libOpenglRender)
|
||||||
|
|
||||||
|
$(call emugl-import,libGLESv1_dec libGLESv2_dec lib_renderControl_dec libOpenglCodecCommon libOpenglOsUtils)
|
||||||
|
|
||||||
|
LOCAL_LDLIBS += $(host_common_LDLIBS)
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := $(host_common_SRC_FILES)
|
||||||
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/host/include)
|
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/host/include)
|
||||||
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||||
|
|
||||||
@@ -46,7 +56,28 @@ LOCAL_C_INCLUDES += $(EMUGL_PATH)/host/libs/Translator/include
|
|||||||
|
|
||||||
LOCAL_STATIC_LIBRARIES += libutils liblog
|
LOCAL_STATIC_LIBRARIES += libutils liblog
|
||||||
|
|
||||||
#For gl debbuging
|
$(call emugl-export,CFLAGS,$(host_common_CFLAGS))
|
||||||
#$(call emugl-export,CFLAGS,-DCHECK_GL_ERROR)
|
|
||||||
|
$(call emugl-end-module)
|
||||||
|
|
||||||
|
|
||||||
|
### host libOpenglRender, 64-bit #########################################
|
||||||
|
$(call emugl-begin-host-shared-library,lib64OpenglRender)
|
||||||
|
|
||||||
|
$(call emugl-import,lib64GLESv1_dec lib64GLESv2_dec lib64_renderControl_dec lib64OpenglCodecCommon lib64OpenglOsUtils)
|
||||||
|
|
||||||
|
#LOCAL_LDFLAGS += -m64 # adding -m64 here doesn't work, because it somehow appear BEFORE -m32 in command-line.
|
||||||
|
LOCAL_LDLIBS += $(host_common_LDLIBS) -m64 # Put -m64 it in LOCAL_LDLIBS instead.
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := $(host_common_SRC_FILES)
|
||||||
|
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/host/include)
|
||||||
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||||
|
|
||||||
|
# use Translator's egl/gles headers
|
||||||
|
LOCAL_C_INCLUDES += $(EMUGL_PATH)/host/libs/Translator/include
|
||||||
|
|
||||||
|
LOCAL_STATIC_LIBRARIES += lib64utils lib64log
|
||||||
|
|
||||||
|
$(call emugl-export,CFLAGS,$(host_common_CFLAGS) -m64)
|
||||||
|
|
||||||
$(call emugl-end-module)
|
$(call emugl-end-module)
|
||||||
|
|||||||
@@ -20,13 +20,7 @@
|
|||||||
|
|
||||||
EGLDispatch s_egl;
|
EGLDispatch s_egl;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#define DEFAULT_EGL_LIB EMUGL_LIBNAME("EGL_translator")
|
||||||
#define DEFAULT_EGL_LIB "libEGL_translator"
|
|
||||||
#elif defined(__APPLE__)
|
|
||||||
#define DEFAULT_EGL_LIB "libEGL_translator.dylib"
|
|
||||||
#else
|
|
||||||
#define DEFAULT_EGL_LIB "libEGL_translator.so"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool init_egl_dispatch()
|
bool init_egl_dispatch()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,13 +24,7 @@ int s_gl2_enabled;
|
|||||||
|
|
||||||
static osUtils::dynLibrary *s_gles2_lib = NULL;
|
static osUtils::dynLibrary *s_gles2_lib = NULL;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#define DEFAULT_GLES_V2_LIB EMUGL_LIBNAME("GLES_V2_translator")
|
||||||
#define DEFAULT_GLES_V2_LIB "libGLES_V2_translator"
|
|
||||||
#elif defined(__APPLE__)
|
|
||||||
#define DEFAULT_GLES_V2_LIB "libGLES_V2_translator.dylib"
|
|
||||||
#else
|
|
||||||
#define DEFAULT_GLES_V2_LIB "libGLES_V2_translator.so"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// This function is called only once during initialiation before
|
// This function is called only once during initialiation before
|
||||||
|
|||||||
@@ -27,13 +27,7 @@ static osUtils::dynLibrary *s_gles_lib = NULL;
|
|||||||
// any thread has been created - hence it should NOT be thread safe.
|
// any thread has been created - hence it should NOT be thread safe.
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifdef _WIN32
|
#define DEFAULT_GLES_CM_LIB EMUGL_LIBNAME("GLES_CM_translator")
|
||||||
#define DEFAULT_GLES_CM_LIB "libGLES_CM_translator"
|
|
||||||
#elif defined(__APPLE__)
|
|
||||||
#define DEFAULT_GLES_CM_LIB "libGLES_CM_translator.dylib"
|
|
||||||
#else
|
|
||||||
#define DEFAULT_GLES_CM_LIB "libGLES_CM_translator.so"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool init_gl_dispatch()
|
bool init_gl_dispatch()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,19 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
|
|
||||||
|
### host library ############################################
|
||||||
$(call emugl-begin-host-static-library,lib_renderControl_dec)
|
$(call emugl-begin-host-static-library,lib_renderControl_dec)
|
||||||
$(call emugl-import,libOpenglCodecCommon)
|
$(call emugl-import,libOpenglCodecCommon)
|
||||||
$(call emugl-gen-decoder,$(EMUGL_PATH)/system/renderControl_enc,renderControl)
|
$(call emugl-gen-decoder,$(EMUGL_PATH)/system/renderControl_enc,renderControl)
|
||||||
# For renderControl_types.h
|
# For renderControl_types.h
|
||||||
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/system/renderControl_enc)
|
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/system/renderControl_enc)
|
||||||
$(call emugl-end-module)
|
$(call emugl-end-module)
|
||||||
|
|
||||||
|
### host library, 64-bit ####################################
|
||||||
|
$(call emugl-begin-host-static-library,lib64_renderControl_dec)
|
||||||
|
$(call emugl-import,lib64OpenglCodecCommon)
|
||||||
|
$(call emugl-gen-decoder,$(EMUGL_PATH)/system/renderControl_enc,renderControl)
|
||||||
|
# For renderControl_types.h
|
||||||
|
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/system/renderControl_enc)
|
||||||
|
$(call emugl-export,CFLAGS,-m64)
|
||||||
|
$(call emugl-end-module)
|
||||||
|
|||||||
@@ -11,6 +11,15 @@ commonSources := \
|
|||||||
TcpStream.cpp \
|
TcpStream.cpp \
|
||||||
TimeUtils.cpp
|
TimeUtils.cpp
|
||||||
|
|
||||||
|
host_commonSources := $(commonSources)
|
||||||
|
|
||||||
|
ifeq ($(HOST_OS),windows)
|
||||||
|
host_commonSources += Win32PipeStream.cpp
|
||||||
|
else
|
||||||
|
host_commonSources += UnixStream.cpp
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
### CodecCommon guest ##############################################
|
### CodecCommon guest ##############################################
|
||||||
$(call emugl-begin-static-library,libOpenglCodecCommon)
|
$(call emugl-begin-static-library,libOpenglCodecCommon)
|
||||||
|
|
||||||
@@ -22,18 +31,24 @@ $(call emugl-export,SHARED_LIBRARIES,libcutils libutils)
|
|||||||
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||||
$(call emugl-end-module)
|
$(call emugl-end-module)
|
||||||
|
|
||||||
|
|
||||||
### OpenglCodecCommon host ##############################################
|
### OpenglCodecCommon host ##############################################
|
||||||
$(call emugl-begin-host-static-library,libOpenglCodecCommon)
|
$(call emugl-begin-host-static-library,libOpenglCodecCommon)
|
||||||
|
|
||||||
LOCAL_SRC_FILES := $(commonSources)
|
LOCAL_SRC_FILES := $(host_commonSources)
|
||||||
|
|
||||||
ifeq ($(HOST_OS),windows)
|
|
||||||
LOCAL_SRC_FILES += Win32PipeStream.cpp
|
|
||||||
else
|
|
||||||
LOCAL_SRC_FILES += UnixStream.cpp
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(call emugl-export,STATIC_LIBRARIES,libcutils)
|
$(call emugl-export,STATIC_LIBRARIES,libcutils)
|
||||||
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||||
$(call emugl-end-module)
|
$(call emugl-end-module)
|
||||||
|
|
||||||
|
|
||||||
|
### OpenglCodecCommon host, 64-bit #########################################
|
||||||
|
$(call emugl-begin-host-static-library,lib64OpenglCodecCommon)
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := $(host_commonSources)
|
||||||
|
|
||||||
|
$(call emugl-export,STATIC_LIBRARIES,lib64cutils)
|
||||||
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||||
|
$(call emugl-export,CFLAGS,-m64)
|
||||||
|
$(call emugl-end-module)
|
||||||
|
|
||||||
|
|||||||
@@ -21,28 +21,37 @@ $(call emugl-end-module)
|
|||||||
|
|
||||||
|
|
||||||
### Host library ##############################################
|
### Host library ##############################################
|
||||||
|
|
||||||
|
host_common_SRC_FILES := osDynLibrary.cpp
|
||||||
|
host_common_LDLIBS :=
|
||||||
|
|
||||||
|
ifeq ($(HOST_OS),windows)
|
||||||
|
host_common_SRC_FILES += \
|
||||||
|
osProcessWin.cpp \
|
||||||
|
osThreadWin.cpp
|
||||||
|
host_common_LDLIBS += -lws2_32 -lpsapi
|
||||||
|
else
|
||||||
|
host_common_SRC_FILES += \
|
||||||
|
osProcessUnix.cpp \
|
||||||
|
osThreadUnix.cpp
|
||||||
|
host_common_LDLIBS += -ldl
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(HOST_OS),linux)
|
||||||
|
host_common_LDLIBS += -lpthread -lrt
|
||||||
|
endif
|
||||||
|
|
||||||
|
### 32-bit host library ####
|
||||||
$(call emugl-begin-host-static-library,libOpenglOsUtils)
|
$(call emugl-begin-host-static-library,libOpenglOsUtils)
|
||||||
|
|
||||||
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||||
|
LOCAL_SRC_FILES = $(host_common_SRC_FILES)
|
||||||
LOCAL_SRC_FILES := osDynLibrary.cpp
|
$(call emugl-export,LDLIBS,$(host_common_LDLIBS))
|
||||||
|
$(call emugl-end-module)
|
||||||
ifeq ($(HOST_OS),windows)
|
|
||||||
LOCAL_SRC_FILES += \
|
### 64-bit host library ####
|
||||||
osProcessWin.cpp \
|
$(call emugl-begin-host-static-library,lib64OpenglOsUtils)
|
||||||
osThreadWin.cpp
|
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||||
|
LOCAL_SRC_FILES = $(host_common_SRC_FILES)
|
||||||
$(call emugl-export,LDLIBS,-lws2_32 -lpsapi)
|
$(call emugl-export,LDLIBS,$(host_common_LDLIBS))
|
||||||
else
|
$(call emugl-export,CFLAGS,-m64)
|
||||||
LOCAL_SRC_FILES += \
|
|
||||||
osProcessUnix.cpp \
|
|
||||||
osThreadUnix.cpp
|
|
||||||
|
|
||||||
$(call emugl-export,LDLIBS,-ldl)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(HOST_OS),linux)
|
|
||||||
$(call emugl-export,LDLIBS,-lpthread -lrt)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(call emugl-end-module)
|
$(call emugl-end-module)
|
||||||
|
|||||||
@@ -45,4 +45,27 @@ private:
|
|||||||
|
|
||||||
} // of namespace osUtils
|
} // of namespace osUtils
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Macro to compose emugl shared library name under various OS and bitness
|
||||||
|
// eg.
|
||||||
|
// on x86_64, EMUGL_LIBNAME("foo") --> "lib64foo.so"
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
# define DLL_EXTENSION "" // _WIN32 LoadLibrary only accept name w/o .dll extension
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
# define DLL_EXTENSION ".dylib"
|
||||||
|
#else
|
||||||
|
# define DLL_EXTENSION ".so"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__x86_64__)
|
||||||
|
# define EMUGL_LIBNAME(name) "lib64" name DLL_EXTENSION
|
||||||
|
#elif defined(__i386__)
|
||||||
|
# define EMUGL_LIBNAME(name) "lib" name DLL_EXTENSION
|
||||||
|
#else
|
||||||
|
/* This header is included by target w/o using EMUGL_LIBNAME(). Don't #error, leave it undefined */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user