libs: fix API export/import and 'inconsistent linkage' on MSVC
[platform/upstream/gstreamer.git] / gst-libs / gst / video / Makefile.am
1 # variables used for enum generation
2 ORC_SOURCE=video-orc
3 include $(top_srcdir)/common/orc.mak
4
5 glib_enum_headers = video.h video-format.h video-color.h video-info.h video-dither.h \
6                         colorbalance.h navigation.h video-chroma.h video-tile.h video-converter.h \
7                         video-resampler.h video-frame.h video-scaler.h video-anc.h
8 glib_enum_define = GST_VIDEO
9 glib_gen_prefix = gst_video
10 glib_gen_basename = video
11 glib_gen_decl_banner=GST_VIDEO_API
12 glib_gen_decl_include=\#include <gst/video/video-prelude.h>
13
14 built_sources = video-enumtypes.c
15 built_headers = video-enumtypes.h
16 BUILT_SOURCES += $(built_sources) $(built_headers)
17
18 lib_LTLIBRARIES = libgstvideo-@GST_API_VERSION@.la
19
20 CLEANFILES = $(BUILT_SOURCES)
21
22 libgstvideo_@GST_API_VERSION@_la_SOURCES = \
23         colorbalance.c          \
24         colorbalancechannel.c   \
25         navigation.c            \
26         video.c                 \
27         video-anc.c             \
28         video-event.c           \
29         video-format.c          \
30         video-chroma.c          \
31         video-color.c           \
32         video-converter.c       \
33         video-dither.c          \
34         video-info.c            \
35         video-frame.c           \
36         video-scaler.c          \
37         video-tile.c            \
38         gstvideosink.c          \
39         gstvideofilter.c        \
40         convertframe.c          \
41         gstvideoaffinetransformationmeta.c \
42         gstvideometa.c          \
43         gstvideopool.c          \
44         videodirection.c        \
45         videoorientation.c      \
46         videooverlay.c          \
47         gstvideodecoder.c       \
48         gstvideoencoder.c       \
49         gstvideoutils.c         \
50         gstvideoutilsprivate.c  \
51         video-resampler.c       \
52         video-blend.c           \
53         video-overlay-composition.c \
54         video-multiview.c       \
55         gstvideotimecode.c
56
57 nodist_libgstvideo_@GST_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
58
59 libgstvideo_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/video
60 libgstvideo_@GST_API_VERSION@include_HEADERS = \
61         colorbalance.h          \
62         colorbalancechannel.h   \
63         navigation.h            \
64         video.h                 \
65         video-prelude.h         \
66         video-anc.h             \
67         video-event.h           \
68         video-format.h          \
69         video-chroma.h          \
70         video-color.h           \
71         video-converter.h       \
72         video-dither.h          \
73         video-info.h            \
74         video-frame.h           \
75         video-scaler.h          \
76         video-tile.h            \
77         gstvideosink.h          \
78         gstvideofilter.h        \
79         gstvideometa.h          \
80         gstvideoaffinetransformationmeta.h \
81         gstvideopool.h          \
82         videodirection.h        \
83         videoorientation.h      \
84         videooverlay.h          \
85         gstvideodecoder.h       \
86         gstvideoencoder.h       \
87         gstvideoutils.h         \
88         video-resampler.h       \
89         video-blend.h           \
90         video-overlay-composition.h \
91         video-multiview.h       \
92         gstvideotimecode.h
93
94 nodist_libgstvideo_@GST_API_VERSION@include_HEADERS = $(built_headers)
95 noinst_HEADERS = gstvideoutilsprivate.h
96
97 libgstvideo_@GST_API_VERSION@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) \
98                                         $(ORC_CFLAGS) -DBUILDING_GST_VIDEO
99 libgstvideo_@GST_API_VERSION@_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) $(LIBM)
100 libgstvideo_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
101
102 include $(top_srcdir)/common/gst-glib-gen.mak
103
104 if HAVE_INTROSPECTION
105 BUILT_GIRSOURCES = GstVideo-@GST_API_VERSION@.gir
106
107 gir_headers=$(patsubst %,$(srcdir)/%, $(libgstvideo_@GST_API_VERSION@include_HEADERS))
108 gir_headers+=$(patsubst %,$(builddir)/%, $(built_headers))
109 gir_sources=$(patsubst %,$(srcdir)/%, $(libgstvideo_@GST_API_VERSION@_la_SOURCES))
110 gir_sources+=$(patsubst %,$(builddir)/%, $(built_sources))
111
112 GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VERSION@.la
113         $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
114                 GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_DISABLE=yes \
115                 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" PKG_CONFIG="$(PKG_CONFIG)" DLLTOOL="$(DLLTOOL)" \
116                 $(INTROSPECTION_SCANNER) -v --namespace GstVideo \
117                 --nsversion=@GST_API_VERSION@ \
118                 --identifier-prefix=Gst \
119                 --symbol-prefix=gst \
120                 --warn-all \
121                 --c-include "gst/video/video.h" \
122                 -I$(top_srcdir)/gst-libs \
123                 -I$(top_builddir)/gst-libs \
124                 --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
125                 --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
126                 --library=libgstvideo-@GST_API_VERSION@.la \
127                 --include=Gst-@GST_API_VERSION@ \
128                 --include=GstBase-@GST_API_VERSION@ \
129                 --libtool="${LIBTOOL}" \
130                 --pkg gstreamer-@GST_API_VERSION@ \
131                 --pkg gstreamer-base-@GST_API_VERSION@ \
132                 --pkg-export gstreamer-video-@GST_API_VERSION@ \
133                 --add-init-section="$(INTROSPECTION_INIT)" \
134                 --output $@ \
135                 $(gir_headers) \
136                 $(gir_sources)
137
138 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
139 # install anything - we need to install inside our prefix.
140 girdir = $(datadir)/gir-1.0
141 gir_DATA = $(BUILT_GIRSOURCES)
142
143 typelibsdir = $(libdir)/girepository-1.0/
144
145 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
146
147 %.typelib: %.gir $(INTROSPECTION_COMPILER)
148         $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
149                 $(INTROSPECTION_COMPILER) \
150                 --includedir=$(srcdir) \
151                 --includedir=$(builddir) \
152                 --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
153                 --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
154                 $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
155
156 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
157 endif