• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2019 Collabora Ltd.
2#
3# Permission is hereby granted, free of charge, to any person obtaining a
4# copy of this software and associated documentation files (the "Software"),
5# to deal in the Software without restriction, including without limitation
6# the rights to use, copy, modify, merge, publish, distribute, sublicense,
7# and/or sell copies of the Software, and to permit persons to whom the
8# Software is furnished to do so, subject to the following conditions:
9#
10# The above copyright notice and this permission notice shall be included
11# in all copies or substantial portions of the Software.
12#
13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
16# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19# DEALINGS IN THE SOFTWARE.
20
21# build libpanfrost_bifrost_disasm
22include $(CLEAR_VARS)
23
24LOCAL_MODULE := libpanfrost_bifrost_disasm
25LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT
26LOCAL_LICENSE_CONDITIONS := notice
27LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE
28
29LOCAL_SRC_FILES := \
30	$(bifrost_disasm_FILES)
31
32LOCAL_C_INCLUDES := \
33	$(MESA_TOP)/include \
34	$(MESA_TOP)/src/compiler/nir/ \
35	$(MESA_TOP)/src/gallium/auxiliary/ \
36	$(MESA_TOP)/src/gallium/include/ \
37	$(MESA_TOP)/src/mapi/ \
38	$(MESA_TOP)/src/mesa/ \
39	$(MESA_TOP)/src/panfrost/bifrost/ \
40	$(MESA_TOP)/src/panfrost/include/
41
42LOCAL_EXPORT_C_INCLUDE_DIRS := \
43	$(MESA_TOP)/src/panfrost/bifrost/ \
44
45LOCAL_MODULE_CLASS := STATIC_LIBRARIES
46intermediates := $(call local-generated-sources-dir)
47prebuilt_intermediates := $(MESA_TOP)/prebuilt-intermediates
48
49LOCAL_GENERATED_SOURCES := \
50	$(intermediates)/bifrost_gen_disasm.c
51
52bifrost_gen_disasm_gen := $(LOCAL_PATH)/bifrost/gen_disasm.py
53bifrost_gen_disasm_deps := $(LOCAL_PATH)/bifrost/ISA.xml
54
55$(intermediates)/bifrost_gen_disasm.c: $(prebuilt_intermediates)/bifrost/bifrost_gen_disasm.c
56	@mkdir -p $(dir $@)
57	@cp -f $< $@
58
59include $(MESA_COMMON_MK)
60include $(BUILD_STATIC_LIBRARY)
61
62# build libpanfrost_bifrost
63include $(CLEAR_VARS)
64
65LOCAL_MODULE := libpanfrost_bifrost
66LOCAL_LICENSE_KINDS := SPDX-license-identifier-MIT
67LOCAL_LICENSE_CONDITIONS := notice
68LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE
69LOCAL_MODULE_CLASS := STATIC_LIBRARIES
70intermediates := $(call local-generated-sources-dir)
71prebuilt_intermediates := $(MESA_TOP)/prebuilt-intermediates
72
73LOCAL_SRC_FILES := \
74	$(bifrost_FILES)
75
76LOCAL_C_INCLUDES := \
77	$(MESA_TOP)/include \
78	$(MESA_TOP)/src/compiler/nir/ \
79	$(MESA_TOP)/src/gallium/auxiliary/ \
80	$(MESA_TOP)/src/gallium/include/ \
81	$(MESA_TOP)/src/mapi/ \
82	$(MESA_TOP)/src/mesa/ \
83	$(MESA_TOP)/src/panfrost/bifrost/ \
84	$(MESA_TOP)/src/panfrost/include/
85
86LOCAL_STATIC_LIBRARIES := \
87	libmesa_glsl \
88	libmesa_nir \
89	libmesa_st_mesa \
90	libpanfrost_lib
91
92LOCAL_GENERATED_SOURCES := \
93	$(intermediates)/bifrost_nir_algebraic.c \
94	$(intermediates)/bi_generated_pack.h \
95	$(MESA_GEN_GLSL_H)
96
97bifrost_nir_algebraic_gen := $(LOCAL_PATH)/bifrost/bifrost_nir_algebraic.py
98bifrost_nir_algebraic_deps := \
99	$(MESA_TOP)/src/compiler/nir/
100
101$(intermediates)/bifrost_nir_algebraic.c: $(prebuilt_intermediates)/bifrost/bifrost_nir_algebraic.c
102	@mkdir -p $(dir $@)
103	@cp -f $< $@
104
105bi_generated_pack_gen := $(LOCAL_PATH)/bifrost/gen_pack.py
106bi_generated_pack_deps := $(LOCAL_PATH)/bifrost/ISA.xml
107
108$(intermediates)/bi_generated_pack.h: $(prebuilt_intermediates)/bifrost/bi_generated_pack.h
109	@mkdir -p $(dir $@)
110	@cp -f $< $@
111
112LOCAL_EXPORT_C_INCLUDE_DIRS := \
113	$(MESA_TOP)/src/panfrost/bifrost/ \
114
115include $(MESA_COMMON_MK)
116include $(BUILD_STATIC_LIBRARY)
117