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);\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 -DPACKAGE_LOCALEDIR=\""$(datadir)/locale"\" \
42 -DGNOME_DESKTOP_USE_UNSTABLE_API=1 \
52 --vapidir $(top_srcdir)/src/vapi \
53 --gresources $(top_srcdir)/data/org.gnome.Cheese.gresource.xml \
59 --pkg clutter-gtk-1.0 \
61 --pkg libcanberra-gtk \
64 --pkg cheese-thumbview \
69 lib_LTLIBRARIES = libcheese.la libcheese-gtk.la
71 libcheese_gtk_la_CFLAGS = \
73 $(CHEESE_GTK_CFLAGS) \
76 libcheese_gtk_la_CPPFLAGS = \
78 -DG_LOG_DOMAIN=\"cheese-gtk\" \
79 -I$(top_builddir)/libcheese \
80 -I$(top_srcdir)/libcheese \
83 libcheese_gtk_la_LIBADD = \
89 libcheese_gtk_la_LDFLAGS = \
90 -version-info $(LIBCHEESE_GTK_LT_VERSION) \
91 -export-symbols $(top_srcdir)/libcheese/cheese-gtk.symbols \
95 libcheese_gtk_la_SOURCES = \
96 libcheese/cheese-avatar-chooser.c \
97 libcheese/cheese-avatar-widget.c \
98 libcheese/totem-aspect-frame.c \
99 libcheese/cheese-flash.c \
100 libcheese/cheese-gtk.c \
101 libcheese/cheese-widget.c \
102 libcheese/um-crop-area.c
104 noinst_libcheese_gtk_headers = \
105 libcheese/totem-aspect-frame.h \
106 libcheese/cheese-avatar-chooser.h \
107 libcheese/cheese-avatar-widget.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 -DG_LOG_DOMAIN=\"cheese\" \
121 -I$(top_builddir)/libcheese \
122 -I$(top_srcdir)/libcheese
124 libcheese_la_LIBADD = \
127 libcheese_la_LDFLAGS = \
128 -version-info $(LIBCHEESE_LT_VERSION) \
131 libcheese_la_SOURCES = \
132 libcheese/cheese-enums.c \
133 libcheese/cheese-camera.c \
134 libcheese/cheese-camera-device.c \
135 libcheese/cheese-camera-device-monitor.c \
136 libcheese/cheese-effect.c \
137 libcheese/cheese-fileutil.c \
140 noinst_libcheese_headers = \
141 libcheese/cheese-camera.h \
142 libcheese/cheese-camera-device.h \
143 libcheese/cheese-camera-device-monitor.h \
144 libcheese/cheese-effect.h \
145 libcheese/cheese-fileutil.h
147 # FIXME when we have a .pc file, and sonames
148 cheesedir = $(includedir)/cheese
150 libcheese/cheese-avatar-widget.h \
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 = \
180 Cheese_3_0_gir_LIBS = libcheese.la
181 Cheese_3_0_gir_SCANNERFLAGS = --verbose --warn-all --pkg-export cheese
183 girdir = $(datadir)/gir-1.0
184 gir_DATA = $(INTROSPECTION_GIRS)
186 typelibdir = $(libdir)/girepository-1.0
187 typelib_DATA = Cheese-3.0.typelib
190 noinst_resource_files = \
192 data/cheese-viewport.json \
193 data/cheese-main-window.ui \
194 data/cheese-prefs.ui \
197 data/pixmaps/cheese-1.svg \
198 data/pixmaps/cheese-2.svg \
199 data/pixmaps/cheese-3.svg \
200 data/pixmaps/thumbnail-frame.png
202 src/cheese-resource.c src/cheese-resource.h: data/org.gnome.Cheese.gresource.xml Makefile $(noinst_resource_files)
203 $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/data --generate --c-name cheese $<
205 bin_PROGRAMS = cheese
207 nodist_cheese_SOURCES = \
208 src/cheese-resource.c
210 # cheese-main.vala must go at the end of the Vala sources.
212 src/cheese-application.vala \
213 src/cheese-countdown.vala \
214 src/cheese-effects-manager.vala \
215 src/cheese-preferences.vala \
216 src/cheese-window.vala \
217 src/cheese-main.vala \
218 src/thumbview/cheese-thumb-view.c \
219 src/thumbview/cheese-thumbnail.c \
220 src/thumbview/eog-thumb-nav.c
222 nodist_cheese_HEADERS = \
223 src/cheese-resource.h
226 src/thumbview/cheese-thumb-view.h \
227 src/thumbview/cheese-thumbnail.h \
228 src/thumbview/eog-thumb-nav.h
233 $(CHEESE_GTK_CFLAGS) \
234 -include $(top_builddir)/$(CONFIG_HEADER) \
235 -I$(top_srcdir)/libcheese \
238 cheese_CFLAGS = -export-dynamic -w
247 tests/cheese-test-camera \
248 tests/cheese-test-chooser \
249 tests/cheese-test-flash \
250 tests/cheese-test-monitor \
251 tests/cheese-test-widget
256 tests/test-webcam-button
258 noinst_PROGRAMS = $(EXAMPLES)
261 EXAMPLES_CPPFLAGS = \
263 $(CHEESE_GTK_CFLAGS) \
264 -I$(top_srcdir)/libcheese
266 tests_cheese_test_camera_SOURCES = tests/cheese-test-camera.c
267 tests_cheese_test_chooser_SOURCES = tests/cheese-test-chooser.c
268 tests_cheese_test_flash_SOURCES = tests/cheese-test-flash.c
269 tests_cheese_test_monitor_SOURCES = tests/cheese-test-monitor.c
270 tests_cheese_test_widget_SOURCES = tests/cheese-test-widget.c
271 tests_test_webcam_button_SOURCES = tests/test-webcam-button.c
273 tests_cheese_test_camera_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
274 tests_cheese_test_chooser_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
275 tests_cheese_test_flash_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
276 tests_cheese_test_monitor_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
277 tests_cheese_test_widget_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
278 tests_test_webcam_button_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
280 tests_cheese_test_camera_LDADD = \
284 tests_cheese_test_chooser_LDADD = \
289 tests_cheese_test_flash_LDADD = \
294 tests_cheese_test_monitor_LDADD = \
299 tests_cheese_test_widget_LDADD = \
304 tests_test_webcam_button_LDADD = $(XTEST_LIBS)
306 @INTLTOOL_DESKTOP_RULE@
307 desktopdir = $(datadir)/applications
308 desktop_in_files = data/org.gnome.Cheese.desktop.in
309 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
311 @APPSTREAM_XML_RULES@
313 appstream_in_files = data/org.gnome.Cheese.appdata.xml.in
314 appstream_XML = $(appstream_in_files:.appdata.xml.in=.appdata.xml)
316 data/org.gnome.Cheese.service: data/org.gnome.Cheese.service.in
317 $(AM_V_GEN)$(SED) -e "s|[@]bindir[@]|$(bindir)|" $< > $@
319 servicedir = $(datadir)/dbus-1/services
321 data/org.gnome.Cheese.service.in
322 service_DATA = $(service_in_files:.service.in=.service)
325 gsettings_SCHEMAS = data/org.gnome.Cheese.gschema.xml
327 pkgconfigdir = $(libdir)/pkgconfig
332 iconthemedir = $(datadir)/icons/hicolor
334 appsicon16dir = $(iconthemedir)/16x16/apps
335 appsicon22dir = $(iconthemedir)/22x22/apps
336 appsicon24dir = $(iconthemedir)/24x24/apps
337 appsicon32dir = $(iconthemedir)/32x32/apps
338 appsicon48dir = $(iconthemedir)/48x48/apps
339 appsicon256dir = $(iconthemedir)/256x256/apps
340 appsiconsymbolicdir = $(iconthemedir)/symbolic/apps
342 dist_appsicon16_DATA = data/icons/16x16/org.gnome.Cheese.png
343 dist_appsicon22_DATA = data/icons/22x22/org.gnome.Cheese.png
344 dist_appsicon24_DATA = data/icons/24x24/org.gnome.Cheese.png
345 dist_appsicon32_DATA = data/icons/32x32/org.gnome.Cheese.png
346 dist_appsicon48_DATA = data/icons/48x48/org.gnome.Cheese.png
347 dist_appsicon256_DATA = data/icons/256x256/org.gnome.Cheese.png
348 dist_appsiconsymbolic_DATA = data/icons/symbolic/org.gnome.Cheese-symbolic.svg
350 update_icon_cache = gtk-update-icon-cache --ignore-theme-index --force
352 install-data-hook: install-update-icon-cache
353 uninstall-hook: uninstall-update-icon-cache
354 touch libcheese_la_vala.stamp
356 install-update-icon-cache:
357 $(AM_V_at)$(POST_INSTALL)
358 test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
360 uninstall-update-icon-cache:
361 $(AM_V_at)$(POST_UNINSTALL)
362 test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
366 tests/test-libcheese \
367 tests/test-libcheese-gtk
369 tests_test_libcheese_gtk_SOURCES = \
370 libcheese/um-crop-area.c \
371 tests/test-libcheese-gtk.c
372 tests_test_libcheese_gtk_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
373 tests_test_libcheese_gtk_LDADD = \
379 tests_test_libcheese_SOURCES = \
380 tests/test-libcheese.c
381 tests_test_libcheese_CPPFLAGS = $(EXAMPLES_CPPFLAGS)
382 tests_test_libcheese_LDADD = \
386 if CHEESE_ENABLE_TESTS
387 # Not automake built-in TESTS_ENVIRONMENT!
388 TEST_ENVIRONMENT = MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
390 # test: run all tests.
391 test: $(check_PROGRAMS)
392 $(AM_V_at)$(TEST_ENVIRONMENT) $(GTESTER) --verbose $(check_PROGRAMS)
394 # test-report: run tests and generate report.
395 # perf-report: run tests with -m perf and generate report.
396 # full-report: like test-report: with -m perf and -m slow.
397 test-report perf-report full-report: $(check_PROGRAMS)
398 $(AM_V_at)test -z "$(check_PROGRAMS)" || { \
400 test-report) test_options="-k";; \
401 perf-report) test_options="-k -m=perf";; \
402 full-report) test_options="-k -m=perf -m=slow";; \
404 $(TEST_ENVIRONMENT) $(GTESTER) --verbose $$test_options -o test-log.xml $(check_PROGRAMS) ; \
405 if test -d "$(top_srcdir)/.git" ; then \
406 REVISION=`git describe` ; \
408 REVISION=$(PACKAGE_VERSION) ; \
410 echo '<?xml version="1.0"?>' > $@.xml ; \
411 echo '<report-collection>' >> $@.xml ; \
412 echo '<info>' >> $@.xml ; \
413 echo ' <package>$(PACKAGE_NAME)</package>' >> $@.xml ; \
414 echo ' <version>$(PACKAGE_VERSION)</version>' >> $@.xml ; \
415 echo " <revision>$$REVISION</revision>" >> $@.xml ; \
416 echo '</info>' >> $@.xml ; \
417 $(SED) '1,1s/^<?xml\b[^>?]*?>//' < test-log.xml >> $@.xml ; \
420 echo '</report-collection>' >> $@.xml ; \
421 $(GTESTER_REPORT) --version 2>/dev/null 1>&2 ; test "$$?" != 0 || $(GTESTER_REPORT) $@.xml >$@.html ; \
423 else # !CHEESE_ENABLE_TESTS
425 echo "Test run disabled due to the lack of GLib testing utilities"
428 # Code coverage reporting.
429 if CHEESE_ENABLE_LCOV
430 # Depend on full-report so that all the tests are run.
432 $(AM_V_at)$(LCOV) --base-directory $(top_builddir) \
433 --directory $(top_builddir)/libcheese --capture \
434 --output-file cheese-lcov.info --test-name CHEESE \
435 --no-checksum --compat-libtool
436 $(AM_V_at)LANG=C $(LCOV_GENHTML) --prefix $(top_builddir) \
437 --output-directory cheese-lcov --title "Cheese code coverage" \
438 --legend --show-details cheese-lcov.info
441 $(AM_V_at)$(LCOV) --directory $(top_builddir) -z
442 $(AM_V_at)rm -rf cheese-lcov.info cheese-lcov
443 $(AM_V_at)find . -name '*.gcda' -exec rm -f {} +
444 else # !CHEESE_ENABLE_LCOV
446 $(AM_V_at)echo "Code coverage reporting not available"
449 $(AM_V_at)rm -rf cheese-lcov.info cheese-lcov
450 $(AM_V_at)find . -name '*.gcda' -exec rm -f {} +
454 gtkdoc_builddir = $(top_builddir)/docs/reference
455 gtkdoc_distdir = $(top_distdir)/docs/reference
456 gtkdoc_srcdir = $(top_srcdir)/docs/reference
458 all-local: $(bin_PROGRAMS)
459 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) all
460 # run make test as part of make check.
462 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFlAGS) check
463 clean-local: lcov-clean
464 cd $(gtkdoc_builddir) && if test -e Makefile ; then \
465 $(MAKE) $(AM_MAKEFLAGS) clean ; \
467 find . -name '*.gcno' -exec rm -f {} +
469 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) distclean
470 docs: $(lib_LTLIBRARIES)
471 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) docs
473 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) install-data
475 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) uninstall
477 dist-hook: git-changelog-hook
478 $(MKDIR_P) $(gtkdoc_distdir)
479 cp $(gtkdoc_srcdir)/Makefile.am $(gtkdoc_srcdir)/Makefile.in $(gtkdoc_distdir)
480 cd $(gtkdoc_builddir) && $(MAKE) $(AM_MAKEFLAGS) \
481 distdir="../../$(gtkdoc_distdir)" \
482 top_distdir="../../$(top_distdir)" \
487 $(appstream_in_files) \
488 $(desktop_in_files) \
489 $(gsettings_SCHEMAS) \
490 $(noinst_resource_files) \
491 $(service_in_files) \
492 data/org.gnome.Cheese.gresource.xml \
493 build-aux/test-driver \
494 $(gtkdoc_srcdir)/cheese-docs.xml \
495 $(gtkdoc_srcdir)/cheese-sections.txt \
496 $(gtkdoc_srcdir)/cheese.xml \
497 $(gtkdoc_srcdir)/version.xml.in \
499 $(noinst_libcheese_headers) \
500 $(noinst_libcheese_gtk_headers) \
501 libcheese/cheese-gtk.symbols \
502 m4/introspection.m4 \
503 src/vapi/cheese-common.deps \
504 src/vapi/cheese-common.vapi \
505 src/vapi/cheese-thumbview.vapi \
506 src/vapi/config.vapi \
507 src/vapi/eogthumbnav.vapi
509 dist_noinst_SCRIPTS = \
520 src/cheese-resource.c \
521 src/cheese-resource.h
524 libcheese_la_vala.stamp \
525 po/.intltool-merge-cache
527 MAINTAINERCLEANFILES = \
529 build-aux/config.guess \
530 build-aux/config.sub \
532 build-aux/install-sh \
533 build-aux/ltmain.sh \
535 build-aux/test-driver \
538 $(gsettings_SCHEMAS:.xml=.valid) \
543 AM_DISTCHECK_CONFIGURE_FLAGS = \
544 --enable-appdata-check \
546 --enable-introspection \
549 CHANGELOG_START = 2.26.0
552 $(AM_V_at)if $(top_srcdir)/build-aux/missing --run git \
553 --git-dir=$(top_srcdir)/.git --work-tree=$(top_srcdir) log \
554 --stat -M -C --name-status --no-color $(CHANGELOG_START).. \
555 | fmt --split-only >.ChangeLog.tmp; \
556 then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \
557 else rm -f .ChangeLog.tmp; exit 1; fi
559 .PHONY: docs git-changelog-hook test test-report perf-report full-report
560 .PHONY: lcov lcov-clean