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