Makefile.am 10 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
libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
5
libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
6

7 8
if PLATFORM_WIN32
no_undefined = -no-undefined
9
libgdi32 = -lgdi32
10 11 12 13
else
libm = -lm
endif

14 15
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
16 17
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
18 19 20
framework_cocoa = -framework Cocoa
endif

21 22
if OS_WIN32
gimpwidgets_def = gimpwidgets.def
23
libgimpwidgets_export_symbols = -export-symbols $(srcdir)/gimpwidgets.def
24 25

install-libtool-import-lib:
26
	$(INSTALL) .libs/libgimpwidgets-$(GIMP_API_VERSION).dll.a $(DESTDIR)$(libdir)
27
	$(INSTALL) $(srcdir)/gimpwidgets.def $(DESTDIR)$(libdir)
28 29

uninstall-libtool-import-lib:
30
	-rm $(DESTDIR)$(libdir)/libgimpwidgets-$(GIMP_API_VERSION).dll.a
31
	-rm $(DESTDIR)$(libdir)/gimpwidgets.def
32 33 34 35 36 37
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif

if MS_LIB_AVAILABLE
38
noinst_DATA = gimpwidgets-$(GIMP_API_VERSION).lib
39 40

install-ms-lib:
41
	$(INSTALL) gimpwidgets-$(GIMP_API_VERSION).lib $(DESTDIR)$(libdir)
42 43

uninstall-ms-lib:
44
	-rm $(DESTDIR)$(libdir)/gimpwidgets-$(GIMP_API_VERSION).lib
45

