Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. # Mesa 3-D graphics library
  2. #
  3. # Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
  4. # Copyright (C) 2010-2011 LunarG Inc.
  5. #
  6. # Permission is hereby granted, free of charge, to any person obtaining a
  7. # copy of this software and associated documentation files (the "Software"),
  8. # to deal in the Software without restriction, including without limitation
  9. # the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10. # and/or sell copies of the Software, and to permit persons to whom the
  11. # Software is furnished to do so, subject to the following conditions:
  12. #
  13. # The above copyright notice and this permission notice shall be included
  14. # in all copies or substantial portions of the Software.
  15. #
  16. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  19. # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  21. # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  22. # DEALINGS IN THE SOFTWARE.
  23.  
  24. # Android.mk for libGLES_mesa
  25.  
  26. LOCAL_PATH := $(call my-dir)
  27.  
  28. # from Makefile
  29. SOURCES = \
  30.         eglapi.c \
  31.         eglarray.c \
  32.         eglconfig.c \
  33.         eglcontext.c \
  34.         eglcurrent.c \
  35.         egldisplay.c \
  36.         egldriver.c \
  37.         eglfallbacks.c \
  38.         eglglobals.c \
  39.         eglimage.c \
  40.         egllog.c \
  41.         eglmisc.c \
  42.         eglmode.c \
  43.         eglscreen.c \
  44.         eglstring.c \
  45.         eglsurface.c \
  46.         eglsync.c
  47.  
  48. # ---------------------------------------
  49. # Build libGLES_mesa
  50. # ---------------------------------------
  51.  
  52. include $(CLEAR_VARS)
  53.  
  54. LOCAL_SRC_FILES := $(SOURCES)
  55.  
  56. LOCAL_CFLAGS := \
  57.         -D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_ANDROID \
  58.         -D_EGL_DRIVER_SEARCH_DIR=\"/system/lib/egl\" \
  59.         -D_EGL_OS_UNIX=1
  60.  
  61. LOCAL_STATIC_LIBRARIES :=
  62.  
  63. LOCAL_SHARED_LIBRARIES := \
  64.         libglapi \
  65.         libdl \
  66.         libhardware \
  67.         liblog \
  68.         libcutils \
  69.         libgralloc_drm \
  70.  
  71. ifeq ($(shell echo "$(MESA_ANDROID_VERSION) >= 4.2" | bc),1)
  72. LOCAL_SHARED_LIBRARIES += libsync
  73. endif
  74.  
  75. # add libdrm if there are hardware drivers
  76. ifneq ($(MESA_GPU_DRIVERS),swrast)
  77. LOCAL_SHARED_LIBRARIES += libdrm
  78. endif
  79.  
  80. ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
  81. LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2
  82. LOCAL_STATIC_LIBRARIES += libmesa_egl_dri2
  83.  
  84. # require i915_dri and/or i965_dri
  85. LOCAL_REQUIRED_MODULES += \
  86.         $(addsuffix _dri, $(filter i915 i965, $(MESA_GPU_DRIVERS)))
  87. endif # MESA_BUILD_CLASSIC
  88.  
  89. ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
  90.  
  91. LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GALLIUM
  92.  
  93. gallium_DRIVERS :=
  94.  
  95. # swrast
  96. gallium_DRIVERS += libmesa_pipe_softpipe libmesa_winsys_sw_android
  97.  
  98. # i915g
  99. ifneq ($(filter i915g, $(MESA_GPU_DRIVERS)),)
  100. gallium_DRIVERS += libmesa_winsys_i915 libmesa_pipe_i915
  101. LOCAL_SHARED_LIBRARIES += libdrm_intel
  102. endif
  103.  
  104. # ilo
  105. ifneq ($(filter ilo, $(MESA_GPU_DRIVERS)),)
  106. gallium_DRIVERS += libmesa_winsys_intel libmesa_pipe_ilo
  107. LOCAL_SHARED_LIBRARIES += libdrm_intel
  108. endif
  109.  
  110. # nouveau
  111. ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),)
  112. gallium_DRIVERS += \
  113.         libmesa_winsys_nouveau \
  114.         libmesa_pipe_nvfx \
  115.         libmesa_pipe_nv50 \
  116.         libmesa_pipe_nvc0 \
  117.         libmesa_pipe_nouveau
  118. LOCAL_SHARED_LIBRARIES += libdrm_nouveau
  119. endif
  120.  
  121. # r300g/r600g/radeonsi
  122. ifneq ($(filter r300g r600g radeonsi, $(MESA_GPU_DRIVERS)),)
  123. gallium_DRIVERS += libmesa_winsys_radeon
  124. ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
  125. gallium_DRIVERS += libmesa_pipe_r300
  126. endif
  127. ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
  128. gallium_DRIVERS += libmesa_pipe_r600
  129. endif
  130. ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
  131. gallium_DRIVERS += libmesa_pipe_radeonsi
  132. endif
  133. endif
  134.  
  135. # vmwgfx
  136. ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),)
  137. gallium_DRIVERS += libmesa_winsys_svga libmesa_pipe_svga
  138. endif
  139.  
  140. #
  141. # Notes about the order here:
  142. #
  143. #  * libmesa_st_egl depends on libmesa_winsys_sw_android in $(gallium_DRIVERS)
  144. #  * libmesa_pipe_r300 in $(gallium_DRIVERS) depends on libmesa_st_mesa and
  145. #    libmesa_glsl
  146. #  * libmesa_st_mesa depends on libmesa_glsl
  147. #  * libmesa_glsl depends on libmesa_glsl_utils
  148. #
  149. LOCAL_STATIC_LIBRARIES := \
  150.         libmesa_egl_gallium \
  151.         libmesa_st_egl \
  152.         $(gallium_DRIVERS) \
  153.         libmesa_st_mesa \
  154.         libmesa_glsl \
  155.         libmesa_glsl_utils \
  156.         libmesa_gallium \
  157.         $(LOCAL_STATIC_LIBRARIES)
  158.  
  159. endif # MESA_BUILD_GALLIUM
  160.  
  161. LOCAL_MODULE := libGLES_mesa
  162. LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
  163.  
  164. include $(MESA_COMMON_MK)
  165. include $(BUILD_SHARED_LIBRARY)
  166.