[vlc-devel] [PATCH 1/2] opengl: move opengl-specific to its own makefile

Alexandre Janniaux ajanni at videolabs.io
Wed Jun 24 19:12:22 CEST 2020


It moves the opengl-related compilation part into a Makefile in the
opengl directory, but doesn't move platform-specific handling.

No other changes.
---
 modules/video_output/Makefile.am        | 65 +------------------------
 modules/video_output/opengl/Makefile.am | 64 ++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 64 deletions(-)
 create mode 100644 modules/video_output/opengl/Makefile.am

diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index 4b2151679c4..33d7d91cbb1 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -3,29 +3,7 @@ vout_LTLIBRARIES =
 
 EXTRA_DIST += video_output/README
 
-OPENGL_COMMONSOURCES = video_output/opengl/vout_helper.c \
-	video_output/opengl/gl_api.c \
-	video_output/opengl/gl_api.h \
-	video_output/opengl/gl_common.h \
-	video_output/opengl/gl_util.c \
-	video_output/opengl/gl_util.h \
-	video_output/opengl/interop.h \
-	video_output/opengl/vout_helper.h \
-	video_output/opengl/internal.h \
-	video_output/opengl/interop.c video_output/opengl/interop_sw.c \
-	video_output/opengl/renderer.c \
-	video_output/opengl/renderer.h \
-	video_output/opengl/sampler.c \
-	video_output/opengl/sampler.h \
-	video_output/opengl/sampler_priv.h \
-	video_output/opengl/sub_renderer.c \
-	video_output/opengl/sub_renderer.h
-if HAVE_LIBPLACEBO
-OPENGL_COMMONSOURCES += video_output/placebo_utils.c video_output/placebo_utils.h
-endif
-
-OPENGL_COMMONCFLAGS = $(LIBPLACEBO_CFLAGS)
-OPENGL_COMMONLIBS = $(LIBPLACEBO_LIBS)
+include video_output/opengl/Makefile.am
 
 if HAVE_DECKLINK
 libdecklinkoutput_plugin_la_SOURCES = video_output/decklink.cpp \
@@ -81,47 +59,6 @@ if HAVE_TVOS
 vout_LTLIBRARIES += libvout_ios_plugin.la libglinterop_cvpx_plugin.la
 endif
 
-### OpenGL ###
-libgles2_plugin_la_SOURCES = $(OPENGL_COMMONSOURCES) video_output/opengl/display.c
-libgles2_plugin_la_CFLAGS = $(AM_CFLAGS) $(GLES2_CFLAGS) -DUSE_OPENGL_ES2 $(OPENGL_COMMONCFLAGS)
-libgles2_plugin_la_LIBADD = $(GLES2_LIBS) $(LIBM) $(OPENGL_COMMONLIBS)
-libgles2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
-
-EXTRA_LTLIBRARIES += libgles2_plugin.la
-vout_LTLIBRARIES += $(LTLIBgles2)
-
-libgl_plugin_la_SOURCES = $(OPENGL_COMMONSOURCES) video_output/opengl/display.c
-libgl_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS) $(OPENGL_COMMONCFLAGS)
-libgl_plugin_la_LIBADD = $(LIBM) $(OPENGL_COMMONLIBS)
-if HAVE_WIN32
-libgl_plugin_la_CFLAGS += -DHAVE_GL_CORE_SYMBOLS
-libgl_plugin_la_LIBADD += $(GL_LIBS)
-endif
-
-libglinterop_vaapi_plugin_la_SOURCES = video_output/opengl/interop_vaapi.c \
-	video_output/opengl/interop.h \
-	hw/vaapi/vlc_vaapi.c hw/vaapi/vlc_vaapi.h
-libglinterop_vaapi_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS)
-libglinterop_vaapi_plugin_la_LIBADD = $(LIBVA_LIBS) $(LIBVA_EGL_LIBS)
-
-libglinterop_vdpau_plugin_la_SOURCES = video_output/opengl/interop_vdpau.c \
-	video_output/opengl/interop.h hw/vdpau/picture.c hw/vdpau/vlc_vdpau.h
-libglinterop_vdpau_plugin_la_CFLAGS = $(AM_CFLAGS) $(VDPAU_CFLAGS)
-libglinterop_vdpau_plugin_la_LIBADD = $(LIBDL) libvlc_vdpau.la $(X_LIBS) $(X_PRE_LIBS) -lX11
-
-if HAVE_GL
-vout_LTLIBRARIES += libgl_plugin.la
-if HAVE_EGL
-if HAVE_VAAPI
-vout_LTLIBRARIES += libglinterop_vaapi_plugin.la
-endif
-endif # HAVE_EGL
-
-if HAVE_VDPAU
-vout_LTLIBRARIES += libglinterop_vdpau_plugin.la
-endif
-endif # HAVE_GL
-
 ### X11 ###
 include video_output/xcb/Makefile.am
 
