app/tag: Add missing sources/headers to the GIR build
[platform/upstream/gstreamer.git] / gst-libs / gst / tag / Makefile.am
1 libgsttagincludedir = \
2         $(includedir)/gstreamer-@GST_API_VERSION@/gst/tag
3
4 glib_enum_define = GST_TAG
5 glib_gen_prefix = gst_tag
6 glib_gen_basename = tag
7
8 glib_enum_headers = tag.h gsttagdemux.h
9
10 built_sources = tag-enumtypes.c
11 built_headers = tag-enumtypes.h
12 BUILT_SOURCES = $(built_sources) $(built_headers)
13
14 include $(top_srcdir)/common/gst-glib-gen.mak
15
16 libgsttaginclude_HEADERS = \
17         tag.h gsttagdemux.h gsttagmux.h xmpwriter.h
18 nodist_libgsttaginclude_HEADERS = tag-enumtypes.h
19
20 CLEANFILES = $(BUILT_SOURCES)
21
22 lib_LTLIBRARIES = libgsttag-@GST_API_VERSION@.la
23
24 libgsttag_@GST_API_VERSION@_la_SOURCES = \
25         gstvorbistag.c gstid3tag.c gstxmptag.c gstexiftag.c \
26         lang.c licenses.c tags.c gsttagdemux.c gsttagmux.c \
27         gsttageditingprivate.c id3v2.c id3v2frames.c xmpwriter.c
28 nodist_libgsttag_@GST_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
29
30 libgsttag_@GST_API_VERSION@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
31         $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(ZLIB_CFLAGS) \
32         -DLICENSE_TRANSLATIONS_PATH=\"$(pkgdatadir)/@GST_API_VERSION@/license-translations.dict\"
33 libgsttag_@GST_API_VERSION@_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) $(ZLIB_LIBS)
34 libgsttag_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
35
36 # lang-tables.dat contains generated static data and is included by lang.c
37 # licenses-tables.dat contains generated data and is included by licenses.c
38 EXTRA_DIST = lang-tables.dat licenses-tables.dat license-translations.dict
39
40 noinst_HEADERS = gsttageditingprivate.h id3v2.h
41
42 if HAVE_INTROSPECTION
43 BUILT_GIRSOURCES = GstTag-@GST_API_VERSION@.gir
44
45 gir_headers=$(patsubst %,$(srcdir)/%, $(libgsttaginclude_HEADERS))
46 gir_headers+=$(patsubst %,$(srcdir)/%, $(nodist_libgsttaginclude_HEADERS))
47 gir_sources=$(patsubst %,$(srcdir)/%, $(libgsttag_@GST_API_VERSION@_la_SOURCES))
48 gir_sources+=$(patsubst %,$(srcdir)/%, $(nodist_libgsttag_@GST_API_VERSION@_la_SOURCES))
49
50 GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSION@.la
51         $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" GI_SCANNER_DISABLE_CACHE=yes\
52                 GST_PLUGIN_SYSTEM_PATH_1_0="" GST_PLUGIN_PATH_1_0="" GST_REGISTRY_UPDATE=no \
53                 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CC="$(CC)" PKG_CONFIG="$(PKG_CONFIG)" DLLTOOL="$(DLLTOOL)" \
54                 $(INTROSPECTION_SCANNER) -v --namespace GstTag \
55                 --nsversion=@GST_API_VERSION@ \
56                 --identifier-prefix=Gst \
57                 --symbol-prefix=gst \
58                 --warn-all \
59                 --c-include "gst/tag/tag.h" \
60                 -I$(top_srcdir)/gst-libs \
61                 -I$(top_builddir)/gst-libs \
62                 --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
63                 --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
64                 --library=libgsttag-@GST_API_VERSION@.la \
65                 --include=Gst-@GST_API_VERSION@ \
66                 --include=GstBase-@GST_API_VERSION@ \
67                 --libtool="$(top_builddir)/libtool" \
68                 --pkg gstreamer-@GST_API_VERSION@ \
69                 --pkg gstreamer-base-@GST_API_VERSION@ \
70                 --pkg-export gstreamer-tag-@GST_API_VERSION@ \
71                 --add-init-section="$(INTROSPECTION_INIT)" \
72                 --output $@ \
73                 $(gir_headers) \
74                 $(gir_sources)
75
76 # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
77 # install anything - we need to install inside our prefix.
78 girdir = $(datadir)/gir-1.0
79 gir_DATA = $(BUILT_GIRSOURCES)
80
81 typelibsdir = $(libdir)/girepository-1.0/
82
83 typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
84
85 %.typelib: %.gir $(INTROSPECTION_COMPILER)
86         $(AM_V_GEN)PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \
87                 $(INTROSPECTION_COMPILER) \
88                 --includedir=$(srcdir) \
89                 --includedir=$(builddir) \
90                 --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
91                 --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
92                 $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
93
94 CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
95 endif
96
97 # little program that reads iso_639.xml and outputs tables for us as fallback
98 # for when iso-codes are not available (and so we don't have to read the xml
99 # just to map codes)
100 mklangtables_SOURCES = mklangtables.c
101 mklangtables_CFLAGS = $(GST_CFLAGS)
102 mklangtables_LDADD = $(GST_LIBS)
103
104 mklicensestables_SOURCES = mklicensestables.c
105 mklicensestables_CFLAGS = $(GST_CFLAGS)
106 mklicensestables_LDADD = $(GST_LIBS)
107
108 EXTRA_PROGRAMS = mklangtables mklicensestables
109
110 update-isocodes: mklangtables
111         $(builddir)/mklangtables > $(srcdir)/lang-tables.dat && \
112                 echo "Updated lang-tables.dat"
113
114 update-licenses: mklicensestables
115         $(builddir)/mklicensestables \
116                 --translation-dictionary=$(srcdir)/license-translations.dict \
117                 > $(srcdir)/licenses-tables.dat && \
118                 echo "Updated licenses-tables.dat and license-translations.dict"
119
120 #if USE_NLS
121 # Yes, this is not great, but it's only an implementation detail. The
122 # translations come from an external source here, so we don't want the
123 # strings retranslated, but also we don't want to create 30 1kB .mo files,
124 # so just do something for now, we can change it later if someone really cares.
125 licensetransdir = $(pkgdatadir)/@GST_API_VERSION@
126 licensetrans_DATA = $(srcdir)/license-translations.dict
127 #endif