i965/fs: Pass key->render_to_fbo via src1 of FS_OPCODE_DDY_*.
[mesa.git] / src / egl / main / Android.mk
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 include $(LOCAL_PATH)/Makefile.sources
29
30 SOURCES := \
31 ${LIBEGL_C_FILES}
32
33 # ---------------------------------------
34 # Build libGLES_mesa
35 # ---------------------------------------
36
37 include $(CLEAR_VARS)
38
39 LOCAL_SRC_FILES := $(SOURCES)
40
41 LOCAL_CFLAGS := \
42 -D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_ANDROID \
43 -D_EGL_DRIVER_SEARCH_DIR=\"/system/lib/egl\" \
44 -D_EGL_OS_UNIX=1
45
46 LOCAL_STATIC_LIBRARIES :=
47
48 LOCAL_SHARED_LIBRARIES := \
49 libglapi \
50 libdl \
51 libhardware \
52 liblog \
53 libcutils \
54 libgralloc_drm \
55
56 ifeq ($(shell echo "$(MESA_ANDROID_VERSION) >= 4.2" | bc),1)
57 LOCAL_SHARED_LIBRARIES += libsync
58 endif
59
60 # add libdrm if there are hardware drivers
61 ifneq ($(MESA_GPU_DRIVERS),swrast)
62 LOCAL_SHARED_LIBRARIES += libdrm
63 endif
64
65 ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
66 LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2
67 LOCAL_STATIC_LIBRARIES += libmesa_egl_dri2
68
69 # require i915_dri and/or i965_dri
70 LOCAL_REQUIRED_MODULES += \
71 $(addsuffix _dri, $(filter i915 i965, $(MESA_GPU_DRIVERS)))
72 endif # MESA_BUILD_CLASSIC
73
74 ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
75
76 LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GALLIUM
77
78 gallium_DRIVERS :=
79
80 # swrast
81 gallium_DRIVERS += libmesa_pipe_softpipe libmesa_winsys_sw_android
82
83 # freedreno
84 ifneq ($(filter freedreno, $(MESA_GPU_DRIVERS)),)
85 gallium_DRIVERS += libmesa_winsys_freedreno libmesa_pipe_freedreno
86 LOCAL_SHARED_LIBRARIES += libdrm_freedreno
87 endif
88
89 # i915g
90 ifneq ($(filter i915g, $(MESA_GPU_DRIVERS)),)
91 gallium_DRIVERS += libmesa_winsys_i915 libmesa_pipe_i915
92 LOCAL_SHARED_LIBRARIES += libdrm_intel
93 endif
94
95 # ilo
96 ifneq ($(filter ilo, $(MESA_GPU_DRIVERS)),)
97 gallium_DRIVERS += libmesa_winsys_intel libmesa_pipe_ilo
98 LOCAL_SHARED_LIBRARIES += libdrm_intel
99 endif
100
101 # nouveau
102 ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),)
103 gallium_DRIVERS += libmesa_winsys_nouveau libmesa_pipe_nouveau
104 LOCAL_SHARED_LIBRARIES += libdrm_nouveau
105 LOCAL_SHARED_LIBRARIES += libstlport
106 endif
107
108 # r300g/r600g/radeonsi
109 ifneq ($(filter r300g r600g radeonsi, $(MESA_GPU_DRIVERS)),)
110 gallium_DRIVERS += libmesa_winsys_radeon
111 LOCAL_SHARED_LIBRARIES += libdrm_radeon
112 ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
113 gallium_DRIVERS += libmesa_pipe_r300
114 endif # r300g
115 ifneq ($(filter r600g radeonsi, $(MESA_GPU_DRIVERS)),)
116 ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
117 gallium_DRIVERS += libmesa_pipe_r600
118 LOCAL_SHARED_LIBRARIES += libstlport
119 endif # r600g
120 ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
121 gallium_DRIVERS += libmesa_pipe_radeonsi
122 endif # radeonsi
123 gallium_DRIVERS += libmesa_pipe_radeon
124 endif # r600g || radeonsi
125 endif # r300g || r600g || radeonsi
126
127 # vmwgfx
128 ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),)
129 gallium_DRIVERS += libmesa_winsys_svga libmesa_pipe_svga
130 endif
131
132 #
133 # Notes about the order here:
134 #
135 # * libmesa_st_egl depends on libmesa_winsys_sw_android in $(gallium_DRIVERS)
136 # * libmesa_pipe_r300 in $(gallium_DRIVERS) depends on libmesa_st_mesa and
137 # libmesa_glsl
138 # * libmesa_st_mesa depends on libmesa_glsl
139 # * libmesa_glsl depends on libmesa_glsl_utils
140 #
141 LOCAL_STATIC_LIBRARIES := \
142 libmesa_egl_gallium \
143 libmesa_st_egl \
144 $(gallium_DRIVERS) \
145 libmesa_st_mesa \
146 libmesa_util \
147 libmesa_glsl \
148 libmesa_glsl_utils \
149 libmesa_gallium \
150 $(LOCAL_STATIC_LIBRARIES)
151
152 endif # MESA_BUILD_GALLIUM
153
154 LOCAL_STATIC_LIBRARIES := \
155 $(LOCAL_STATIC_LIBRARIES) \
156 libmesa_loader
157
158 LOCAL_MODULE := libGLES_mesa
159 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
160
161 include $(MESA_COMMON_MK)
162 include $(BUILD_SHARED_LIBRARY)