46 47
gimpwidgets-@GIMP_API_VERSION@.lib: gimpwidgets.def
	lib -name:libgimpwidgets-$(GIMP_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gimpwidgets.def -out:$@
48 49 50 51 52 53

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

54
libgimpwidgetsincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimpwidgets
55

56
AM_CPPFLAGS = \
57
	-DG_LOG_DOMAIN=\"LibGimpWidgets\"	\
58 59 60 61
	-DGIMP_WIDGETS_COMPILATION		\
	-I$(top_srcdir)				\
	$(GEGL_CFLAGS)				\
	$(GTK_CFLAGS)				\
62
	$(LCMS_CFLAGS)				\
63 64 65
	-I$(includedir)

AM_CFLAGS = \
66
	$(xobjective_c)
67

68 69 70 71 72 73
AM_CXXFLAGS = \
	$(xobjective_cxx)

AM_LDFLAGS = \
	$(xnone)

74
lib_LTLIBRARIES = libgimpwidgets-@GIMP_API_VERSION@.la
75

76
libgimpwidgets_sources = \
77 78
	gimpbrowser.c			\
	gimpbrowser.h			\
Ell's avatar
Ell committed
79 80
	gimpbusybox.c			\
	gimpbusybox.h			\
81 82
	gimpbutton.c			\
	gimpbutton.h			\
83 84
	gimpcairo-utils.c		\
	gimpcairo-utils.h		\
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
	gimpcellrenderercolor.c		\
	gimpcellrenderercolor.h		\
	gimpcellrenderertoggle.c	\
	gimpcellrenderertoggle.h	\
	gimpchainbutton.c		\
	gimpchainbutton.h		\
	gimpcolorarea.c			\
	gimpcolorarea.h			\
	gimpcolorbutton.c		\
	gimpcolorbutton.h		\
	gimpcolordisplay.c		\
	gimpcolordisplay.h		\
	gimpcolordisplaystack.c		\
	gimpcolordisplaystack.h		\
	gimpcolorhexentry.c		\
	gimpcolorhexentry.h		\
Martin Nordholts's avatar
Martin Nordholts committed
101 102
	gimpcolornotebook.c		\
	gimpcolornotebook.h		\
103 104
	gimpcolorprofilechooserdialog.c	\
	gimpcolorprofilechooserdialog.h	\
105 106
	gimpcolorprofilecombobox.c	\
	gimpcolorprofilecombobox.h	\
Martin Nordholts's avatar
Martin Nordholts committed
107
	gimpcolorprofilestore-private.h	\
108 109
	gimpcolorprofilestore.c		\
	gimpcolorprofilestore.h		\
110 111
	gimpcolorprofileview.c		\
	gimpcolorprofileview.h		\
112 113 114 115 116 117 118 119
	gimpcolorscale.c		\
	gimpcolorscale.h		\
	gimpcolorscales.c		\
	gimpcolorscales.h		\
	gimpcolorselect.c		\
	gimpcolorselect.h		\
	gimpcolorselection.c		\
	gimpcolorselection.h		\
Martin Nordholts's avatar
Martin Nordholts committed
120 121
	gimpcolorselector.c		\
	gimpcolorselector.h		\
122 123 124 125
	gimpcontroller.c		\
	gimpcontroller.h		\
	gimpdialog.c			\
	gimpdialog.h			\
126 127
	gimpeevl.c			\
	gimpeevl.h			\
128 129 130 131
	gimpenumcombobox.c		\
	gimpenumcombobox.h		\
	gimpenumlabel.c			\
	gimpenumlabel.h			\
Martin Nordholts's avatar
Martin Nordholts committed
132 133 134 135
	gimpenumstore.c			\
	gimpenumstore.h			\
	gimpenumwidgets.c		\
	gimpenumwidgets.h		\
136 137 138 139 140 141 142 143
	gimpfileentry.c			\
	gimpfileentry.h			\
	gimpframe.c			\
	gimpframe.h			\
	gimphelpui.c			\
	gimphelpui.h			\
	gimphintbox.c			\
	gimphintbox.h			\
144 145
	gimpicons.c			\
	gimpicons.h			\
146 147 148 149 150 151 152 153 154 155
	gimpintcombobox.c		\
	gimpintcombobox.h		\
	gimpintstore.c			\
	gimpintstore.h			\
	gimpmemsizeentry.c		\
	gimpmemsizeentry.h		\
	gimpnumberpairentry.c		\
	gimpnumberpairentry.h		\
	gimpoffsetarea.c		\
	gimpoffsetarea.h		\
Martin Nordholts's avatar
Martin Nordholts committed
156 157
	gimpoldwidgets.c		\
	gimpoldwidgets.h		\
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
	gimppageselector.c		\
	gimppageselector.h		\
	gimppatheditor.c		\
	gimppatheditor.h		\
	gimppickbutton.c		\
	gimppickbutton.h		\
	gimppixmap.c			\
	gimppixmap.h			\
	gimppreview.c			\
	gimppreview.h			\
	gimppreviewarea.c		\
	gimppreviewarea.h		\
	gimppropwidgets.c		\
	gimppropwidgets.h		\
	gimpquerybox.c			\
	gimpquerybox.h			\
174 175
	gimpruler.c			\
	gimpruler.h			\
176
	gimpscaleentry.c		\
177
	gimpscaleentry.h		\
178 179 180 181 182 183
	gimpscrolledpreview.c		\
	gimpscrolledpreview.h		\
	gimpsizeentry.c			\
	gimpsizeentry.h			\
	gimpstringcombobox.c		\
	gimpstringcombobox.h		\
184 185
	gimpunitcombobox.c		\
	gimpunitcombobox.h		\
186 187
	gimpunitmenu.c			\
	gimpunitmenu.h			\
188 189
	gimpunitstore.c			\
	gimpunitstore.h			\
190 191
	gimpwidgets-error.c		\
	gimpwidgets-error.h		\
192
	gimpwidgets-private.c		\
Martin Nordholts's avatar
Martin Nordholts committed
193 194 195 196 197
	gimpwidgets-private.h		\
	gimpwidgets.c			\
	gimpwidgets.h			\
	gimpwidgetsenums.h		\
	gimpwidgetstypes.h		\
198 199
	gimpwidgetsutils.c		\
	gimpwidgetsutils.h		\
Martin Nordholts's avatar
Martin Nordholts committed
200
	gimpzoommodel.c			\
201 202 203
	gimpzoommodel.h			\
	gimp3migration.c		\
	gimp3migration.h
204

205
libgimpwidgets_built_sources = \
206
	gimpwidgetsenums.c	\
207
	gimpwidgetsmarshal.c	\
Martin Nordholts's avatar
Martin Nordholts committed
208
	gimpwidgetsmarshal.h
209

210
libgimpwidgets_extra_sources = gimpwidgetsmarshal.list
211

212 213 214
libgimpwidgets_@GIMP_API_VERSION@_la_SOURCES = \
	$(libgimpwidgets_built_sources)	\
	$(libgimpwidgets_sources)
215

216
libgimpwidgetsinclude_HEADERS = \
217
	gimpbrowser.h			\
218
	gimpbusybox.h			\
219
	gimpbutton.h			\
220
	gimpcairo-utils.h		\
221 222 223 224 225 226 227 228 229
	gimpcellrenderercolor.h		\
	gimpcellrenderertoggle.h	\
	gimpchainbutton.h		\
	gimpcolorarea.h			\
	gimpcolorbutton.h		\
	gimpcolordisplay.h		\
	gimpcolordisplaystack.h		\
	gimpcolorhexentry.h		\
	gimpcolornotebook.h		\
230
	gimpcolorprofilechooserdialog.h	\
Martin Nordholts's avatar
Martin Nordholts committed
231 232
	gimpcolorprofilecombobox.h	\
	gimpcolorprofilestore.h		\
233
	gimpcolorprofileview.h		\
234 235 236 237
	gimpcolorscale.h		\
	gimpcolorscales.h		\
	gimpcolorselect.h		\
	gimpcolorselection.h		\
Martin Nordholts's avatar
Martin Nordholts committed
238
	gimpcolorselector.h		\
239 240 241 242 243 244 245 246 247 248
	gimpcontroller.h		\
	gimpdialog.h			\
	gimpenumcombobox.h		\
	gimpenumlabel.h			\
	gimpenumstore.h			\
	gimpenumwidgets.h		\
	gimpfileentry.h			\
	gimpframe.h			\
	gimphelpui.h			\
	gimphintbox.h			\
249
	gimpicons.h			\
250 251 252 253 254
	gimpintcombobox.h		\
	gimpintstore.h			\
	gimpmemsizeentry.h		\
	gimpnumberpairentry.h		\
	gimpoffsetarea.h		\
Martin Nordholts's avatar
Martin Nordholts committed
255
	gimpoldwidgets.h		\
256 257 258 259 260 261 262 263
	gimppageselector.h		\
	gimppatheditor.h		\
	gimppickbutton.h		\
	gimppixmap.h			\
	gimppreview.h			\
	gimppreviewarea.h		\
	gimppropwidgets.h		\
	gimpquerybox.h			\
264
	gimpruler.h			\
265
	gimpscaleentry.h		\
266 267 268
	gimpscrolledpreview.h		\
	gimpsizeentry.h			\
	gimpstringcombobox.h		\
269
	gimpunitcombobox.h		\
270
	gimpunitmenu.h			\
271
	gimpunitstore.h			\
272
	gimpwidgets-error.h		\
Martin Nordholts's avatar
Martin Nordholts committed
273 274 275
	gimpwidgets.h			\
	gimpwidgetsenums.h		\
	gimpwidgetstypes.h		\
276
	gimpwidgetsutils.h		\
277 278
	gimpzoommodel.h			\
	gimp3migration.h
279

280
libgimpwidgets_@GIMP_API_VERSION@_la_LDFLAGS = \
281 282
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined) 			\
283
	$(libgimpwidgets_export_symbols)	\
