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:
Andrew Hsieh
2012-03-22 13:27:43 -07:00
committed by Android Git Automerger
15 changed files with 291 additions and 123 deletions

View File

@@ -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 \
MacNative.m \
MacPixelFormatsAttribs.m
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)

View File

@@ -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) {

View File

@@ -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)

View File

@@ -1,14 +1,27 @@
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-import, libGLcommon)
LOCAL_SRC_FILES := \
GLESv2Imp.cpp \
GLESv2Context.cpp \
GLESv2Validate.cpp \
ShaderParser.cpp \
ProgramData.cpp
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)

View File

@@ -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)