63574f4b1504f1d69764105e2a89f51fadc998af
[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 libanv-gen8.la
41
42 noinst_LTLIBRARIES = $(PER_GEN_LIBS)
43
44 # The gallium includes are for the util/u_math.h include from main/macros.h
45
46 AM_CPPFLAGS = \
47 $(INTEL_CFLAGS) \
48 $(VALGRIND_CFLAGS) \
49 $(DEFINES) \
50 -I$(top_srcdir)/include \
51 -I$(top_srcdir)/src \
52 -I$(top_srcdir)/src/glsl/nir \
53 -I$(top_srcdir)/src/mapi \
54 -I$(top_srcdir)/src/mesa \
55 -I$(top_srcdir)/src/mesa/drivers/dri/common \
56 -I$(top_srcdir)/src/mesa/drivers/dri/i965 \
57 -I$(top_srcdir)/src/gallium/auxiliary \
58 -I$(top_srcdir)/src/gallium/include \
59 -I$(top_builddir)/src/vulkan
60
61 libvulkan_la_CFLAGS = \
62 -Wall -Wno-unused-parameter -fvisibility=hidden -O0 -g \
63 -Wstrict-prototypes -Wmissing-prototypes -Wno-override-init
64
65 VULKAN_SOURCES = \
66 anv_allocator.c \
67 anv_cmd_buffer.c \
68 anv_batch_chain.c \
69 anv_descriptor_set.c \
70 anv_device.c \
71 anv_dump.c \
72 anv_entrypoints.c \
73 anv_entrypoints.h \
74 anv_formats.c \
75 anv_image.c \
76 anv_intel.c \
77 anv_meta.c \
78 anv_meta_clear.c \
79 anv_nir_apply_dynamic_offsets.c \
80 anv_nir_apply_pipeline_layout.c \
81 anv_nir_lower_push_constants.c \
82 anv_pass.c \
83 anv_pipeline.c \
84 anv_private.h \
85 anv_query.c \
86 anv_util.c \
87 anv_wsi.c \
88 anv_wsi_x11.c \
89 gen8_state.c \
90 gen8_cmd_buffer.c \
91 gen8_pipeline.c \
92 isl.c \
93 isl_format_layout.c
94
95 BUILT_SOURCES = \
96 anv_entrypoints.h \
97 anv_entrypoints.c \
98 isl_format_layout.c
99
100 libanv_gen7_la_SOURCES = \
101 genX_cmd_buffer.c \
102 gen7_cmd_buffer.c \
103 gen7_pipeline.c \
104 gen7_state.c
105 libanv_gen7_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=70
106
107 libanv_gen75_la_SOURCES = \
108 genX_cmd_buffer.c \
109 gen7_cmd_buffer.c \
110 gen7_pipeline.c \
111 gen7_state.c
112 libanv_gen75_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=75
113
114 libanv_gen8_la_SOURCES = \
115 genX_cmd_buffer.c
116 libanv_gen8_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=80
117
118 if HAVE_EGL_PLATFORM_WAYLAND
119 BUILT_SOURCES += \
120 wayland-drm-protocol.c \
121 wayland-drm-client-protocol.h
122
123 %-protocol.c : $(top_srcdir)/src/egl/wayland/wayland-drm/%.xml
124 $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
125
126 %-client-protocol.h : $(top_srcdir)/src/egl/wayland/wayland-drm/%.xml
127 $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
128
129 AM_CPPFLAGS += -I$(top_srcdir)/src/egl/wayland/wayland-drm
130 VULKAN_SOURCES += \
131 wayland-drm-protocol.c \
132 anv_wsi_wayland.c
133 libvulkan_la_CFLAGS += -DHAVE_WAYLAND_PLATFORM
134 endif
135
136 libvulkan_la_SOURCES = \
137 $(VULKAN_SOURCES) \
138 anv_gem.c
139
140 anv_entrypoints.h : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
141 $(AM_V_GEN)cat $(vulkan_include_HEADERS) | $(PYTHON2) $< header > $@
142
143 anv_entrypoints.c : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
144 $(AM_V_GEN)cat $(vulkan_include_HEADERS) | $(PYTHON2) $< code > $@
145
146 isl_format_layout.c: isl_format_layout_gen.bash \
147 isl_format_layout.csv
148 $(AM_V_GEN)$(srcdir)/isl_format_layout_gen.bash \
149 <$(srcdir)/isl_format_layout.csv >$@
150
151 CLEANFILES = $(BUILT_SOURCES)
152
153 libvulkan_la_LIBADD = $(WAYLAND_LIBS) -lxcb -lxcb-dri3 \
154 $(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
155 ../mesa/libmesa.la \
156 ../mesa/drivers/dri/common/libdri_test_stubs.la \
157 -lpthread -ldl -lstdc++ \
158 $(PER_GEN_LIBS)
159
160 # Libvulkan with dummy gem. Used for unit tests.
161
162 libvulkan_test_la_SOURCES = \
163 $(VULKAN_SOURCES) \
164 anv_gem_stubs.c
165
166 libvulkan_test_la_CFLAGS = $(libvulkan_la_CFLAGS)
167 libvulkan_test_la_LIBADD = $(libvulkan_la_LIBADD)
168
169 include $(top_srcdir)/install-lib-links.mk