xref: /freebsd/contrib/kyua/cli/Makefile.am.inc (revision a4e5e0106ac7145f56eb39a691e302cabb4635be)
1# Copyright 2010 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
29CLI_CFLAGS = $(DRIVERS_CFLAGS)
30CLI_LIBS = libcli.a $(DRIVERS_LIBS)
31
32noinst_LIBRARIES += libcli.a
33libcli_a_SOURCES  = cli/cmd_about.cpp
34libcli_a_SOURCES += cli/cmd_about.hpp
35libcli_a_SOURCES += cli/cmd_config.cpp
36libcli_a_SOURCES += cli/cmd_config.hpp
37libcli_a_SOURCES += cli/cmd_db_exec.cpp
38libcli_a_SOURCES += cli/cmd_db_exec.hpp
39libcli_a_SOURCES += cli/cmd_db_migrate.cpp
40libcli_a_SOURCES += cli/cmd_db_migrate.hpp
41libcli_a_SOURCES += cli/cmd_debug.cpp
42libcli_a_SOURCES += cli/cmd_debug.hpp
43libcli_a_SOURCES += cli/cmd_help.cpp
44libcli_a_SOURCES += cli/cmd_help.hpp
45libcli_a_SOURCES += cli/cmd_list.cpp
46libcli_a_SOURCES += cli/cmd_list.hpp
47libcli_a_SOURCES += cli/cmd_report.cpp
48libcli_a_SOURCES += cli/cmd_report.hpp
49libcli_a_SOURCES += cli/cmd_report_html.cpp
50libcli_a_SOURCES += cli/cmd_report_html.hpp
51libcli_a_SOURCES += cli/cmd_report_junit.cpp
52libcli_a_SOURCES += cli/cmd_report_junit.hpp
53libcli_a_SOURCES += cli/cmd_test.cpp
54libcli_a_SOURCES += cli/cmd_test.hpp
55libcli_a_SOURCES += cli/common.cpp
56libcli_a_SOURCES += cli/common.hpp
57libcli_a_SOURCES += cli/common.ipp
58libcli_a_SOURCES += cli/config.cpp
59libcli_a_SOURCES += cli/config.hpp
60libcli_a_SOURCES += cli/main.cpp
61libcli_a_SOURCES += cli/main.hpp
62libcli_a_CPPFLAGS  = -DKYUA_CONFDIR="\"$(kyua_confdir)\""
63libcli_a_CPPFLAGS += -DKYUA_DOCDIR="\"$(docdir)\""
64libcli_a_CPPFLAGS += -DKYUA_MISCDIR="\"$(miscdir)\""
65libcli_a_CPPFLAGS += $(DRIVERS_CFLAGS)
66libcli_a_LIBADD = libutils.a
67
68if WITH_ATF
69tests_clidir = $(pkgtestsdir)/cli
70
71tests_cli_DATA = cli/Kyuafile
72EXTRA_DIST += $(tests_cli_DATA)
73
74tests_cli_PROGRAMS = cli/cmd_about_test
75cli_cmd_about_test_SOURCES = cli/cmd_about_test.cpp
76cli_cmd_about_test_CXXFLAGS = $(CLI_CFLAGS) $(ATF_CXX_CFLAGS)
77cli_cmd_about_test_LDADD = $(CLI_LIBS) $(ATF_CXX_LIBS)
78
79tests_cli_PROGRAMS += cli/cmd_config_test
80cli_cmd_config_test_SOURCES = cli/cmd_config_test.cpp
81cli_cmd_config_test_CXXFLAGS = $(CLI_CFLAGS) $(ATF_CXX_CFLAGS)
82cli_cmd_config_test_LDADD = $(CLI_LIBS) $(ATF_CXX_LIBS)
83
84tests_cli_PROGRAMS += cli/cmd_db_exec_test
85cli_cmd_db_exec_test_SOURCES = cli/cmd_db_exec_test.cpp
86cli_cmd_db_exec_test_CXXFLAGS = $(CLI_CFLAGS) $(ATF_CXX_CFLAGS)
87cli_cmd_db_exec_test_LDADD = $(CLI_LIBS) $(ATF_CXX_LIBS)
88
89tests_cli_PROGRAMS += cli/cmd_debug_test
90cli_cmd_debug_test_SOURCES = cli/cmd_debug_test.cpp
91cli_cmd_debug_test_CXXFLAGS = $(CLI_CFLAGS) $(ATF_CXX_CFLAGS)
92cli_cmd_debug_test_LDADD = $(CLI_LIBS) $(ATF_CXX_LIBS)
93
94tests_cli_PROGRAMS += cli/cmd_help_test
95cli_cmd_help_test_SOURCES = cli/cmd_help_test.cpp
96cli_cmd_help_test_CXXFLAGS = $(CLI_CFLAGS) $(ATF_CXX_CFLAGS)
97cli_cmd_help_test_LDADD = $(CLI_LIBS) $(ATF_CXX_LIBS)
98
99tests_cli_PROGRAMS += cli/cmd_list_test
100cli_cmd_list_test_SOURCES = cli/cmd_list_test.cpp
101cli_cmd_list_test_CXXFLAGS = $(CLI_CFLAGS) $(ATF_CXX_CFLAGS)
102cli_cmd_list_test_LDADD = $(CLI_LIBS) $(ATF_CXX_LIBS)
103
104tests_cli_PROGRAMS += cli/cmd_test_test
105cli_cmd_test_test_SOURCES = cli/cmd_test_test.cpp
106cli_cmd_test_test_CXXFLAGS = $(CLI_CFLAGS) $(ATF_CXX_CFLAGS)
107cli_cmd_test_test_LDADD = $(CLI_LIBS) $(ATF_CXX_LIBS)
108
109tests_cli_PROGRAMS += cli/common_test
110cli_common_test_SOURCES = cli/common_test.cpp
111cli_common_test_CXXFLAGS = $(CLI_CFLAGS) $(ATF_CXX_CFLAGS)
112cli_common_test_LDADD = $(CLI_LIBS) $(ATF_CXX_LIBS)
113
114tests_cli_PROGRAMS += cli/config_test
115cli_config_test_SOURCES = cli/config_test.cpp
116cli_config_test_CXXFLAGS = $(CLI_CFLAGS) $(ATF_CXX_CFLAGS)
117cli_config_test_LDADD = $(CLI_LIBS) $(ATF_CXX_LIBS)
118
119tests_cli_PROGRAMS += cli/main_test
120cli_main_test_SOURCES = cli/main_test.cpp
121cli_main_test_CXXFLAGS = $(CLI_CFLAGS) $(ATF_CXX_CFLAGS)
122cli_main_test_LDADD = $(CLI_LIBS) $(ATF_CXX_LIBS)
123endif
124