xref: /freebsd/contrib/kyua/utils/Makefile.am.inc (revision d65cd7a57bf0600b722afc770838a5d0c1c3a8e1)
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
29UTILS_CFLAGS =
30UTILS_LIBS = libutils.a
31
32noinst_LIBRARIES += libutils.a
33libutils_a_CPPFLAGS = -DGDB=\"$(GDB)\"
34libutils_a_SOURCES  = utils/auto_array.hpp
35libutils_a_SOURCES += utils/auto_array.ipp
36libutils_a_SOURCES += utils/auto_array_fwd.hpp
37libutils_a_SOURCES += utils/datetime.cpp
38libutils_a_SOURCES += utils/datetime.hpp
39libutils_a_SOURCES += utils/datetime_fwd.hpp
40libutils_a_SOURCES += utils/env.hpp
41libutils_a_SOURCES += utils/env.cpp
42libutils_a_SOURCES += utils/memory.hpp
43libutils_a_SOURCES += utils/memory.cpp
44libutils_a_SOURCES += utils/noncopyable.hpp
45libutils_a_SOURCES += utils/optional.hpp
46libutils_a_SOURCES += utils/optional_fwd.hpp
47libutils_a_SOURCES += utils/optional.ipp
48libutils_a_SOURCES += utils/passwd.cpp
49libutils_a_SOURCES += utils/passwd.hpp
50libutils_a_SOURCES += utils/passwd_fwd.hpp
51libutils_a_SOURCES += utils/sanity.cpp
52libutils_a_SOURCES += utils/sanity.hpp
53libutils_a_SOURCES += utils/sanity_fwd.hpp
54libutils_a_SOURCES += utils/stacktrace.cpp
55libutils_a_SOURCES += utils/stacktrace.hpp
56libutils_a_SOURCES += utils/stream.cpp
57libutils_a_SOURCES += utils/stream.hpp
58libutils_a_SOURCES += utils/units.cpp
59libutils_a_SOURCES += utils/units.hpp
60libutils_a_SOURCES += utils/units_fwd.hpp
61nodist_libutils_a_SOURCES = utils/defs.hpp
62
63EXTRA_DIST += utils/test_utils.ipp
64
65if WITH_ATF
66tests_utilsdir = $(pkgtestsdir)/utils
67
68tests_utils_DATA = utils/Kyuafile
69EXTRA_DIST += $(tests_utils_DATA)
70
71tests_utils_PROGRAMS = utils/auto_array_test
72utils_auto_array_test_SOURCES = utils/auto_array_test.cpp
73utils_auto_array_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
74utils_auto_array_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
75
76tests_utils_PROGRAMS += utils/datetime_test
77utils_datetime_test_SOURCES = utils/datetime_test.cpp
78utils_datetime_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
79utils_datetime_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
80
81tests_utils_PROGRAMS += utils/env_test
82utils_env_test_SOURCES = utils/env_test.cpp
83utils_env_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
84utils_env_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
85
86tests_utils_PROGRAMS += utils/memory_test
87utils_memory_test_SOURCES = utils/memory_test.cpp
88utils_memory_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
89utils_memory_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
90
91tests_utils_PROGRAMS += utils/optional_test
92utils_optional_test_SOURCES = utils/optional_test.cpp
93utils_optional_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
94utils_optional_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
95
96tests_utils_PROGRAMS += utils/passwd_test
97utils_passwd_test_SOURCES = utils/passwd_test.cpp
98utils_passwd_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
99utils_passwd_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
100
101tests_utils_PROGRAMS += utils/sanity_test
102utils_sanity_test_SOURCES = utils/sanity_test.cpp
103utils_sanity_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
104utils_sanity_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
105
106tests_utils_PROGRAMS += utils/stacktrace_helper
107utils_stacktrace_helper_SOURCES = utils/stacktrace_helper.cpp
108
109tests_utils_PROGRAMS += utils/stacktrace_test
110utils_stacktrace_test_SOURCES = utils/stacktrace_test.cpp
111utils_stacktrace_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
112utils_stacktrace_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
113
114tests_utils_PROGRAMS += utils/stream_test
115utils_stream_test_SOURCES = utils/stream_test.cpp
116utils_stream_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
117utils_stream_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
118
119tests_utils_PROGRAMS += utils/units_test
120utils_units_test_SOURCES = utils/units_test.cpp
121utils_units_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
122utils_units_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
123endif
124
125include utils/cmdline/Makefile.am.inc
126include utils/config/Makefile.am.inc
127include utils/format/Makefile.am.inc
128include utils/fs/Makefile.am.inc
129include utils/logging/Makefile.am.inc
130include utils/process/Makefile.am.inc
131include utils/signals/Makefile.am.inc
132include utils/sqlite/Makefile.am.inc
133include utils/text/Makefile.am.inc
134