Makefile.am 12 KB
Newer Older
Elliot Lee's avatar
Elliot Lee committed
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
libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la
libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
8
libgimp = ./libgimp-$(GIMP_API_VERSION).la
9

10 11 12 13
if PLATFORM_WIN32
no_undefined = -no-undefined
endif

14 15 16 17 18
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
framework_cocoa = -framework Cocoa
endif

19
if OS_WIN32
20 21 22 23
if HAVE_EXCHNDL
exchndl = -lexchndl
endif

24 25
gimp_def = gimp.def
gimpui_def = gimpui.def
26 27
libgimp_export_symbols = -export-symbols $(srcdir)/gimp.def
libgimpui_export_symbols = -export-symbols $(srcdir)/gimpui.def
28 29

install-libtool-import-lib:
30 31
	$(INSTALL) .libs/libgimp-$(GIMP_API_VERSION).dll.a $(DESTDIR)$(libdir)
	$(INSTALL) .libs/libgimpui-$(GIMP_API_VERSION).dll.a $(DESTDIR)$(libdir)
32 33
	$(INSTALL) $(srcdir)/gimp.def $(DESTDIR)$(libdir)
	$(INSTALL) $(srcdir)/gimpui.def $(DESTDIR)$(libdir)
34 35

uninstall-libtool-import-lib:
36 37
	-rm $(DESTDIR)$(libdir)/libgimp-$(GIMP_API_VERSION).dll.a
	-rm $(DESTDIR)$(libdir)/libgimpui-$(GIMP_API_VERSION).dll.a
38 39
	-rm $(DESTDIR)$(libdir)/gimp.def
	-rm $(DESTDIR)$(libdir)/gimpui.def
40 41 42 43 44 45
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif

if MS_LIB_AVAILABLE
46
noinst_DATA = gimp-$(GIMP_API_VERSION).lib gimpui-$(GIMP_API_VERSION).lib
47 48

install-ms-lib:
49 50
	$(INSTALL) gimp-$(GIMP_API_VERSION).lib $(DESTDIR)$(libdir)
	$(INSTALL) gimpui-$(GIMP_API_VERSION).lib $(DESTDIR)$(libdir)
51 52

uninstall-ms-lib:
53 54
	-rm $(DESTDIR)$(libdir)/gimp-$(GIMP_API_VERSION).lib
	-rm $(DESTDIR)$(libdir)/gimpui-$(GIMP_API_VERSION).lib
55

