2009-12-01 Jeffrey Stedfast <fejj@novell.com>
[moon.git] / perf / Makefile.am
blob5debf1c5f415088f6c19b7751b921e034d2a68d5
1 if INCLUDE_PERFORMANCE
2 PERFORMANCE = true
3 else
4 PERFORMANCE = echo ERROR: Performance suite is disabled by configuration; false
5 endif
7 noinst_PROGRAMS = perf-tool
9 MOZ_PATH = `pwd`/$(top_builddir)/plugin/.libs
10 LD_PATH = $(top_builddir)/plugin/.libs:$(top_builddir)/src/.libs:`pkg-config --variable=sdkdir mozilla-gtkmozembed`/lib
11 MOON_PLUGIN_DIR = `pwd`/$(top_builddir)/plugin/.libs
13 INCLUDES = $(PERF_TOOL_CFLAGS) $(MOON_PROG_CFLAGS) -Wall -DG_LOG_DOMAIN=\"perf-tool\"
15 perf_tool_SOURCES =                                     \
16         perf-suite-tool/perf-suite-tool.cpp
18 perf_tool_LDADD = $(PERF_TOOL_LIBS) $(MOON_PROG_LIBS)
20 MCS = gmcs
21 RUNTIME = mono
22 MCS_COMMON_FLAGS = -r:Mono.GetOptions
24 MCS_LIB_FLAGS = -r:Mono.Data.SqliteClient -r:System.Data
25 MCS_RUNNER_FLAGS = -r:perf-suite-lib.dll
26 MCS_GENERATOR_FLAGS = -r:perf-suite-lib.dll -r:Mono.Cairo
28 check-performance:
29         @$(PERFORMANCE) 
31 perf_suite_lib_sources = \
32         $(srcdir)/perf-suite-lib/Database.cs                    \
33         $(srcdir)/perf-suite-lib/DbEntry.cs                     \
34         $(srcdir)/perf-suite-lib/PassDbEntry.cs                 \
35         $(srcdir)/perf-suite-lib/ItemDbEntry.cs                 \
36         $(srcdir)/perf-suite-lib/ResultDbEntry.cs
38 perf_suite_runner_sources = \
39         $(srcdir)/perf-suite-runner/DrtStore.cs                 \
40         $(srcdir)/perf-suite-runner/DrtItem.cs                  \
41         $(srcdir)/perf-suite-runner/PerfSuiteRunner.cs          \
42         $(srcdir)/perf-suite-runner/DrtResult.cs                \
43         $(srcdir)/perf-suite-runner/Options.cs                  \
44         $(srcdir)/perf-suite-runner/AssemblyInfo.cs
46 perf_suite_generator_sources = \
47         $(srcdir)/perf-suite-generator/GraphGenerator.cs        \
48         $(srcdir)/perf-suite-generator/HtmlGenerator.cs         \
49         $(srcdir)/perf-suite-generator/PerfSuiteGenerator.cs    \
50         $(srcdir)/perf-suite-generator/UtilFu.cs                \
51         $(srcdir)/perf-suite-generator/AssemblyInfo.cs          \
52         $(srcdir)/perf-suite-generator/Options.cs
54 perf-suite-lib.dll: $(perf_suite_lib_sources) check-performance
55         $(MCS) $(MCS_COMMON_FLAGS) $(MCS_LIB_FLAGS) $(perf_suite_lib_sources) /target:library /out:$@
57 perf-suite-runner.exe: $(perf_suite_runner_sources) perf-suite-lib.dll check-performance
58         $(MCS) $(MCS_COMMON_FLAGS) $(MCS_RUNNER_FLAGS) $(perf_suite_runner_sources) /out:$@ 
60 perf-suite-generator.exe: $(perf_suite_generator_sources) perf-suite-lib.dll check-performance
61         $(MCS) $(MCS_COMMON_FLAGS) $(MCS_GENERATOR_FLAGS) $(perf_suite_generator_sources) /out:$@ 
63 all: perf-suite-lib.dll perf-suite-runner.exe perf-suite-generator.exe perf-tool
65 run-perf: all check-performance
66         GNOME_DISABLE_CRASH_DIALOG=1 MOON_PLUGIN_DIR=$(MOON_PLUGIN_DIR) MOZ_PLUGIN_PATH=$(MOZ_PATH) LD_LIBRARY_PATH=$(LD_PATH):$(LD_LIBRARY_PATH) $(RUNTIME) perf-suite-runner.exe
67         $(RUNTIME) perf-suite-generator.exe
69 EXTRA_DIST = $(perf_suite_lib_sources) $(perf_suite_runner_sources) $(perf_suite_generator_sources) perf-report/helpers.js perf-report/jquery.js  perf-report/logo.png  perf-report/report.css perf-suite-set
71 CLEANFILES = perf-suite-lib.dll perf-suite-runner.exe perf-suite-generator.exe
73 .PHONY: check-performance