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 \
56 --vapidir $(top_srcdir)/src/vapi \
63 --pkg clutter-gtk-1.0 \
64 --pkg gstreamer-0.10 \
65 --pkg libcanberra-gtk \
68 --pkg cheese-thumbview \
73 lib_LTLIBRARIES = libcheese.la libcheese-gtk.la
75 libcheese_gtk_la_CFLAGS = \
77 $(CHEESE_GTK_CFLAGS) \
80 libcheese_gtk_la_CPPFLAGS = \
82 -I$(top_builddir)/libcheese \
83 -I$(top_srcdir)/libcheese \
86 libcheese_gtk_la_LIBADD = \
91 libcheese_gtk_la_LDFLAGS = \
92 -version-info $(LIBCHEESE_GTK_LT_VERSION) \
93 -export-symbols $(top_srcdir)/libcheese/cheese-gtk.symbols \
97 libcheese_gtk_la_SOURCES = \
98 libcheese/cheese-avatar-chooser.c \
99 libcheese/cheese-aspect-frame.c \
100 libcheese/cheese-flash.c \
101 libcheese/cheese-gtk.c \
102 libcheese/cheese-widget.c \
103 libcheese/um-crop-area.c
105 noinst_libcheese_gtk_headers = \
106 libcheese/cheese-aspect-frame.h \
107 libcheese/cheese-avatar-chooser.h \
108 libcheese/cheese-flash.h \
109 libcheese/cheese-widget.h \
110 libcheese/cheese-widget-private.h \
111 libcheese/um-crop-area.h
113 libcheese_la_CFLAGS = \
115 $(CHEESE_GTK_CFLAGS) \
118 libcheese_la_CPPFLAGS = \
120 -I$(top_builddir)/libcheese \
121 -I$(top_srcdir)/libcheese
123 libcheese_la_LIBADD = \
126 libcheese_la_LDFLAGS = \
127 -version-info $(LIBCHEESE_LT_VERSION) \
130 libcheese_la_SOURCES = \
131 libcheese/cheese-enums.c \
132 libcheese/cheese-camera.c \
133 libcheese/cheese-camera-device.c \
134 libcheese/cheese-camera-device-monitor.c \
135 libcheese/cheese-effect.c \
136 libcheese/cheese-fileutil.c \
139 noinst_libcheese_headers = \
140 libcheese/cheese-camera.h \
141 libcheese/cheese-camera-device.h \
142 libcheese/cheese-camera-device-monitor.h \
143 libcheese/cheese-effect.h \
144 libcheese/cheese-fileutil.h
146 # FIXME when we have a .pc file, and sonames
147 cheesedir = $(includedir)/cheese
149 libcheese/cheese-avatar-chooser.h \
150 libcheese/cheese-camera.h \
151 libcheese/cheese-camera-device.h \
152 libcheese/cheese-camera-device-monitor.h \
153 libcheese/cheese-effect.h \
154 libcheese/cheese-gtk.h \
156 libcheese/cheese-widget.h
158 if HAVE_INTROSPECTION
159 -include $(INTROSPECTION_MAKEFILE)
160 INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir)
161 INTROSPECTION_SCANNER_ARGS = --add-include-path=$(top_srcdir) --warn-all
163 INTROSPECTION_GIRS = Cheese-3.0.gir
165 Cheese-3.0.gir: libcheese.la
166 Cheese_3_0_gir_CFLAGS = \
170 Cheese_3_0_gir_FILES = \
171 $(libcheese_la_SOURCES) \
172 libcheese/cheese-enums.h
173 Cheese_3_0_gir_INCLUDES = \
181 Cheese_3_0_gir_LIBS = libcheese.la
182 Cheese_3_0_gir_SCANNERFLAGS = --verbose --warn-all --pkg-export cheese
184 girdir = $(datadir)/gir-1.0
185 gir_DATA = $(INTROSPECTION_GIRS)
187 typelibdir = $(libdir)/girepository-1.0
188 typelib_DATA = Cheese-3.0.typelib
191 bin_PROGRAMS = cheese
193 # cheese-main.vala must go at the end of the Vala sources.
195 src/cheese-countdown.vala \
196 src/cheese-effects-manager.vala \
197 src/cheese-preferences.vala \
198 src/cheese-window.vala \
199 src/cheese-main.vala \
200 src/cheese-shareable-media.vala \
201 src/thumbview/cheese-thumb-view.c \
202 src/thumbview/cheese-thumbnail.c \
203 src/thumbview/eog-thumb-nav.c
206 src/thumbview/cheese-thumb-view.h \
207 src/thumbview/cheese-thumbnail.h \
208 src/thumbview/eog-thumb-nav.h
213 $(CHEESE_GTK_CFLAGS) \
214 -include $(top_builddir)/$(CONFIG_HEADER) \
215 -I$(top_srcdir)/libcheese \
218 cheese_CFLAGS = -export-dynamic
227 tests/cheese-test-camera \
228 tests/cheese-test-chooser \
229 tests/cheese-test-flash \
230 tests/cheese-test-monitor \
231 tests/cheese-test-widget
236 tests/test-webcam-button
238 noinst_PROGRAMS = $(EXAMPLES)
241 EXAMPLES_CPPFLAGS = \
243 $(CHEESE_GTK_CFLAGS) \
244 -I$(top_srcdir)/libcheese
246 tests_cheese_test_camera_SOURCES = tests/cheese-test-camera.c
247 tests_cheese_test_chooser_SOURCES = tests/cheese-test-chooser.c
248 tests_cheese_test_flash_SOURCES = tests/cheese-test-flash.c
249 tests_cheese_test_monitor_SOURCES = tests/cheese-test-monitor.c
250 tests_cheese_test_widget_SOURCES = tests/cheese-test-widget.c
251 tests_test_webcam_button_SOURCES = tests/test-webcam-button.c
253 tests_cheese_test_camera_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
254 tests_cheese_test_chooser_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
255 tests_cheese_test_flash_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
256 tests_cheese_test_monitor_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
257 tests_cheese_test_widget_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
258 tests_test_webcam_button_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
260 tests_cheese_test_camera_LDADD = \
264 tests_cheese_test_chooser_LDADD = \
269 tests_cheese_test_flash_LDADD = \
274 tests_cheese_test_monitor_LDADD = \
279 tests_cheese_test_widget_LDADD = \
284 tests_test_webcam_button_LDADD = $(XTEST_LIBS)
286 @INTLTOOL_DESKTOP_RULE@
287 desktopdir = $(datadir)/applications
288 desktop_in_files = data/cheese.desktop.in
289 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
291 @INTLTOOL_XML_NOMERGE_RULE@
292 gsettings_in_file = data/org.gnome.Cheese.gschema.xml.in
293 gsettings_SCHEMAS = $(gsettings_in_file:.xml.in=.xml)
296 dist_pkgdata_DATA = \
298 data/cheese-about.ui \
299 data/cheese-actions.ui \
300 data/cheese-main-window.ui \
301 data/cheese-prefs.ui \
302 data/cheese-viewport.json
304 pkgconfigdir = $(libdir)/pkgconfig
309 iconthemedir = $(datadir)/icons/hicolor
311 appsicon16dir = $(iconthemedir)/16x16/apps
312 appsicon22dir = $(iconthemedir)/22x22/apps
313 appsicon24dir = $(iconthemedir)/24x24/apps
314 appsicon32dir = $(iconthemedir)/32x32/apps
315 appsicon48dir = $(iconthemedir)/48x48/apps
316 appsicon256dir = $(iconthemedir)/256x256/apps
318 actionsicon16dir = $(iconthemedir)/16x16/actions
319 actionsicon22dir = $(iconthemedir)/22x22/actions
320 actionsicon24dir = $(iconthemedir)/24x24/actions
321 actionsicon32dir = $(iconthemedir)/32x32/actions
322 actionsicon48dir = $(iconthemedir)/48x48/actions
323 actionsiconscalabledir = $(iconthemedir)/scalable/actions
325 dist_appsicon16_DATA = data/icons/16x16/cheese.png
326 dist_appsicon22_DATA = data/icons/22x22/cheese.png
327 dist_appsicon24_DATA = data/icons/24x24/cheese.png
328 dist_appsicon32_DATA = data/icons/32x32/cheese.png
329 dist_appsicon48_DATA = data/icons/48x48/cheese.png
330 dist_appsicon256_DATA = data/icons/256x256/cheese.png
332 dist_actionsicon16_DATA = \
333 data/icons/16x16/actions/browse-webcam-effects.png \
334 data/icons/16x16/actions/cheese-take-burst.png \
335 data/icons/16x16/actions/cheese-take-photo.png
336 dist_actionsicon22_DATA = \
337 data/icons/22x22/actions/browse-webcam-effects.png \
338 data/icons/22x22/actions/cheese-take-burst.png \
339 data/icons/22x22/actions/cheese-take-photo.png
340 dist_actionsicon24_DATA = \
341 data/icons/24x24/actions/browse-webcam-effects.png \
342 data/icons/24x24/actions/cheese-take-burst.png \
343 data/icons/24x24/actions/cheese-take-photo.png
344 dist_actionsicon32_DATA = \
345 data/icons/32x32/actions/browse-webcam-effects.png \
346 data/icons/32x32/actions/cheese-take-burst.png \
347 data/icons/32x32/actions/cheese-take-photo.png
348 dist_actionsicon48_DATA = \
349 data/icons/48x48/actions/browse-webcam-effects.png \
350 data/icons/48x48/actions/cheese-take-burst.png \
351 data/icons/48x48/actions/cheese-take-photo.png
352 dist_actionsiconscalable_DATA = \
353 data/icons/scalable/actions/browse-webcam-effects.svg \
354 data/icons/scalable/actions/cheese-take-burst.svg \
355 data/icons/scalable/actions/cheese-take-photo.svg
357 update_icon_cache = gtk-update-icon-cache --ignore-theme-index --force
359 install-data-hook: install-update-icon-cache
360 uninstall-hook: uninstall-update-icon-cache
361 touch libcheese_la_vala.stamp
363 install-update-icon-cache:
364 $(AM_V_at)$(POST_INSTALL)
365 test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
367 uninstall-update-icon-cache:
368 $(AM_V_at)$(POST_UNINSTALL)
369 test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
371 pixmapsdir = $(pkgdatadir)/pixmaps
372 dist_pixmaps_DATA = \
373 data/pixmaps/thumbnail-frame.png \
374 data/pixmaps/camera-icon.svg \
375 data/pixmaps/cheese-1.svg \
376 data/pixmaps/cheese-2.svg \
377 data/pixmaps/cheese-3.svg
379 catalogdir = $(pkgdatadir)
380 dist_catalog_DATA = \
385 tests/test-libcheese \
386 tests/test-libcheese-gtk
388 tests_test_libcheese_gtk_SOURCES = \
389 libcheese/um-crop-area.c \
390 tests/test-libcheese-gtk.c
391 tests_test_libcheese_gtk_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
392 tests_test_libcheese_gtk_LDADD = \
398 tests_test_libcheese_SOURCES = \
399 tests/test-libcheese.c
400 tests_test_libcheese_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
401 tests_test_libcheese_LDADD = \
405 if CHEESE_ENABLE_TESTS
406 # Not automake built-in TESTS_ENVIRONMENT!
407 TEST_ENVIRONMENT = MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
409 # test: run all tests.
410 test: $(check_PROGRAMS)
411 $(AM_V_at)$(TEST_ENVIRONMENT) $(GTESTER) --verbose $(check_PROGRAMS)
413 # test-report: run tests and generate report.
414 # perf-report: run tests with -m perf and generate report.
415 # full-report: like test-report: with -m perf and -m slow.
416 test-report perf-report full-report: $(check_PROGRAMS)
417 $(AM_V_at)test -z "$(check_PROGRAMS)" || { \
419 test-report) test_options="-k";; \
420 perf-report) test_options="-k -m=perf";; \
421 full-report) test_options="-k -m=perf -m=slow";; \
423 $(TEST_ENVIRONMENT) $(GTESTER) --verbose $$test_options -o test-log.xml $(check_PROGRAMS) ; \
424 if test -d "$(top_srcdir)/.git" ; then \
425 REVISION=`git describe` ; \
427 REVISION=$(PACKAGE_VERSION) ; \
429 echo '<?xml version="1.0"?>' > $@.xml ; \
430 echo '<report-collection>' >> $@.xml ; \
431 echo '<info>' >> $@.xml ; \
432 echo ' <package>$(PACKAGE_NAME)</package>' >> $@.xml ; \
433 echo ' <version>$(PACKAGE_VERSION)</version>' >> $@.xml ; \
434 echo " <revision>$$REVISION</revision>" >> $@.xml ; \
435 echo '</info>' >> $@.xml ; \
436 sed '1,1s/^<?xml\b[^>?]*?>//' < test-log.xml >> $@.xml ; \
439 echo '</report-collection>' >> $@.xml ; \
440 $(GTESTER_REPORT) --version 2>/dev/null 1>&2 ; test "$$?" != 0 || $(GTESTER_REPORT) $@.xml >$@.html ; \
442 else # !CHEESE_ENABLE_TESTS
444 echo "Test run disabled due to the lack of GLib testing utilities"
447 # Code coverage reporting.
448 if CHEESE_ENABLE_LCOV
449 # Depend on full-report so that all the tests are run.
451 $(AM_V_at)$(LCOV) --base-directory $(top_builddir) \
452 --directory $(top_builddir)/libcheese --capture \
453 --output-file cheese-lcov.info --test-name CHEESE \
454 --no-checksum --compat-libtool
455 $(AM_V_at)LANG=C $(LCOV_GENHTML) --prefix $(top_builddir) \
456 --output-directory cheese-lcov --title "Cheese code coverage" \
457 --legend --show-details cheese-lcov.info
460 $(AM_V_at)$(LCOV) --directory $(top_builddir) -z
461 $(AM_V_at)rm -rf cheese-lcov.info cheese-lcov
462 $(AM_V_at)find -name '*.gcda' -exec rm -f {} +
463 else # !CHEESE_ENABLE_LCOV
465 $(AM_V_at)echo "Code coverage reporting not available"
468 $(AM_V_at)rm -rf cheese-lcov.info cheese-lcov
469 $(AM_V_at)find -name '*.gcda' -exec rm -f {} +
473 gtkdoc_builddir = $(top_builddir)/docs/reference
474 gtkdoc_distdir = $(top_distdir)/docs/reference
475 gtkdoc_srcdir = $(top_srcdir)/docs/reference
477 all-local: $(bin_PROGRAMS)
478 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) all
479 # run make test as part of make check.
481 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFlAGS) check
482 clean-local: lcov-clean
483 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) clean
484 find -name '*.gcno' -exec rm -f {} +
486 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) distclean
487 docs: $(lib_LTLIBRARIES)
488 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) docs
490 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) install-data
492 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) uninstall
494 dist-hook: git-changelog-hook
495 $(MKDIR_P) $(gtkdoc_distdir)
496 cp $(gtkdoc_srcdir)/Makefile.am $(gtkdoc_srcdir)/Makefile.in $(gtkdoc_distdir)
497 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) \
498 distdir="../../$(gtkdoc_distdir)" \
499 top_distdir="../../$(top_distdir)" \
504 $(desktop_in_files) \
505 $(gsettings_in_file) \
506 $(service_in_files) \
507 $(gtkdoc_srcdir)/cheese-docs.xml \
508 $(gtkdoc_srcdir)/cheese-sections.txt \
509 $(gtkdoc_srcdir)/cheese.xml \
510 $(gtkdoc_srcdir)/version.xml.in \
512 intltool-extract.in \
515 $(noinst_libcheese_headers) \
516 $(noinst_libcheese_gtk_headers) \
517 libcheese/cheese-gtk.symbols \
518 m4/introspection.m4 \
519 src/vapi/cheese-common.deps \
520 src/vapi/cheese-common.vapi \
521 src/vapi/cheese-thumbview.vapi \
522 src/vapi/config.vapi \
523 src/vapi/eogthumbnav.vapi
525 dist_noinst_SCRIPTS = \
530 $(gsettings_SCHEMAS) \
537 libcheese_la_vala.stamp \
541 po/.intltool-merge-cache
543 MAINTAINERCLEANFILES = \
545 build-aux/config.guess \
546 build-aux/config.sub \
548 build-aux/install-sh \
549 build-aux/ltmain.sh \
553 $(gsettings_SCHEMAS:.xml=.valid) \
558 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection --enable-man
560 CHANGELOG_START = 2.26.0
563 $(AM_V_at)if $(top_srcdir)/build-aux/missing --run git \
564 --git-dir=$(top_srcdir)/.git --work-tree=$(top_srcdir) log \
565 --stat -M -C --name-status --no-color $(CHANGELOG_START).. \
566 | fmt --split-only >.ChangeLog.tmp; \
567 then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
568 else rm -f .ChangeLog.tmp; exit 1; fi
570 .PHONY: docs git-changelog-hook test test-report perf-report full-report
571 .PHONY: lcov lcov-clean