1 # Mesa 3-D graphics library
3 # Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
4 # Copyright (C) 2010-2011 LunarG Inc.
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:
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
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.
24 # Android.mk for libGLES_mesa
26 LOCAL_PATH := $(call my-dir)
48 # ---------------------------------------
50 # ---------------------------------------
54 LOCAL_SRC_FILES := $(SOURCES)
57 -D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_ANDROID \
58 -D_EGL_DRIVER_SEARCH_DIR=\"/system/lib/egl\" \
61 LOCAL_STATIC_LIBRARIES :=
63 LOCAL_SHARED_LIBRARIES := \
70 # add libdrm if there are hardware drivers
71 ifneq ($(MESA_GPU_DRIVERS),swrast)
72 LOCAL_SHARED_LIBRARIES += libdrm
75 ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
76 LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2
77 LOCAL_STATIC_LIBRARIES += libmesa_egl_dri2
79 # require i915_dri and/or i965_dri
80 LOCAL_REQUIRED_MODULES += \
81 $(addsuffix _dri, $(filter i915 i965, $(MESA_GPU_DRIVERS)))
84 ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
86 LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GALLIUM
91 gallium_DRIVERS += libmesa_pipe_softpipe libmesa_winsys_sw_android
94 ifneq ($(filter i915g, $(MESA_GPU_DRIVERS)),)
95 gallium_DRIVERS += libmesa_winsys_i915 libmesa_pipe_i915
96 LOCAL_SHARED_LIBRARIES += libdrm_intel
100 ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),)
102 libmesa_winsys_nouveau \
107 LOCAL_SHARED_LIBRARIES += libdrm_nouveau
111 ifneq ($(filter r300g r600g, $(MESA_GPU_DRIVERS)),)
112 gallium_DRIVERS += libmesa_winsys_radeon
113 ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
114 gallium_DRIVERS += libmesa_pipe_r300
116 ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
117 gallium_DRIVERS += libmesa_pipe_r600
122 ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),)
123 gallium_DRIVERS += libmesa_winsys_svga libmesa_pipe_svga
127 # Notes about the order here:
129 # * libmesa_st_egl depends on libmesa_winsys_sw_android in $(gallium_DRIVERS)
130 # * libmesa_pipe_r300 in $(gallium_DRIVERS) depends on libmesa_st_mesa and
132 # * libmesa_st_mesa depends on libmesa_glsl
133 # * libmesa_glsl depends on libmesa_glsl_utils
135 LOCAL_STATIC_LIBRARIES := \
136 libmesa_egl_gallium \
143 $(LOCAL_STATIC_LIBRARIES)
145 endif # MESA_BUILD_GALLIUM
147 LOCAL_MODULE := libGLES_mesa
148 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
150 include $(MESA_COMMON_MK)
151 include $(BUILD_SHARED_LIBRARY)