Makefile.am 12.3 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
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
16 17
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
18 19 20
framework_cocoa = -framework Cocoa
endif

21
if OS_WIN32
22 23 24 25
if HAVE_EXCHNDL
exchndl = -lexchndl
endif

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

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

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

if MS_LIB_AVAILABLE
48
noinst_DATA = gimp-$(GIMP_API_VERSION).lib gimpui-$(GIMP_API_VERSION).lib
49 50

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

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

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

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

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

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

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

AM_CFLAGS = \
83
	$(xobjective_c)
Elliot Lee's avatar
Elliot Lee committed
84

85 86 87 88 89 90
AM_CXXFLAGS = \
	$(xobjective_cxx)

AM_LDFLAGS = \
	$(xnone)

91
lib_LTLIBRARIES = libgimp-@GIMP_API_VERSION@.la libgimpui-@GIMP_API_VERSION@.la
Elliot Lee's avatar
Elliot Lee committed
92

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

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

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

278
libgimp_built_sources = \
279 280
	gimpenums.c

281
libgimp_extra_sources = gimpenums.c.tail
282

283 284 285
libgimp_@GIMP_API_VERSION@_la_SOURCES = \
	$(libgimp_built_sources)	\
	$(libgimp_sources)
286

287
libgimpui_sources = \
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
	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		\
311 312
	gimpimagemetadata.c		\
	gimpimagemetadata.h		\
Simon Budig's avatar
Simon Budig committed
313 314
	gimpitemcombobox.c		\
	gimpitemcombobox.h		\
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333
	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		\
334
	gimpzoompreview.h
335

336
libgimpui_built_sources = \
337 338 339
	gimpuimarshal.c			\
	gimpuimarshal.h

340
libgimpui_extra_sources = gimpuimarshal.list
341

342 343 344
libgimpui_@GIMP_API_VERSION@_la_SOURCES = \
	$(libgimpui_built_sources)	\
	$(libgimpui_sources)
345

346
gimpinclude_HEADERS = \
347 348 349 350 351 352 353 354
	gimp.h				\
	gimptypes.h			\
	gimpenums.h			\
	${PDB_WRAPPERS_H}		\
	gimpbrushes.h			\
	gimpbrushselect.h		\
	gimpchannel.h			\
	gimpdrawable.h			\
355
	gimpedit.h			\
356 357 358 359 360
	gimpfontselect.h		\
	gimpgimprc.h			\
	gimpgradients.h			\
	gimpgradientselect.h		\
	gimpimage.h			\
361
	gimpimagecolorprofile.h		\
362 363 364 365 366 367 368 369 370 371 372 373 374 375
	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			\
376
	gimpvectors.h			\
377
	\
378 379 380 381 382 383 384 385 386 387 388 389
	gimpui.h			\
	gimpuitypes.h			\
	gimpaspectpreview.h		\
	gimpbrushmenu.h			\
	gimpbrushselectbutton.h		\
	gimpdrawablepreview.h   	\
	gimpexport.h			\
	gimpfontmenu.h			\
	gimpfontselectbutton.h		\
	gimpgradientmenu.h		\
	gimpgradientselectbutton.h	\
	gimpimagecombobox.h		\
390
	gimpimagemetadata.h		\
391
	gimpitemcombobox.h		\
392 393 394 395 396 397 398 399 400 401
	gimpmenu.h			\
	gimppalettemenu.h		\
	gimppaletteselectbutton.h	\
	gimppatternmenu.h		\
	gimppatternselectbutton.h	\
	gimppixbuf.h			\
	gimpprocbrowserdialog.h		\
	gimpprocview.h			\
	gimpprogressbar.h		\
	gimpselectbutton.h		\
402
	gimpzoompreview.h
403

404
libgimp_@GIMP_API_VERSION@_la_LDFLAGS = \
405 406
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
407
	$(libgimp_export_symbols)		\
408 409
	$(framework_cocoa)			\
	$(xnone)
410

411
EXTRA_libgimp_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimp_def)
412

413
libgimp_@GIMP_API_VERSION@_la_LIBADD = \
414 415 416
	$(libgimpconfig)	\
	$(libgimpcolor)		\
	$(libgimpbase)		\
417
	$(exchndl)		\
418
	$(CAIRO_LIBS)		\
419
	$(GEGL_LIBS)		\
420 421 422
	$(GDK_PIXBUF_LIBS)	\
	$(RT_LIBS)

423
libgimpui_@GIMP_API_VERSION@_la_LDFLAGS = \
424 425
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
426
	$(libgimpui_export_symbols)		\
427 428
	$(framework_cocoa)			\
	$(xnone)
429

430
EXTRA_libgimpui_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimpui_def)
431

432
libgimpui_@GIMP_API_VERSION@_la_LIBADD = \
433 434 435 436 437 438
	$(libgimp)		\
	$(libgimpwidgets)	\
	$(libgimpcolor)		\
	$(libgimpbase)		\
	$(libgimpmodule)	\
	$(GTK_LIBS)		\
439
	$(GEXIV2_LIBS)		\
440 441
	$(RT_LIBS)

442 443 444 445
BUILT_SOURCES = \
	$(libgimp_built_sources) \
	$(libgimpui_built_sources)

446
EXTRA_DIST = \
447 448 449
	COPYING				\
	gimp.def			\
	gimpui.def			\
450 451
	$(libgimp_extra_sources)	\
	$(libgimpui_extra_sources)
452

453
install-data-local: install-ms-lib install-libtool-import-lib
454

455
uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
456 457 458 459 460

#
# rules to generate built sources
#
# setup autogeneration dependencies
461
gen_sources = xgen-cec xgen-umh xgen-umc
462 463
CLEANFILES = $(gen_sources)

464
gimpenums.c: $(srcdir)/gimpenums.h $(srcdir)/gimpenums.c.tail $(GIMP_MKENUMS) Makefile.am
465
	$(AM_V_GEN) $(GIMP_MKENUMS) \
466
		--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\"" \
467 468
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static const G@Type@Value values[] =\n  {" \
469 470 471
		--vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "    { 0, NULL, NULL }\n  };\n" \
		--dhead "  static const Gimp@Type@Desc descs[] =\n  {" \
472
		--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@" \
473
		--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" \
474
		$< > xgen-cec \
475
	&& cat $(srcdir)/gimpenums.c.tail >> xgen-cec \
476 477
	&& cp xgen-cec $(@F) \
	&& rm -f xgen-cec
478

479
gimpuimarshal.h: $(srcdir)/gimpuimarshal.list
480
	$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gimpui_marshal $(srcdir)/gimpuimarshal.list --header >> xgen-umh \
481 482 483
	&& (cmp -s xgen-umh $(@F) || cp xgen-umh $(@F)) \
	&& rm -f xgen-umh xgen-umh~

484
gimpuimarshal.c: gimpuimarshal.h
485
	$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gimpui_marshal $(srcdir)/gimpuimarshal.list --header --body >> xgen-umc \
486 487
	&& cp xgen-umc $(@F) \
	&& rm -f xgen-umc xgen-umc~