1 include $(top_srcdir)/build/Makefile.am.common
5 -I$(top_srcdir)/boilerplate \
7 -I$(top_builddir)/src \
10 EXTRA_PROGRAMS += cairo-perf cairo-perf-diff-files cairo-perf-graph-files
11 EXTRA_DIST += cairo-perf-diff
12 EXTRA_LTLIBRARIES += libcairoperf.la
14 LDADD = $(top_builddir)/boilerplate/libcairoboilerplate.la \
15 $(top_builddir)/src/libcairo.la \
19 cairo_perf_SOURCES = \
31 pattern_create_radial.c \
33 rounded-rectangles.c \
45 if CAIRO_HAS_WIN32_SURFACE
46 cairo_perf_SOURCES += cairo-perf-win32.c
48 if CAIRO_HAS_OS2_SURFACE
49 cairo_perf_SOURCES += cairo-perf-os2.c
51 cairo_perf_SOURCES += cairo-perf-posix.c
55 libcairoperf_la_SOURCES = \
60 cairo_perf_diff_files_SOURCES = \
61 cairo-perf-diff-files.c
63 cairo_perf_graph_files_SOURCES = \
65 cairo-perf-graph-files.c \
66 cairo-perf-graph-widget.c
67 cairo_perf_graph_files_CFLAGS = @gtk_CFLAGS@
68 cairo_perf_graph_files_LDADD = @gtk_LIBS@ $(LDADD)
70 $(top_builddir)/boilerplate/libcairoboilerplate.la: $(top_builddir)/src/libcairo.la
71 cd $(top_builddir)/boilerplate && $(MAKE) $(AM_MAKEFLAGS) libcairoboilerplate.la
73 $(top_builddir)/src/libcairo.la:
74 cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libcairo.la
77 # Do a funny transition of CAIRO_TEST_TARGET through TARGETS such that
78 # one can limit tested targets both through CAIRO_TEST_TARGET env var
79 # and TARGETS make var on the command line. Same for the rest.
80 TARGETS = $(CAIRO_TEST_TARGET)
81 TARGETS_EXCLUDE = $(CAIRO_TEST_TARGET_EXCLUDE)
82 ITERS = $(CAIRO_PERF_ITERATIONS)
84 CAIRO_PERF_ENVIRONMENT = CAIRO_PERF_ITERATIONS="$(ITERS)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)"
86 # Cap the maximum number of iterations during 'make check'
87 TESTS_ENVIRONMENT = CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_PERF_ITERATIONS="10"
89 TESTS += cairo-perf$(EXEEXT)
91 perf: cairo-perf$(EXEEXT)
92 $(CAIRO_PERF_ENVIRONMENT) ./cairo-perf$(EXEEXT)
94 html-local: index.html
96 index.html: cairo-perf$(EXEEXT)
97 $(CAIRO_PERF_ENVIRONMENT) ./cairo-perf-diff -h HEAD > $@
100 EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS)
101 VALGRIND_MEMCHECK_FLAGS = \
103 --suppressions=$(top_srcdir)/test/.valgrind-suppressions \
104 --leak-check=yes --show-reachable=yes
105 VALGRIND_CALLGRIND_FLAGS = \
112 check-valgrind perf-valgrind:
113 $(MAKE) $(AM_MAKEFLAGS) check \
114 TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) \
115 $(top_builddir)/libtool --mode=execute \
116 valgrind $(VALGRIND_MEMCHECK_FLAGS) $(EXTRA_VALGRIND_FLAGS)' \
120 $(MAKE) $(AM_MAKEFLAGS) check \
121 TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) \
122 $(top_builddir)/libtool --mode=execute \
123 valgrind $(VALGRIND_CALLGRIND_FLAGS) $(EXTRA_VALGRIND_FLAGS)'
125 .PHONY: perf check-valgrind perf-valgrind perf-callgrind
127 EXTRA_DIST += Makefile.win32