anv: Add initial Haswell support
[mesa.git] / src / vulkan / Makefile.am
1 # Copyright © 2015 Intel Corporation
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 (including the next
11 # paragraph) shall be included in all copies or substantial portions of the
12 # Software.
13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 # IN THE SOFTWARE.
21
22 SUBDIRS = . tests
23
24 vulkan_includedir = $(includedir)/vulkan
25
26 vulkan_include_HEADERS = \
27 $(top_srcdir)/include/vulkan/vk_platform.h \
28 $(top_srcdir)/include/vulkan/vulkan.h \
29 $(top_srcdir)/include/vulkan/vulkan_intel.h \
30 $(top_srcdir)/include/vulkan/vk_ext_khr_swapchain.h \
31 $(top_srcdir)/include/vulkan/vk_ext_khr_device_swapchain.h
32
33 lib_LTLIBRARIES = libvulkan.la
34
35 check_LTLIBRARIES = libvulkan-test.la
36
37 PER_GEN_LIBS = \
38 libanv-gen7.la \
39 libanv-gen75.la
40
41 noinst_LTLIBRARIES = $(PER_GEN_LIBS)
42
43 # The gallium includes are for the util/u_math.h include from main/macros.h
44
45 AM_CPPFLAGS = \
46 $(INTEL_CFLAGS) \
47 $(VALGRIND_CFLAGS) \
48 $(DEFINES) \
49 -I$(top_srcdir)/include \
50 -I$(top_srcdir)/src \
51 -I$(top_srcdir)/src/glsl/nir \
52 -I$(top_srcdir)/src/mapi \
53 -I$(top_srcdir)/src/mesa \
54 -I$(top_srcdir)/src/mesa/drivers/dri/common \
55 -I$(top_srcdir)/src/mesa/drivers/dri/i965 \
56 -I$(top_srcdir)/src/gallium/auxiliary \
57 -I$(top_srcdir)/src/gallium/include \
58 -I$(top_builddir)/src/vulkan
59
60 libvulkan_la_CFLAGS = \
61 -Wall -Wno-unused-parameter -fvisibility=hidden -O0 -g \
62 -Wstrict-prototypes -Wmissing-prototypes -Wno-override-init
63
64 VULKAN_SOURCES = \
65 anv_allocator.c \
66 anv_cmd_buffer.c \
67 anv_batch_chain.c \
68 anv_device.c \
69 anv_dump.c \
70 anv_entrypoints.c \
71 anv_entrypoints.h \
72 anv_formats.c \
73 anv_image.c \
74 anv_intel.c \
75 anv_meta.c \
76 anv_meta_clear.c \
77 anv_nir_apply_dynamic_offsets.c \
78 anv_nir_apply_pipeline_layout.c \
79 anv_nir_lower_push_constants.c \
80 anv_pass.c \
81 anv_pipeline.c \
82 anv_private.h \
83 anv_query.c \
84 anv_util.c \
85 anv_wsi.c \
86 anv_wsi_x11.c \
87 gen8_state.c \
88 gen8_cmd_buffer.c \
89 gen8_pipeline.c \
90 isl.c \
91 isl_format_layout.c
92
93 BUILT_SOURCES = \
94 anv_entrypoints.h \
95 anv_entrypoints.c \
96 isl_format_layout.c
97
98 libanv_gen7_la_SOURCES = \
99 gen7_cmd_buffer.c \
100 gen7_pipeline.c \
101 gen7_state.c
102 libanv_gen7_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=70
103
104 libanv_gen75_la_SOURCES = \
105 gen7_cmd_buffer.c \
106 gen7_pipeline.c \
107 gen7_state.c
108 libanv_gen75_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=75
109
110 if HAVE_EGL_PLATFORM_WAYLAND
111 BUILT_SOURCES += \
112 wayland-drm-protocol.c \
113 wayland-drm-client-protocol.h
114
115 %-protocol.c : $(top_srcdir)/src/egl/wayland/wayland-drm/%.xml
116 $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
117
118 %-client-protocol.h : $(top_srcdir)/src/egl/wayland/wayland-drm/%.xml
119 $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
120
121 AM_CPPFLAGS += -I$(top_srcdir)/src/egl/wayland/wayland-drm
122 VULKAN_SOURCES += \
123 wayland-drm-protocol.c \
124 anv_wsi_wayland.c
125 libvulkan_la_CFLAGS += -DHAVE_WAYLAND_PLATFORM
126 endif
127
128 libvulkan_la_SOURCES = \
129 $(VULKAN_SOURCES) \
130 anv_gem.c
131
132 anv_entrypoints.h : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
133 $(AM_V_GEN)cat $(vulkan_include_HEADERS) | $(PYTHON2) $< header > $@
134
135 anv_entrypoints.c : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
136 $(AM_V_GEN)cat $(vulkan_include_HEADERS) | $(PYTHON2) $< code > $@
137
138 isl_format_layout.c: isl_format_layout_gen.bash \
139 isl_format_layout.csv
140 $(AM_V_GEN)$(srcdir)/isl_format_layout_gen.bash \
141 <$(srcdir)/isl_format_layout.csv >$@
142
143 CLEANFILES = $(BUILT_SOURCES)
144
145 libvulkan_la_LIBADD = $(WAYLAND_LIBS) -lxcb -lxcb-dri3 \
146 $(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
147 ../mesa/libmesa.la \
148 ../mesa/drivers/dri/common/libdri_test_stubs.la \
149 -lpthread -ldl -lstdc++ \
150 $(PER_GEN_LIBS)
151
152 # Libvulkan with dummy gem. Used for unit tests.
153
154 libvulkan_test_la_SOURCES = \
155 $(VULKAN_SOURCES) \
156 anv_gem_stubs.c
157
158 libvulkan_test_la_CFLAGS = $(libvulkan_la_CFLAGS)
159 libvulkan_test_la_LIBADD = $(libvulkan_la_LIBADD)
160
161 include $(top_srcdir)/install-lib-links.mk