284 285
	$(framework_cocoa)			\
	$(xnone)
286

287
EXTRA_libgimpwidgets_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimpwidgets_def)
288

289
libgimpwidgets_@GIMP_API_VERSION@_la_LIBADD = \
290
	$(libgimpbase)		\
291 292
	$(libgimpcolor)		\
	$(libgimpconfig)	\
293
	$(GEGL_LIBS)		\
294
	$(GTK_LIBS)		\
295
	$(LCMS_LIBS)		\
296 297
	$(libm)			\
	$(libgdi32)
298

299 300
BUILT_SOURCES = \
	$(libgimpwidgets_built_sources)
301 302

EXTRA_DIST = \
303
	gimpwidgets.def			\
304
	$(libgimpwidgets_extra_sources)
305

306 307 308 309 310
#
# platform-dependent source files
#


311
if PLATFORM_OSX_QUARTZ
312
libgimpwidgets_sources += gimppickbutton-quartz.c gimppickbutton-quartz.h
313 314
AM_CPPFLAGS += "-xobjective-c"
else
315 316 317 318 319
libgimpwidgets_sources += \
	gimppickbutton-default.c 	\
	gimppickbutton-default.h	\
	gimppickbutton-kwin.c		\
	gimppickbutton-kwin.h
320 321
endif

