xref: /freebsd/contrib/kyua/drivers/Makefile.am.inc (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
1# Copyright 2011 The Kyua Authors.
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met:
7#
8# * Redistributions of source code must retain the above copyright
9#   notice, this list of conditions and the following disclaimer.
10# * Redistributions in binary form must reproduce the above copyright
11#   notice, this list of conditions and the following disclaimer in the
12#   documentation and/or other materials provided with the distribution.
13# * Neither the name of Google Inc. nor the names of its contributors
14#   may be used to endorse or promote products derived from this software
15#   without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29DRIVERS_CFLAGS = $(ENGINE_CFLAGS) $(STORE_CFLAGS) $(MODEL_CFLAGS) \
30                 $(UTILS_CFLAGS)
31DRIVERS_LIBS = libdrivers.a $(ENGINE_LIBS) $(STORE_LIBS) $(MODEL_LIBS) \
32               $(UTILS_LIBS)
33
34noinst_LIBRARIES += libdrivers.a
35libdrivers_a_CPPFLAGS = $(DRIVERS_CFLAGS)
36libdrivers_a_SOURCES  = drivers/debug_test.cpp
37libdrivers_a_SOURCES += drivers/debug_test.hpp
38libdrivers_a_SOURCES += drivers/list_tests.cpp
39libdrivers_a_SOURCES += drivers/list_tests.hpp
40libdrivers_a_SOURCES += drivers/report_junit.cpp
41libdrivers_a_SOURCES += drivers/report_junit.hpp
42libdrivers_a_SOURCES += drivers/run_tests.cpp
43libdrivers_a_SOURCES += drivers/run_tests.hpp
44libdrivers_a_SOURCES += drivers/scan_results.cpp
45libdrivers_a_SOURCES += drivers/scan_results.hpp
46
47if WITH_ATF
48tests_driversdir = $(pkgtestsdir)/drivers
49
50tests_drivers_DATA = drivers/Kyuafile
51EXTRA_DIST += $(tests_drivers_DATA)
52
53tests_drivers_PROGRAMS = drivers/list_tests_helpers
54drivers_list_tests_helpers_SOURCES = drivers/list_tests_helpers.cpp
55drivers_list_tests_helpers_CXXFLAGS = $(ATF_CXX_CFLAGS)
56drivers_list_tests_helpers_LDADD = $(ATF_CXX_LIBS)
57
58tests_drivers_PROGRAMS += drivers/list_tests_test
59drivers_list_tests_test_SOURCES = drivers/list_tests_test.cpp
60drivers_list_tests_test_CXXFLAGS = $(DRIVERS_CFLAGS) $(ATF_CXX_CFLAGS)
61drivers_list_tests_test_LDADD = $(DRIVERS_LIBS) $(ATF_CXX_LIBS)
62
63tests_drivers_PROGRAMS += drivers/report_junit_test
64drivers_report_junit_test_SOURCES = drivers/report_junit_test.cpp
65drivers_report_junit_test_CXXFLAGS = $(DRIVERS_CFLAGS) $(ATF_CXX_CFLAGS)
66drivers_report_junit_test_LDADD = $(DRIVERS_LIBS) $(ATF_CXX_LIBS)
67
68tests_drivers_PROGRAMS += drivers/scan_results_test
69drivers_scan_results_test_SOURCES = drivers/scan_results_test.cpp
70drivers_scan_results_test_CXXFLAGS = $(DRIVERS_CFLAGS) $(ATF_CXX_CFLAGS)
71drivers_scan_results_test_LDADD = $(DRIVERS_LIBS) $(ATF_CXX_LIBS)
72endif
73