app: s/sprintf/g_snprintf/ in xcf_save_image()
[gimp.git] / libgimpconfig / Makefile.am
blob40d30ca18d3b4f081592be21e8e7ab92f65a179f
1 ## Process this file with automake to produce Makefile.in
3 libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
4 libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
5 libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
7 if PLATFORM_WIN32
8 no_undefined = -no-undefined
9 endif
11 if OS_WIN32
12 gimpconfig_def = gimpconfig.def
13 libgimpconfig_export_symbols = -export-symbols $(srcdir)/gimpconfig.def
15 install-libtool-import-lib:
16         $(INSTALL) .libs/libgimpconfig-$(GIMP_API_VERSION).dll.a $(DESTDIR)$(libdir)
17         $(INSTALL) $(srcdir)/gimpconfig.def $(DESTDIR)$(libdir)
19 uninstall-libtool-import-lib:
20         -rm $(DESTDIR)$(libdir)/libgimpconfig-$(GIMP_API_VERSION).dll.a
21         -rm $(DESTDIR)$(libdir)/gimpconfig.def
22 else
23 install-libtool-import-lib:
24 uninstall-libtool-import-lib:
25 endif
27 if MS_LIB_AVAILABLE
28 noinst_DATA = gimpconfig-$(GIMP_API_VERSION).lib
30 install-ms-lib:
31         $(INSTALL) gimpconfig-$(GIMP_API_VERSION).lib $(DESTDIR)$(libdir)
33 uninstall-ms-lib:
34         -rm $(DESTDIR)$(libdir)/gimpconfig-$(GIMP_API_VERSION).lib
36 gimpconfig-@GIMP_API_VERSION@.lib: gimpconfig.def
37         lib -name:libgimpconfig-$(GIMP_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gimpconfig.def -out:$@
39 else
40 install-ms-lib:
41 uninstall-ms-lib:
42 endif
44 libgimpconfigincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimpconfig
46 AM_CPPFLAGS = \
47         -DG_LOG_DOMAIN=\"LibGimpConfig\"        \
48         -DGIMP_CONFIG_COMPILATION               \
49         -I$(top_srcdir)                         \
50         $(GIO_UNIX_CFLAGS)                      \
51         $(GIO_WINDOWS_CFLAGS)                   \
52         $(GEGL_CFLAGS)                          \
53         $(CAIRO_CFLAGS)                         \
54         $(GDK_PIXBUF_CFLAGS)                    \
55         -I$(includedir)
57 EXTRA_DIST = \
58         gimpconfig.def
60 lib_LTLIBRARIES = libgimpconfig-@GIMP_API_VERSION@.la
62 libgimpconfig_sources =                 \
63         gimpconfig.h                    \
64         gimpconfigenums.h               \
65         gimpconfigtypes.h               \
66         \
67         gimpconfig-iface.c              \
68         gimpconfig-iface.h              \
69         gimpconfig-deserialize.c        \
70         gimpconfig-deserialize.h        \
71         gimpconfig-error.c              \
72         gimpconfig-error.h              \
73         gimpconfig-params.h             \
74         gimpconfig-path.c               \
75         gimpconfig-path.h               \
76         gimpconfig-serialize.c          \
77         gimpconfig-serialize.h          \
78         gimpconfig-utils.c              \
79         gimpconfig-utils.h              \
80         gimpconfigwriter.c              \
81         gimpconfigwriter.h              \
82         gimpscanner.c                   \
83         gimpscanner.h                   \
84         gimpcolorconfig.c               \
85         gimpcolorconfig.h
87 libgimpconfig_built_sources = \
88         gimpconfigenums.c
90 libgimpconfig_@GIMP_API_VERSION@_la_SOURCES = \
91         $(libgimpconfig_sources)        \
92         $(libgimpconfig_built_sources)
95 libgimpconfiginclude_HEADERS = \
96         gimpconfig.h                    \
97         gimpconfigenums.h               \
98         gimpconfigtypes.h               \
99         gimpconfig-iface.h              \
100         gimpconfig-deserialize.h        \
101         gimpconfig-error.h              \
102         gimpconfig-params.h             \
103         gimpconfig-path.h               \
104         gimpconfig-serialize.h          \
105         gimpconfig-utils.h              \
106         gimpconfigwriter.h              \
107         gimpscanner.h                   \
108         gimpcolorconfig.h
111 libgimpconfig_@GIMP_API_VERSION@_la_LDFLAGS = \
112         -version-info $(LT_VERSION_INFO)        \
113         $(no_undefined)                         \
114         $(libgimpconfig_export_symbols)
116 EXTRA_libgimpconfig_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimpconfig_def)
118 libgimpconfig_@GIMP_API_VERSION@_la_LIBADD = \
119         $(libgimpbase)          \
120         $(libgimpcolor)         \
121         $(libgimpmath)          \
122         $(GIO_UNIX_LIBS)        \
123         $(GIO_WINDOWS_LIBS)     \
124         $(GEGL_LIBS)            \
125         $(CAIRO_LIBS)           \
126         $(GDK_PIXBUF_LIBS)
129 install-data-local: install-ms-lib install-libtool-import-lib
131 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
135 # rules to generate built sources
138 gen_sources = xgen-cec
139 CLEANFILES = $(gen_sources)
141 xgen-cec: $(srcdir)/gimpconfigenums.h $(GIMP_MKENUMS) Makefile.am
142         $(AM_V_GEN) $(GIMP_MKENUMS) \
143                 --fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include \"libgimpbase/gimpbase.h\"\n#include \"gimpconfigenums.h\"\n#include \"libgimp/libgimp-intl.h\"" \
144                 --fprod "\n/* enumerations from \"@basename@\" */" \
145                 --vhead "GType\n@enum_name@_get_type (void)\n{\n  static const G@Type@Value values[] =\n  {" \
146                 --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
147                 --vtail "    { 0, NULL, NULL }\n  };\n" \
148                 --dhead "  static const Gimp@Type@Desc descs[] =\n  {" \
149                 --dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n    /* Translators: this is an abbreviated version of @valueudesc@.\n       Keep it short. */\n    { @VALUENAME@, @valueabbrev@, NULL },@endif@" \
150                 --dtail "    { 0, NULL, NULL }\n  };\n\n  static GType type = 0;\n\n  if (G_UNLIKELY (! type))\n    {\n      type = g_@type@_register_static (\"@EnumName@\", values);\n      gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n      gimp_type_set_translation_context (type, \"@enumnick@\");\n      gimp_@type@_set_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
151                 $< > $@
153 # copy the generated enum file back to the source directory only if it's
154 # changed; otherwise, only update its timestamp, so that the recipe isn't
155 # executed again on the next build, however, allow this to (harmlessly) fail,
156 # to support building from a read-only source tree.
157 $(srcdir)/gimpconfigenums.c: xgen-cec
158         $(AM_V_GEN) if ! cmp -s $< $@; then \
159                 cp $< $@; \
160         else \
161                 touch $@ 2> /dev/null \
162                 || true; \
163         fi