-#
-# Shaders
-# As there is no need to modify shaders at run-time, we statically compile them
-# into object files. As autotools would ignore them, we need to add them to
-# EXTRA_DIST.
-# The program that converts the shaders into C-source files is "genshader". It's
-# pretty simple and just creates a string with the shader source as content.
-#
-
-SHADERS = \
- $(srcdir)/src/static_fill.vert \
- $(srcdir)/src/static_fill.frag \
- $(srcdir)/src/static_blend.vert \
- $(srcdir)/src/static_blend.frag \
- $(srcdir)/src/static_blit.vert \
- $(srcdir)/src/static_blit.frag \
- $(srcdir)/src/static_gltex.vert \
- $(srcdir)/src/static_gltex.frag
-
-EXTRA_DIST += $(SHADERS)
-CLEANFILES += src/static_shaders.c
-genshader_SOURCES = src/genshader.c
-
-src/static_shaders.c: $(SHADERS) genshader$(EXEEXT)
- $(AM_V_GEN)./genshader$(EXEEXT) src/static_shaders.c $(SHADERS)
+# add shared sources only once
+UTERM_DRM_SHARED_SRC = \
+ src/uterm_drm_shared_internal.h \
+ src/uterm_drm_shared.c
+if BUILD_ENABLE_VIDEO_DRM2D
+libuterm_la_SOURCES += $(UTERM_DRM_SHARED_SRC)
+else
+if BUILD_ENABLE_VIDEO_DRM3D
+libuterm_la_SOURCES += $(UTERM_DRM_SHARED_SRC)
+endif
+endif