• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/drm-uapi
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_gen10
52
53# ---------------------------------------
54# Build libmesa_i965_gen4
55# ---------------------------------------
56
57include $(CLEAR_VARS)
58
59LOCAL_MODULE := libmesa_i965_gen4
60
61LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES)
62
63LOCAL_SRC_FILES := $(i965_gen4_FILES)
64
65LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES)
66
67LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES)
68
69LOCAL_CFLAGS := -DGEN_VERSIONx10=40
70
71include $(MESA_COMMON_MK)
72include $(BUILD_STATIC_LIBRARY)
73
74# ---------------------------------------
75# Build libmesa_i965_gen45
76# ---------------------------------------
77
78include $(CLEAR_VARS)
79
80LOCAL_MODULE := libmesa_i965_gen45
81
82LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES)
83
84LOCAL_SRC_FILES := $(i965_gen45_FILES)
85
86LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES)
87
88LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES)
89
90LOCAL_CFLAGS := -DGEN_VERSIONx10=45
91
92include $(MESA_COMMON_MK)
93include $(BUILD_STATIC_LIBRARY)
94
95# ---------------------------------------
96# Build libmesa_i965_gen5
97# ---------------------------------------
98
99include $(CLEAR_VARS)
100
101LOCAL_MODULE := libmesa_i965_gen5
102
103LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES)
104
105LOCAL_SRC_FILES := $(i965_gen5_FILES)
106
107LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES)
108
109LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES)
110
111LOCAL_CFLAGS := -DGEN_VERSIONx10=50
112
113include $(MESA_COMMON_MK)
114include $(BUILD_STATIC_LIBRARY)
115
116# ---------------------------------------
117# Build libmesa_i965_gen6
118# ---------------------------------------
119
120include $(CLEAR_VARS)
121
122LOCAL_MODULE := libmesa_i965_gen6
123
124LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES)
125
126LOCAL_SRC_FILES := $(i965_gen6_FILES)
127
128LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES)
129
130LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES)
131
132LOCAL_CFLAGS := -DGEN_VERSIONx10=60
133
134include $(MESA_COMMON_MK)
135include $(BUILD_STATIC_LIBRARY)
136
137# ---------------------------------------
138# Build libmesa_i965_gen7
139# ---------------------------------------
140
141include $(CLEAR_VARS)
142
143LOCAL_MODULE := libmesa_i965_gen7
144
145LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES)
146
147LOCAL_SRC_FILES := $(i965_gen7_FILES)
148
149LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES)
150
151LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES)
152
153LOCAL_CFLAGS := -DGEN_VERSIONx10=70
154
155include $(MESA_COMMON_MK)
156include $(BUILD_STATIC_LIBRARY)
157
158# ---------------------------------------
159# Build libmesa_i965_gen75
160# ---------------------------------------
161
162include $(CLEAR_VARS)
163
164LOCAL_MODULE := libmesa_i965_gen75
165
166LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES)
167
168LOCAL_SRC_FILES := $(i965_gen75_FILES)
169
170LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES)
171
172LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES)
173
174LOCAL_CFLAGS := -DGEN_VERSIONx10=75
175
176include $(MESA_COMMON_MK)
177include $(BUILD_STATIC_LIBRARY)
178
179# ---------------------------------------
180# Build libmesa_i965_gen8
181# ---------------------------------------
182
183include $(CLEAR_VARS)
184
185LOCAL_MODULE := libmesa_i965_gen8
186
187LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES)
188
189LOCAL_SRC_FILES := $(i965_gen8_FILES)
190
191LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES)
192
193LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES)
194
195LOCAL_CFLAGS := -DGEN_VERSIONx10=80
196
197include $(MESA_COMMON_MK)
198include $(BUILD_STATIC_LIBRARY)
199
200# ---------------------------------------
201# Build libmesa_i965_gen9
202# ---------------------------------------
203
204include $(CLEAR_VARS)
205
206LOCAL_MODULE := libmesa_i965_gen9
207
208LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES)
209
210LOCAL_SRC_FILES := $(i965_gen9_FILES)
211
212LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES)
213
214LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES)
215
216LOCAL_CFLAGS := -DGEN_VERSIONx10=90
217
218include $(MESA_COMMON_MK)
219include $(BUILD_STATIC_LIBRARY)
220
221# ---------------------------------------
222# Build libmesa_i965_gen10
223# ---------------------------------------
224
225include $(CLEAR_VARS)
226
227LOCAL_MODULE := libmesa_i965_gen10
228
229LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES)
230
231LOCAL_SRC_FILES := $(i965_gen10_FILES)
232
233LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES)
234
235LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES)
236
237LOCAL_CFLAGS := -DGEN_VERSIONx10=100
238
239include $(MESA_COMMON_MK)
240include $(BUILD_STATIC_LIBRARY)
241
242# ---------------------------------------
243# Build i965_dri
244# ---------------------------------------
245
246include $(CLEAR_VARS)
247
248LOCAL_MODULE := i965_dri
249LOCAL_MODULE_RELATIVE_PATH := $(MESA_DRI_MODULE_REL_PATH)
250LOCAL_LDFLAGS += $(MESA_DRI_LDFLAGS)
251
252LOCAL_CFLAGS := \
253	$(MESA_DRI_CFLAGS)
254
255ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
256LOCAL_CFLAGS += \
257	-DUSE_SSE41
258endif
259
260LOCAL_C_INCLUDES := \
261	$(MESA_DRI_C_INCLUDES) \
262	$(MESA_TOP)/include/drm-uapi
263
264LOCAL_SRC_FILES := \
265	$(i965_FILES)
266
267LOCAL_WHOLE_STATIC_LIBRARIES := \
268	$(MESA_DRI_WHOLE_STATIC_LIBRARIES) \
269	$(I965_PERGEN_LIBS) \
270	libmesa_intel_common \
271	libmesa_isl \
272	libmesa_blorp \
273	libmesa_intel_compiler
274
275LOCAL_SHARED_LIBRARIES := \
276	$(MESA_DRI_SHARED_LIBRARIES)
277
278LOCAL_GENERATED_SOURCES := \
279	$(MESA_DRI_OPTIONS_H) \
280	$(MESA_GEN_NIR_H)
281
282LOCAL_MODULE_CLASS := SHARED_LIBRARIES
283
284intermediates := $(call local-generated-sources-dir)
285
286gen := $(addprefix $(intermediates)/, $(i965_oa_GENERATED_FILES))
287LOCAL_GENERATED_SOURCES += $(gen)
288
289$(filter %.h,$(gen)): $(intermediates)/brw_oa_%.h: $(LOCAL_PATH)/brw_oa_%.xml $(LOCAL_PATH)/brw_oa.py
290	@echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))"
291	@mkdir -p $(dir $@)
292	$(hide) $(MESA_PYTHON2) $(word 2, $^) --header=$@ --chipset=$(basename $*) $<
293
294$(filter %.c,$(gen)): $(intermediates)/brw_oa_%.c: $(LOCAL_PATH)/brw_oa_%.xml $(LOCAL_PATH)/brw_oa.py
295	@echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))"
296	@mkdir -p $(dir $@)
297	$(hide) $(MESA_PYTHON2) $(word 2, $^) --code=$@ --chipset=$(basename $*) $<
298
299include $(MESA_COMMON_MK)
300include $(BUILD_SHARED_LIBRARY)
301