Makefile.am 11.2 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 20 21 22 23 24 25
if OS_WIN32
gimp_def = gimp.def
gimpui_def = gimpui.def
libgimp_export_symbols = -export-symbols gimp.def
libgimpui_export_symbols = -export-symbols gimpui.def

install-libtool-import-lib:
26 27
	$(INSTALL) .libs/libgimp-$(GIMP_API_VERSION).dll.a $(DESTDIR)$(libdir)
	$(INSTALL) .libs/libgimpui-$(GIMP_API_VERSION).dll.a $(DESTDIR)$(libdir)
28 29
	$(INSTALL) gimp.def $(DESTDIR)$(libdir)
	$(INSTALL) gimpui.def $(DESTDIR)$(libdir)
30 31

uninstall-libtool-import-lib:
32 33
	-rm $(DESTDIR)$(libdir)/libgimp-$(GIMP_API_VERSION).dll.a
	-rm $(DESTDIR)$(libdir)/libgimpui-$(GIMP_API_VERSION).dll.a
34 35
	-rm $(DESTDIR)$(libdir)/gimp.def
	-rm $(DESTDIR)$(libdir)/gimpui.def
36 37 38 39 40 41
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif

if MS_LIB_AVAILABLE
42
noinst_DATA = gimp-$(GIMP_API_VERSION).lib gimpui-$(GIMP_API_VERSION).lib 
43 44

install-ms-lib:
45 46
	$(INSTALL) gimp-$(GIMP_API_VERSION).lib $(DESTDIR)$(libdir)
	$(INSTALL) gimpui-$(GIMP_API_VERSION).lib $(DESTDIR)$(libdir)
47 48

uninstall-ms-lib:
49 50
	-rm $(DESTDIR)$(libdir)/gimp-$(GIMP_API_VERSION).lib
	-rm $(DESTDIR)$(libdir)/gimpui-$(GIMP_API_VERSION).lib
51

