1# Copyright © 2016 Intel Corporation 2# Copyright © 2016 Mauro Rossi <issor.oruam@gmail.com> 3# 4# Permission is hereby granted, free of charge, to any person obtaining a 5# copy of this software and associated documentation files (the "Software"), 6# to deal in the Software without restriction, including without limitation 7# the rights to use, copy, modify, merge, publish, distribute, sublicense, 8# and/or sell copies of the Software, and to permit persons to whom the 9# Software is furnished to do so, subject to the following conditions: 10# 11# The above copyright notice and this permission notice shall be included 12# in all copies or substantial portions of the Software. 13# 14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20# DEALINGS IN THE SOFTWARE. 21# 22 23# --------------------------------------- 24# libmesa_isl_gen* common variables 25# --------------------------------------- 26 27LIBISL_GENX_COMMON_INCLUDES := \ 28 $(MESA_TOP)/src/ \ 29 $(MESA_TOP)/src/gallium/include/ 30 31# --------------------------------------- 32# Build libmesa_isl_gen4 33# --------------------------------------- 34 35include $(CLEAR_VARS) 36 37LOCAL_MODULE := libmesa_isl_gen4 38LOCAL_LICENSE_KINDS := SPDX-license-identifier-ISC SPDX-license-identifier-MIT 39LOCAL_LICENSE_CONDITIONS := notice 40LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE 41 42LOCAL_SRC_FILES := $(ISL_GEN4_FILES) 43 44LOCAL_CFLAGS := -DGEN_VERSIONx10=40 45 46LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES) 47 48LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml 49 50include $(MESA_COMMON_MK) 51include $(BUILD_STATIC_LIBRARY) 52 53# --------------------------------------- 54# Build libmesa_isl_gen5 55# --------------------------------------- 56 57include $(CLEAR_VARS) 58 59LOCAL_MODULE := libmesa_isl_gen5 60LOCAL_LICENSE_KINDS := SPDX-license-identifier-ISC SPDX-license-identifier-MIT 61LOCAL_LICENSE_CONDITIONS := notice 62LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE 63 64LOCAL_SRC_FILES := $(ISL_GEN5_FILES) 65 66LOCAL_CFLAGS := -DGEN_VERSIONx10=50 67 68LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES) 69 70LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml 71 72include $(MESA_COMMON_MK) 73include $(BUILD_STATIC_LIBRARY) 74 75# --------------------------------------- 76# Build libmesa_isl_gen6 77# --------------------------------------- 78 79include $(CLEAR_VARS) 80 81LOCAL_MODULE := libmesa_isl_gen6 82LOCAL_LICENSE_KINDS := SPDX-license-identifier-ISC SPDX-license-identifier-MIT 83LOCAL_LICENSE_CONDITIONS := notice 84LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE 85 86LOCAL_SRC_FILES := $(ISL_GEN6_FILES) 87 88LOCAL_CFLAGS := -DGEN_VERSIONx10=60 89 90LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES) 91 92LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml 93 94include $(MESA_COMMON_MK) 95include $(BUILD_STATIC_LIBRARY) 96 97# --------------------------------------- 98# Build libmesa_isl_gen7 99# --------------------------------------- 100 101include $(CLEAR_VARS) 102 103LOCAL_MODULE := libmesa_isl_gen7 104LOCAL_LICENSE_KINDS := SPDX-license-identifier-ISC SPDX-license-identifier-MIT 105LOCAL_LICENSE_CONDITIONS := notice 106LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE 107 108LOCAL_SRC_FILES := $(ISL_GEN7_FILES) 109 110LOCAL_CFLAGS := -DGEN_VERSIONx10=70 111 112LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES) 113 114LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml 115 116include $(MESA_COMMON_MK) 117include $(BUILD_STATIC_LIBRARY) 118 119# --------------------------------------- 120# Build libmesa_isl_gen75 121# --------------------------------------- 122 123include $(CLEAR_VARS) 124 125LOCAL_MODULE := libmesa_isl_gen75 126LOCAL_LICENSE_KINDS := SPDX-license-identifier-ISC SPDX-license-identifier-MIT 127LOCAL_LICENSE_CONDITIONS := notice 128LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE 129 130LOCAL_SRC_FILES := $(ISL_GEN75_FILES) 131 132LOCAL_CFLAGS := -DGEN_VERSIONx10=75 133 134LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES) 135 136LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml 137 138include $(MESA_COMMON_MK) 139include $(BUILD_STATIC_LIBRARY) 140 141# --------------------------------------- 142# Build libmesa_isl_gen8 143# --------------------------------------- 144 145include $(CLEAR_VARS) 146 147LOCAL_MODULE := libmesa_isl_gen8 148LOCAL_LICENSE_KINDS := SPDX-license-identifier-ISC SPDX-license-identifier-MIT 149LOCAL_LICENSE_CONDITIONS := notice 150LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE 151 152LOCAL_SRC_FILES := $(ISL_GEN8_FILES) 153 154LOCAL_CFLAGS := -DGEN_VERSIONx10=80 155 156LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES) 157 158LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml 159 160include $(MESA_COMMON_MK) 161include $(BUILD_STATIC_LIBRARY) 162 163# --------------------------------------- 164# Build libmesa_isl_gen9 165# --------------------------------------- 166 167include $(CLEAR_VARS) 168 169LOCAL_MODULE := libmesa_isl_gen9 170LOCAL_LICENSE_KINDS := SPDX-license-identifier-ISC SPDX-license-identifier-MIT 171LOCAL_LICENSE_CONDITIONS := notice 172LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE 173 174LOCAL_SRC_FILES := $(ISL_GEN9_FILES) 175 176LOCAL_CFLAGS := -DGEN_VERSIONx10=90 177 178LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES) 179 180LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml 181 182include $(MESA_COMMON_MK) 183include $(BUILD_STATIC_LIBRARY) 184 185# --------------------------------------- 186# Build libmesa_isl_gen11 187# --------------------------------------- 188 189include $(CLEAR_VARS) 190 191LOCAL_MODULE := libmesa_isl_gen11 192LOCAL_LICENSE_KINDS := SPDX-license-identifier-ISC SPDX-license-identifier-MIT 193LOCAL_LICENSE_CONDITIONS := notice 194LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE 195 196LOCAL_SRC_FILES := $(ISL_GEN11_FILES) 197 198LOCAL_CFLAGS := -DGEN_VERSIONx10=110 199 200LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES) 201 202LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml 203 204include $(MESA_COMMON_MK) 205include $(BUILD_STATIC_LIBRARY) 206 207# --------------------------------------- 208# Build libmesa_isl_gen12 209# --------------------------------------- 210 211include $(CLEAR_VARS) 212 213LOCAL_MODULE := libmesa_isl_gen12 214LOCAL_LICENSE_KINDS := SPDX-license-identifier-ISC SPDX-license-identifier-MIT 215LOCAL_LICENSE_CONDITIONS := notice 216LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE 217 218LOCAL_SRC_FILES := $(ISL_GEN12_FILES) 219 220LOCAL_CFLAGS := -DGEN_VERSIONx10=120 221 222LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES) 223 224LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml 225 226include $(MESA_COMMON_MK) 227include $(BUILD_STATIC_LIBRARY) 228 229# --------------------------------------- 230# Build libmesa_isl_tiled_memcpy 231# --------------------------------------- 232 233include $(CLEAR_VARS) 234 235LOCAL_MODULE := libmesa_isl_tiled_memcpy 236LOCAL_LICENSE_KINDS := SPDX-license-identifier-ISC SPDX-license-identifier-MIT 237LOCAL_LICENSE_CONDITIONS := notice 238LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE 239 240LOCAL_C_INCLUDES := \ 241 $(MESA_TOP)/src/gallium/include \ 242 $(MESA_TOP)/src/mapi \ 243 $(MESA_TOP)/src/mesa 244 245LOCAL_SRC_FILES := $(ISL_TILED_MEMCPY_FILES) 246 247include $(MESA_COMMON_MK) 248include $(BUILD_STATIC_LIBRARY) 249 250# --------------------------------------- 251# Build libmesa_isl_tiled_memcpy_sse41 252# --------------------------------------- 253 254ifeq ($(ARCH_X86_HAVE_SSE4_1),true) 255include $(CLEAR_VARS) 256 257LOCAL_MODULE := libmesa_isl_tiled_memcpy_sse41 258LOCAL_LICENSE_KINDS := SPDX-license-identifier-ISC SPDX-license-identifier-MIT 259LOCAL_LICENSE_CONDITIONS := notice 260LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE 261 262LOCAL_C_INCLUDES := \ 263 $(MESA_TOP)/src/gallium/include \ 264 $(MESA_TOP)/src/mapi \ 265 $(MESA_TOP)/src/mesa 266 267LOCAL_SRC_FILES := $(ISL_TILED_MEMCPY_SSE41_FILES) 268 269LOCAL_CFLAGS += \ 270 -DUSE_SSE41 -msse4.1 -mstackrealign 271 272include $(MESA_COMMON_MK) 273include $(BUILD_STATIC_LIBRARY) 274endif 275 276# --------------------------------------- 277# Build libmesa_isl 278# --------------------------------------- 279 280include $(CLEAR_VARS) 281 282LOCAL_MODULE := libmesa_isl 283LOCAL_LICENSE_KINDS := SPDX-license-identifier-ISC SPDX-license-identifier-MIT 284LOCAL_LICENSE_CONDITIONS := notice 285LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE 286 287LOCAL_SRC_FILES := $(ISL_FILES) 288 289LOCAL_C_INCLUDES := \ 290 $(MESA_TOP)/src/gallium/include \ 291 $(MESA_TOP)/src/gallium/auxiliary \ 292 $(MESA_TOP)/src/mapi \ 293 $(MESA_TOP)/src/mesa \ 294 $(MESA_TOP)/src/intel 295 296LOCAL_EXPORT_C_INCLUDE_DIRS := $(MESA_TOP)/src/intel 297 298LOCAL_WHOLE_STATIC_LIBRARIES := \ 299 libmesa_isl_gen4 \ 300 libmesa_isl_gen5 \ 301 libmesa_isl_gen6 \ 302 libmesa_isl_gen7 \ 303 libmesa_isl_gen75 \ 304 libmesa_isl_gen8 \ 305 libmesa_isl_gen9 \ 306 libmesa_isl_gen11 \ 307 libmesa_isl_gen12 \ 308 libmesa_genxml \ 309 libmesa_isl_tiled_memcpy 310 311ifeq ($(ARCH_X86_HAVE_SSE4_1),true) 312LOCAL_CFLAGS += \ 313 -DUSE_SSE41 314LOCAL_WHOLE_STATIC_LIBRARIES += \ 315 libmesa_isl_tiled_memcpy_sse41 316endif 317 318# Autogenerated sources 319 320LOCAL_MODULE_CLASS := STATIC_LIBRARIES 321 322intermediates := $(call local-generated-sources-dir) 323prebuilt_intermediates := $(MESA_TOP)/prebuilt-intermediates 324 325LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, $(ISL_GENERATED_FILES)) 326 327$(intermediates)/isl/isl_format_layout.c: $(prebuilt_intermediates)/isl/isl_format_layout.c 328 @mkdir -p $(dir $@) 329 @cp -f $< $@ 330 331include $(MESA_COMMON_MK) 332include $(BUILD_STATIC_LIBRARY) 333