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)
|
||||
|
||||
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-import, libOpenglCodecCommon libOpenglOsUtils)
|
||||
@@ -12,8 +20,24 @@ LOCAL_SRC_FILES := GLDecoder.cpp
|
||||
# for gl_types.h !
|
||||
$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/system/GLESv1_enc)
|
||||
|
||||
#For gl debbuging
|
||||
#$(call emugl-export,CFLAGS,-DCHECK_GL_ERROR)
|
||||
#$(call emugl-export,CFLAGS,-DDEBUG_PRINTOUT)
|
||||
$(call emugl-export,CFLAGS,$(host_common_debug_CFLAGS))
|
||||
|
||||
$(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)
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
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-import, libOpenglCodecCommon libOpenglOsUtils)
|
||||
$(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,$(LOCAL_PATH))
|
||||
|
||||
#For gl debbuging
|
||||
#$(call emugl-export,CFLAGS,-DCHECK_GL_ERROR)
|
||||
#$(call emugl-export,CFLAGS,-DDEBUG_PRINTOUT)
|
||||
$(call emugl-export,CFLAGS,$(host_common_debug_CFLAGS))
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -1,31 +1,28 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
### EGL host implementation ########################
|
||||
$(call emugl-begin-host-shared-library,libEGL_translator)
|
||||
$(call emugl-import,libGLcommon)
|
||||
|
||||
OS_SRCS:=
|
||||
host_OS_SRCS :=
|
||||
host_common_LDLIBS :=
|
||||
|
||||
ifeq ($(HOST_OS),linux)
|
||||
OS_SRCS = EglX11Api.cpp
|
||||
LOCAL_LDLIBS += -lX11 -lGL -ldl -lpthread
|
||||
host_OS_SRCS = EglX11Api.cpp
|
||||
host_common_LDLIBS += -lX11 -lGL -ldl -lpthread
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_OS),darwin)
|
||||
OS_SRCS = EglMacApi.cpp \
|
||||
host_OS_SRCS = EglMacApi.cpp \
|
||||
MacNative.m \
|
||||
MacPixelFormatsAttribs.m
|
||||
|
||||
LOCAL_LDLIBS += -Wl,-framework,AppKit
|
||||
host_common_LDLIBS += -Wl,-framework,AppKit
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_OS),windows)
|
||||
OS_SRCS = EglWindowsApi.cpp
|
||||
LOCAL_LDLIBS += -lopengl32 -lgdi32
|
||||
host_OS_SRCS = EglWindowsApi.cpp
|
||||
host_common_LDLIBS += -lopengl32 -lgdi32
|
||||
endif
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(OS_SRCS) \
|
||||
host_common_SRC_FILES := \
|
||||
$(host_OS_SRCS) \
|
||||
ThreadInfo.cpp \
|
||||
EglImp.cpp \
|
||||
EglConfig.cpp \
|
||||
@@ -40,5 +37,21 @@ LOCAL_SRC_FILES := \
|
||||
EglDisplay.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)
|
||||
|
||||
|
||||
@@ -183,16 +183,8 @@ static __translator_getGLESIfaceFunc loadIfaces(const char* libName){
|
||||
return func;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#define LIB_GLES_CM_NAME "libGLES_CM_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
|
||||
#define LIB_GLES_CM_NAME EMUGL_LIBNAME("GLES_CM_translator")
|
||||
#define LIB_GLES_V2_NAME EMUGL_LIBNAME("GLES_V2_translator")
|
||||
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay display, EGLint *major, EGLint *minor) {
|
||||
|
||||
|
||||
@@ -1,14 +1,28 @@
|
||||
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) ########################
|
||||
$(call emugl-begin-host-shared-library,libGLES_CM_translator)
|
||||
|
||||
$(call emugl-import,libGLcommon)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
GLEScmImp.cpp \
|
||||
GLEScmUtils.cpp \
|
||||
GLEScmContext.cpp \
|
||||
GLEScmValidate.cpp
|
||||
LOCAL_SRC_FILES := $(host_common_SRC_FILES)
|
||||
|
||||
$(call emugl-end-module)
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
@@ -1,14 +1,27 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
### GLES_CM host implementation (On top of OpenGL) ########################
|
||||
$(call emugl-begin-host-shared-library,libGLES_V2_translator)
|
||||
$(call emugl-import, libGLcommon)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
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-import, libGLcommon)
|
||||
|
||||
LOCAL_SRC_FILES := $(host_common_SRC_FILES)
|
||||
|
||||
$(call emugl-end-module)
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
### 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 := \
|
||||
GLDispatch.cpp \
|
||||
GLutils.cpp \
|
||||
GLEScontext.cpp \
|
||||
@@ -22,20 +15,47 @@ LOCAL_SRC_FILES := \
|
||||
objectNameManager.cpp \
|
||||
FramebufferData.cpp
|
||||
|
||||
host_GL_COMMON_LINKER_FLAGS :=
|
||||
host_common_LDLIBS :=
|
||||
host_common_LDFLAGS :=
|
||||
|
||||
ifeq ($(HOST_OS),linux)
|
||||
# $(call emugl-export,LDFLAGS,-Wl,--whole-archive)
|
||||
$(call emugl-export,LDLIBS,-lGL -ldl)
|
||||
GL_COMMON_LINKER_FLAGS := -Wl,-Bsymbolic
|
||||
$(call emugl-export,LDFLAGS,$(GL_COMMON_LINKER_FLAGS))
|
||||
# host_common_LDFLAGS += -Wl,--whole-archive
|
||||
host_common_LDLIBS += -lGL -ldl
|
||||
host_common_LDFLAGS += -Wl,-Bsymbolic
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_OS),windows)
|
||||
$(call emugl-export,LDLIBS,-lopengl32 -lgdi32)
|
||||
GL_COMMON_LINKER_FLAGS := -Wl,--add-stdcall-alias
|
||||
$(call emugl-export,LDFLAGS,$(GL_COMMON_LINKER_FLAGS))
|
||||
host_common_LDLIBS += -lopengl32 -lgdi32
|
||||
host_common_LDFLAGS += -Wl,--add-stdcall-alias
|
||||
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,STATIC_LIBRARIES, libcutils libutils liblog)
|
||||
|
||||
$(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)
|
||||
|
||||
### libOpenglRender #################################################
|
||||
$(call emugl-begin-host-shared-library,libOpenglRender)
|
||||
|
||||
$(call emugl-import,libGLESv1_dec libGLESv2_dec lib_renderControl_dec libOpenglCodecCommon libOpenglOsUtils)
|
||||
|
||||
OS_SRCS:=
|
||||
host_OS_SRCS :=
|
||||
host_common_LDLIBS :=
|
||||
|
||||
ifeq ($(HOST_OS),linux)
|
||||
OS_SRCS = NativeLinuxSubWindow.cpp
|
||||
LOCAL_LDLIBS += -lX11
|
||||
host_OS_SRCS = NativeLinuxSubWindow.cpp
|
||||
host_common_LDLIBS += -lX11
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_OS),darwin)
|
||||
OS_SRCS = NativeMacSubWindow.m
|
||||
LOCAL_LDLIBS += -Wl,-framework,AppKit
|
||||
host_OS_SRCS = NativeMacSubWindow.m
|
||||
host_common_LDLIBS += -Wl,-framework,AppKit
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_OS),windows)
|
||||
OS_SRCS = NativeWindowsSubWindow.cpp
|
||||
host_OS_SRCS = NativeWindowsSubWindow.cpp
|
||||
endif
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(OS_SRCS) \
|
||||
host_common_SRC_FILES := \
|
||||
$(host_OS_SRCS) \
|
||||
render_api.cpp \
|
||||
ColorBuffer.cpp \
|
||||
EGLDispatch.cpp \
|
||||
@@ -38,6 +34,20 @@ LOCAL_SRC_FILES := \
|
||||
ReadBuffer.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,$(LOCAL_PATH))
|
||||
|
||||
@@ -46,7 +56,28 @@ LOCAL_C_INCLUDES += $(EMUGL_PATH)/host/libs/Translator/include
|
||||
|
||||
LOCAL_STATIC_LIBRARIES += libutils liblog
|
||||
|
||||
#For gl debbuging
|
||||
#$(call emugl-export,CFLAGS,-DCHECK_GL_ERROR)
|
||||
$(call emugl-export,CFLAGS,$(host_common_CFLAGS))
|
||||
|
||||
$(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)
|
||||
|
||||
@@ -20,13 +20,7 @@
|
||||
|
||||
EGLDispatch s_egl;
|
||||
|
||||
#ifdef _WIN32
|
||||
#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
|
||||
#define DEFAULT_EGL_LIB EMUGL_LIBNAME("EGL_translator")
|
||||
|
||||
bool init_egl_dispatch()
|
||||
{
|
||||
|
||||
@@ -24,13 +24,7 @@ int s_gl2_enabled;
|
||||
|
||||
static osUtils::dynLibrary *s_gles2_lib = NULL;
|
||||
|
||||
#ifdef _WIN32
|
||||
#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
|
||||
#define DEFAULT_GLES_V2_LIB EMUGL_LIBNAME("GLES_V2_translator")
|
||||
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifdef _WIN32
|
||||
#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
|
||||
#define DEFAULT_GLES_CM_LIB EMUGL_LIBNAME("GLES_CM_translator")
|
||||
|
||||
bool init_gl_dispatch()
|
||||
{
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
|
||||
### host library ############################################
|
||||
$(call emugl-begin-host-static-library,lib_renderControl_dec)
|
||||
$(call emugl-import,libOpenglCodecCommon)
|
||||
$(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-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 \
|
||||
TimeUtils.cpp
|
||||
|
||||
host_commonSources := $(commonSources)
|
||||
|
||||
ifeq ($(HOST_OS),windows)
|
||||
host_commonSources += Win32PipeStream.cpp
|
||||
else
|
||||
host_commonSources += UnixStream.cpp
|
||||
endif
|
||||
|
||||
|
||||
### CodecCommon guest ##############################################
|
||||
$(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-end-module)
|
||||
|
||||
|
||||
### OpenglCodecCommon host ##############################################
|
||||
$(call emugl-begin-host-static-library,libOpenglCodecCommon)
|
||||
|
||||
LOCAL_SRC_FILES := $(commonSources)
|
||||
|
||||
ifeq ($(HOST_OS),windows)
|
||||
LOCAL_SRC_FILES += Win32PipeStream.cpp
|
||||
else
|
||||
LOCAL_SRC_FILES += UnixStream.cpp
|
||||
endif
|
||||
LOCAL_SRC_FILES := $(host_commonSources)
|
||||
|
||||
$(call emugl-export,STATIC_LIBRARIES,libcutils)
|
||||
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||
$(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 ##############################################
|
||||
$(call emugl-begin-host-static-library,libOpenglOsUtils)
|
||||
|
||||
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||
|
||||
LOCAL_SRC_FILES := osDynLibrary.cpp
|
||||
host_common_SRC_FILES := osDynLibrary.cpp
|
||||
host_common_LDLIBS :=
|
||||
|
||||
ifeq ($(HOST_OS),windows)
|
||||
LOCAL_SRC_FILES += \
|
||||
host_common_SRC_FILES += \
|
||||
osProcessWin.cpp \
|
||||
osThreadWin.cpp
|
||||
|
||||
$(call emugl-export,LDLIBS,-lws2_32 -lpsapi)
|
||||
host_common_LDLIBS += -lws2_32 -lpsapi
|
||||
else
|
||||
LOCAL_SRC_FILES += \
|
||||
host_common_SRC_FILES += \
|
||||
osProcessUnix.cpp \
|
||||
osThreadUnix.cpp
|
||||
|
||||
$(call emugl-export,LDLIBS,-ldl)
|
||||
host_common_LDLIBS += -ldl
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_OS),linux)
|
||||
$(call emugl-export,LDLIBS,-lpthread -lrt)
|
||||
host_common_LDLIBS += -lpthread -lrt
|
||||
endif
|
||||
|
||||
### 32-bit host library ####
|
||||
$(call emugl-begin-host-static-library,libOpenglOsUtils)
|
||||
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||
LOCAL_SRC_FILES = $(host_common_SRC_FILES)
|
||||
$(call emugl-export,LDLIBS,$(host_common_LDLIBS))
|
||||
$(call emugl-end-module)
|
||||
|
||||
### 64-bit host library ####
|
||||
$(call emugl-begin-host-static-library,lib64OpenglOsUtils)
|
||||
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
|
||||
LOCAL_SRC_FILES = $(host_common_SRC_FILES)
|
||||
$(call emugl-export,LDLIBS,$(host_common_LDLIBS))
|
||||
$(call emugl-export,CFLAGS,-m64)
|
||||
$(call emugl-end-module)
|
||||
|
||||
@@ -45,4 +45,27 @@ private:
|
||||
|
||||
} // 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
|
||||
|
||||
Reference in New Issue
Block a user