1 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
6 libcheese/cheese-enums.c \
7 libcheese/cheese-enums.h
9 cheese_enum_headers = \
10 $(top_srcdir)/libcheese/cheese-widget.h
12 libcheese/cheese-enums.c: $(cheese_enum_headers) libcheese/cheese-enums.h
13 $(AM_V_GEN)$(GLIB_MKENUMS) \
14 --fhead "#include \"cheese-enums.h\"\n\n" \
15 --fprod "/* enumerations from \"@filename@\" */\n" \
16 --fprod "#include \"@filename@\"\n" \
17 --vhead "GType\n@enum_name@_get_type (void)\n{\n" \
18 --vhead " static GType type = 0;\n\n" \
19 --vhead " if (!type)\n {\n" \
20 --vhead " static const G@Type@Value _@enum_name@_values[] = {" \
21 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
22 --vtail " { 0, NULL, NULL }\n };\n\n" \
23 --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n }\n\n" \
24 --vtail " return type;\n}\n\n" \
25 $(cheese_enum_headers) > $@
27 libcheese/cheese-enums.h: $(cheese_enum_headers)
28 $(AM_V_GEN)$(GLIB_MKENUMS) \
29 --fhead "#ifndef CHEESE_ENUMS_H_\n" \
30 --fhead "#define CHEESE_ENUMS_H_\n\n" \
31 --fhead "#include <glib-object.h>\n\n" \
32 --fhead "G_BEGIN_DECLS\n\n" \
33 --fprod "/* enumerations from @filename@ */\n" \
34 --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n" \
35 --vhead "#define CHEESE_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
36 --ftail "G_END_DECLS\n\n" \
37 --ftail "#endif /* CHEESE_ENUMS_H_ */" \
38 $(cheese_enum_headers) > $@
41 -DDATADIR=\"$(datadir)\" \
42 -DPREFIX=\""$(prefix)"\" \
43 -DSYSCONFDIR=\""$(sysconfdir)"\" \
44 -DLIBDIR=\""$(libdir)"\" \
45 -DPACKAGE_DATADIR=\""$(pkgdatadir)"\" \
46 -DPACKAGE_LOCALEDIR=\""$(datadir)/locale"\" \
47 -DGNOME_DESKTOP_USE_UNSTABLE_API=1 \
57 --vapidir $(top_srcdir)/src/vapi \
58 --gresources $(top_srcdir)/data/cheese.gresource.xml \
64 --pkg clutter-gtk-1.0 \
66 --pkg libcanberra-gtk \
69 --pkg cheese-thumbview \
74 lib_LTLIBRARIES = libcheese.la libcheese-gtk.la
76 libcheese_gtk_la_CFLAGS = \
78 $(CHEESE_GTK_CFLAGS) \
81 libcheese_gtk_la_CPPFLAGS = \
83 -DG_LOG_DOMAIN=\"cheese-gtk\" \
84 -I$(top_builddir)/libcheese \
85 -I$(top_srcdir)/libcheese \
88 libcheese_gtk_la_LIBADD = \
93 libcheese_gtk_la_LDFLAGS = \
94 -version-info $(LIBCHEESE_GTK_LT_VERSION) \
95 -export-symbols $(top_srcdir)/libcheese/cheese-gtk.symbols \
99 libcheese_gtk_la_SOURCES = \
100 libcheese/cheese-avatar-chooser.c \
101 libcheese/cheese-avatar-widget.c \
102 libcheese/totem-aspect-frame.c \
103 libcheese/cheese-flash.c \
104 libcheese/cheese-gtk.c \
105 libcheese/cheese-widget.c \
106 libcheese/um-crop-area.c
108 noinst_libcheese_gtk_headers = \
109 libcheese/totem-aspect-frame.h \
110 libcheese/cheese-avatar-chooser.h \
111 libcheese/cheese-avatar-widget.h \
112 libcheese/cheese-flash.h \
113 libcheese/cheese-widget.h \
114 libcheese/cheese-widget-private.h \
115 libcheese/um-crop-area.h
117 libcheese_la_CFLAGS = \
119 $(CHEESE_GTK_CFLAGS) \
122 libcheese_la_CPPFLAGS = \
124 -DG_LOG_DOMAIN=\"cheese\" \
125 -I$(top_builddir)/libcheese \
126 -I$(top_srcdir)/libcheese
128 libcheese_la_LIBADD = \
131 libcheese_la_LDFLAGS = \
132 -version-info $(LIBCHEESE_LT_VERSION) \
135 libcheese_la_SOURCES = \
136 libcheese/cheese-enums.c \
137 libcheese/cheese-camera.c \
138 libcheese/cheese-camera-device.c \
139 libcheese/cheese-camera-device-monitor.c \
140 libcheese/cheese-effect.c \
141 libcheese/cheese-fileutil.c \
144 noinst_libcheese_headers = \
145 libcheese/cheese-camera.h \
146 libcheese/cheese-camera-device.h \
147 libcheese/cheese-camera-device-monitor.h \
148 libcheese/cheese-effect.h \
149 libcheese/cheese-fileutil.h
151 # FIXME when we have a .pc file, and sonames
152 cheesedir = $(includedir)/cheese
154 libcheese/cheese-avatar-widget.h \
155 libcheese/cheese-avatar-chooser.h \
156 libcheese/cheese-camera.h \
157 libcheese/cheese-camera-device.h \
158 libcheese/cheese-camera-device-monitor.h \
159 libcheese/cheese-effect.h \
160 libcheese/cheese-gtk.h \
162 libcheese/cheese-widget.h
164 if HAVE_INTROSPECTION
165 -include $(INTROSPECTION_MAKEFILE)
166 INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir)
167 INTROSPECTION_SCANNER_ARGS = --add-include-path=$(top_srcdir) --warn-all
169 INTROSPECTION_GIRS = Cheese-3.0.gir
171 Cheese-3.0.gir: libcheese.la
172 Cheese_3_0_gir_CFLAGS = \
173 -I$(top_srcdir)/libcheese \
174 -I$(top_builddir)/libcheese \
176 Cheese_3_0_gir_FILES = \
177 $(libcheese_la_SOURCES) \
178 $(noinst_libcheese_headers) \
179 libcheese/cheese-enums.h
180 Cheese_3_0_gir_INCLUDES = \
188 Cheese_3_0_gir_LIBS = libcheese.la
189 Cheese_3_0_gir_SCANNERFLAGS = --verbose --warn-all --pkg-export cheese
191 girdir = $(datadir)/gir-1.0
192 gir_DATA = $(INTROSPECTION_GIRS)
194 typelibdir = $(libdir)/girepository-1.0
195 typelib_DATA = Cheese-3.0.typelib
198 noinst_resource_files = \
200 data/cheese-viewport.json \
201 data/cheese-appmenu.ui \
202 data/cheese-main-window.ui \
203 data/cheese-prefs.ui \
204 data/pixmaps/cheese-1.svg \
205 data/pixmaps/cheese-2.svg \
206 data/pixmaps/cheese-3.svg \
207 data/pixmaps/thumbnail-frame.png
209 src/cheese-resource.c src/cheese-resource.h: data/cheese.gresource.xml Makefile $(noinst_resource_files)
210 $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/data --generate --c-name cheese $<
212 bin_PROGRAMS = cheese
214 nodist_cheese_SOURCES = \
215 src/cheese-resource.c
217 # cheese-main.vala must go at the end of the Vala sources.
219 src/cheese-application.vala \
220 src/cheese-countdown.vala \
221 src/cheese-effects-manager.vala \
222 src/cheese-preferences.vala \
223 src/cheese-window.vala \
224 src/cheese-main.vala \
225 src/thumbview/cheese-thumb-view.c \
226 src/thumbview/cheese-thumbnail.c \
227 src/thumbview/eog-thumb-nav.c
229 nodist_cheese_HEADERS = \
230 src/cheese-resource.h
233 src/thumbview/cheese-thumb-view.h \
234 src/thumbview/cheese-thumbnail.h \
235 src/thumbview/eog-thumb-nav.h
240 $(CHEESE_GTK_CFLAGS) \
241 -include $(top_builddir)/$(CONFIG_HEADER) \
242 -I$(top_srcdir)/libcheese \
245 cheese_CFLAGS = -export-dynamic
254 tests/cheese-test-camera \
255 tests/cheese-test-chooser \
256 tests/cheese-test-flash \
257 tests/cheese-test-monitor \
258 tests/cheese-test-widget
263 tests/test-webcam-button
265 noinst_PROGRAMS = $(EXAMPLES)
268 EXAMPLES_CPPFLAGS = \
270 $(CHEESE_GTK_CFLAGS) \
271 -I$(top_srcdir)/libcheese
273 tests_cheese_test_camera_SOURCES = tests/cheese-test-camera.c
274 tests_cheese_test_chooser_SOURCES = tests/cheese-test-chooser.c
275 tests_cheese_test_flash_SOURCES = tests/cheese-test-flash.c
276 tests_cheese_test_monitor_SOURCES = tests/cheese-test-monitor.c
277 tests_cheese_test_widget_SOURCES = tests/cheese-test-widget.c
278 tests_test_webcam_button_SOURCES = tests/test-webcam-button.c
280 tests_cheese_test_camera_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
281 tests_cheese_test_chooser_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
282 tests_cheese_test_flash_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
283 tests_cheese_test_monitor_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
284 tests_cheese_test_widget_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
285 tests_test_webcam_button_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
287 tests_cheese_test_camera_LDADD = \
291 tests_cheese_test_chooser_LDADD = \
296 tests_cheese_test_flash_LDADD = \
301 tests_cheese_test_monitor_LDADD = \
306 tests_cheese_test_widget_LDADD = \
311 tests_test_webcam_button_LDADD = $(XTEST_LIBS)
313 @INTLTOOL_DESKTOP_RULE@
314 desktopdir = $(datadir)/applications
315 desktop_in_files = data/cheese.desktop.in
316 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
320 appdata_in_files = data/cheese.appdata.xml.in
321 appdata_XML = $(appdata_in_files:.appdata.xml.in=.appdata.xml)
324 gsettings_SCHEMAS = data/org.gnome.Cheese.gschema.xml
326 pkgconfigdir = $(libdir)/pkgconfig
331 iconthemedir = $(datadir)/icons/hicolor
333 appsicon16dir = $(iconthemedir)/16x16/apps
334 appsicon22dir = $(iconthemedir)/22x22/apps
335 appsicon24dir = $(iconthemedir)/24x24/apps
336 appsicon32dir = $(iconthemedir)/32x32/apps
337 appsicon48dir = $(iconthemedir)/48x48/apps
338 appsicon256dir = $(iconthemedir)/256x256/apps
340 dist_appsicon16_DATA = data/icons/16x16/cheese.png
341 dist_appsicon22_DATA = data/icons/22x22/cheese.png
342 dist_appsicon24_DATA = data/icons/24x24/cheese.png
343 dist_appsicon32_DATA = data/icons/32x32/cheese.png
344 dist_appsicon48_DATA = data/icons/48x48/cheese.png
345 dist_appsicon256_DATA = data/icons/256x256/cheese.png
347 update_icon_cache = gtk-update-icon-cache --ignore-theme-index --force
349 install-data-hook: install-update-icon-cache
350 uninstall-hook: uninstall-update-icon-cache
351 touch libcheese_la_vala.stamp
353 install-update-icon-cache:
354 $(AM_V_at)$(POST_INSTALL)
355 test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
357 uninstall-update-icon-cache:
358 $(AM_V_at)$(POST_UNINSTALL)
359 test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
363 tests/test-libcheese \
364 tests/test-libcheese-gtk
366 tests_test_libcheese_gtk_SOURCES = \
367 libcheese/um-crop-area.c \
368 tests/test-libcheese-gtk.c
369 tests_test_libcheese_gtk_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
370 tests_test_libcheese_gtk_LDADD = \
376 tests_test_libcheese_SOURCES = \
377 tests/test-libcheese.c
378 tests_test_libcheese_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
379 tests_test_libcheese_LDADD = \
383 if CHEESE_ENABLE_TESTS
384 # Not automake built-in TESTS_ENVIRONMENT!
385 TEST_ENVIRONMENT = MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
387 # test: run all tests.
388 test: $(check_PROGRAMS)
389 $(AM_V_at)$(TEST_ENVIRONMENT) $(GTESTER) --verbose $(check_PROGRAMS)
391 # test-report: run tests and generate report.
392 # perf-report: run tests with -m perf and generate report.
393 # full-report: like test-report: with -m perf and -m slow.
394 test-report perf-report full-report: $(check_PROGRAMS)
395 $(AM_V_at)test -z "$(check_PROGRAMS)" || { \
397 test-report) test_options="-k";; \
398 perf-report) test_options="-k -m=perf";; \
399 full-report) test_options="-k -m=perf -m=slow";; \
401 $(TEST_ENVIRONMENT) $(GTESTER) --verbose $$test_options -o test-log.xml $(check_PROGRAMS) ; \
402 if test -d "$(top_srcdir)/.git" ; then \
403 REVISION=`git describe` ; \
405 REVISION=$(PACKAGE_VERSION) ; \
407 echo '<?xml version="1.0"?>' > $@.xml ; \
408 echo '<report-collection>' >> $@.xml ; \
409 echo '<info>' >> $@.xml ; \
410 echo ' <package>$(PACKAGE_NAME)</package>' >> $@.xml ; \
411 echo ' <version>$(PACKAGE_VERSION)</version>' >> $@.xml ; \
412 echo " <revision>$$REVISION</revision>" >> $@.xml ; \
413 echo '</info>' >> $@.xml ; \
414 sed '1,1s/^<?xml\b[^>?]*?>//' < test-log.xml >> $@.xml ; \
417 echo '</report-collection>' >> $@.xml ; \
418 $(GTESTER_REPORT) --version 2>/dev/null 1>&2 ; test "$$?" != 0 || $(GTESTER_REPORT) $@.xml >$@.html ; \
420 else # !CHEESE_ENABLE_TESTS
422 echo "Test run disabled due to the lack of GLib testing utilities"
425 # Code coverage reporting.
426 if CHEESE_ENABLE_LCOV
427 # Depend on full-report so that all the tests are run.
429 $(AM_V_at)$(LCOV) --base-directory $(top_builddir) \
430 --directory $(top_builddir)/libcheese --capture \
431 --output-file cheese-lcov.info --test-name CHEESE \
432 --no-checksum --compat-libtool
433 $(AM_V_at)LANG=C $(LCOV_GENHTML) --prefix $(top_builddir) \
434 --output-directory cheese-lcov --title "Cheese code coverage" \
435 --legend --show-details cheese-lcov.info
438 $(AM_V_at)$(LCOV) --directory $(top_builddir) -z
439 $(AM_V_at)rm -rf cheese-lcov.info cheese-lcov
440 $(AM_V_at)find -name '*.gcda' -exec rm -f {} +
441 else # !CHEESE_ENABLE_LCOV
443 $(AM_V_at)echo "Code coverage reporting not available"
446 $(AM_V_at)rm -rf cheese-lcov.info cheese-lcov
447 $(AM_V_at)find -name '*.gcda' -exec rm -f {} +
451 gtkdoc_builddir = $(top_builddir)/docs/reference
452 gtkdoc_distdir = $(top_distdir)/docs/reference
453 gtkdoc_srcdir = $(top_srcdir)/docs/reference
455 all-local: $(bin_PROGRAMS)
456 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) all
457 # run make test as part of make check.
459 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFlAGS) check
460 clean-local: lcov-clean
461 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) clean
462 find -name '*.gcno' -exec rm -f {} +
464 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) distclean
465 docs: $(lib_LTLIBRARIES)
466 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) docs
468 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) install-data
470 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) uninstall
472 dist-hook: git-changelog-hook
473 $(MKDIR_P) $(gtkdoc_distdir)
474 cp $(gtkdoc_srcdir)/Makefile.am $(gtkdoc_srcdir)/Makefile.in $(gtkdoc_distdir)
475 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) \
476 distdir="../../$(gtkdoc_distdir)" \
477 top_distdir="../../$(top_distdir)" \
482 $(desktop_in_files) \
483 $(gsettings_SCHEMAS) \
484 $(noinst_resource_files) \
485 $(appdata_in_files) \
486 data/cheese.gresource.xml \
487 build-aux/test-driver \
488 $(gtkdoc_srcdir)/cheese-docs.xml \
489 $(gtkdoc_srcdir)/cheese-sections.txt \
490 $(gtkdoc_srcdir)/cheese.xml \
491 $(gtkdoc_srcdir)/version.xml.in \
493 intltool-extract.in \
496 $(noinst_libcheese_headers) \
497 $(noinst_libcheese_gtk_headers) \
498 libcheese/cheese-gtk.symbols \
499 m4/introspection.m4 \
500 src/vapi/cheese-common.deps \
501 src/vapi/cheese-common.vapi \
502 src/vapi/cheese-thumbview.vapi \
503 src/vapi/config.vapi \
504 src/vapi/eogthumbnav.vapi
506 dist_noinst_SCRIPTS = \
516 src/cheese-resource.c \
517 src/cheese-resource.h
520 libcheese_la_vala.stamp \
524 po/.intltool-merge-cache
526 MAINTAINERCLEANFILES = \
528 build-aux/config.guess \
529 build-aux/config.sub \
531 build-aux/install-sh \
532 build-aux/ltmain.sh \
534 build-aux/test-driver \
537 $(gsettings_SCHEMAS:.xml=.valid) \
542 DISTCHECK_CONFIGURE_FLAGS = \
543 --enable-appdata-check \
545 --enable-introspection \
548 CHANGELOG_START = 2.26.0
551 $(AM_V_at)if $(top_srcdir)/build-aux/missing --run git \
552 --git-dir=$(top_srcdir)/.git --work-tree=$(top_srcdir) log \
553 --stat -M -C --name-status --no-color $(CHANGELOG_START).. \
554 | fmt --split-only >.ChangeLog.tmp; \
555 then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
556 else rm -f .ChangeLog.tmp; exit 1; fi
558 .PHONY: docs git-changelog-hook test test-report perf-report full-report
559 .PHONY: lcov lcov-clean