Makefile.am 6.31 KB
Newer Older
1

2
lib_LTLIBRARIES = libgstgl-@GST_API_VERSION@.la
3

4
SUBDIRS = glprototypes
5
DIST_SUBDIRS = glprototypes android x11 win32 cocoa wayland dispmanx egl eagl viv-fb
6

7
built_sys_header_configure = gstglconfig.h
8

9
libgstgl_@GST_API_VERSION@_la_SOURCES = \
10
	gstgldisplay.c \
11
	gstglcontext.c \
12
	gstgldebug.c \
Matthew Waters's avatar
Matthew Waters committed
13
	gstglbasememory.c \
14
	gstglbuffer.c \
15
	gstglmemory.c \
16
	gstglmemorypbo.c \
17
	gstglrenderbuffer.c \
Matthew Waters's avatar
Matthew Waters committed
18
	gstglbufferpool.c \
19
	gstglfilter.c \
20
	gstglformat.c \
21
	gstglbasefilter.c \
22
	gstglshader.c \
23
	gstglshaderstrings.c \
24
	gstglsl.c \
25
	gstglslstage.c \
26 27 28 29 30 31 32 33 34
	gstglcolorconvert.c \
	gstglupload.c \
	gstglwindow.c \
	gstglapi.c \
	gstglfeature.c \
	gstglutils.c \
	gstglframebuffer.c \
	gstglsyncmeta.c \
	gstglviewconvert.c \
35
	gstgloverlaycompositor.c \
36
	gstglquery.c
37

38 39 40 41 42
libgstgl_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl
libgstgl_@GST_API_VERSION@include_HEADERS = \
	gstglwindow.h \
	gstgldisplay.h \
	gstglcontext.h \
43
	gstgldebug.h \
Matthew Waters's avatar
Matthew Waters committed
44
	gstglbasememory.h \
45
	gstglbuffer.h \
46
	gstglmemory.h \
47
	gstglmemorypbo.h \
48
	gstglrenderbuffer.h \
49 50
	gstglbufferpool.h \
	gstglfilter.h \
51
	gstglformat.h \
52
	gstglfuncs.h \
53
	gstglbasefilter.h \
54
	gstglshader.h \
55
	gstglshaderstrings.h \
56
	gstglsl.h \
57
	gstglslstage.h \
58
	gstglcolorconvert.h \
59 60 61 62 63
	gstglupload.h \
	gstglapi.h \
	gstglfeature.h \
	gstglutils.h \
	gstglframebuffer.h \
64
	gstglsyncmeta.h \
65
	gstglviewconvert.h \
66
	gstgloverlaycompositor.h \
67
	gstglquery.h \
68
	gstgl_fwd.h \
69
	gstgl_enums.h \
70 71
	gl.h

72
noinst_HEADERS = \
73
	gstglcontext_private.h \
74
	gstglfeature_private.h \
75
	gstglsl_private.h \
76
	gstglwindow_private.h \
77
	gstglutils_private.h \
78 79
	utils/opengl_versions.h \
	utils/gles_versions.h
80 81


