Makefile.am 10.5 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 8
libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la
libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
libgimp = ./libgimp-$(GIMP_API_VERSION).la
9

Tor Lillqvist's avatar
Tor Lillqvist committed
10 11 12 13 14 15 16 17 18 19 20
if PLATFORM_WIN32
no_undefined = -no-undefined
endif

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:
21 22
	$(INSTALL) .libs/libgimp-$(GIMP_API_VERSION).dll.a $(DESTDIR)$(libdir)
	$(INSTALL) .libs/libgimpui-$(GIMP_API_VERSION).dll.a $(DESTDIR)$(libdir)
23 24
	$(INSTALL) gimp.def $(DESTDIR)$(libdir)
	$(INSTALL) gimpui.def $(DESTDIR)$(libdir)
Tor Lillqvist's avatar
Tor Lillqvist committed
25 26

uninstall-libtool-import-lib:
27 28
	-rm $(DESTDIR)$(libdir)/libgimp-$(GIMP_API_VERSION).dll.a
	-rm $(DESTDIR)$(libdir)/libgimpui-$(GIMP_API_VERSION).dll.a
29 30
	-rm $(DESTDIR)$(libdir)/gimp.def
	-rm $(DESTDIR)$(libdir)/gimpui.def
Tor Lillqvist's avatar
Tor Lillqvist committed
31 32 33 34 35 36
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif

if MS_LIB_AVAILABLE
37
noinst_DATA = gimp-$(GIMP_API_VERSION).lib gimpui-$(GIMP_API_VERSION).lib 
Tor Lillqvist's avatar
Tor Lillqvist committed
38 39

install-ms-lib:
40 41
	$(INSTALL) gimp-$(GIMP_API_VERSION).lib $(DESTDIR)$(libdir)
	$(INSTALL) gimpui-$(GIMP_API_VERSION).lib $(DESTDIR)$(libdir)
Tor Lillqvist's avatar
Tor Lillqvist committed
42 43

uninstall-ms-lib:
44 45
	-rm $(DESTDIR)$(libdir)/gimp-$(GIMP_API_VERSION).lib
	-rm $(DESTDIR)$(libdir)/gimpui-$(GIMP_API_VERSION).lib
Tor Lillqvist's avatar
Tor Lillqvist committed
46

