xref: /freebsd/contrib/kyua/utils/cmdline/Makefile.am.inc (revision dd41de95a84d979615a2ef11df6850622bf6184e)
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
29libutils_a_SOURCES += utils/cmdline/base_command.cpp
30libutils_a_SOURCES += utils/cmdline/base_command.hpp
31libutils_a_SOURCES += utils/cmdline/base_command_fwd.hpp
32libutils_a_SOURCES += utils/cmdline/base_command.ipp
33libutils_a_SOURCES += utils/cmdline/commands_map.hpp
34libutils_a_SOURCES += utils/cmdline/commands_map_fwd.hpp
35libutils_a_SOURCES += utils/cmdline/commands_map.ipp
36libutils_a_SOURCES += utils/cmdline/exceptions.cpp
37libutils_a_SOURCES += utils/cmdline/exceptions.hpp
38libutils_a_SOURCES += utils/cmdline/globals.cpp
39libutils_a_SOURCES += utils/cmdline/globals.hpp
40libutils_a_SOURCES += utils/cmdline/options.cpp
41libutils_a_SOURCES += utils/cmdline/options.hpp
42libutils_a_SOURCES += utils/cmdline/options_fwd.hpp
43libutils_a_SOURCES += utils/cmdline/parser.cpp
44libutils_a_SOURCES += utils/cmdline/parser.hpp
45libutils_a_SOURCES += utils/cmdline/parser_fwd.hpp
46libutils_a_SOURCES += utils/cmdline/parser.ipp
47libutils_a_SOURCES += utils/cmdline/ui.cpp
48libutils_a_SOURCES += utils/cmdline/ui.hpp
49libutils_a_SOURCES += utils/cmdline/ui_fwd.hpp
50# The following two files are only supposed to be used from test code.  They
51# should not be bundled into libutils.a, but doing so simplifies the build
52# significantly.
53libutils_a_SOURCES += utils/cmdline/ui_mock.hpp
54libutils_a_SOURCES += utils/cmdline/ui_mock.cpp
55
56if WITH_ATF
57tests_utils_cmdlinedir = $(pkgtestsdir)/utils/cmdline
58
59tests_utils_cmdline_DATA = utils/cmdline/Kyuafile
60EXTRA_DIST += $(tests_utils_cmdline_DATA)
61
62tests_utils_cmdline_PROGRAMS = utils/cmdline/base_command_test
63utils_cmdline_base_command_test_SOURCES = utils/cmdline/base_command_test.cpp
64utils_cmdline_base_command_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
65utils_cmdline_base_command_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
66
67tests_utils_cmdline_PROGRAMS += utils/cmdline/commands_map_test
68utils_cmdline_commands_map_test_SOURCES = utils/cmdline/commands_map_test.cpp
69utils_cmdline_commands_map_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
70utils_cmdline_commands_map_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
71
72tests_utils_cmdline_PROGRAMS += utils/cmdline/exceptions_test
73utils_cmdline_exceptions_test_SOURCES = utils/cmdline/exceptions_test.cpp
74utils_cmdline_exceptions_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
75utils_cmdline_exceptions_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
76
77tests_utils_cmdline_PROGRAMS += utils/cmdline/globals_test
78utils_cmdline_globals_test_SOURCES = utils/cmdline/globals_test.cpp
79utils_cmdline_globals_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
80utils_cmdline_globals_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
81
82tests_utils_cmdline_PROGRAMS += utils/cmdline/options_test
83utils_cmdline_options_test_SOURCES = utils/cmdline/options_test.cpp
84utils_cmdline_options_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
85utils_cmdline_options_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
86
87tests_utils_cmdline_PROGRAMS += utils/cmdline/parser_test
88utils_cmdline_parser_test_SOURCES = utils/cmdline/parser_test.cpp
89utils_cmdline_parser_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
90utils_cmdline_parser_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
91
92tests_utils_cmdline_PROGRAMS += utils/cmdline/ui_test
93utils_cmdline_ui_test_SOURCES = utils/cmdline/ui_test.cpp
94utils_cmdline_ui_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
95utils_cmdline_ui_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
96endif
97