1b8e80941Smrg# Mesa 3-D graphics library
2b8e80941Smrg#
3b8e80941Smrg# Copyright (C) 2018 Intel Corporation
4b8e80941Smrg#
5b8e80941Smrg# Permission is hereby granted, free of charge, to any person obtaining a
6b8e80941Smrg# copy of this software and associated documentation files (the "Software"),
7b8e80941Smrg# to deal in the Software without restriction, including without limitation
8b8e80941Smrg# the rights to use, copy, modify, merge, publish, distribute, sublicense,
9b8e80941Smrg# and/or sell copies of the Software, and to permit persons to whom the
10b8e80941Smrg# Software is furnished to do so, subject to the following conditions:
11b8e80941Smrg#
12b8e80941Smrg# The above copyright notice and this permission notice shall be included
13b8e80941Smrg# in all copies or substantial portions of the Software.
14b8e80941Smrg#
15b8e80941Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16b8e80941Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17b8e80941Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18b8e80941Smrg# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19b8e80941Smrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20b8e80941Smrg# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21b8e80941Smrg# DEALINGS IN THE SOFTWARE.
22b8e80941Smrg
23b8e80941SmrgLOCAL_PATH := $(call my-dir)
24b8e80941Smrg
25b8e80941Smrg# get C_SOURCES
26b8e80941Smrginclude $(LOCAL_PATH)/Makefile.sources
27b8e80941Smrg
28b8e80941Smrginclude $(CLEAR_VARS)
29b8e80941Smrg
30b8e80941SmrgLIBIRIS_SRC_FILES := \
31b8e80941Smrg	iris_blorp.c \
32b8e80941Smrg	iris_state.c
33b8e80941Smrg
34b8e80941SmrgLIBIRIS_STATIC_LIBS := \
35b8e80941Smrg	libmesa_nir
36b8e80941Smrg
37b8e80941SmrgIRIS_COMMON_INCLUDES := \
38b8e80941Smrg	$(MESA_TOP)/src/mapi \
39b8e80941Smrg	$(MESA_TOP)/src/mesa \
40b8e80941Smrg	$(MESA_TOP)/src/gallium/include \
41b8e80941Smrg	$(MESA_TOP)/src/gallium/auxiliary
42b8e80941Smrg
43b8e80941Smrg#
44b8e80941Smrg# libiris for gen8
45b8e80941Smrg#
46b8e80941Smrg
47b8e80941Smrginclude $(CLEAR_VARS)
48b8e80941SmrgLOCAL_MODULE := libmesa_iris_gen8
49b8e80941SmrgLOCAL_MODULE_CLASS := STATIC_LIBRARIES
50b8e80941Smrg
51b8e80941SmrgLOCAL_SRC_FILES := $(LIBIRIS_SRC_FILES)
52b8e80941SmrgLOCAL_CFLAGS := -DGEN_VERSIONx10=80
53b8e80941Smrg
54b8e80941SmrgLOCAL_C_INCLUDES := $(IRIS_COMMON_INCLUDES)
55b8e80941Smrg
56b8e80941SmrgLOCAL_STATIC_LIBRARIES := $(LIBIRIS_STATIC_LIBS)
57b8e80941Smrg
58b8e80941SmrgLOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml
59b8e80941Smrg
60b8e80941Smrginclude $(MESA_COMMON_MK)
61b8e80941Smrginclude $(BUILD_STATIC_LIBRARY)
62b8e80941Smrg
63b8e80941Smrg#
64b8e80941Smrg# libiris for gen9
65b8e80941Smrg#
66b8e80941Smrg
67b8e80941Smrginclude $(CLEAR_VARS)
68b8e80941SmrgLOCAL_MODULE := libmesa_iris_gen9
69b8e80941SmrgLOCAL_MODULE_CLASS := STATIC_LIBRARIES
70b8e80941Smrg
71b8e80941SmrgLOCAL_SRC_FILES := $(LIBIRIS_SRC_FILES)
72b8e80941SmrgLOCAL_CFLAGS := -DGEN_VERSIONx10=90
73b8e80941Smrg
74b8e80941SmrgLOCAL_C_INCLUDES := $(IRIS_COMMON_INCLUDES)
75b8e80941Smrg
76b8e80941SmrgLOCAL_STATIC_LIBRARIES := $(LIBIRIS_STATIC_LIBS)
77b8e80941Smrg
78b8e80941SmrgLOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml
79b8e80941Smrg
80b8e80941Smrginclude $(MESA_COMMON_MK)
81b8e80941Smrginclude $(BUILD_STATIC_LIBRARY)
82b8e80941Smrg
83b8e80941Smrg#
84b8e80941Smrg# libiris for gen10
85b8e80941Smrg#
86b8e80941Smrg
87b8e80941Smrginclude $(CLEAR_VARS)
88b8e80941SmrgLOCAL_MODULE := libmesa_iris_gen10
89b8e80941SmrgLOCAL_MODULE_CLASS := STATIC_LIBRARIES
90b8e80941Smrg
91b8e80941SmrgLOCAL_SRC_FILES := $(LIBIRIS_SRC_FILES)
92b8e80941SmrgLOCAL_CFLAGS := -DGEN_VERSIONx10=100
93b8e80941Smrg
94b8e80941SmrgLOCAL_C_INCLUDES := $(IRIS_COMMON_INCLUDES)
95b8e80941Smrg
96b8e80941SmrgLOCAL_STATIC_LIBRARIES := $(LIBIRIS_STATIC_LIBS)
97b8e80941Smrg
98b8e80941SmrgLOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml
99b8e80941Smrg
100b8e80941Smrginclude $(MESA_COMMON_MK)
101b8e80941Smrginclude $(BUILD_STATIC_LIBRARY)
102b8e80941Smrg
103b8e80941Smrg#
104b8e80941Smrg# libiris for gen11
105b8e80941Smrg#
106b8e80941Smrg
107b8e80941Smrginclude $(CLEAR_VARS)
108b8e80941SmrgLOCAL_MODULE := libmesa_iris_gen11
109b8e80941SmrgLOCAL_MODULE_CLASS := STATIC_LIBRARIES
110b8e80941Smrg
111b8e80941SmrgLOCAL_SRC_FILES := $(LIBIRIS_SRC_FILES)
112b8e80941SmrgLOCAL_CFLAGS := -DGEN_VERSIONx10=110
113b8e80941Smrg
114b8e80941SmrgLOCAL_C_INCLUDES := $(IRIS_COMMON_INCLUDES)
115b8e80941Smrg
116b8e80941SmrgLOCAL_STATIC_LIBRARIES := $(LIBIRIS_STATIC_LIBS)
117b8e80941Smrg
118b8e80941SmrgLOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml
119b8e80941Smrg
120b8e80941Smrginclude $(MESA_COMMON_MK)
121b8e80941Smrginclude $(BUILD_STATIC_LIBRARY)
122b8e80941Smrg
123b8e80941Smrg
124b8e80941Smrg###########################################################
125b8e80941Smrginclude $(CLEAR_VARS)
126b8e80941Smrg
127b8e80941SmrgLOCAL_MODULE := libmesa_pipe_iris
128b8e80941SmrgLOCAL_MODULE_CLASS := STATIC_LIBRARIES
129b8e80941Smrg
130b8e80941Smrgintermediates := $(call local-generated-sources-dir)
131b8e80941Smrg
132b8e80941SmrgLOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/iris/,$(GENERATED_SOURCES))
133b8e80941Smrg
134b8e80941SmrgGEN_DRIINFO_INPUTS := \
135b8e80941Smrg        $(MESA_TOP)/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h \
136b8e80941Smrg        $(LOCAL_PATH)/driinfo_iris.h
137b8e80941Smrg
138b8e80941SmrgMERGE_DRIINFO := $(MESA_TOP)/src/util/merge_driinfo.py
139b8e80941Smrg
140b8e80941Smrg$(intermediates)/iris/iris_driinfo.h: $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS)
141b8e80941Smrg	@mkdir -p $(dir $@)
142b8e80941Smrg	@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
143b8e80941Smrg	$(hide) $(MESA_PYTHON2) $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS) > $@ || ($(RM) $@; false)
144b8e80941Smrg
145b8e80941SmrgLOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
146b8e80941Smrg
147b8e80941SmrgLOCAL_SRC_FILES := \
148b8e80941Smrg	$(IRIS_C_SOURCES)
149b8e80941Smrg
150b8e80941SmrgLOCAL_C_INCLUDES := \
151b8e80941Smrg	$(MESA_TOP)/src/mapi \
152b8e80941Smrg	$(MESA_TOP)/src/mesa \
153b8e80941Smrg	$(MESA_TOP)/include/drm-uapi \
154b8e80941Smrg	$(MESA_TOP)/src/gallium/include
155b8e80941Smrg
156b8e80941SmrgLOCAL_SHARED_LIBRARIES := libdrm_intel
157b8e80941Smrg
158b8e80941SmrgLOCAL_STATIC_LIBRARIES := \
159b8e80941Smrg	libmesa_intel_common \
160b8e80941Smrg	libmesa_nir
161b8e80941Smrg
162b8e80941SmrgLOCAL_WHOLE_STATIC_LIBRARIES := \
163b8e80941Smrg	libmesa_genxml \
164b8e80941Smrg	libmesa_blorp \
165b8e80941Smrg	libmesa_intel_common \
166b8e80941Smrg	libmesa_intel_compiler \
167b8e80941Smrg	libmesa_iris_gen8 \
168b8e80941Smrg	libmesa_iris_gen9 \
169b8e80941Smrg	libmesa_iris_gen10 \
170b8e80941Smrg	libmesa_iris_gen11
171b8e80941Smrg
172b8e80941Smrginclude $(GALLIUM_COMMON_MK)
173b8e80941Smrginclude $(BUILD_STATIC_LIBRARY)
174b8e80941Smrg
175b8e80941Smrgifneq ($(HAVE_GALLIUM_IRIS),)
176b8e80941SmrgGALLIUM_TARGET_DRIVERS += iris
177b8e80941Smrg$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_iris)
178b8e80941Smrg$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
179b8e80941Smrgendif
180