diff --git a/modules/video_output/opengl/Makefile.am b/modules/video_output/opengl/Makefile.am
new file mode 100644
index 00000000000..d64896a56d4
--- /dev/null
+++ b/modules/video_output/opengl/Makefile.am
@@ -0,0 +1,64 @@
+OPENGL_COMMONSOURCES = video_output/opengl/vout_helper.c \
+       video_output/opengl/gl_api.c \
+       video_output/opengl/gl_api.h \
+       video_output/opengl/gl_common.h \
+       video_output/opengl/gl_util.c \
+       video_output/opengl/gl_util.h \
+       video_output/opengl/interop.h \
+       video_output/opengl/vout_helper.h \
+       video_output/opengl/internal.h \
+       video_output/opengl/interop.c video_output/opengl/interop_sw.c \
+       video_output/opengl/renderer.c \
+       video_output/opengl/renderer.h \
+       video_output/opengl/sampler.c \
+       video_output/opengl/sampler.h \
+       video_output/opengl/sampler_priv.h \
+       video_output/opengl/sub_renderer.c \
+       video_output/opengl/sub_renderer.h
+if HAVE_LIBPLACEBO
+OPENGL_COMMONSOURCES += video_output/placebo_utils.c video_output/placebo_utils.h
+endif
+
+OPENGL_COMMONCFLAGS = $(LIBPLACEBO_CFLAGS)
+OPENGL_COMMONLIBS = $(LIBPLACEBO_LIBS)
+
+### OpenGL ###
+libgles2_plugin_la_SOURCES = $(OPENGL_COMMONSOURCES) video_output/opengl/display.c
+libgles2_plugin_la_CFLAGS = $(AM_CFLAGS) $(GLES2_CFLAGS) -DUSE_OPENGL_ES2 $(OPENGL_COMMONCFLAGS)
+libgles2_plugin_la_LIBADD = $(GLES2_LIBS) $(LIBM) $(OPENGL_COMMONLIBS)
+libgles2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
+
+EXTRA_LTLIBRARIES += libgles2_plugin.la
+vout_LTLIBRARIES += $(LTLIBgles2)
+
+libgl_plugin_la_SOURCES = $(OPENGL_COMMONSOURCES) video_output/opengl/display.c
+libgl_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS) $(OPENGL_COMMONCFLAGS)
+libgl_plugin_la_LIBADD = $(LIBM) $(OPENGL_COMMONLIBS)
+if HAVE_WIN32
+libgl_plugin_la_CFLAGS += -DHAVE_GL_CORE_SYMBOLS
+libgl_plugin_la_LIBADD += $(GL_LIBS)
+endif
+
+libglinterop_vaapi_plugin_la_SOURCES = video_output/opengl/interop_vaapi.c \
+       video_output/opengl/interop.h \
+       hw/vaapi/vlc_vaapi.c hw/vaapi/vlc_vaapi.h
+libglinterop_vaapi_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS)
+libglinterop_vaapi_plugin_la_LIBADD = $(LIBVA_LIBS) $(LIBVA_EGL_LIBS)
+
+libglinterop_vdpau_plugin_la_SOURCES = video_output/opengl/interop_vdpau.c \
+       video_output/opengl/interop.h hw/vdpau/picture.c hw/vdpau/vlc_vdpau.h
+libglinterop_vdpau_plugin_la_CFLAGS = $(AM_CFLAGS) $(VDPAU_CFLAGS)
+libglinterop_vdpau_plugin_la_LIBADD = $(LIBDL) libvlc_vdpau.la $(X_LIBS) $(X_PRE_LIBS) -lX11
+
+if HAVE_GL
+vout_LTLIBRARIES += libgl_plugin.la
+if HAVE_EGL
+if HAVE_VAAPI
+vout_LTLIBRARIES += libglinterop_vaapi_plugin.la
+endif
+endif # HAVE_EGL
+
+if HAVE_VDPAU
+vout_LTLIBRARIES += libglinterop_vdpau_plugin.la
+endif
+endif # HAVE_GL
-- 
2.27.0



More information about the vlc-devel mailing list