82
libgstgl_@GST_API_VERSION@_la_LIBADD = \
83 84
	$(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la \
	$(top_builddir)/gst-libs/gst/allocators/libgstallocators-@GST_API_VERSION@.la \
85
	$(GMODULE_NO_EXPORT_LIBS) \
86 87
	$(GST_BASE_LIBS) \
	$(GST_LIBS) \
88
	$(GL_LIBS)
89

90 91 92
gstgl_gir_headers = $(libgstgl_@GST_API_VERSION@include_HEADERS)
gstgl_gir_sources = $(libgstgl_@GST_API_VERSION@_la_SOURCES)

93
if HAVE_WINDOW_WIN32
94 95
SUBDIRS += win32
libgstgl_@GST_API_VERSION@_la_LIBADD += win32/libgstgl-win32.la
96 97
endif

98
if HAVE_WINDOW_COCOA
99 100
SUBDIRS += cocoa
libgstgl_@GST_API_VERSION@_la_LIBADD += cocoa/libgstgl-cocoa.la
101
endif
102

103
if HAVE_WINDOW_X11
104 105
SUBDIRS += x11
libgstgl_@GST_API_VERSION@_la_LIBADD += x11/libgstgl-x11.la
106 107
gstgl_gir_headers += x11/gstgldisplay_x11.h
gstgl_gir_sources += x11/gstgldisplay_x11.c
108
endif
109

110 111 112
if HAVE_WINDOW_WAYLAND
SUBDIRS += wayland
libgstgl_@GST_API_VERSION@_la_LIBADD += wayland/libgstgl-wayland.la
113 114
gstgl_gir_headers += wayland/gstgldisplay_wayland.h
gstgl_gir_sources += wayland/gstgldisplay_wayland.c
115 116
endif

117 118 119 120 121
if HAVE_WINDOW_DISPMANX
SUBDIRS += dispmanx
libgstgl_@GST_API_VERSION@_la_LIBADD += dispmanx/libgstgl-dispmanx.la
endif

122 123 124
if HAVE_WINDOW_ANDROID
SUBDIRS += android
libgstgl_@GST_API_VERSION@_la_LIBADD += android/libgstgl-android.la
125 126
endif

127 128 129 130 131
if HAVE_WINDOW_EAGL
SUBDIRS += eagl
libgstgl_@GST_API_VERSION@_la_LIBADD += eagl/libgstgl-eagl.la
endif

132 133 134 135 136
if HAVE_WINDOW_VIV_FB
SUBDIRS += viv-fb
libgstgl_@GST_API_VERSION@_la_LIBADD += viv-fb/libgstgl-viv-fb.la
endif

137
if USE_EGL
138 139
SUBDIRS += egl
libgstgl_@GST_API_VERSION@_la_LIBADD += egl/libgstgl-egl.la
140 141
gstgl_gir_headers += egl/gstgldisplay_egl.h
gstgl_gir_sources += egl/gstgldisplay_egl.c
142 143
endif

144 145
configexecincludedir = $(libdir)/gstreamer-@GST_API_VERSION@/include/gst/gl
nodist_configexecinclude_HEADERS = $(built_sys_header_configure)
146

147
libgstgl_@GST_API_VERSION@_la_CFLAGS = \
148
	-DGST_EXPORTS \
149 150
	$(GST_PLUGINS_BASE_CFLAGS) \
	$(GST_BASE_CFLAGS) \
151 152
	$(GST_CFLAGS) \
	$(GL_CFLAGS)
153

154
libgstgl_@GST_API_VERSION@_la_LDFLAGS = \
155 156 157
	$(GST_LIB_LDFLAGS) \
	$(GST_ALL_LDFLAGS) \
	$(GST_LT_LDFLAGS)
158 159

# DISTCLEANFILES is for files generated by configure
160
DISTCLEANFILES = $(built_sys_header_configure)
161 162 163 164

if HAVE_INTROSPECTION
BUILT_GIRSOURCES = GstGL-@GST_API_VERSION@.gir

165 166
gir_headers=$(patsubst %,$(srcdir)/%, $(gstgl_gir_headers))
gir_sources=$(patsubst %,$(srcdir)/%, $(gstgl_gir_sources))
167 168

GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@.la
169
	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
170
		GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
171
		CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" PKG_CONFIG="$(PKG_CONFIG)" DLLTOOL="$(DLLTOOL)" \
172 173
		$(INTROSPECTION_SCANNER) -v --namespace GstGL \
		--nsversion=@GST_API_VERSION@ \
174 175
		--identifier-prefix=Gst \
		--symbol-prefix=gst \
176 177 178 179 180
		--warn-all \
		--c-include "gst/gl/gl.h" \
		-I$(top_srcdir)/gst-libs \
		-I$(top_builddir)/gst-libs \
		$(GST_PLUGINS_BASE_CFLAGS) \
181
		$(GL_CFLAGS) \
182 183
		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
184
		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \
185 186 187
		--library=libgstgl-@GST_API_VERSION@.la \
		--include=Gst-@GST_API_VERSION@ \
		--include=GstBase-@GST_API_VERSION@ \
Matthew Waters's avatar
Matthew Waters committed
188
		--include=GstVideo-@GST_API_VERSION@ \
189 190 191 192 193
		--libtool="$(top_builddir)/libtool" \
		--pkg gstreamer-@GST_API_VERSION@ \
		--pkg gstreamer-base-@GST_API_VERSION@ \
		--pkg gstreamer-video-@GST_API_VERSION@ \
		--pkg-export gstreamer-gl-@GST_API_VERSION@ \
194
		--add-init-section="$(INTROSPECTION_INIT)" \
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
		--output $@ \
		$(gir_headers) \
		$(gir_sources)

# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
# install anything - we need to install inside our prefix.
girdir = $(datadir)/gir-1.0
gir_DATA = $(BUILT_GIRSOURCES)

typelibsdir = $(libdir)/girepository-1.0/

typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)

%.typelib: %.gir $(INTROSPECTION_COMPILER)
	$(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
		$(INTROSPECTION_COMPILER) \
		--includedir=$(srcdir) \
		--includedir=$(builddir) \
		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
215
		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \
216 217 218 219
		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)

CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
endif