2001-05-20 17:05:48 -07:00
## Process this file with automake to produce Makefile.in
2002-03-29 15:10:18 -08:00
if PLATFORM_WIN32
no_undefined = -no-undefined
endif
2012-05-12 05:39:44 -07:00
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
2018-04-08 00:59:49 -07:00
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
2012-05-12 05:39:44 -07:00
framework_cocoa = -framework Cocoa
endif
2002-03-29 15:10:18 -08:00
if OS_WIN32
2007-05-13 16:12:52 -07:00
ole32_lib = -lole32
2002-03-29 15:10:18 -08:00
gimpbase_def = gimpbase.def
2014-09-14 09:28:26 -07:00
libgimpbase_export_symbols = -export-symbols $(srcdir)/gimpbase.def
2002-03-29 15:10:18 -08:00
install-libtool-import-lib:
2004-01-21 19:51:46 -08:00
$(INSTALL) .libs/libgimpbase-$(GIMP_API_VERSION).dll.a $(DESTDIR)$(libdir)
2014-09-14 09:28:26 -07:00
$(INSTALL) $(srcdir)/gimpbase.def $(DESTDIR)$(libdir)
2002-03-29 15:10:18 -08:00
uninstall-libtool-import-lib:
2004-01-21 19:51:46 -08:00
-rm $(DESTDIR)$(libdir)/libgimpbase-$(GIMP_API_VERSION).dll.a
2003-10-09 14:33:27 -07:00
-rm $(DESTDIR)$(libdir)/gimpbase.def
2002-03-29 15:10:18 -08:00
else
2017-08-31 12:35:00 -07:00
libm = -lm
2002-03-29 15:10:18 -08:00
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif
if MS_LIB_AVAILABLE
2004-01-21 19:51:46 -08:00
noinst_DATA = gimpbase-$(GIMP_API_VERSION).lib
2002-03-29 15:10:18 -08:00
install-ms-lib:
2004-01-21 19:51:46 -08:00
$(INSTALL) gimpbase-$(GIMP_API_VERSION).lib $(DESTDIR)$(libdir)
2002-03-29 15:10:18 -08:00
uninstall-ms-lib:
2004-01-21 19:51:46 -08:00
-rm $(DESTDIR)$(libdir)/gimpbase-$(GIMP_API_VERSION).lib
2002-03-29 15:10:18 -08:00
2004-01-21 19:51:46 -08:00
gimpbase-@GIMP_API_VERSION@.lib: gimpbase.def
lib -name:libgimpbase-$(GIMP_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gimpbase.def -out:$@
2002-03-29 15:10:18 -08:00
else
install-ms-lib:
uninstall-ms-lib:
endif
2004-01-21 19:51:46 -08:00
libgimpbaseincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimpbase
2001-05-20 17:05:48 -07:00
2002-06-07 16:00:46 -07:00
AM_CPPFLAGS = \
2012-05-12 05:39:44 -07:00
-DPREFIX=\""$(prefix)"\" \
-DGIMPDIR=\""$(gimpdir)"\" \
2018-01-30 08:27:43 -08:00
-DGIMPDATADIR=\""$(gimpdatadir)"\" \
2012-05-12 05:39:44 -07:00
-DLOCALEDIR=\""$(gimplocaledir)"\" \
-DPLUGINDIR=\""$(gimpplugindir)"\" \
2018-01-30 08:27:43 -08:00
-DGIMPSYSCONFDIR=\""$(gimpsysconfdir)"\" \
2012-05-12 05:39:44 -07:00
-DGIMP_PACKAGE=\""@PACKAGE@"\" \
2005-11-05 17:06:41 -08:00
-DGIMP_DATA_VERSION=\"$(GIMP_DATA_VERSION)\" \
2012-05-12 05:39:44 -07:00
-DGIMP_USER_VERSION=\"$(GIMP_USER_VERSION)\" \
2005-11-05 17:06:41 -08:00
-DGIMP_SYSCONF_VERSION=\"$(GIMP_SYSCONF_VERSION)\" \
-DGIMP_PLUGIN_VERSION=\"$(GIMP_PLUGIN_VERSION)\" \
2011-04-28 05:30:41 -07:00
-DG_LOG_DOMAIN=\"LibGimpBase\" \
2013-06-05 11:48:37 -07:00
-DGIMP_BASE_COMPILATION \
-I$(top_srcdir) \
2013-07-12 06:18:38 -07:00
$(GIO_CFLAGS) \
2013-10-19 09:38:01 -07:00
$(GEXIV2_CFLAGS) \
2018-04-07 13:39:13 -07:00
-I$(includedir)
AM_CFLAGS = \
2013-06-05 11:48:37 -07:00
$(xobjective_c)
2001-05-20 17:05:48 -07:00
2018-04-08 00:59:49 -07:00
AM_CXXFLAGS = \
$(xobjective_cxx)
2006-06-02 02:58:03 -07:00
AM_CCASFLAGS = \
-I$(top_builddir) \
-I$(top_srcdir)
2018-04-08 00:59:49 -07:00
AM_LDFLAGS = \
$(xnone)
2001-05-20 17:05:48 -07:00
EXTRA_DIST = \
gimpbase.def
2012-05-04 06:37:43 -07:00
lib_LTLIBRARIES = libgimpbase-@GIMP_API_VERSION@.la
2001-05-20 17:05:48 -07:00
2001-05-21 17:36:38 -07:00
# help `make' along by giving another name for the file, which it knows
# how to build
../libgimpbase/gimpversion.h: gimpversion.h
@:
2004-07-29 05:33:15 -07:00
libgimpbase_sources = \
2001-05-20 17:05:48 -07:00
gimpbase.h \
2004-07-29 05:33:15 -07:00
gimpbaseenums.h \
2017-01-08 17:04:01 -08:00
gimpcompatenums.h \
2001-05-20 17:05:48 -07:00
gimpbasetypes.h \
2004-07-29 05:33:15 -07:00
gimpbasetypes.c \
2002-10-23 07:55:07 -07:00
gimplimits.h \
2006-01-30 08:10:56 -08:00
gimpparam.h \
2002-10-23 07:55:07 -07:00
gimpversion.h \
\
2003-11-15 14:53:28 -08:00
gimpbase-private.c \
gimpbase-private.h \
2004-09-02 17:06:21 -07:00
gimpchecks.c \
gimpchecks.h \
2006-06-02 02:58:03 -07:00
gimpcpuaccel.c \
gimpcpuaccel.h \
2002-10-23 07:55:07 -07:00
gimpdatafiles.c \
gimpdatafiles.h \
2001-05-20 17:05:48 -07:00
gimpenv.c \
gimpenv.h \
2004-07-27 09:39:00 -07:00
gimpmemsize.c \
gimpmemsize.h \
2013-10-19 09:38:01 -07:00
gimpmetadata.c \
gimpmetadata.h \
2001-05-20 17:05:48 -07:00
gimpparasite.c \
gimpparasite.h \
gimpparasiteio.c \
gimpparasiteio.h \
gimpprotocol.c \
gimpprotocol.h \
2006-08-29 07:46:32 -07:00
gimprectangle.c \
gimprectangle.h \
2005-11-05 17:06:41 -08:00
gimpreloc.c \
gimpreloc.h \
2002-10-23 07:55:07 -07:00
gimpsignal.c \
gimpsignal.h \
2003-11-15 14:53:28 -08:00
gimpunit.c \
gimpunit.h \
2003-02-05 14:15:39 -08:00
gimputils.c \
gimputils.h \
2012-05-03 14:24:09 -07:00
gimpvaluearray.c \
gimpvaluearray.h \
2003-11-04 21:19:14 -08:00
gimpwin32-io.h \
2001-05-20 17:05:48 -07:00
gimpwire.c \
2007-10-31 06:09:46 -07:00
gimpwire.h
2001-05-20 17:05:48 -07:00
2004-07-29 05:33:15 -07:00
libgimpbase_built_sources = \
2017-01-08 16:05:48 -08:00
gimpbaseenums.c \
gimpcompatenums.c
2004-07-29 05:33:15 -07:00
2012-05-04 06:37:43 -07:00
libgimpbase_@GIMP_API_VERSION@_la_SOURCES = \
$(libgimpbase_sources) \
$(libgimpbase_built_sources)
2004-07-29 05:33:15 -07:00
2002-06-07 16:00:46 -07:00
libgimpbaseinclude_HEADERS = \
2001-05-20 17:05:48 -07:00
gimpbase.h \
2004-07-29 05:33:15 -07:00
gimpbaseenums.h \
2001-05-20 17:05:48 -07:00
gimpbasetypes.h \
2006-06-02 14:31:56 -07:00
gimpcpuaccel.h \
2001-05-20 17:05:48 -07:00
gimplimits.h \
2006-01-30 08:10:56 -08:00
gimpparam.h \
2002-10-23 07:55:07 -07:00
gimpversion.h \
\
2004-09-02 17:06:21 -07:00
gimpchecks.h \
2002-10-23 07:55:07 -07:00
gimpdatafiles.h \
gimpenv.h \
2004-07-27 09:39:00 -07:00
gimpmemsize.h \
2013-10-19 09:38:01 -07:00
gimpmetadata.h \
2001-05-20 17:05:48 -07:00
gimpparasite.h \
gimpparasiteio.h \
2006-08-29 07:46:32 -07:00
gimprectangle.h \
2003-11-15 14:53:28 -08:00
gimpsignal.h \
gimpunit.h \
2012-05-03 14:24:09 -07:00
gimputils.h \
gimpvaluearray.h
2001-06-07 10:20:50 -07:00
2012-05-04 06:37:43 -07:00
libgimpbase_@GIMP_API_VERSION@_la_LDFLAGS = \
2004-01-21 19:51:46 -08:00
-version-info $(LT_VERSION_INFO) \
$(no_undefined) \
2007-05-14 09:31:50 -07:00
$(libgimpbase_export_symbols) \
2018-04-08 00:59:49 -07:00
$(framework_cocoa) \
$(xnone)
2001-05-20 17:05:48 -07:00
2014-03-15 14:18:45 -07:00
EXTRA_libgimpbase_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimpbase_def)
2002-03-29 15:10:18 -08:00
2012-05-04 06:37:43 -07:00
libgimpbase_@GIMP_API_VERSION@_la_LIBADD = \
2013-07-12 06:18:38 -07:00
$(GIO_LIBS) \
2013-10-19 09:38:01 -07:00
$(GEXIV2_LIBS) \
2017-08-31 12:35:00 -07:00
$(libm) \
2012-05-04 06:37:43 -07:00
$(ole32_lib)
2002-03-29 15:10:18 -08:00
install-data-local: install-ms-lib install-libtool-import-lib
uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
2004-07-29 05:33:15 -07:00
2006-06-02 02:58:03 -07:00
#
# test programs, not to be built by default and never installed
#
TESTS = test-cpu-accel
test_cpu_accel_SOURCES = test-cpu-accel.c
test_cpu_accel_DEPENDENCIES = \
$(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
test_cpu_accel_LDADD = \
$(GLIB_LIBS) \
$(test_cpu_accel_DEPENDENCIES)
EXTRA_PROGRAMS = test-cpu-accel
2004-07-29 05:33:15 -07:00
#
# rules to generate built sources
#
2017-02-19 12:18:15 -08:00
gen_sources = xgen-bec xgen-cec
2006-06-02 02:58:03 -07:00
CLEANFILES = $(EXTRA_PROGRAMS) $(gen_sources)
2004-07-29 05:33:15 -07:00
2017-05-22 14:19:17 -07:00
xgen-bec: $(srcdir)/gimpbaseenums.h $(GIMP_MKENUMS) Makefile.am
2017-05-22 17:12:50 -07:00
$(AM_V_GEN) $(GIMP_MKENUMS) \
2007-10-31 06:09:46 -07:00
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#undef GIMP_DISABLE_DEPRECATED\n#include \"gimpbasetypes.h\"\n#include \"libgimp/libgimp-intl.h\"" \
2017-05-22 17:12:50 -07:00
--fprod "\n/* enumerations from \"@basename@\" */" \
2004-07-29 05:33:15 -07:00
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
2004-10-25 10:55:25 -07:00
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
2017-11-29 13:27:59 -08:00
--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@" \
2008-11-06 00:28:28 -08:00
--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" \
2017-05-22 17:12:50 -07:00
$< > $@
2017-05-22 14:19:17 -07:00
2017-06-02 07:53:44 -07:00
# copy the generated enum file back to the source directory only if it's
# changed; otherwise, only update its timestamp, so that the recipe isn't
# executed again on the next build, however, allow this to (harmlessly) fail,
# to support building from a read-only source tree.
2017-05-22 14:19:17 -07:00
$(srcdir)/gimpbaseenums.c: xgen-bec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
touch $@ 2> /dev/null \
|| true; \
fi
xgen-cec: $(srcdir)/gimpcompatenums.h $(GIMP_MKENUMS) Makefile.am
2017-05-22 17:12:50 -07:00
$(AM_V_GEN) $(GIMP_MKENUMS) \
2017-01-08 16:05:48 -08:00
--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"gimpbasetypes.h\"\n#include \"gimpcompatenums.h\"\n#include \"libgimp/libgimp-intl.h\"" \
2017-05-22 17:12:50 -07:00
--fprod "\n/* enumerations from \"@basename@\" */" \
2017-01-08 16:05:48 -08:00
--vhead "GType\n@enum_name@_get_type (void)\n{\n static const G@Type@Value values[] =\n {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n" \
--dhead " static const Gimp@Type@Desc descs[] =\n {" \
2017-11-29 13:27:59 -08:00
--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@" \
2017-01-08 16:05:48 -08:00
--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" \
2017-05-22 17:12:50 -07:00
$< > $@
2017-05-22 14:19:17 -07:00
2017-06-02 07:53:44 -07:00
# copy the generated enum file back to the source directory only if it's
# changed; otherwise, only update its timestamp, so that the recipe isn't
# executed again on the next build, however, allow this to (harmlessly) fail,
# to support building from a read-only source tree.
2017-05-22 14:19:17 -07:00
$(srcdir)/gimpcompatenums.c: xgen-cec
$(AM_V_GEN) if ! cmp -s $< $@; then \
cp $< $@; \
else \
touch $@ 2> /dev/null \
|| true; \
fi
2017-01-08 16:05:48 -08:00
2007-05-06 06:54:56 -07:00
DISTCLEANFILES = gimpversion.h