summaryrefslogtreecommitdiffstats
path: root/libgimpthumb/Makefile.am
blob: 2655379bb737e39cca17ba95d506d175c6ec7175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
## Process this file with automake to produce Makefile.in

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

if PLATFORM_WIN32
no_undefined = -no-undefined
endif

if PLATFORM_OSX
xobjective_c = "-xobjective-c"
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
framework_cocoa = -framework Cocoa
endif

if OS_WIN32
gimpthumb_def = gimpthumb.def
libgimpthumb_export_symbols = -export-symbols $(srcdir)/gimpthumb.def

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

uninstall-libtool-import-lib:
	-rm $(DESTDIR)$(libdir)/libgimpthumb-$(GIMP_API_VERSION).dll.a
	-rm $(DESTDIR)$(libdir)/gimpthumb.def
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif

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

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

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

gimpthumb-@GIMP_API_VERSION@.lib: gimpthumb.def
	lib -name:libgimpthumb-$(GIMP_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gimpthumb.def -out:$@

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

libgimpthumbincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimpthumb

AM_CPPFLAGS = \
	-DG_LOG_DOMAIN=\"LibGimpThumb\"	\
	-DGIMP_THUMB_COMPILATION	\
	-I$(top_srcdir)			\
	$(GDK_PIXBUF_CFLAGS)		\
	$(GIO_CFLAGS)			\
	-I$(includedir)

AM_CFLAGS = \
	$(xobjective_c)

AM_CXXFLAGS = \
	$(xobjective_cxx)

AM_LDFLAGS = \
	$(xnone)

EXTRA_DIST = \
	gimpthumb.def

lib_LTLIBRARIES = libgimpthumb-@GIMP_API_VERSION@.la

libgimpthumb_@GIMP_API_VERSION@_la_SOURCES = \
	gimpthumb.h		\
	gimpthumb-enums.c	\
	gimpthumb-enums.h	\
	gimpthumb-error.c	\
	gimpthumb-error.h	\
	gimpthumb-types.h	\
	gimpthumb-utils.c	\
	gimpthumb-utils.h	\
	gimpthumbnail.c		\
	gimpthumbnail.h

libgimpthumbinclude_HEADERS = \
	gimpthumb.h		\
	gimpthumb-enums.h	\
	gimpthumb-error.h	\
	gimpthumb-types.h	\
	gimpthumb-utils.h	\
	gimpthumbnail.h

libgimpthumb_@GIMP_API_VERSION@_la_LDFLAGS = \
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
	$(libgimpbase)				\
	$(libgimpthumb_export_symbols)		\
	$(framework_cocoa)			\
	$(xnone)

libgimpthumb_@GIMP_API_VERSION@_la_LIBADD = \
	$(GDK_PIXBUF_LIBS)	\
	$(GIO_LIBS)


noinst_PROGRAMS = gimp-thumbnail-list

gimp_thumbnail_list_SOURCES = gimp-thumbnail-list.c

gimp_thumbnail_list_LDADD = \
	libgimpthumb-$(GIMP_API_VERSION).la \
	$(GDK_PIXBUF_LIBS) \
	$(GIO_LIBS)


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)

gimpthumb-enums.c: $(srcdir)/gimpthumb-enums.h $(GIMP_MKENUMS) Makefile.am
	$(AM_V_GEN) $(GIMP_MKENUMS) \
		--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"gimpthumb-enums.h\"" \
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static const G@Type@Value values[] =\n  {" \
		--vprod "    { @VALUENAME@, @valuedesc@, \"@valuenick@\" }," \
		--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" \
		$< > xgen-tec \
	&& cp xgen-tec $(@F) \
	&& rm -f xgen-tec