vulkan/overlay: fix min/max computations
[mesa.git] / src / vulkan / Makefile.am
index bd66901255db56395a5279cf0f0013eb7e8bb9e2..fbd9e300032669e12a2238c4eb711efd3e12192d 100644 (file)
@@ -6,24 +6,40 @@ vulkan_includedir = $(includedir)/vulkan
 vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml
 
 MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
 
 EXTRA_DIST = \
-       util/gen_enum_to_str.py
-
-BUILT_SOURCES = \
+       overlay-layer/README \
+       overlay-layer/meson.build \
+       overlay-layer/overlay.cpp \
+       overlay-layer/overlay.frag \
+       overlay-layer/overlay.vert \
+       overlay-layer/VkLayer_MESA_overlay.json.in \
+       overlay-layer/vk_layer_table.cpp \
+       overlay-layer/vk_layer_table.h \
+       util/gen_enum_to_str.py \
+       util/meson.build \
+       wsi/meson.build \
+       meson.build
+
+VULKAN_UTIL_SOURCES = \
+       $(VULKAN_UTIL_FILES) \
        $(VULKAN_UTIL_GENERATED_FILES)
 
-util/vk_enum_to_str.c util/vk_enum_to_str.h: util/gen_enum_to_str.py $(vulkan_api_xml)
+util/vk_enum_to_str.c util/vk_enum_to_str.h: util/gen_enum_to_str.py \
+               $(vulkan_api_xml)
        $(MKDIR_GEN)
-       $(PYTHON_GEN) $(srcdir)/util/gen_enum_to_str.py --xml $(vulkan_api_xml) --outdir $(top_builddir)/src/vulkan/util
+       $(PYTHON_GEN) $(srcdir)/util/gen_enum_to_str.py \
+           --xml $(vulkan_api_xml) \
+           --outdir $(top_builddir)/src/vulkan/util
 
-libvulkan_util_la_SOURCES = $(VULKAN_UTIL_GENERATED_FILES)
+libvulkan_util_la_SOURCES = $(VULKAN_UTIL_SOURCES)
 
 AM_CPPFLAGS = \
        $(DEFINES) \
        -I$(top_srcdir)/include \
        -I$(top_srcdir)/src \
+       -I$(top_srcdir)/src/vulkan/util \
        -I$(top_srcdir)/src/gallium/auxiliary \
        -I$(top_srcdir)/src/gallium/include
 
@@ -31,7 +47,7 @@ AM_CFLAGS = \
        $(LIBDRM_CFLAGS) \
        $(VISIBILITY_CFLAGS)
 
-VULKAN_LIB_DEPS =
+VULKAN_WSI_GENERATED_SOURCES =
 
 VULKAN_WSI_SOURCES = \
        $(VULKAN_WSI_FILES)
@@ -43,36 +59,64 @@ AM_CPPFLAGS += \
        -DVK_USE_PLATFORM_XLIB_KHR
 
 VULKAN_WSI_SOURCES += $(VULKAN_WSI_X11_FILES)
+endif
+
+if HAVE_PLATFORM_DRM
+AM_CPPFLAGS += \
+       -DVK_USE_PLATFORM_DISPLAY_KHR
 
-# FIXME: Use pkg-config for X11-xcb ldflags.
-VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) -lX11-xcb
+VULKAN_WSI_SOURCES += $(VULKAN_WSI_DISPLAY_FILES)
 endif
 
-BUILT_SOURCES += $(VULKAN_WSI_WAYLAND_GENERATED_FILES)
-CLEANFILES = $(BUILT_SOURCES)
+if HAVE_XLIB_LEASE
+AM_CPPFLAGS += \
+       $(XCB_RANDR_CFLAGS) \
+       $(XLIB_RANDR_CFLAGS) \
+       -DVK_USE_PLATFORM_XLIB_XRANDR_EXT
+endif
+
+CLEANFILES = \
+       $(VULKAN_UTIL_GENERATED_FILES) \
+       $(VULKAN_WSI_WAYLAND_GENERATED_FILES)
 
 WL_DRM_XML = $(top_srcdir)/src/egl/wayland/wayland-drm/wayland-drm.xml
 
 wsi/wayland-drm-protocol.c : $(WL_DRM_XML)
        $(MKDIR_GEN)
-       $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
+       $(AM_V_GEN)$(WAYLAND_SCANNER) $(SCANNER_ARG) $< $@
 
 wsi/wayland-drm-client-protocol.h : $(WL_DRM_XML)
        $(MKDIR_GEN)
-       $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
+       $(AM_V_GEN)$(WAYLAND_SCANNER) client-header $< $@
+
+WL_DMABUF_XML = $(WAYLAND_PROTOCOLS_DATADIR)/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
+
+wsi/linux-dmabuf-unstable-v1-protocol.c : $(WL_DMABUF_XML)
+       $(MKDIR_GEN)
+       $(AM_V_GEN)$(WAYLAND_SCANNER) $(SCANNER_ARG) $< $@
+
+wsi/linux-dmabuf-unstable-v1-client-protocol.h : $(WL_DMABUF_XML)
+       $(MKDIR_GEN)
+       $(AM_V_GEN)$(WAYLAND_SCANNER) client-header $< $@
 
 if HAVE_PLATFORM_WAYLAND
+wsi/linux-dmabuf-unstable-v1-protocol.lo: wsi/linux-dmabuf-unstable-v1-client-protocol.h
+wsi/wayland-drm-protocol.lo: wsi/wayland-drm-client-protocol.h
+wsi/wsi_common_wayland.lo: wsi/linux-dmabuf-unstable-v1-client-protocol.h wsi/wayland-drm-client-protocol.h
+
 AM_CPPFLAGS += \
        -I$(top_builddir)/src/vulkan/wsi \
-       $(WAYLAND_CFLAGS) \
+       $(WAYLAND_CLIENT_CFLAGS) \
        -DVK_USE_PLATFORM_WAYLAND_KHR
 
 VULKAN_WSI_SOURCES += \
-       $(VULKAN_WSI_WAYLAND_FILES) \
+       $(VULKAN_WSI_WAYLAND_FILES)
+
+VULKAN_WSI_GENERATED_SOURCES += \
        $(VULKAN_WSI_WAYLAND_GENERATED_FILES)
 
-VULKAN_LIB_DEPS += \
-       $(WAYLAND_LIBS)
 endif
 
+nodist_libvulkan_wsi_la_SOURCES = $(VULKAN_WSI_GENERATED_SOURCES)
+
 libvulkan_wsi_la_SOURCES = $(VULKAN_WSI_SOURCES)