56 57
gimp-@GIMP_API_VERSION@.lib: gimp.def
	lib -name:libgimp-$(GIMP_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gimp.def -out:$@
58

59 60
gimpui-@GIMP_API_VERSION@.lib: gimpui.def
	lib -name:libgimpui-$(GIMP_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gimpui.def -out:$@
61 62 63 64 65 66

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

67
gimpincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimp
Elliot Lee's avatar
Elliot Lee committed
68

69
AM_CPPFLAGS = \
70 71
	-DGIMPDIR=\""$(gimpdir)"\"				\
	-DGIMP_USER_VERSION=\"$(GIMP_USER_VERSION)\"		\
72
	-DG_LOG_DOMAIN=\"LibGimp\"	\
73 74 75 76
	-DGIMP_COMPILATION		\
	-I$(top_srcdir)			\
	$(GTK_CFLAGS)			\
	$(GEGL_CFLAGS)			\
77
	$(GEXIV2_CFLAGS)		\
78 79 80
	-I$(includedir)

AM_CFLAGS = \
81
	$(xobjective_c)
Elliot Lee's avatar
Elliot Lee committed
82

83
lib_LTLIBRARIES = libgimp-@GIMP_API_VERSION@.la libgimpui-@GIMP_API_VERSION@.la
Elliot Lee's avatar
Elliot Lee committed
84

85
PDB_WRAPPERS_C = \
86
	gimp_pdb.c			\
87
	gimpbrush_pdb.c			\
88 89
	gimpbrushes_pdb.c		\
	gimpbrushselect_pdb.c		\
90
	gimpbuffer_pdb.c		\
91 92
	gimpchannel_pdb.c		\
	gimpcolor_pdb.c			\
93
	gimpcontext_pdb.c		\
94
	gimpdebug_pdb.c			\
95 96
	gimpdisplay_pdb.c		\
	gimpdrawable_pdb.c		\
97
	gimpdrawablecolor_pdb.c		\
98
	gimpdrawabletransform_pdb.c	\
99
	gimpdynamics_pdb.c		\
100 101 102
	gimpedit_pdb.c			\
	gimpfileops_pdb.c		\
	gimpfloatingsel_pdb.c		\
103
	gimpfonts_pdb.c			\
104
	gimpfontselect_pdb.c		\
105
	gimpgimprc_pdb.c		\
106
	gimpgradient_pdb.c		\
107
	gimpgradients_pdb.c		\
108 109 110
	gimpgradientselect_pdb.c	\
	gimphelp_pdb.c			\
	gimpimage_pdb.c			\
111
	gimpimagecolorprofile_pdb.c	\
112
	gimpimageconvert_pdb.c		\
113
	gimpimagegrid_pdb.c		\
114
	gimpimageguides_pdb.c		\
115
	gimpimagesamplepoints_pdb.c	\
116
	gimpimageselect_pdb.c		\
117
	gimpimagetransform_pdb.c	\
118
	gimpimageundo_pdb.c		\
119
	gimpitem_pdb.c			\
120
	gimpitemtransform_pdb.c		\
121 122
	gimplayer_pdb.c			\
	gimpmessage_pdb.c		\
Michael Natterer's avatar
Michael Natterer committed
123
	gimppainttools_pdb.c		\
124
	gimppalette_pdb.c		\
125 126
	gimppalettes_pdb.c		\
	gimppaletteselect_pdb.c		\
127
	gimppaths_pdb.c			\
128
	gimppattern_pdb.c		\
129 130 131 132
	gimppatterns_pdb.c		\
	gimppatternselect_pdb.c		\
	gimpplugin_pdb.c		\
	gimpproceduraldb_pdb.c		\
133
	gimpprogress_pdb.c		\
134
	gimpselection_pdb.c		\
135
	gimpselectiontools_pdb.c	\
136
	gimptextlayer_pdb.c		\
137
	gimptexttool_pdb.c		\
138
	gimptransformtools_pdb.c	\
139 140
	gimpunit_pdb.c			\
	gimpvectors_pdb.c
141 142

PDB_WRAPPERS_H = \
143
	gimp_pdb_headers.h		\
144
	gimp_pdb.h			\
145
	gimpbrush_pdb.h			\
146 147
	gimpbrushes_pdb.h		\
	gimpbrushselect_pdb.h		\
148
	gimpbuffer_pdb.h		\
149 150
	gimpchannel_pdb.h		\
	gimpcolor_pdb.h			\
151
	gimpcontext_pdb.h		\
152
	gimpdebug_pdb.h			\
153 154
	gimpdisplay_pdb.h		\
	gimpdrawable_pdb.h		\
155
	gimpdrawablecolor_pdb.h		\
156
	gimpdrawabletransform_pdb.h	\
157
	gimpdynamics_pdb.h		\
158 159 160
	gimpedit_pdb.h			\
	gimpfileops_pdb.h		\
	gimpfloatingsel_pdb.h		\
161
	gimpfonts_pdb.h			\
162
	gimpfontselect_pdb.h		\
163
	gimpgimprc_pdb.h		\
164
	gimpgradient_pdb.h		\
165
	gimpgradients_pdb.h		\
166 167 168
	gimpgradientselect_pdb.h	\
	gimphelp_pdb.h			\
	gimpimage_pdb.h			\
169
	gimpimagecolorprofile_pdb.h	\
170
	gimpimageconvert_pdb.h		\
171
	gimpimagegrid_pdb.h		\
172
	gimpimageguides_pdb.h		\
173
	gimpimagesamplepoints_pdb.h	\
174
	gimpimageselect_pdb.h		\
175
	gimpimagetransform_pdb.h	\
176
	gimpimageundo_pdb.h		\
177
	gimpitem_pdb.h			\
178
	gimpitemtransform_pdb.h		\
179 180
	gimplayer_pdb.h			\
	gimpmessage_pdb.h		\
Michael Natterer's avatar
Michael Natterer committed
181
	gimppainttools_pdb.h		\
182
	gimppalette_pdb.h		\
183 184
	gimppalettes_pdb.h		\
	gimppaletteselect_pdb.h		\
185
	gimppaths_pdb.h			\
186
	gimppattern_pdb.h		\
187 188 189 190
	gimppatterns_pdb.h		\
	gimppatternselect_pdb.h		\
	gimpplugin_pdb.h		\
	gimpproceduraldb_pdb.h		\
191
	gimpprogress_pdb.h		\
192
	gimpselection_pdb.h		\
193
	gimpselectiontools_pdb.h	\
194
	gimptextlayer_pdb.h		\
195
	gimptexttool_pdb.h		\
196
	gimptransformtools_pdb.h	\
197 198
	gimpunit_pdb.h			\
	gimpvectors_pdb.h
199

200
libgimp_sources = \
201 202 203
	gimp.c			\
	gimp.h			\
	gimptypes.h		\
204
	gimpenums.h		\
205 206
	${PDB_WRAPPERS_C}	\
	${PDB_WRAPPERS_H}	\
207 208
	gimpbrushes.c		\
	gimpbrushes.h		\
209 210
	gimpbrushselect.c	\
	gimpbrushselect.h	\
211 212 213 214
	gimpchannel.c		\
	gimpchannel.h		\
	gimpdrawable.c		\
	gimpdrawable.h		\
215 216
	gimpedit.c		\
	gimpedit.h		\
217 218
	gimpfontselect.c	\
	gimpfontselect.h	\
219 220
	gimpgimprc.c		\
	gimpgimprc.h		\
221 222
	gimpgradients.c		\
	gimpgradients.h		\
223
	gimpgradientselect.c	\
Sven Neumann's avatar
Sven Neumann committed
224
	gimpgradientselect.h	\
225 226
	gimpimage.c		\
	gimpimage.h		\
227 228
	gimpimagecolorprofile.c	\
	gimpimagecolorprofile.h	\
229 230
	gimplayer.c		\
	gimplayer.h		\
231 232
	gimppalette.c		\
	gimppalette.h		\
233 234
	gimppalettes.c		\
	gimppalettes.h		\
235 236
	gimppaletteselect.c	\
	gimppaletteselect.h	\
237 238
	gimppatterns.c		\
	gimppatterns.h		\
239 240
	gimppatternselect.c	\
	gimppatternselect.h	\
241 242
	gimppixbuf.c		\
	gimppixbuf.h		\
243 244
	gimppixelfetcher.c	\
	gimppixelfetcher.h	\
245 246
	gimppixelrgn.c		\
	gimppixelrgn.h		\
247 248
	gimpplugin.c		\
	gimpplugin.h		\
249 250
	gimpproceduraldb.c	\
	gimpproceduraldb.h	\
251 252
	gimpprogress.c		\
	gimpprogress.h		\
253 254
	gimpregioniterator.c	\
	gimpregioniterator.h	\
255 256 257 258
	gimpselection.c		\
	gimpselection.h		\
	gimptile.c		\
	gimptile.h		\
259 260
	gimptilebackendplugin.c \
	gimptilebackendplugin.h \
261 262
	gimpunitcache.c		\
	gimpunitcache.h		\
263 264
	gimpvectors.c		\
	gimpvectors.h		\
265 266
	stdplugins-intl.h	\
	libgimp-intl.h
Manish Singh's avatar
Manish Singh committed
267

268
libgimp_built_sources = \
269 270
	gimpenums.c

271
libgimp_extra_sources = gimpenums.c.tail
272

273 274 275
libgimp_@GIMP_API_VERSION@_la_SOURCES = \
	$(libgimp_built_sources)	\
	$(libgimp_sources)
276

277
libgimpui_sources = \
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
	gimpui.c			\
	gimpui.h			\
	gimpuitypes.h			\
	gimpaspectpreview.c     	\
	gimpaspectpreview.h     	\
	gimpbrushmenu.c			\
	gimpbrushmenu.h			\
	gimpbrushselectbutton.c		\
	gimpbrushselectbutton.h		\
	gimpdrawablepreview.c		\
	gimpdrawablepreview.h		\
	gimpexport.c			\
	gimpexport.h			\
	gimpfontmenu.c			\
	gimpfontmenu.h			\
	gimpfontselectbutton.c		\
	gimpfontselectbutton.h		\
	gimpgradientmenu.c 		\
	gimpgradientmenu.h 		\
	gimpgradientselectbutton.c	\
	gimpgradientselectbutton.h	\
	gimpimagecombobox.c		\
	gimpimagecombobox.h		\
301 302
	gimpimagemetadata.c		\
	gimpimagemetadata.h		\
Simon Budig's avatar
Simon Budig committed
303 304
	gimpitemcombobox.c		\
	gimpitemcombobox.h		\
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323
	gimpmenu.c			\
	gimpmenu.h			\
	gimppalettemenu.c		\
	gimppalettemenu.h		\
	gimppaletteselectbutton.c	\
	gimppaletteselectbutton.h	\
	gimppatternmenu.c		\
	gimppatternmenu.h		\
	gimppatternselectbutton.c	\
	gimppatternselectbutton.h	\
	gimpprocbrowserdialog.c		\
	gimpprocbrowserdialog.h		\
	gimpprocview.c			\
	gimpprocview.h			\
	gimpprogressbar.c		\
	gimpprogressbar.h		\
	gimpselectbutton.c		\
	gimpselectbutton.h		\
	gimpzoompreview.c		\
324
	gimpzoompreview.h
325

326
libgimpui_built_sources = \
327 328 329
	gimpuimarshal.c			\
	gimpuimarshal.h

330
libgimpui_extra_sources = gimpuimarshal.list
331

332 333 334
libgimpui_@GIMP_API_VERSION@_la_SOURCES = \
	$(libgimpui_built_sources)	\
	$(libgimpui_sources)
335

336
gimpinclude_HEADERS = \
337 338 339 340 341 342 343 344
	gimp.h				\
	gimptypes.h			\
	gimpenums.h			\
	${PDB_WRAPPERS_H}		\
	gimpbrushes.h			\
	gimpbrushselect.h		\
	gimpchannel.h			\
	gimpdrawable.h			\
345
	gimpedit.h			\
346 347 348 349 350
	gimpfontselect.h		\
	gimpgimprc.h			\
	gimpgradients.h			\
	gimpgradientselect.h		\
	gimpimage.h			\
351
	gimpimagecolorprofile.h		\
352 353 354 355 356 357 358 359 360 361 362 363 364 365
	gimplayer.h			\
	gimppalette.h			\
	gimppalettes.h			\
	gimppaletteselect.h		\
	gimppatterns.h			\
	gimppatternselect.h		\
	gimppixelfetcher.h		\
	gimppixelrgn.h			\
	gimpplugin.h			\
	gimpproceduraldb.h		\
	gimpprogress.h			\
	gimpregioniterator.h		\
	gimpselection.h			\
	gimptile.h			\
366
	gimpvectors.h			\
367
	\
368 369 370 371 372 373 374 375 376 377 378 379
	gimpui.h			\
	gimpuitypes.h			\
	gimpaspectpreview.h		\
	gimpbrushmenu.h			\
	gimpbrushselectbutton.h		\
	gimpdrawablepreview.h   	\
	gimpexport.h			\
	gimpfontmenu.h			\
	gimpfontselectbutton.h		\
	gimpgradientmenu.h		\
	gimpgradientselectbutton.h	\
	gimpimagecombobox.h		\
380
	gimpimagemetadata.h		\
381
	gimpitemcombobox.h		\
382 383 384 385 386 387 388 389 390 391
	gimpmenu.h			\
	gimppalettemenu.h		\
	gimppaletteselectbutton.h	\
	gimppatternmenu.h		\
	gimppatternselectbutton.h	\
	gimppixbuf.h			\
	gimpprocbrowserdialog.h		\
	gimpprocview.h			\
	gimpprogressbar.h		\
	gimpselectbutton.h		\
392
	gimpzoompreview.h
393

394
libgimp_@GIMP_API_VERSION@_la_LDFLAGS = \
395 396
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
397 398
	$(libgimp_export_symbols)		\
	$(framework_cocoa)
399

400
EXTRA_libgimp_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimp_def)
401

402
libgimp_@GIMP_API_VERSION@_la_LIBADD = \
403 404 405
	$(libgimpconfig)	\
	$(libgimpcolor)		\
	$(libgimpbase)		\
406
	$(exchndl)		\
407
	$(CAIRO_LIBS)		\
408
	$(GEGL_LIBS)		\
409 410 411
	$(GDK_PIXBUF_LIBS)	\
	$(RT_LIBS)

412
libgimpui_@GIMP_API_VERSION@_la_LDFLAGS = \
413 414
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
415 416
	$(libgimpui_export_symbols)		\
	$(framework_cocoa)
417

418
EXTRA_libgimpui_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimpui_def)
419

