xref: /freebsd/contrib/kyua/model/Makefile.am.inc (revision 02e9120893770924227138ba49df1edb3896112a)
1# Copyright 2014 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
29MODEL_CFLAGS = $(UTILS_CFLAGS)
30MODEL_LIBS = libmodel.a $(UTILS_LIBS)
31
32noinst_LIBRARIES += libmodel.a
33libmodel_a_CPPFLAGS = $(UTILS_CFLAGS)
34libmodel_a_SOURCES  = model/context.cpp
35libmodel_a_SOURCES += model/context.hpp
36libmodel_a_SOURCES += model/context_fwd.hpp
37libmodel_a_SOURCES += model/exceptions.cpp
38libmodel_a_SOURCES += model/exceptions.hpp
39libmodel_a_SOURCES += model/metadata.cpp
40libmodel_a_SOURCES += model/metadata.hpp
41libmodel_a_SOURCES += model/metadata_fwd.hpp
42libmodel_a_SOURCES += model/test_case.cpp
43libmodel_a_SOURCES += model/test_case.hpp
44libmodel_a_SOURCES += model/test_case_fwd.hpp
45libmodel_a_SOURCES += model/test_program.cpp
46libmodel_a_SOURCES += model/test_program.hpp
47libmodel_a_SOURCES += model/test_program_fwd.hpp
48libmodel_a_SOURCES += model/test_result.cpp
49libmodel_a_SOURCES += model/test_result.hpp
50libmodel_a_SOURCES += model/test_result_fwd.hpp
51libmodel_a_SOURCES += model/types.hpp
52
53if WITH_ATF
54tests_modeldir = $(pkgtestsdir)/model
55
56tests_model_DATA = model/Kyuafile
57EXTRA_DIST += $(tests_model_DATA)
58
59tests_model_PROGRAMS = model/context_test
60model_context_test_SOURCES = model/context_test.cpp
61model_context_test_CXXFLAGS = $(MODEL_CFLAGS) $(ATF_CXX_CFLAGS)
62model_context_test_LDADD = $(MODEL_LIBS) $(ATF_CXX_LIBS)
63
64tests_model_PROGRAMS += model/exceptions_test
65model_exceptions_test_SOURCES = model/exceptions_test.cpp
66model_exceptions_test_CXXFLAGS = $(MODEL_CFLAGS) $(ATF_CXX_CFLAGS)
67model_exceptions_test_LDADD = $(MODEL_LIBS) $(ATF_CXX_LIBS)
68
69tests_model_PROGRAMS += model/metadata_test
70model_metadata_test_SOURCES = model/metadata_test.cpp
71model_metadata_test_CXXFLAGS = $(MODEL_CFLAGS) $(ATF_CXX_CFLAGS)
72model_metadata_test_LDADD = $(MODEL_LIBS) $(ATF_CXX_LIBS)
73
74tests_model_PROGRAMS += model/test_case_test
75model_test_case_test_SOURCES = model/test_case_test.cpp
76model_test_case_test_CXXFLAGS = $(MODEL_CFLAGS) $(ATF_CXX_CFLAGS)
77model_test_case_test_LDADD = $(MODEL_LIBS) $(ATF_CXX_LIBS)
78
79tests_model_PROGRAMS += model/test_program_test
80model_test_program_test_SOURCES = model/test_program_test.cpp
81model_test_program_test_CXXFLAGS = $(MODEL_CFLAGS) $(ATF_CXX_CFLAGS)
82model_test_program_test_LDADD = $(MODEL_LIBS) $(ATF_CXX_LIBS)
83
84tests_model_PROGRAMS += model/test_result_test
85model_test_result_test_SOURCES = model/test_result_test.cpp
86model_test_result_test_CXXFLAGS = $(MODEL_CFLAGS) $(ATF_CXX_CFLAGS)
87model_test_result_test_LDADD = $(MODEL_LIBS) $(ATF_CXX_LIBS)
88
89endif
90