322

323 324 325
#
# rules to generate built sources
#
326
# setup autogeneration dependencies
327
gen_sources = xgen-wec xgen-wmh xgen-wmc
328 329
CLEANFILES = $(gen_sources)

330
xgen-wec: $(srcdir)/gimpwidgetsenums.h $(GIMP_MKENUMS) Makefile.am
331
	$(AM_V_GEN) $(GIMP_MKENUMS) \
332
		--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include \"libgimpbase/gimpbase.h\"\n#include \"gimpwidgetsenums.h\"\n#include \"libgimp/libgimp-intl.h\"" \
333
		--fprod "\n/* enumerations from \"@basename@\" */" \
334 335
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static const G@Type@Value values[] =\n  {" \
		--vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
336 337
		--vtail "    { 0, NULL, NULL }\n  };\n" \
		--dhead "  static const Gimp@Type@Desc descs[] =\n  {" \
338
		--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@" \
339
		--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" \
340
		$< > $@
341

342 343 344 345
# 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.
346 347 348 349 350 351 352
$(srcdir)/gimpwidgetsenums.c: xgen-wec
	$(AM_V_GEN) if ! cmp -s $< $@; then \
		cp $< $@; \
	else \
		touch $@ 2> /dev/null \
		|| true; \
	fi
353

354
gimpwidgetsmarshal.h: $(srcdir)/gimpwidgetsmarshal.list
355
	$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gimp_widgets_marshal $(srcdir)/gimpwidgetsmarshal.list --header >> xgen-wmh \
356 357
	&& (cmp -s xgen-wmh $(@F) || cp xgen-wmh $(@F)) \
	&& rm -f xgen-wmh xgen-wmh~
358

359
gimpwidgetsmarshal.c: gimpwidgetsmarshal.h
360
	$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gimp_widgets_marshal $(srcdir)/gimpwidgetsmarshal.list --header --body >> xgen-wmc \
361 362
	&& cp xgen-wmc $(@F) \
	&& rm -f xgen-wmc xgen-wmc~
363

364 365

#
366
# test programs, not installed
367 368
#

369 370 371 372
EXTRA_PROGRAMS = \
	test-preview-area	\
	test-eevl

373

374
test_preview_area_SOURCES = test-preview-area.c
375 376

test_preview_area_LDADD = \
377
	$(GTK_LIBS)	\
378 379
	$(libgimpbase)	\
	$(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
380 381


382 383 384 385
test_eevl_SOURCES = \
	test-eevl.c

test_eevl_LDADD = \
386
	$(GLIB_LIBS)	\
387 388
	$(libgimpcolor)		\
	$(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
389 390 391 392 393 394 395 396 397 398 399 400 401


#
# test programs, not to be built by default and never installed
#

TESTS = test-eevl$(EXEEXT)




CLEANFILES += $(EXTRA_PROGRAMS)

402

403 404 405
install-data-local: install-ms-lib install-libtool-import-lib

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