47 48
gimp-@GIMP_API_VERSION@.lib: gimp.def
	lib -name:libgimp-$(GIMP_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gimp.def -out:$@
Tor Lillqvist's avatar
Tor Lillqvist committed
49

50 51
gimpui-@GIMP_API_VERSION@.lib: gimpui.def
	lib -name:libgimpui-$(GIMP_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gimpui.def -out:$@
Tor Lillqvist's avatar
Tor Lillqvist committed
52 53 54 55 56 57

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

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

60
AM_CPPFLAGS = \
61
	-DG_LOG_DOMAIN=\"LibGimp\"	\
62
	@GTHREAD_CFLAGS@
Manish Singh's avatar
Manish Singh committed
63

64 65 66 67
INCLUDES = \
	-I$(top_srcdir)	\
	$(GTK_CFLAGS)	\
	-I$(includedir)
Elliot Lee's avatar
Elliot Lee committed
68

69
lib_LTLIBRARIES = libgimp-2.0.la libgimpui-2.0.la
Elliot Lee's avatar
Elliot Lee committed
70

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

PDB_WRAPPERS_H = \
	gimp_pdb.h			\
121
	gimpbrush_pdb.h			\
122 123
	gimpbrushes_pdb.h		\
	gimpbrushselect_pdb.h		\
124
	gimpbuffer_pdb.h		\
125 126
	gimpchannel_pdb.h		\
	gimpcolor_pdb.h			\
127
	gimpcontext_pdb.h		\
128 129 130
	gimpconvert_pdb.h		\
	gimpdisplay_pdb.h		\
	gimpdrawable_pdb.h		\
131
	gimpdrawabletransform_pdb.h	\
132 133 134
	gimpedit_pdb.h			\
	gimpfileops_pdb.h		\
	gimpfloatingsel_pdb.h		\
135
	gimpfonts_pdb.h			\
136
	gimpfontselect_pdb.h		\
137
	gimpgimprc_pdb.h		\
138
	gimpgradient_pdb.h		\
139
	gimpgradients_pdb.h		\
140
	gimpgradientselect_pdb.h	\
141
	gimpgrid_pdb.h			\
142 143 144 145 146
	gimpguides_pdb.h		\
	gimphelp_pdb.h			\
	gimpimage_pdb.h			\
	gimplayer_pdb.h			\
	gimpmessage_pdb.h		\
147
	gimpmisc_pdb.h			\
Michael Natterer's avatar
Michael Natterer committed
148
	gimppainttools_pdb.h		\
149
	gimppalette_pdb.h		\
150 151
	gimppalettes_pdb.h		\
	gimppaletteselect_pdb.h		\
152
	gimpparasite_pdb.h		\
153
	gimppaths_pdb.h			\
154
	gimppattern_pdb.h		\
155 156 157 158
	gimppatterns_pdb.h		\
	gimppatternselect_pdb.h		\
	gimpplugin_pdb.h		\
	gimpproceduraldb_pdb.h		\
159
	gimpprogress_pdb.h		\
160
	gimpselection_pdb.h		\
161
	gimpselectiontools_pdb.h	\
162
	gimptexttool_pdb.h		\
163
	gimptransformtools_pdb.h	\
164
	gimpundo_pdb.h			\
165 166
	gimpunit_pdb.h			\
	gimpvectors_pdb.h
167

168
libgimp_2_0_la_sources = \
169 170 171 172
	gimp.c			\
	gimp.h			\
	gimpcompat.h		\
	gimptypes.h		\
173
	gimpenums.h		\
174 175
	${PDB_WRAPPERS_C}	\
	${PDB_WRAPPERS_H}	\
176 177
	gimpbrushes.c		\
	gimpbrushes.h		\
178 179
	gimpbrushselect.c	\
	gimpbrushselect.h	\
180 181 182 183
	gimpchannel.c		\
	gimpchannel.h		\
	gimpdrawable.c		\
	gimpdrawable.h		\
184 185
	gimpfontselect.c	\
	gimpfontselect.h	\
186 187
	gimpgimprc.c		\
	gimpgimprc.h		\
188 189
	gimpgradients.c		\
	gimpgradients.h		\
190
	gimpgradientselect.c	\
Sven Neumann's avatar
Sven Neumann committed
191
	gimpgradientselect.h	\
192 193 194 195
	gimpimage.c		\
	gimpimage.h		\
	gimplayer.c		\
	gimplayer.h		\
196 197
	gimppalette.c		\
	gimppalette.h		\
198 199
	gimppalettes.c		\
	gimppalettes.h		\
200 201
	gimppaletteselect.c	\
	gimppaletteselect.h	\
202 203
	gimppatterns.c		\
	gimppatterns.h		\
204 205
	gimppatternselect.c	\
	gimppatternselect.h	\
206 207
	gimppixelfetcher.c	\
	gimppixelfetcher.h	\
208 209
	gimppixelrgn.c		\
	gimppixelrgn.h		\
210 211
	gimpplugin.c		\
	gimpplugin.h		\
212 213
	gimpproceduraldb.c	\
	gimpproceduraldb.h	\
214 215
	gimpprogress.c		\
	gimpprogress.h		\
216 217
	gimpregioniterator.c	\
	gimpregioniterator.h	\
218 219 220 221
	gimpselection.c		\
	gimpselection.h		\
	gimptile.c		\
	gimptile.h		\
222 223
	gimpunitcache.c		\
	gimpunitcache.h		\
224 225
	stdplugins-intl.h	\
	libgimp-intl.h
Manish Singh's avatar
Manish Singh committed
226

227 228 229
libgimp_2_0_la_built_sources = \
	gimpenums.c

Manish Singh's avatar
Manish Singh committed
230 231
libgimp_2_0_la_extra_sources = gimpenums.c.tail

232
libgimp_2_0_la_SOURCES = \
233 234
	$(libgimp_2_0_la_built_sources)	\
	$(libgimp_2_0_la_sources)
235

236
libgimpui_2_0_la_sources = \
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
	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
260 261
	gimpitemcombobox.c		\
	gimpitemcombobox.h		\
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282
	gimpmenu.c			\
	gimpmenu.h			\
	gimppalettemenu.c		\
	gimppalettemenu.h		\
	gimppaletteselectbutton.c	\
	gimppaletteselectbutton.h	\
	gimppatternmenu.c		\
	gimppatternmenu.h		\
	gimppatternselectbutton.c	\
	gimppatternselectbutton.h	\
	gimppixbuf.c			\
	gimppixbuf.h			\
	gimpprocbrowserdialog.c		\
	gimpprocbrowserdialog.h		\
	gimpprocview.c			\
	gimpprocview.h			\
	gimpprogressbar.c		\
	gimpprogressbar.h		\
	gimpselectbutton.c		\
	gimpselectbutton.h		\
	gimpzoompreview.c		\
283
	gimpzoompreview.h
284

285 286 287 288 289 290 291
libgimpui_2_0_la_built_sources = \
	gimpuimarshal.c			\
	gimpuimarshal.h

libgimpui_2_0_la_extra_sources = gimpuimarshal.list

libgimpui_2_0_la_SOURCES = \
292 293
	$(libgimpui_2_0_la_built_sources)	\
	$(libgimpui_2_0_la_sources)
294

295
gimpinclude_HEADERS = \
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323
	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			\
324
	\
325 326 327 328 329 330 331 332 333 334 335 336
	gimpui.h			\
	gimpuitypes.h			\
	gimpaspectpreview.h		\
	gimpbrushmenu.h			\
	gimpbrushselectbutton.h		\
	gimpdrawablepreview.h   	\
	gimpexport.h			\
	gimpfontmenu.h			\
	gimpfontselectbutton.h		\
	gimpgradientmenu.h		\
	gimpgradientselectbutton.h	\
	gimpimagecombobox.h		\
337
	gimpitemcombobox.h		\
338 339 340 341 342 343 344 345 346 347
	gimpmenu.h			\
	gimppalettemenu.h		\
	gimppaletteselectbutton.h	\
	gimppatternmenu.h		\
	gimppatternselectbutton.h	\
	gimppixbuf.h			\
	gimpprocbrowserdialog.h		\
	gimpprocview.h			\
	gimpprogressbar.h		\
	gimpselectbutton.h		\
348
	gimpzoompreview.h
349

350
libgimp_2_0_la_LDFLAGS = \
351 352
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
Tor Lillqvist's avatar
Tor Lillqvist committed
353 354
	$(libgimp_export_symbols)

355
libgimp_2_0_la_LIBADD = $(libgimpconfig) $(libgimpcolor) $(libgimpbase) $(GLIB_LIBS) $(RT_LIBS)
Elliot Lee's avatar
Elliot Lee committed
356

357
libgimp_2_0_la_DEPENDENCIES = $(gimp_def) $(libgimpconfig) $(libgimpcolor) $(libgimpbase)
358

359
libgimpui_2_0_la_LDFLAGS = \
360 361
	-version-info $(LT_VERSION_INFO)	\
	$(no_undefined)				\
Tor Lillqvist's avatar
Tor Lillqvist committed
362 363
	$(libgimpui_export_symbols)

364
libgimpui_2_0_la_LIBADD = $(libgimp) $(libgimpwidgets) $(libgimpcolor) \
365
	 $(libgimpbase) $(libgimpmodule) $(GTK_LIBS) $(RT_LIBS)
Tor Lillqvist's avatar
Tor Lillqvist committed
366

367
libgimpui_2_0_la_DEPENDENCIES = $(gimpui_def) $(libgimp) $(libgimpwidgets) $(libgimpbase)
Tor Lillqvist's avatar
Tor Lillqvist committed
368

369 370 371 372 373 374 375 376
EXTRA_DIST = \
	COPYING					\
	makefile.msc				\
	gimp.def				\
	gimpui.def				\
	$(libgimp_2_0_la_extra_sources)		\
	$(libgimpui_2_0_la_extra_sources)

Tor Lillqvist's avatar
Tor Lillqvist committed
377
install-data-local: install-ms-lib install-libtool-import-lib
378

Tor Lillqvist's avatar
Tor Lillqvist committed
379
uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
380 381 382 383 384

#
# rules to generate built sources
#
# setup autogeneration dependencies
385
gen_sources = xgen-cec xgen-umh xgen-umc
386 387
CLEANFILES = $(gen_sources)

388
$(srcdir)/gimpenums.c: $(srcdir)/gimpenums.h $(srcdir)/gimpenums.c.tail $(GIMP_MKENUMS)
389
	$(GIMP_MKENUMS) \
390
		--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"libgimpbase/gimpbase.h\"\n#include \"gimpenums.h\"" \
391 392
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static const G@Type@Value values[] =\n  {" \
393 394 395 396 397
		--vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "    { 0, NULL, NULL }\n  };\n" \
		--dhead "  static const Gimp@Type@Desc descs[] =\n  {" \
		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
		--dtail "    { 0, NULL, NULL }\n  };\n\n  static GType type = 0;\n\n  if (! type)\n    {\n      type = g_@type@_register_static (\"@EnumName@\", values);\n      gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n      gimp_@type@_set_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
398
		$(srcdir)/gimpenums.h > xgen-cec \
399
	&& cat $(srcdir)/gimpenums.c.tail >> xgen-cec \
400 401
	&& cp xgen-cec $(@F) \
	&& rm -f xgen-cec
402 403 404 405 406 407 408 409 410 411 412

$(srcdir)/gimpuimarshal.h: $(srcdir)/gimpuimarshal.list
	$(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~

$(srcdir)/gimpuimarshal.c: $(srcdir)/gimpuimarshal.h
	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~