From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com ---
The API isn't necessarily final yet, but I would like to have it finalized before the next release.
--- Makefile.am | 29 ++++++++++++++++++------- include/{private => }/vkd3d_shader.h | 0 libs/vkd3d-shader/libvkd3d-shader.pc.in | 10 +++++++++ 3 files changed, 31 insertions(+), 8 deletions(-) rename include/{private => }/vkd3d_shader.h (100%) create mode 100644 libs/vkd3d-shader/libvkd3d-shader.pc.in
diff --git a/Makefile.am b/Makefile.am index 8d4743995a68..111671837b87 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,6 +19,7 @@ vkd3d_public_headers = \ include/vkd3d_d3dcommon.h \ include/vkd3d_dxgibase.h \ include/vkd3d_dxgiformat.h \ + include/vkd3d_shader.h \ include/vkd3d_utils.h \ include/vkd3d_windows.h
@@ -51,13 +52,13 @@ vkd3d_demos_headers = \
BUILT_SOURCES = $(widl_headers)
-noinst_LTLIBRARIES = libvkd3d-common.la libvkd3d-shader.la +noinst_LTLIBRARIES = libvkd3d-common.la libvkd3d_common_la_SOURCES = \ include/private/vkd3d_debug.h \ libs/vkd3d-common/debug.c \ libs/vkd3d-common/memory.c
-lib_LTLIBRARIES = libvkd3d.la libvkd3d-utils.la +lib_LTLIBRARIES = libvkd3d-shader.la libvkd3d.la libvkd3d-utils.la
libvkd3d_shader_la_SOURCES = \ include/private/list.h \ @@ -73,9 +74,10 @@ libvkd3d_shader_la_SOURCES = \ libs/vkd3d-shader/vkd3d_shader_main.c \ libs/vkd3d-shader/vkd3d_shader_private.h libvkd3d_shader_la_CFLAGS = $(AM_CFLAGS) @SPIRV_TOOLS_CFLAGS@ -libvkd3d_shader_la_LIBADD = @SPIRV_TOOLS_LIBS@ +libvkd3d_shader_la_LDFLAGS = -version-info 1:0:0 +libvkd3d_shader_la_LIBADD = libvkd3d-common.la @SPIRV_TOOLS_LIBS@ if HAVE_LD_VERSION_SCRIPT -libvkd3d_shader_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libs/vkd3d-shader/vkd3d_shader.map +libvkd3d_shader_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-shader/vkd3d_shader.map endif
libvkd3d_la_SOURCES = \ @@ -116,13 +118,16 @@ EXTRA_DIST = LICENSE
pkgconfigdir = $(libdir)/pkgconfig pkginclude_HEADERS = $(vkd3d_public_headers) -nodist_pkgconfig_DATA = libvkd3d.pc libvkd3d-utils.pc -CLEANFILES = libvkd3d.pc libvkd3d-utils.pc -EXTRA_DIST += libs/vkd3d/libvkd3d.pc.in libs/vkd3d-utils/libvkd3d-utils.pc.in +nodist_pkgconfig_DATA = libvkd3d.pc libvkd3d-shader.pc libvkd3d-utils.pc +CLEANFILES = libvkd3d.pc libvkd3d-shader.pc libvkd3d-utils.pc +EXTRA_DIST += \ + libs/vkd3d/libvkd3d.pc.in \ + libs/vkd3d-shader/libvkd3d-shader.pc.in \ + libs/vkd3d-utils/libvkd3d-utils.pc.in
noinst_PROGRAMS = vkd3d-compiler vkd3d_compiler_SOURCES = programs/vkd3d-compiler/main.c -vkd3d_compiler_LDADD = libvkd3d-shader.la libvkd3d-common.la +vkd3d_compiler_LDADD = libvkd3d-shader.la
LDADD = libvkd3d.la libvkd3d-utils.la check_PROGRAMS = $(vkd3d_tests) $(vkd3d_cross_tests) @@ -170,6 +175,14 @@ libvkd3d-utils.pc: $(srcdir)/libs/vkd3d-utils/libvkd3d-utils.pc.in -e 's![@]PACKAGE_VERSION[@]!$(PACKAGE_VERSION)!g' \ $< > $@
+libvkd3d-shader.pc: $(srcdir)/libs/vkd3d-shader/libvkd3d-shader.pc.in + $(AM_V_GEN)$(SED) -e 's![@]prefix[@]!$(prefix)!g' \ + -e 's![@]exec_prefix[@]!$(exec_prefix)!g' \ + -e 's![@]includedir[@]!$(includedir)!g' \ + -e 's![@]libdir[@]!$(libdir)!g' \ + -e 's![@]PACKAGE_VERSION[@]!$(PACKAGE_VERSION)!g' \ + $< > $@ + libvkd3d.pc: $(srcdir)/libs/vkd3d/libvkd3d.pc.in $(AM_V_GEN)$(SED) -e 's![@]prefix[@]!$(prefix)!g' \ -e 's![@]exec_prefix[@]!$(exec_prefix)!g' \ diff --git a/include/private/vkd3d_shader.h b/include/vkd3d_shader.h similarity index 100% rename from include/private/vkd3d_shader.h rename to include/vkd3d_shader.h diff --git a/libs/vkd3d-shader/libvkd3d-shader.pc.in b/libs/vkd3d-shader/libvkd3d-shader.pc.in new file mode 100644 index 000000000000..b93e6ed9c6d6 --- /dev/null +++ b/libs/vkd3d-shader/libvkd3d-shader.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: vkd3d-shader +Description: The vkd3d Shader Translation Library +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir}/vkd3d +Libs: -L${libdir} -lvkd3d-shader
On Fri, 2 Nov 2018 at 01:16, Józef Kucia joseph.kucia@gmail.com wrote:
The API isn't necessarily final yet, but I would like to have it finalized before the next release.
From a very brief look, two things we may want to change are "enum
vkd3d_result" (not explicitly used in the public interface, but returned by the library. Should probably either be "vkd3d_shader_result", or moved to some common header or something), and "struct vkd3d_shader_scan_info" (uses bitfields, which may be questionable for portability).