Tomasz Figa | d703abf | 2014-09-27 16:19:59 +0200 | [diff] [blame] | 1 | # Mesa 3-D graphics library |
| 2 | # |
| 3 | # Copyright (C) 2014 Tomasz Figa <tomasz.figa@gmail.com> |
| 4 | # |
| 5 | # Permission is hereby granted, free of charge, to any person obtaining a |
| 6 | # copy of this software and associated documentation files (the "Software"), |
| 7 | # to deal in the Software without restriction, including without limitation |
| 8 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 9 | # and/or sell copies of the Software, and to permit persons to whom the |
| 10 | # Software is furnished to do so, subject to the following conditions: |
| 11 | # |
| 12 | # The above copyright notice and this permission notice shall be included |
| 13 | # in all copies or substantial portions of the Software. |
| 14 | # |
| 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 18 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 20 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 21 | # DEALINGS IN THE SOFTWARE. |
| 22 | |
| 23 | LOCAL_PATH := $(call my-dir) |
| 24 | |
| 25 | include $(LOCAL_PATH)/Makefile.sources |
| 26 | |
| 27 | # --------------------------------------- |
| 28 | # Build libmesa_util |
| 29 | # --------------------------------------- |
| 30 | |
| 31 | include $(CLEAR_VARS) |
| 32 | |
| 33 | LOCAL_SRC_FILES := \ |
Nicolai Hähnle | 601093f | 2017-06-30 11:57:06 +0200 | [diff] [blame] | 34 | $(MESA_UTIL_FILES) \ |
| 35 | $(XMLCONFIG_FILES) |
Tomasz Figa | d703abf | 2014-09-27 16:19:59 +0200 | [diff] [blame] | 36 | |
Mauro Rossi | be28183 | 2020-09-05 18:49:19 +0200 | [diff] [blame] | 37 | LOCAL_MODULE := libmesa_util |
Amit Pundir | 06247ea | 2021-02-25 13:41:17 +0530 | [diff] [blame] | 38 | LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD SPDX-license-identifier-MIT legacy_by_exception_only legacy_notice legacy_unencumbered |
| 39 | LOCAL_LICENSE_CONDITIONS := by_exception_only notice unencumbered |
| 40 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE |
Mauro Rossi | be28183 | 2020-09-05 18:49:19 +0200 | [diff] [blame] | 41 | |
| 42 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 43 | |
Amit Pundir | 06247ea | 2021-02-25 13:41:17 +0530 | [diff] [blame] | 44 | prebuilt_intermediates := $(MESA_TOP)/prebuilt-intermediates |
Mauro Rossi | be28183 | 2020-09-05 18:49:19 +0200 | [diff] [blame] | 45 | intermediates := $(call local-generated-sources-dir) |
| 46 | |
Tomasz Figa | d703abf | 2014-09-27 16:19:59 +0200 | [diff] [blame] | 47 | LOCAL_C_INCLUDES := \ |
Chih-Wei Huang | bfc0c23 | 2017-05-17 13:10:02 +0800 | [diff] [blame] | 48 | external/zlib \ |
Tomasz Figa | d703abf | 2014-09-27 16:19:59 +0200 | [diff] [blame] | 49 | $(MESA_TOP)/src/mesa \ |
Emil Velikov | 94cab35 | 2015-03-28 01:10:52 +0000 | [diff] [blame] | 50 | $(MESA_TOP)/src/mapi \ |
| 51 | $(MESA_TOP)/src/gallium/include \ |
Mauro Rossi | 09ab297 | 2019-11-15 23:54:52 +0100 | [diff] [blame] | 52 | $(MESA_TOP)/src/gallium/auxiliary \ |
Mauro Rossi | be28183 | 2020-09-05 18:49:19 +0200 | [diff] [blame] | 53 | $(MESA_TOP)/src/util/format \ |
| 54 | $(intermediates)/format |
Tomasz Figa | d703abf | 2014-09-27 16:19:59 +0200 | [diff] [blame] | 55 | |
Kishore Kadiyala | e1d8057 | 2019-03-11 11:23:03 +0200 | [diff] [blame] | 56 | # If Android version >=8 MESA should static link libexpat else should dynamic link |
| 57 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0) |
| 58 | LOCAL_STATIC_LIBRARIES := \ |
| 59 | libexpat |
| 60 | else |
Rob Herring | d0540d5 | 2017-07-31 10:42:10 -0500 | [diff] [blame] | 61 | LOCAL_SHARED_LIBRARIES := \ |
| 62 | libexpat |
Sumit Semwal | 444cc9e | 2019-02-18 20:46:30 +0530 | [diff] [blame] | 63 | endif |
Rob Herring | d0540d5 | 2017-07-31 10:42:10 -0500 | [diff] [blame] | 64 | |
Mauro Rossi | cc16113 | 2020-10-30 01:24:08 +0100 | [diff] [blame] | 65 | LOCAL_SHARED_LIBRARIES += liblog libsync |
Tomasz Figa | d703abf | 2014-09-27 16:19:59 +0200 | [diff] [blame] | 66 | |
| 67 | # Generated sources |
| 68 | |
Tapani Pälli | f444ac5 | 2017-08-01 14:23:00 +0300 | [diff] [blame] | 69 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates) |
| 70 | |
Nicolai Hähnle | 601093f | 2017-06-30 11:57:06 +0200 | [diff] [blame] | 71 | UTIL_GENERATED_SOURCES := $(addprefix $(intermediates)/,$(MESA_UTIL_GENERATED_FILES)) |
| 72 | LOCAL_GENERATED_SOURCES := $(UTIL_GENERATED_SOURCES) |
| 73 | |
Mauro Rossi | aa86611 | 2020-08-14 14:04:54 +0200 | [diff] [blame] | 74 | format_srgb_gen := $(LOCAL_PATH)/format_srgb.py |
Nicolai Hähnle | 601093f | 2017-06-30 11:57:06 +0200 | [diff] [blame] | 75 | |
Mauro Rossi | aa86611 | 2020-08-14 14:04:54 +0200 | [diff] [blame] | 76 | $(intermediates)/format_srgb.c: $(format_srgb_gen) |
Alistair Strachan | 5e07382 | 2018-09-19 15:33:29 -0700 | [diff] [blame] | 77 | @mkdir -p $(dir $@) |
Mauro Rossi | aa86611 | 2020-08-14 14:04:54 +0200 | [diff] [blame] | 78 | $(hide) $(MESA_PYTHON2) $(format_srgb_gen) $< > $@ |
Alistair Strachan | 5e07382 | 2018-09-19 15:33:29 -0700 | [diff] [blame] | 79 | |
Mauro Rossi | aa86611 | 2020-08-14 14:04:54 +0200 | [diff] [blame] | 80 | u_format_gen := $(LOCAL_PATH)/format/u_format_table.py |
| 81 | u_format_deps := $(LOCAL_PATH)/format/u_format.csv \ |
| 82 | $(LOCAL_PATH)/format/u_format_pack.py \ |
| 83 | $(LOCAL_PATH)/format/u_format_parse.py |
Nicolai Hähnle | 601093f | 2017-06-30 11:57:06 +0200 | [diff] [blame] | 84 | |
Mauro Rossi | aa86611 | 2020-08-14 14:04:54 +0200 | [diff] [blame] | 85 | $(intermediates)/format/u_format_pack.h: $(u_format_deps) |
| 86 | @mkdir -p $(dir $@) |
| 87 | $(hide) $(MESA_PYTHON2) $(u_format_gen) --header $< > $@ |
Sumit Semwal | 092675f | 2018-10-11 15:27:51 +0530 | [diff] [blame] | 88 | |
Mauro Rossi | aa86611 | 2020-08-14 14:04:54 +0200 | [diff] [blame] | 89 | $(intermediates)/format/u_format_table.c: $(u_format_deps) |
| 90 | @mkdir -p $(dir $@) |
| 91 | $(hide) $(MESA_PYTHON2) $(u_format_gen) $< > $@ |
Sumit Semwal | 092675f | 2018-10-11 15:27:51 +0530 | [diff] [blame] | 92 | |
Tomasz Figa | d703abf | 2014-09-27 16:19:59 +0200 | [diff] [blame] | 93 | include $(MESA_COMMON_MK) |
| 94 | include $(BUILD_STATIC_LIBRARY) |