Makefile.am 11.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 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
	-DGIMP_COMPILATION		\
	-I$(top_srcdir)			\
	$(GTK_CFLAGS)			\
	$(GEGL_CFLAGS)			\
71
	$(GEXIV2_CFLAGS)		\
72
	-I$(includedir)			\
73
	$(xobjective_c)
Elliot Lee's avatar
Elliot Lee committed
74

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

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

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

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

247
libgimp_built_sources = \
248 249
	gimpenums.c

250
libgimp_extra_sources = gimpenums.c.tail
251

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

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

305
libgimpui_built_sources = \
306 307 308
	gimpuimarshal.c			\
	gimpuimarshal.h

309
libgimpui_extra_sources = gimpuimarshal.list
310

311 312 313
libgimpui_@GIMP_API_VERSION@_la_SOURCES = \
	$(libgimpui_built_sources)	\
	$(libgimpui_sources)
314

315
gimpinclude_HEADERS = \
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 341 342 343
	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			\
344
	gimpvectors.h			\
345
	\
346 347 348 349 350 351 352 353 354 355 356 357
	gimpui.h			\
	gimpuitypes.h			\
	gimpaspectpreview.h		\
	gimpbrushmenu.h			\
	gimpbrushselectbutton.h		\
	gimpdrawablepreview.h   	\
	gimpexport.h			\
	gimpfontmenu.h			\
	gimpfontselectbutton.h		\
	gimpgradientmenu.h		\
	gimpgradientselectbutton.h	\
	gimpimagecombobox.h		\
358
	gimpitemcombobox.h		\
359
	gimpmenu.h			\
360
	gimpmetadata.h			\
361 362 363 364 365 366 367 368 369
	gimppalettemenu.h		\
	gimppaletteselectbutton.h	\
	gimppatternmenu.h		\
	gimppatternselectbutton.h	\
	gimppixbuf.h			\
	gimpprocbrowserdialog.h		\
	gimpprocview.h			\
	gimpprogressbar.h		\
	gimpselectbutton.h		\
370
	gimpzoompreview.h
371

372
libgimp_@GIMP_API_VERSION@_la_LDFLAGS = \
373 374
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
375 376
	$(libgimp_export_symbols)		\
	$(framework_cocoa)
377

378
libgimp_@GIMP_API_VERSION@_la_LIBADD = \
379 380 381
	$(libgimpconfig)	\
	$(libgimpcolor)		\
	$(libgimpbase)		\
382
	$(CAIRO_LIBS)		\
383
	$(GEGL_LIBS)		\
384 385 386
	$(GDK_PIXBUF_LIBS)	\
	$(RT_LIBS)

387
libgimp_@GIMP_API_VERSION@_la_DEPENDENCIES = \
388 389 390 391
	$(gimp_def)		\
	$(libgimpconfig)	\
	$(libgimpcolor)		\
	$(libgimpbase)
392

393
libgimpui_@GIMP_API_VERSION@_la_LDFLAGS = \
394 395
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
396 397
	$(libgimpui_export_symbols)		\
	$(framework_cocoa)
398

399
libgimpui_@GIMP_API_VERSION@_la_LIBADD = \
400 401 402 403 404 405
	$(libgimp)		\
	$(libgimpwidgets)	\
	$(libgimpcolor)		\
	$(libgimpbase)		\
	$(libgimpmodule)	\
	$(GTK_LIBS)		\
406
	$(GEXIV2_LIBS)		\
407 408
	$(RT_LIBS)

409
libgimpui_@GIMP_API_VERSION@_la_DEPENDENCIES = \
410 411 412 413
	$(gimpui_def)		\
	$(libgimp)		\
	$(libgimpwidgets)	\
	$(libgimpbase)
414

415
EXTRA_DIST = \
416 417 418
	COPYING				\
	gimp.def			\
	gimpui.def			\
419 420
	$(libgimp_extra_sources)	\
	$(libgimpui_extra_sources)
421

422
install-data-local: install-ms-lib install-libtool-import-lib
423

424
uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
425 426 427 428 429

#
# rules to generate built sources
#
# setup autogeneration dependencies
430
gen_sources = xgen-cec xgen-umh xgen-umc
431 432
CLEANFILES = $(gen_sources)

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

448
gimpuimarshal.h: $(srcdir)/gimpuimarshal.list
449 450 451 452
	$(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~

453
gimpuimarshal.c: gimpuimarshal.h
454 455 456 457
	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~