52 53
gimp-@GIMP_API_VERSION@.lib: gimp.def
	lib -name:libgimp-$(GIMP_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gimp.def -out:$@
54

55 56
gimpui-@GIMP_API_VERSION@.lib: gimpui.def
	lib -name:libgimpui-$(GIMP_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gimpui.def -out:$@
57 58 59 60 61 62

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

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

65
AM_CPPFLAGS = \
66
	-DG_LOG_DOMAIN=\"LibGimp\"	\
67 68 69 70 71
	-DGIMP_COMPILATION		\
	-I$(top_srcdir)			\
	$(GTK_CFLAGS)			\
	$(GEGL_CFLAGS)			\
	-I$(includedir)			\
72
	$(xobjective_c)
Elliot Lee's avatar
Elliot Lee committed
73

74
lib_LTLIBRARIES = libgimp-@GIMP_API_VERSION@.la libgimpui-@GIMP_API_VERSION@.la
Elliot Lee's avatar
Elliot Lee committed
75

76
PDB_WRAPPERS_C = \
77
	gimp_pdb.c			\
78
	gimpbrush_pdb.c			\
79 80
	gimpbrushes_pdb.c		\
	gimpbrushselect_pdb.c		\
81
	gimpbuffer_pdb.c		\
82 83
	gimpchannel_pdb.c		\
	gimpcolor_pdb.c			\
84
	gimpcontext_pdb.c		\
85 86 87
	gimpconvert_pdb.c		\
	gimpdisplay_pdb.c		\
	gimpdrawable_pdb.c		\
88
	gimpdrawabletransform_pdb.c	\
89
	gimpdynamics_pdb.c		\
90 91 92
	gimpedit_pdb.c			\
	gimpfileops_pdb.c		\
	gimpfloatingsel_pdb.c		\
93
	gimpfonts_pdb.c			\
94
	gimpfontselect_pdb.c		\
95
	gimpgimprc_pdb.c		\
96
	gimpgradient_pdb.c		\
97
	gimpgradients_pdb.c		\
98 99
	gimpgradientselect_pdb.c	\
	gimpguides_pdb.c		\
100
	gimpgrid_pdb.c			\
101 102
	gimphelp_pdb.c			\
	gimpimage_pdb.c			\
103
	gimpimageselect_pdb.c		\
104
	gimpitem_pdb.c			\
105
	gimpitemtransform_pdb.c		\
106 107
	gimplayer_pdb.c			\
	gimpmessage_pdb.c		\
Michael Natterer's avatar
Michael Natterer committed
108
	gimppainttools_pdb.c		\
109
	gimppalette_pdb.c		\
110 111
	gimppalettes_pdb.c		\
	gimppaletteselect_pdb.c		\
112
	gimppaths_pdb.c			\
113
	gimppattern_pdb.c		\
114 115 116 117
	gimppatterns_pdb.c		\
	gimppatternselect_pdb.c		\
	gimpplugin_pdb.c		\
	gimpproceduraldb_pdb.c		\
118
	gimpprogress_pdb.c		\
119
	gimpselection_pdb.c		\
120
	gimpselectiontools_pdb.c	\
121
	gimptextlayer_pdb.c		\
122
	gimptexttool_pdb.c		\
123
	gimptransformtools_pdb.c	\
124
	gimpundo_pdb.c			\
125 126
	gimpunit_pdb.c			\
	gimpvectors_pdb.c
127 128

PDB_WRAPPERS_H = \
129
	gimp_pdb_headers.h		\
130
	gimp_pdb.h			\
131
	gimpbrush_pdb.h			\
132 133
	gimpbrushes_pdb.h		\
	gimpbrushselect_pdb.h		\
134
	gimpbuffer_pdb.h		\
135 136
	gimpchannel_pdb.h		\
	gimpcolor_pdb.h			\
137
	gimpcontext_pdb.h		\
138 139 140
	gimpconvert_pdb.h		\
	gimpdisplay_pdb.h		\
	gimpdrawable_pdb.h		\
141
	gimpdrawabletransform_pdb.h	\
142
	gimpdynamics_pdb.h		\
143 144 145
	gimpedit_pdb.h			\
	gimpfileops_pdb.h		\
	gimpfloatingsel_pdb.h		\
146
	gimpfonts_pdb.h			\
147
	gimpfontselect_pdb.h		\
148
	gimpgimprc_pdb.h		\
149
	gimpgradient_pdb.h		\
150
	gimpgradients_pdb.h		\
151
	gimpgradientselect_pdb.h	\
152
	gimpgrid_pdb.h			\
153 154 155
	gimpguides_pdb.h		\
	gimphelp_pdb.h			\
	gimpimage_pdb.h			\
156
	gimpimageselect_pdb.h		\
157
	gimpitem_pdb.h			\
158
	gimpitemtransform_pdb.h		\
159 160
	gimplayer_pdb.h			\
	gimpmessage_pdb.h		\
Michael Natterer's avatar
Michael Natterer committed
161
	gimppainttools_pdb.h		\
162
	gimppalette_pdb.h		\
163 164
	gimppalettes_pdb.h		\
	gimppaletteselect_pdb.h		\
165
	gimppaths_pdb.h			\
166
	gimppattern_pdb.h		\
167 168 169 170
	gimppatterns_pdb.h		\
	gimppatternselect_pdb.h		\
	gimpplugin_pdb.h		\
	gimpproceduraldb_pdb.h		\
171
	gimpprogress_pdb.h		\
172
	gimpselection_pdb.h		\
173
	gimpselectiontools_pdb.h	\
174
	gimptextlayer_pdb.h		\
175
	gimptexttool_pdb.h		\
176
	gimptransformtools_pdb.h	\
177
	gimpundo_pdb.h			\
178 179
	gimpunit_pdb.h			\
	gimpvectors_pdb.h
180

181
libgimp_sources = \
182 183 184 185
	gimp.c			\
	gimp.h			\
	gimpcompat.h		\
	gimptypes.h		\
186
	gimpenums.h		\
187 188
	${PDB_WRAPPERS_C}	\
	${PDB_WRAPPERS_H}	\
189 190
	gimpbrushes.c		\
	gimpbrushes.h		\
191 192
	gimpbrushselect.c	\
	gimpbrushselect.h	\
193 194 195 196
	gimpchannel.c		\
	gimpchannel.h		\
	gimpdrawable.c		\
	gimpdrawable.h		\
197 198
	gimpfontselect.c	\
	gimpfontselect.h	\
199 200
	gimpgimprc.c		\
	gimpgimprc.h		\
201 202
	gimpgradients.c		\
	gimpgradients.h		\
203
	gimpgradientselect.c	\
Sven Neumann's avatar
Sven Neumann committed
204
	gimpgradientselect.h	\
205 206 207 208
	gimpimage.c		\
	gimpimage.h		\
	gimplayer.c		\
	gimplayer.h		\
209 210
	gimppalette.c		\
	gimppalette.h		\
211 212
	gimppalettes.c		\
	gimppalettes.h		\
213 214
	gimppaletteselect.c	\
	gimppaletteselect.h	\
215 216
	gimppatterns.c		\
	gimppatterns.h		\
217 218
	gimppatternselect.c	\
	gimppatternselect.h	\
219 220
	gimppixbuf.c		\
	gimppixbuf.h		\
221 222
	gimppixelfetcher.c	\
	gimppixelfetcher.h	\
223 224
	gimppixelrgn.c		\
	gimppixelrgn.h		\
225 226
	gimpplugin.c		\
	gimpplugin.h		\
227 228
	gimpproceduraldb.c	\
	gimpproceduraldb.h	\
229 230
	gimpprogress.c		\
	gimpprogress.h		\
231 232
	gimpregioniterator.c	\
	gimpregioniterator.h	\
233 234 235 236
	gimpselection.c		\
	gimpselection.h		\
	gimptile.c		\
	gimptile.h		\
237 238
	gimptilebackendplugin.c \
	gimptilebackendplugin.h \
239 240
	gimpunitcache.c		\
	gimpunitcache.h		\
241 242
	gimpvectors.c		\
	gimpvectors.h		\
243 244
	stdplugins-intl.h	\
	libgimp-intl.h
Manish Singh's avatar
Manish Singh committed
245

246
libgimp_built_sources = \
247 248
	gimpenums.c

249
libgimp_extra_sources = gimpenums.c.tail
250

251 252 253
libgimp_@GIMP_API_VERSION@_la_SOURCES = \
	$(libgimp_built_sources)	\
	$(libgimp_sources)
254

255
libgimpui_sources = \
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
	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		\
Simon Budig's avatar
Simon Budig committed
279 280
	gimpitemcombobox.c		\
	gimpitemcombobox.h		\
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299
	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		\
300
	gimpzoompreview.h
301

302
libgimpui_built_sources = \
303 304 305
	gimpuimarshal.c			\
	gimpuimarshal.h

306
libgimpui_extra_sources = gimpuimarshal.list
307

308 309 310
libgimpui_@GIMP_API_VERSION@_la_SOURCES = \
	$(libgimpui_built_sources)	\
	$(libgimpui_sources)
311

312
gimpinclude_HEADERS = \
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340
	gimp.h				\
	gimpcompat.h			\
	gimptypes.h			\
	gimpenums.h			\
	${PDB_WRAPPERS_H}		\
	gimpbrushes.h			\
	gimpbrushselect.h		\
	gimpchannel.h			\
	gimpdrawable.h			\
	gimpfontselect.h		\
	gimpgimprc.h			\
	gimpgradients.h			\
	gimpgradientselect.h		\
	gimpimage.h			\
	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			\
341
	gimpvectors.h			\
342
	\
343 344 345 346 347 348 349 350 351 352 353 354
	gimpui.h			\
	gimpuitypes.h			\
	gimpaspectpreview.h		\
	gimpbrushmenu.h			\
	gimpbrushselectbutton.h		\
	gimpdrawablepreview.h   	\
	gimpexport.h			\
	gimpfontmenu.h			\
	gimpfontselectbutton.h		\
	gimpgradientmenu.h		\
	gimpgradientselectbutton.h	\
	gimpimagecombobox.h		\
355
	gimpitemcombobox.h		\
356 357 358 359 360 361 362 363 364 365
	gimpmenu.h			\
	gimppalettemenu.h		\
	gimppaletteselectbutton.h	\
	gimppatternmenu.h		\
	gimppatternselectbutton.h	\
	gimppixbuf.h			\
	gimpprocbrowserdialog.h		\
	gimpprocview.h			\
	gimpprogressbar.h		\
	gimpselectbutton.h		\
366
	gimpzoompreview.h
367

368
libgimp_@GIMP_API_VERSION@_la_LDFLAGS = \
369 370
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
371 372
	$(libgimp_export_symbols)		\
	$(framework_cocoa)
373

374
libgimp_@GIMP_API_VERSION@_la_LIBADD = \
375 376 377
	$(libgimpconfig)	\
	$(libgimpcolor)		\
	$(libgimpbase)		\
378
	$(CAIRO_LIBS)		\
379
	$(GEGL_LIBS)		\
380 381 382
	$(GDK_PIXBUF_LIBS)	\
	$(RT_LIBS)

383
libgimp_@GIMP_API_VERSION@_la_DEPENDENCIES = \
384 385 386 387
	$(gimp_def)		\
	$(libgimpconfig)	\
	$(libgimpcolor)		\
	$(libgimpbase)
388

389
libgimpui_@GIMP_API_VERSION@_la_LDFLAGS = \
390 391
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
392 393
	$(libgimpui_export_symbols)		\
	$(framework_cocoa)
394

395
libgimpui_@GIMP_API_VERSION@_la_LIBADD = \
396 397 398 399 400 401 402 403
	$(libgimp)		\
	$(libgimpwidgets)	\
	$(libgimpcolor)		\
	$(libgimpbase)		\
	$(libgimpmodule)	\
	$(GTK_LIBS)		\
	$(RT_LIBS)

404
libgimpui_@GIMP_API_VERSION@_la_DEPENDENCIES = \
405 406 407 408
	$(gimpui_def)		\
	$(libgimp)		\
	$(libgimpwidgets)	\
	$(libgimpbase)
409

410
EXTRA_DIST = \
411 412 413
	COPYING				\
	gimp.def			\
	gimpui.def			\
414 415
	$(libgimp_extra_sources)	\
	$(libgimpui_extra_sources)
416

417
install-data-local: install-ms-lib install-libtool-import-lib
418

419
uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
420 421 422 423 424

#
# rules to generate built sources
#
# setup autogeneration dependencies
425
gen_sources = xgen-cec xgen-umh xgen-umc
426 427
CLEANFILES = $(gen_sources)

428
gimpenums.c: $(srcdir)/gimpenums.h $(srcdir)/gimpenums.c.tail $(GIMP_MKENUMS)
429
	$(GIMP_MKENUMS) \
430
		--fhead "#include \"config.h\"\n#include <glib-object.h>\n#undef GIMP_DISABLE_DEPRECATED\n#include \"libgimpbase/gimpbase.h\"\n#include \"gimpenums.h\"" \
431 432
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static const G@Type@Value values[] =\n  {" \
433 434 435 436
		--vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "    { 0, NULL, NULL }\n  };\n" \
		--dhead "  static const Gimp@Type@Desc descs[] =\n  {" \
		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
437
		--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" \
438
		$(srcdir)/gimpenums.h > xgen-cec \
439
	&& cat $(srcdir)/gimpenums.c.tail >> xgen-cec \
440 441
	&& cp xgen-cec $(@F) \
	&& rm -f xgen-cec
442

443
gimpuimarshal.h: $(srcdir)/gimpuimarshal.list
444 445 446 447
	$(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~

448
gimpuimarshal.c: gimpuimarshal.h
449 450 451 452
	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~