420
libgimpui_@GIMP_API_VERSION@_la_LIBADD = \
421 422 423 424 425 426
	$(libgimp)		\
	$(libgimpwidgets)	\
	$(libgimpcolor)		\
	$(libgimpbase)		\
	$(libgimpmodule)	\
	$(GTK_LIBS)		\
427
	$(GEXIV2_LIBS)		\
428 429
	$(RT_LIBS)

430
EXTRA_DIST = \
431 432 433
	COPYING				\
	gimp.def			\
	gimpui.def			\
434 435
	$(libgimp_extra_sources)	\
	$(libgimpui_extra_sources)
436

437
install-data-local: install-ms-lib install-libtool-import-lib
438

439
uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
440 441 442 443 444

#
# rules to generate built sources
#
# setup autogeneration dependencies
445
gen_sources = xgen-cec xgen-umh xgen-umc
446 447
CLEANFILES = $(gen_sources)

448
gimpenums.c: $(srcdir)/gimpenums.h $(srcdir)/gimpenums.c.tail $(GIMP_MKENUMS) Makefile.am
449
	$(AM_V_GEN) $(GIMP_MKENUMS) \
450
		--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include <gegl.h>\n#undef GIMP_DISABLE_DEPRECATED\n#include \"libgimpbase/gimpbase.h\"\n#include \"libgimpbase/gimpbase-private.h\"\n#include \"libgimpconfig/gimpconfigenums.h\"\n#include \"gimpenums.h\"" \
451 452
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static const G@Type@Value values[] =\n  {" \
453 454 455
		--vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "    { 0, NULL, NULL }\n  };\n" \
		--dhead "  static const Gimp@Type@Desc descs[] =\n  {" \
456
		--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@" \
457
		--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" \
458
		$< > xgen-cec \
459
	&& cat $(srcdir)/gimpenums.c.tail >> xgen-cec \
460 461
	&& cp xgen-cec $(@F) \
	&& rm -f xgen-cec
462

463
gimpuimarshal.h: $(srcdir)/gimpuimarshal.list
464
	$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gimpui_marshal $(srcdir)/gimpuimarshal.list --header >> xgen-umh \
465 466 467
	&& (cmp -s xgen-umh $(@F) || cp xgen-umh $(@F)) \
	&& rm -f xgen-umh xgen-umh~

468
gimpuimarshal.c: gimpuimarshal.h
469
	$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gimpui_marshal $(srcdir)/gimpuimarshal.list --header --body >> xgen-umc \
470 471
	&& cp xgen-umc $(@F) \
	&& rm -f xgen-umc xgen-umc~