Makefile.am 11.8 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
	-I$(includedir)			\
79
	$(xobjective_c)
Elliot Lee's avatar
Elliot Lee committed
80

81
lib_LTLIBRARIES = libgimp-@GIMP_API_VERSION@.la libgimpui-@GIMP_API_VERSION@.la
Elliot Lee's avatar
Elliot Lee committed
82

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

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

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

264
libgimp_built_sources = \
265 266
	gimpenums.c

267
libgimp_extra_sources = gimpenums.c.tail
268

269 270 271
libgimp_@GIMP_API_VERSION@_la_SOURCES = \
	$(libgimp_built_sources)	\
	$(libgimp_sources)
272

273
libgimpui_sources = \
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
	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		\
297 298
	gimpimagemetadata.c		\
	gimpimagemetadata.h		\
Simon Budig's avatar
Simon Budig committed
299 300
	gimpitemcombobox.c		\
	gimpitemcombobox.h		\
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
	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		\
320
	gimpzoompreview.h
321

322
libgimpui_built_sources = \
323 324 325
	gimpuimarshal.c			\
	gimpuimarshal.h

326
libgimpui_extra_sources = gimpuimarshal.list
327

328 329 330
libgimpui_@GIMP_API_VERSION@_la_SOURCES = \
	$(libgimpui_built_sources)	\
	$(libgimpui_sources)
331

332
gimpinclude_HEADERS = \
333 334 335 336 337 338 339 340
	gimp.h				\
	gimptypes.h			\
	gimpenums.h			\
	${PDB_WRAPPERS_H}		\
	gimpbrushes.h			\
	gimpbrushselect.h		\
	gimpchannel.h			\
	gimpdrawable.h			\
341
	gimpedit.h			\
342 343 344 345 346
	gimpfontselect.h		\
	gimpgimprc.h			\
	gimpgradients.h			\
	gimpgradientselect.h		\
	gimpimage.h			\
347
	gimpimagecolorprofile.h		\
348 349 350 351 352 353 354 355 356 357 358 359 360 361
	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			\
362
	gimpvectors.h			\
363
	\
364 365 366 367 368 369 370 371 372 373 374 375
	gimpui.h			\
	gimpuitypes.h			\
	gimpaspectpreview.h		\
	gimpbrushmenu.h			\
	gimpbrushselectbutton.h		\
	gimpdrawablepreview.h   	\
	gimpexport.h			\
	gimpfontmenu.h			\
	gimpfontselectbutton.h		\
	gimpgradientmenu.h		\
	gimpgradientselectbutton.h	\
	gimpimagecombobox.h		\
376
	gimpimagemetadata.h		\
377
	gimpitemcombobox.h		\
378 379 380 381 382 383 384 385 386 387
	gimpmenu.h			\
	gimppalettemenu.h		\
	gimppaletteselectbutton.h	\
	gimppatternmenu.h		\
	gimppatternselectbutton.h	\
	gimppixbuf.h			\
	gimpprocbrowserdialog.h		\
	gimpprocview.h			\
	gimpprogressbar.h		\
	gimpselectbutton.h		\
388
	gimpzoompreview.h
389

390
libgimp_@GIMP_API_VERSION@_la_LDFLAGS = \
391 392
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
393 394
	$(libgimp_export_symbols)		\
	$(framework_cocoa)
395

396
EXTRA_libgimp_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimp_def)
397

398
libgimp_@GIMP_API_VERSION@_la_LIBADD = \
399 400 401
	$(libgimpconfig)	\
	$(libgimpcolor)		\
	$(libgimpbase)		\
402
	$(exchndl)		\
403
	$(CAIRO_LIBS)		\
404
	$(GEGL_LIBS)		\
405 406 407
	$(GDK_PIXBUF_LIBS)	\
	$(RT_LIBS)

408
libgimpui_@GIMP_API_VERSION@_la_LDFLAGS = \
409 410
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
411 412
	$(libgimpui_export_symbols)		\
	$(framework_cocoa)
413

414
EXTRA_libgimpui_@GIMP_API_VERSION@_la_DEPENDENCIES = $(gimpui_def)
415

416
libgimpui_@GIMP_API_VERSION@_la_LIBADD = \
417 418 419 420 421 422
	$(libgimp)		\
	$(libgimpwidgets)	\
	$(libgimpcolor)		\
	$(libgimpbase)		\
	$(libgimpmodule)	\
	$(GTK_LIBS)		\
423
	$(GEXIV2_LIBS)		\
424 425
	$(RT_LIBS)

426
EXTRA_DIST = \
427 428 429
	COPYING				\
	gimp.def			\
	gimpui.def			\
430 431
	$(libgimp_extra_sources)	\
	$(libgimpui_extra_sources)
432

433
install-data-local: install-ms-lib install-libtool-import-lib
434

435
uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
436 437 438 439 440

#
# rules to generate built sources
#
# setup autogeneration dependencies
441
gen_sources = xgen-cec xgen-umh xgen-umc
442 443
CLEANFILES = $(gen_sources)

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

459
gimpuimarshal.h: $(srcdir)/gimpuimarshal.list
460 461 462 463
	$(GLIB_GENMARSHAL) --prefix=_gimpui_marshal $(srcdir)/gimpuimarshal.list --header >> xgen-umh \
	&& (cmp -s xgen-umh $(@F) || cp xgen-umh $(@F)) \
	&& rm -f xgen-umh xgen-umh~

464
gimpuimarshal.c: gimpuimarshal.h
465 466 467 468
	echo "#include \"gimpuimarshal.h\"" >> xgen-umc \
	&& $(GLIB_GENMARSHAL) --prefix=_gimpui_marshal $(srcdir)/gimpuimarshal.list --body >> xgen-umc \
	&& cp xgen-umc $(@F) \
	&& rm -f xgen-umc xgen-umc~