1848b8605Smrg# Mesa 3-D graphics library 2848b8605Smrg# 3848b8605Smrg# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com> 4848b8605Smrg# Copyright (C) 2010-2011 LunarG Inc. 5848b8605Smrg# 6848b8605Smrg# Permission is hereby granted, free of charge, to any person obtaining a 7848b8605Smrg# copy of this software and associated documentation files (the "Software"), 8848b8605Smrg# to deal in the Software without restriction, including without limitation 9848b8605Smrg# the rights to use, copy, modify, merge, publish, distribute, sublicense, 10848b8605Smrg# and/or sell copies of the Software, and to permit persons to whom the 11848b8605Smrg# Software is furnished to do so, subject to the following conditions: 12848b8605Smrg# 13848b8605Smrg# The above copyright notice and this permission notice shall be included 14848b8605Smrg# in all copies or substantial portions of the Software. 15848b8605Smrg# 16848b8605Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17848b8605Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18848b8605Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19848b8605Smrg# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20848b8605Smrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21848b8605Smrg# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22848b8605Smrg# DEALINGS IN THE SOFTWARE. 23848b8605Smrg 24848b8605SmrgLOCAL_PATH := $(call my-dir) 25848b8605Smrg 26848b8605Smrg# get C_SOURCES and GENERATED_SOURCES 27848b8605Smrginclude $(LOCAL_PATH)/Makefile.sources 28848b8605Smrg 29848b8605Smrginclude $(CLEAR_VARS) 30848b8605Smrg 31b8e80941SmrgLOCAL_SRC_FILES := \ 32b8e80941Smrg $(C_SOURCES) \ 33b8e80941Smrg $(NIR_SOURCES) \ 34b8e80941Smrg $(RENDERONLY_SOURCES) \ 35b8e80941Smrg $(VL_STUB_SOURCES) 36b8e80941Smrg 37b8e80941Smrgifeq ($(USE_LIBBACKTRACE),true) 38b8e80941Smrg LOCAL_SRC_FILES += util/u_debug_stack_android.cpp 39b8e80941Smrgendif 40848b8605Smrg 41848b8605SmrgLOCAL_C_INCLUDES := \ 42848b8605Smrg $(GALLIUM_TOP)/auxiliary/util \ 43b8e80941Smrg $(MESA_TOP)/src/util 44b8e80941Smrg 45b8e80941Smrgifeq ($(MESA_ENABLE_LLVM),true) 46b8e80941SmrgLOCAL_SRC_FILES += \ 47b8e80941Smrg $(GALLIVM_SOURCES) 48b8e80941Smrg$(call mesa-build-with-llvm) 49b8e80941Smrgendif 50b8e80941Smrg 51b8e80941SmrgLOCAL_CPPFLAGS += -std=c++11 52848b8605Smrg 53b8e80941Smrg# We need libmesa_nir to get NIR's generated include directories. 54848b8605SmrgLOCAL_MODULE := libmesa_gallium 55b8e80941SmrgLOCAL_STATIC_LIBRARIES += libmesa_nir 56b8e80941Smrg 57b8e80941SmrgLOCAL_WHOLE_STATIC_LIBRARIES += cpufeatures 58b8e80941SmrgLOCAL_CFLAGS += -DHAS_ANDROID_CPUFEATURES 59848b8605Smrg 60848b8605Smrg# generate sources 61848b8605SmrgLOCAL_MODULE_CLASS := STATIC_LIBRARIES 62b8e80941Smrgintermediates := $(call local-generated-sources-dir) 63848b8605SmrgLOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(GENERATED_SOURCES)) 64848b8605Smrg 65848b8605Smrg$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2) 66848b8605Smrg$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@ 67848b8605Smrg 68848b8605Smrg$(intermediates)/indices/u_indices_gen.c \ 69848b8605Smrg$(intermediates)/indices/u_unfilled_gen.c \ 70848b8605Smrg$(intermediates)/util/u_format_srgb.c: $(intermediates)/%.c: $(LOCAL_PATH)/%.py 71848b8605Smrg $(transform-generated-source) 72848b8605Smrg 73848b8605Smrg$(intermediates)/util/u_format_table.c: $(intermediates)/%.c: $(LOCAL_PATH)/%.py $(LOCAL_PATH)/util/u_format.csv 74848b8605Smrg $(transform-generated-source) 75848b8605Smrg 76b8e80941SmrgLOCAL_GENERATED_SOURCES += $(MESA_GEN_NIR_H) 77b8e80941Smrg 78848b8605Smrginclude $(GALLIUM_COMMON_MK) 79848b8605Smrginclude $(BUILD_STATIC_LIBRARY) 80