Makefile.am 3.36 KB
Newer Older
1 2
## Process this file with automake to produce Makefile.in

3 4
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la

5 6 7 8
if PLATFORM_WIN32
no_undefined = -no-undefined
endif

9 10
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
11 12
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
13 14 15
framework_cocoa = -framework Cocoa
endif

16 17
if OS_WIN32
gimpthumb_def = gimpthumb.def
18
libgimpthumb_export_symbols = -export-symbols $(srcdir)/gimpthumb.def
19 20

install-libtool-import-lib:
21
	$(INSTALL) .libs/libgimpthumb-$(GIMP_API_VERSION).dll.a $(DESTDIR)$(libdir)
22
	$(INSTALL) $(srcdir)/gimpthumb.def $(DESTDIR)$(libdir)
23 24

uninstall-libtool-import-lib:
25
	-rm $(DESTDIR)$(libdir)/libgimpthumb-$(GIMP_API_VERSION).dll.a
26
	-rm $(DESTDIR)$(libdir)/gimpthumb.def
27 28 29 30 31 32
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif

if MS_LIB_AVAILABLE
33
noinst_DATA = gimpthumb-$(GIMP_API_VERSION).lib
34 35

install-ms-lib:
36
	$(INSTALL) gimpthumb-$(GIMP_API_VERSION).lib $(DESTDIR)$(libdir)
37 38

uninstall-ms-lib:
39
	-rm $(DESTDIR)$(libdir)/gimpthumb-$(GIMP_API_VERSION).lib
40

41 42
gimpthumb-@GIMP_API_VERSION@.lib: gimpthumb.def
	lib -name:libgimpthumb-$(GIMP_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gimpthumb.def -out:$@
43 44 45 46 47 48

else
install-ms-lib:
uninstall-ms-lib:
endif

49
libgimpthumbincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimpthumb
50 51

AM_CPPFLAGS = \
52
	-DG_LOG_DOMAIN=\"LibGimpThumb\"	\
53 54 55
	-DGIMP_THUMB_COMPILATION	\
	-I$(top_srcdir)			\
	$(GDK_PIXBUF_CFLAGS)		\
56
	$(GIO_CFLAGS)			\
57 58 59
	-I$(includedir)

AM_CFLAGS = \
60
	$(xobjective_c)
61

62 63 64 65 66 67
AM_CXXFLAGS = \
	$(xobjective_cxx)

AM_LDFLAGS = \
	$(xnone)

68 69 70
EXTRA_DIST = \
	gimpthumb.def

71
lib_LTLIBRARIES = libgimpthumb-@GIMP_API_VERSION@.la
72

73
libgimpthumb_@GIMP_API_VERSION@_la_SOURCES = \
74 75 76
	gimpthumb.h		\
	gimpthumb-enums.c	\
	gimpthumb-enums.h	\
77 78
	gimpthumb-error.c	\
	gimpthumb-error.h	\
79 80 81 82 83 84 85 86 87
	gimpthumb-types.h	\
	gimpthumb-utils.c	\
	gimpthumb-utils.h	\
	gimpthumbnail.c		\
	gimpthumbnail.h

libgimpthumbinclude_HEADERS = \
	gimpthumb.h		\
	gimpthumb-enums.h	\
88
	gimpthumb-error.h	\
89
	gimpthumb-types.h	\
90
	gimpthumb-utils.h	\
91 92
	gimpthumbnail.h

93
libgimpthumb_@GIMP_API_VERSION@_la_LDFLAGS = \
94 95
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
96
	$(libgimpbase)				\
97
	$(libgimpthumb_export_symbols)		\
98 99
	$(framework_cocoa)			\
	$(xnone)
100

101 102
libgimpthumb_@GIMP_API_VERSION@_la_LIBADD = \
	$(GDK_PIXBUF_LIBS)	\
103
	$(GIO_LIBS)
104 105


106 107
noinst_PROGRAMS = gimp-thumbnail-list

108
gimp_thumbnail_list_SOURCES = gimp-thumbnail-list.c
109

110 111 112
gimp_thumbnail_list_LDADD = \
	libgimpthumb-$(GIMP_API_VERSION).la \
	$(GDK_PIXBUF_LIBS) \
113
	$(GIO_LIBS)
114 115


116 117 118 119 120 121 122 123 124 125 126 127
install-data-local: install-ms-lib install-libtool-import-lib

uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib


#
# rules to generate built sources
#
# setup autogeneration dependencies
gen_sources = xgen-tec
CLEANFILES = $(gen_sources)

128
gimpthumb-enums.c: $(srcdir)/gimpthumb-enums.h $(GIMP_MKENUMS) Makefile.am
129
	$(AM_V_GEN) $(GIMP_MKENUMS) \
130 131
		--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"gimpthumb-enums.h\"" \
		--fprod "\n/* enumerations from \"@filename@\" */" \
132 133
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static const G@Type@Value values[] =\n  {" \
		--vprod "    { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \
134
		--vtail "    { 0, NULL, NULL }\n  };\n\n  static GType type = 0;\n\n  if (G_UNLIKELY (! type))\n    type = g_@type@_register_static (\"@EnumName@\", values);\n\n  return type;\n}\n" \
135
		$< > xgen-tec \
136 137
	&& cp xgen-tec $(@F) \
	&& rm -f xgen-tec