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 \
63 --pkg clutter-gtk-1.0 \
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 -DG_LOG_DOMAIN=\"cheese-gtk\" \
83 -I$(top_builddir)/libcheese \
84 -I$(top_srcdir)/libcheese \
87 libcheese_gtk_la_LIBADD = \
92 libcheese_gtk_la_LDFLAGS = \
93 -version-info $(LIBCHEESE_GTK_LT_VERSION) \
94 -export-symbols $(top_srcdir)/libcheese/cheese-gtk.symbols \
98 libcheese_gtk_la_SOURCES = \
99 libcheese/cheese-avatar-chooser.c \
100 libcheese/totem-aspect-frame.c \
101 libcheese/cheese-flash.c \
102 libcheese/cheese-gtk.c \
103 libcheese/cheese-widget.c \
104 libcheese/um-crop-area.c
106 noinst_libcheese_gtk_headers = \
107 libcheese/totem-aspect-frame.h \
108 libcheese/cheese-avatar-chooser.h \
109 libcheese/cheese-flash.h \
110 libcheese/cheese-widget.h \
111 libcheese/cheese-widget-private.h \
112 libcheese/um-crop-area.h
114 libcheese_la_CFLAGS = \
116 $(CHEESE_GTK_CFLAGS) \
119 libcheese_la_CPPFLAGS = \
121 -DG_LOG_DOMAIN=\"cheese\" \
122 -I$(top_builddir)/libcheese \
123 -I$(top_srcdir)/libcheese
125 libcheese_la_LIBADD = \
128 libcheese_la_LDFLAGS = \
129 -version-info $(LIBCHEESE_LT_VERSION) \
132 libcheese_la_SOURCES = \
133 libcheese/cheese-enums.c \
134 libcheese/cheese-camera.c \
135 libcheese/cheese-camera-device.c \
136 libcheese/cheese-camera-device-monitor.c \
137 libcheese/cheese-effect.c \
138 libcheese/cheese-fileutil.c \
141 noinst_libcheese_headers = \
142 libcheese/cheese-camera.h \
143 libcheese/cheese-camera-device.h \
144 libcheese/cheese-camera-device-monitor.h \
145 libcheese/cheese-effect.h \
146 libcheese/cheese-fileutil.h
148 # FIXME when we have a .pc file, and sonames
149 cheesedir = $(includedir)/cheese
151 libcheese/cheese-avatar-chooser.h \
152 libcheese/cheese-camera.h \
153 libcheese/cheese-camera-device.h \
154 libcheese/cheese-camera-device-monitor.h \
155 libcheese/cheese-effect.h \
156 libcheese/cheese-gtk.h \
158 libcheese/cheese-widget.h
160 if HAVE_INTROSPECTION
161 -include $(INTROSPECTION_MAKEFILE)
162 INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir)
163 INTROSPECTION_SCANNER_ARGS = --add-include-path=$(top_srcdir) --warn-all
165 INTROSPECTION_GIRS = Cheese-3.0.gir
167 Cheese-3.0.gir: libcheese.la
168 Cheese_3_0_gir_CFLAGS = \
169 -I$(top_srcdir)/libcheese \
170 -I$(top_builddir)/libcheese \
172 Cheese_3_0_gir_FILES = \
173 $(libcheese_la_SOURCES) \
174 $(noinst_libcheese_headers) \
175 libcheese/cheese-enums.h
176 Cheese_3_0_gir_INCLUDES = \
184 Cheese_3_0_gir_LIBS = libcheese.la
185 Cheese_3_0_gir_SCANNERFLAGS = --verbose --warn-all --pkg-export cheese
187 girdir = $(datadir)/gir-1.0
188 gir_DATA = $(INTROSPECTION_GIRS)
190 typelibdir = $(libdir)/girepository-1.0
191 typelib_DATA = Cheese-3.0.typelib
194 bin_PROGRAMS = cheese
196 # cheese-main.vala must go at the end of the Vala sources.
198 src/cheese-application.vala \
199 src/cheese-countdown.vala \
200 src/cheese-effects-manager.vala \
201 src/cheese-preferences.vala \
202 src/cheese-window.vala \
203 src/cheese-main.vala \
204 src/thumbview/cheese-thumb-view.c \
205 src/thumbview/cheese-thumbnail.c \
206 src/thumbview/eog-thumb-nav.c
209 src/thumbview/cheese-thumb-view.h \
210 src/thumbview/cheese-thumbnail.h \
211 src/thumbview/eog-thumb-nav.h
216 $(CHEESE_GTK_CFLAGS) \
217 -include $(top_builddir)/$(CONFIG_HEADER) \
218 -I$(top_srcdir)/libcheese \
221 cheese_CFLAGS = -export-dynamic
230 tests/cheese-test-camera \
231 tests/cheese-test-chooser \
232 tests/cheese-test-flash \
233 tests/cheese-test-monitor \
234 tests/cheese-test-widget
239 tests/test-webcam-button
241 noinst_PROGRAMS = $(EXAMPLES)
244 EXAMPLES_CPPFLAGS = \
246 $(CHEESE_GTK_CFLAGS) \
247 -I$(top_srcdir)/libcheese
249 tests_cheese_test_camera_SOURCES = tests/cheese-test-camera.c
250 tests_cheese_test_chooser_SOURCES = tests/cheese-test-chooser.c
251 tests_cheese_test_flash_SOURCES = tests/cheese-test-flash.c
252 tests_cheese_test_monitor_SOURCES = tests/cheese-test-monitor.c
253 tests_cheese_test_widget_SOURCES = tests/cheese-test-widget.c
254 tests_test_webcam_button_SOURCES = tests/test-webcam-button.c
256 tests_cheese_test_camera_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
257 tests_cheese_test_chooser_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
258 tests_cheese_test_flash_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
259 tests_cheese_test_monitor_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
260 tests_cheese_test_widget_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
261 tests_test_webcam_button_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
263 tests_cheese_test_camera_LDADD = \
267 tests_cheese_test_chooser_LDADD = \
272 tests_cheese_test_flash_LDADD = \
277 tests_cheese_test_monitor_LDADD = \
282 tests_cheese_test_widget_LDADD = \
287 tests_test_webcam_button_LDADD = $(XTEST_LIBS)
289 @INTLTOOL_DESKTOP_RULE@
290 desktopdir = $(datadir)/applications
291 desktop_in_files = data/cheese.desktop.in
292 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
294 gsettings_SCHEMAS = data/org.gnome.Cheese.gschema.xml
297 dist_pkgdata_DATA = \
299 data/cheese-main-window.ui \
300 data/cheese-prefs.ui \
301 data/cheese-viewport.json
303 pkgconfigdir = $(libdir)/pkgconfig
308 iconthemedir = $(datadir)/icons/hicolor
310 appsicon16dir = $(iconthemedir)/16x16/apps
311 appsicon22dir = $(iconthemedir)/22x22/apps
312 appsicon24dir = $(iconthemedir)/24x24/apps
313 appsicon32dir = $(iconthemedir)/32x32/apps
314 appsicon48dir = $(iconthemedir)/48x48/apps
315 appsicon256dir = $(iconthemedir)/256x256/apps
317 actionsicon16dir = $(iconthemedir)/16x16/actions
318 actionsicon22dir = $(iconthemedir)/22x22/actions
319 actionsicon24dir = $(iconthemedir)/24x24/actions
320 actionsicon32dir = $(iconthemedir)/32x32/actions
321 actionsicon48dir = $(iconthemedir)/48x48/actions
322 actionsiconscalabledir = $(iconthemedir)/scalable/actions
324 dist_appsicon16_DATA = data/icons/16x16/cheese.png
325 dist_appsicon22_DATA = data/icons/22x22/cheese.png
326 dist_appsicon24_DATA = data/icons/24x24/cheese.png
327 dist_appsicon32_DATA = data/icons/32x32/cheese.png
328 dist_appsicon48_DATA = data/icons/48x48/cheese.png
329 dist_appsicon256_DATA = data/icons/256x256/cheese.png
331 dist_actionsicon16_DATA = \
332 data/icons/16x16/actions/browse-webcam-effects.png \
333 data/icons/16x16/actions/cheese-take-burst.png \
334 data/icons/16x16/actions/cheese-take-photo.png
335 dist_actionsicon22_DATA = \
336 data/icons/22x22/actions/browse-webcam-effects.png \
337 data/icons/22x22/actions/cheese-take-burst.png \
338 data/icons/22x22/actions/cheese-take-photo.png
339 dist_actionsicon24_DATA = \
340 data/icons/24x24/actions/browse-webcam-effects.png \
341 data/icons/24x24/actions/cheese-take-burst.png \
342 data/icons/24x24/actions/cheese-take-photo.png
343 dist_actionsicon32_DATA = \
344 data/icons/32x32/actions/browse-webcam-effects.png \
345 data/icons/32x32/actions/cheese-take-burst.png \
346 data/icons/32x32/actions/cheese-take-photo.png
347 dist_actionsicon48_DATA = \
348 data/icons/48x48/actions/browse-webcam-effects.png \
349 data/icons/48x48/actions/cheese-take-burst.png \
350 data/icons/48x48/actions/cheese-take-photo.png
351 dist_actionsiconscalable_DATA = \
352 data/icons/scalable/actions/browse-webcam-effects.svg \
353 data/icons/scalable/actions/cheese-take-burst.svg \
354 data/icons/scalable/actions/cheese-take-photo.svg
356 update_icon_cache = gtk-update-icon-cache --ignore-theme-index --force
358 install-data-hook: install-update-icon-cache
359 uninstall-hook: uninstall-update-icon-cache
360 touch libcheese_la_vala.stamp
362 install-update-icon-cache:
363 $(AM_V_at)$(POST_INSTALL)
364 test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
366 uninstall-update-icon-cache:
367 $(AM_V_at)$(POST_UNINSTALL)
368 test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
370 pixmapsdir = $(pkgdatadir)/pixmaps
371 dist_pixmaps_DATA = \
372 data/pixmaps/thumbnail-frame.png \
373 data/pixmaps/camera-icon.svg \
374 data/pixmaps/cheese-1.svg \
375 data/pixmaps/cheese-2.svg \
376 data/pixmaps/cheese-3.svg
380 tests/test-libcheese \
381 tests/test-libcheese-gtk
383 tests_test_libcheese_gtk_SOURCES = \
384 libcheese/um-crop-area.c \
385 tests/test-libcheese-gtk.c
386 tests_test_libcheese_gtk_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
387 tests_test_libcheese_gtk_LDADD = \
393 tests_test_libcheese_SOURCES = \
394 tests/test-libcheese.c
395 tests_test_libcheese_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
396 tests_test_libcheese_LDADD = \
400 if CHEESE_ENABLE_TESTS
401 # Not automake built-in TESTS_ENVIRONMENT!
402 TEST_ENVIRONMENT = MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
404 # test: run all tests.
405 test: $(check_PROGRAMS)
406 $(AM_V_at)$(TEST_ENVIRONMENT) $(GTESTER) --verbose $(check_PROGRAMS)
408 # test-report: run tests and generate report.
409 # perf-report: run tests with -m perf and generate report.
410 # full-report: like test-report: with -m perf and -m slow.
411 test-report perf-report full-report: $(check_PROGRAMS)
412 $(AM_V_at)test -z "$(check_PROGRAMS)" || { \
414 test-report) test_options="-k";; \
415 perf-report) test_options="-k -m=perf";; \
416 full-report) test_options="-k -m=perf -m=slow";; \
418 $(TEST_ENVIRONMENT) $(GTESTER) --verbose $$test_options -o test-log.xml $(check_PROGRAMS) ; \
419 if test -d "$(top_srcdir)/.git" ; then \
420 REVISION=`git describe` ; \
422 REVISION=$(PACKAGE_VERSION) ; \
424 echo '<?xml version="1.0"?>' > $@.xml ; \
425 echo '<report-collection>' >> $@.xml ; \
426 echo '<info>' >> $@.xml ; \
427 echo ' <package>$(PACKAGE_NAME)</package>' >> $@.xml ; \
428 echo ' <version>$(PACKAGE_VERSION)</version>' >> $@.xml ; \
429 echo " <revision>$$REVISION</revision>" >> $@.xml ; \
430 echo '</info>' >> $@.xml ; \
431 sed '1,1s/^<?xml\b[^>?]*?>//' < test-log.xml >> $@.xml ; \
434 echo '</report-collection>' >> $@.xml ; \
435 $(GTESTER_REPORT) --version 2>/dev/null 1>&2 ; test "$$?" != 0 || $(GTESTER_REPORT) $@.xml >$@.html ; \
437 else # !CHEESE_ENABLE_TESTS
439 echo "Test run disabled due to the lack of GLib testing utilities"
442 # Code coverage reporting.
443 if CHEESE_ENABLE_LCOV
444 # Depend on full-report so that all the tests are run.
446 $(AM_V_at)$(LCOV) --base-directory $(top_builddir) \
447 --directory $(top_builddir)/libcheese --capture \
448 --output-file cheese-lcov.info --test-name CHEESE \
449 --no-checksum --compat-libtool
450 $(AM_V_at)LANG=C $(LCOV_GENHTML) --prefix $(top_builddir) \
451 --output-directory cheese-lcov --title "Cheese code coverage" \
452 --legend --show-details cheese-lcov.info
455 $(AM_V_at)$(LCOV) --directory $(top_builddir) -z
456 $(AM_V_at)rm -rf cheese-lcov.info cheese-lcov
457 $(AM_V_at)find -name '*.gcda' -exec rm -f {} +
458 else # !CHEESE_ENABLE_LCOV
460 $(AM_V_at)echo "Code coverage reporting not available"
463 $(AM_V_at)rm -rf cheese-lcov.info cheese-lcov
464 $(AM_V_at)find -name '*.gcda' -exec rm -f {} +
468 gtkdoc_builddir = $(top_builddir)/docs/reference
469 gtkdoc_distdir = $(top_distdir)/docs/reference
470 gtkdoc_srcdir = $(top_srcdir)/docs/reference
472 all-local: $(bin_PROGRAMS)
473 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) all
474 # run make test as part of make check.
476 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFlAGS) check
477 clean-local: lcov-clean
478 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) clean
479 find -name '*.gcno' -exec rm -f {} +
481 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) distclean
482 docs: $(lib_LTLIBRARIES)
483 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) docs
485 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) install-data
487 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) uninstall
489 dist-hook: git-changelog-hook
490 $(MKDIR_P) $(gtkdoc_distdir)
491 cp $(gtkdoc_srcdir)/Makefile.am $(gtkdoc_srcdir)/Makefile.in $(gtkdoc_distdir)
492 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) \
493 distdir="../../$(gtkdoc_distdir)" \
494 top_distdir="../../$(top_distdir)" \
499 $(desktop_in_files) \
500 $(gsettings_SCHEMAS) \
501 $(service_in_files) \
502 $(gtkdoc_srcdir)/cheese-docs.xml \
503 $(gtkdoc_srcdir)/cheese-sections.txt \
504 $(gtkdoc_srcdir)/cheese.xml \
505 $(gtkdoc_srcdir)/version.xml.in \
507 intltool-extract.in \
510 $(noinst_libcheese_headers) \
511 $(noinst_libcheese_gtk_headers) \
512 libcheese/cheese-gtk.symbols \
513 m4/introspection.m4 \
514 src/vapi/cheese-common.deps \
515 src/vapi/cheese-common.vapi \
516 src/vapi/cheese-thumbview.vapi \
517 src/vapi/config.vapi \
518 src/vapi/eogthumbnav.vapi
520 dist_noinst_SCRIPTS = \
531 libcheese_la_vala.stamp \
535 po/.intltool-merge-cache
537 MAINTAINERCLEANFILES = \
539 build-aux/config.guess \
540 build-aux/config.sub \
542 build-aux/install-sh \
543 build-aux/ltmain.sh \
547 $(gsettings_SCHEMAS:.xml=.valid) \
552 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection --enable-man
554 CHANGELOG_START = 2.26.0
557 $(AM_V_at)if $(top_srcdir)/build-aux/missing --run git \
558 --git-dir=$(top_srcdir)/.git --work-tree=$(top_srcdir) log \
559 --stat -M -C --name-status --no-color $(CHANGELOG_START).. \
560 | fmt --split-only >.ChangeLog.tmp; \
561 then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
562 else rm -f .ChangeLog.tmp; exit 1; fi
564 .PHONY: docs git-changelog-hook test test-report perf-report full-report
565 .PHONY: lcov lcov-clean