1# 2# Copyright (C) 2011 Intel Corporation 3# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> 4# Copyright (C) 2010-2011 LunarG 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 25LOCAL_PATH := $(call my-dir) 26 27# Import variables i965_FILES. 28include $(LOCAL_PATH)/Makefile.sources 29 30I965_PERGEN_COMMON_INCLUDES := \ 31 $(MESA_DRI_C_INCLUDES) \ 32 $(MESA_TOP)/src/intel \ 33 $(MESA_TOP)/include 34 35I965_PERGEN_SHARED_LIBRARIES := \ 36 $(MESA_DRI_SHARED_LIBRARIES) 37 38I965_PERGEN_STATIC_LIBRARIES := \ 39 libmesa_genxml \ 40 libmesa_nir 41 42I965_PERGEN_LIBS := \ 43 libmesa_i965_gen4 \ 44 libmesa_i965_gen45 \ 45 libmesa_i965_gen5 \ 46 libmesa_i965_gen6 \ 47 libmesa_i965_gen7 \ 48 libmesa_i965_gen75 \ 49 libmesa_i965_gen8 \ 50 libmesa_i965_gen9 \ 51 libmesa_i965_gen11 52 53# --------------------------------------- 54# Build libmesa_i965_gen4 55# --------------------------------------- 56 57include $(CLEAR_VARS) 58 59LOCAL_MODULE := libmesa_i965_gen4 60LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT 61LOCAL_LICENSE_CONDITIONS := notice 62LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../LICENSE 63 64LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) 65 66LOCAL_SRC_FILES := $(i965_gen4_FILES) 67 68LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) 69 70LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) 71 72LOCAL_CFLAGS := -DGEN_VERSIONx10=40 73 74include $(MESA_COMMON_MK) 75include $(BUILD_STATIC_LIBRARY) 76 77# --------------------------------------- 78# Build libmesa_i965_gen45 79# --------------------------------------- 80 81include $(CLEAR_VARS) 82 83LOCAL_MODULE := libmesa_i965_gen45 84LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT 85LOCAL_LICENSE_CONDITIONS := notice 86LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../LICENSE 87 88LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) 89 90LOCAL_SRC_FILES := $(i965_gen45_FILES) 91 92LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) 93 94LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) 95 96LOCAL_CFLAGS := -DGEN_VERSIONx10=45 97 98include $(MESA_COMMON_MK) 99include $(BUILD_STATIC_LIBRARY) 100 101# --------------------------------------- 102# Build libmesa_i965_gen5 103# --------------------------------------- 104 105include $(CLEAR_VARS) 106 107LOCAL_MODULE := libmesa_i965_gen5 108LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT 109LOCAL_LICENSE_CONDITIONS := notice 110LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../LICENSE 111 112LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) 113 114LOCAL_SRC_FILES := $(i965_gen5_FILES) 115 116LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) 117 118LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) 119 120LOCAL_CFLAGS := -DGEN_VERSIONx10=50 121 122include $(MESA_COMMON_MK) 123include $(BUILD_STATIC_LIBRARY) 124 125# --------------------------------------- 126# Build libmesa_i965_gen6 127# --------------------------------------- 128 129include $(CLEAR_VARS) 130 131LOCAL_MODULE := libmesa_i965_gen6 132LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT 133LOCAL_LICENSE_CONDITIONS := notice 134LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../LICENSE 135 136LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) 137 138LOCAL_SRC_FILES := $(i965_gen6_FILES) 139 140LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) 141 142LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) 143 144LOCAL_CFLAGS := -DGEN_VERSIONx10=60 145 146include $(MESA_COMMON_MK) 147include $(BUILD_STATIC_LIBRARY) 148 149# --------------------------------------- 150# Build libmesa_i965_gen7 151# --------------------------------------- 152 153include $(CLEAR_VARS) 154 155LOCAL_MODULE := libmesa_i965_gen7 156LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT 157LOCAL_LICENSE_CONDITIONS := notice 158LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../LICENSE 159 160LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) 161 162LOCAL_SRC_FILES := $(i965_gen7_FILES) 163 164LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) 165 166LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) 167 168LOCAL_CFLAGS := -DGEN_VERSIONx10=70 169 170include $(MESA_COMMON_MK) 171include $(BUILD_STATIC_LIBRARY) 172 173# --------------------------------------- 174# Build libmesa_i965_gen75 175# --------------------------------------- 176 177include $(CLEAR_VARS) 178 179LOCAL_MODULE := libmesa_i965_gen75 180LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT 181LOCAL_LICENSE_CONDITIONS := notice 182LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../LICENSE 183 184LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) 185 186LOCAL_SRC_FILES := $(i965_gen75_FILES) 187 188LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) 189 190LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) 191 192LOCAL_CFLAGS := -DGEN_VERSIONx10=75 193 194include $(MESA_COMMON_MK) 195include $(BUILD_STATIC_LIBRARY) 196 197# --------------------------------------- 198# Build libmesa_i965_gen8 199# --------------------------------------- 200 201include $(CLEAR_VARS) 202 203LOCAL_MODULE := libmesa_i965_gen8 204LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT 205LOCAL_LICENSE_CONDITIONS := notice 206LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../LICENSE 207 208LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) 209 210LOCAL_SRC_FILES := $(i965_gen8_FILES) 211 212LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) 213 214LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) 215 216LOCAL_CFLAGS := -DGEN_VERSIONx10=80 217 218include $(MESA_COMMON_MK) 219include $(BUILD_STATIC_LIBRARY) 220 221# --------------------------------------- 222# Build libmesa_i965_gen9 223# --------------------------------------- 224 225include $(CLEAR_VARS) 226 227LOCAL_MODULE := libmesa_i965_gen9 228LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT 229LOCAL_LICENSE_CONDITIONS := notice 230LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../LICENSE 231 232LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) 233 234LOCAL_SRC_FILES := $(i965_gen9_FILES) 235 236LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) 237 238LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) 239 240LOCAL_CFLAGS := -DGEN_VERSIONx10=90 241 242include $(MESA_COMMON_MK) 243include $(BUILD_STATIC_LIBRARY) 244 245# --------------------------------------- 246# Build libmesa_i965_gen11 247# --------------------------------------- 248 249include $(CLEAR_VARS) 250 251LOCAL_MODULE := libmesa_i965_gen11 252LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT 253LOCAL_LICENSE_CONDITIONS := notice 254LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../LICENSE 255 256LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES) 257 258LOCAL_SRC_FILES := $(i965_gen11_FILES) 259 260LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES) 261 262LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES) 263 264LOCAL_CFLAGS := -DGEN_VERSIONx10=110 265 266include $(MESA_COMMON_MK) 267include $(BUILD_STATIC_LIBRARY) 268 269# --------------------------------------- 270# Build i965_dri 271# --------------------------------------- 272 273include $(CLEAR_VARS) 274 275LOCAL_MODULE := i965_dri 276LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT 277LOCAL_LICENSE_CONDITIONS := notice 278LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../LICENSE 279LOCAL_MODULE_RELATIVE_PATH := $(MESA_DRI_MODULE_REL_PATH) 280LOCAL_LDFLAGS += $(MESA_DRI_LDFLAGS) 281 282LOCAL_CFLAGS := \ 283 $(MESA_DRI_CFLAGS) 284 285LOCAL_C_INCLUDES := \ 286 $(MESA_DRI_C_INCLUDES) \ 287 $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_glsl,,) \ 288 $(MESA_TOP)/include 289 290LOCAL_SRC_FILES := \ 291 $(i965_FILES) 292 293LOCAL_WHOLE_STATIC_LIBRARIES := \ 294 $(MESA_DRI_WHOLE_STATIC_LIBRARIES) \ 295 $(I965_PERGEN_LIBS) \ 296 libmesa_intel_dev \ 297 libmesa_intel_common \ 298 libmesa_isl \ 299 libmesa_blorp \ 300 libmesa_intel_compiler \ 301 libmesa_intel_perf 302 303ifeq ($(ARCH_X86_HAVE_SSE4_1),true) 304LOCAL_CFLAGS += \ 305 -DUSE_SSE41 306endif 307 308LOCAL_SHARED_LIBRARIES := \ 309 $(MESA_DRI_SHARED_LIBRARIES) 310 311LOCAL_GENERATED_SOURCES := \ 312 $(MESA_DRI_OPTIONS_H) \ 313 $(MESA_GEN_NIR_H) 314 315LOCAL_MODULE_CLASS := SHARED_LIBRARIES 316 317intermediates := $(call local-generated-sources-dir) 318 319LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \ 320 $(i965_oa_GENERATED_FILES)) 321 322i965_oa_xml_FILES := $(addprefix $(MESA_TOP)/src/mesa/drivers/dri/i965/, \ 323 $(i965_oa_xml_FILES)) 324 325$(intermediates)/brw_oa_metrics.c: .KATI_IMPLICIT_OUTPUTS := $(intermediates)/brw_oa_metrics.h 326$(intermediates)/brw_oa_metrics.c: $(LOCAL_PATH)/brw_oa.py $(i965_oa_xml_FILES) 327 @echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))" 328 @mkdir -p $(dir $@) 329 $(hide) $(MESA_PYTHON2) $< \ 330 --code=$@ \ 331 --header=$(call generated-sources-dir-for,SHARED_LIBRARIES,i965_dri,,)/brw_oa_metrics.h \ 332 $(i965_oa_xml_FILES) 333 334include $(MESA_COMMON_MK) 335include $(BUILD_SHARED_LIBRARY) 336