Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / nlio / repo / tests / Makefile.am
1 #
2 #    Copyright (c) 2020 Project nlio Authors
3 #    Copyright (c) 2015-2016 Nest Labs Inc. All Rights Reserved.
4 #
5 #    Licensed under the Apache License, Version 2.0 (the "License");
6 #    you may not use this file except in compliance with the License.
7 #    You may obtain a copy of the License at
8 #
9 #    http://www.apache.org/licenses/LICENSE-2.0
10 #
11 #    Unless required by applicable law or agreed to in writing, software
12 #    distributed under the License is distributed on an "AS IS" BASIS,
13 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 #    See the License for the specific language governing permissions and
15 #    limitations under the License.
16 #
17
18 #
19 #    Description:
20 #      This file is the GNU automake template for the Nest Labs Memory-
21 #      mapped I/O library unit tests.
22 #
23
24 include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
25
26 #
27 # Local headers to build against and distribute but not to install
28 # since they are not part of the package.
29 #
30 noinst_HEADERS                                 = \
31     nlbyteorder-test.h                           \
32     nlio-byteorder-test.h                        \
33     nlio-test.h                                  \
34     $(NULL)
35
36 #
37 # Other files we do want to distribute with the NLIO SDK.
38 #
39 EXTRA_DIST                                     = \
40     $(NULL)
41
42 if NLIO_BUILD_TESTS
43 # C preprocessor option flags that will apply to all compiled objects in this
44 # makefile.
45
46 AM_CPPFLAGS                                    = \
47     -I$(top_srcdir)/include                      \
48     $(NULL)
49
50 COMMON_LDADD                                   = \
51     $(NULL)
52
53 # Test applications that should be run when the 'check' target is run.
54
55 check_PROGRAMS                                 = \
56     nlbyteorder-test                             \
57     nlbyteorder-test-cxx                         \
58     nlio-byteorder-test                          \
59     nlio-byteorder-test-cxx                      \
60     nlio-test                                    \
61     nlio-test-cxx                                \
62     $(NULL)
63
64 # Test applications and scripts that should be built and run when the
65 # 'check' target is run.
66
67 TESTS                                          = \
68     $(check_PROGRAMS)                            \
69     $(NULL)
70
71 # The additional environment variables and their values that will be
72 # made available to all programs and scripts in TESTS.
73
74 TESTS_ENVIRONMENT                              = \
75     $(NULL)
76
77 # Source, compiler, and linker options for test programs.
78
79 nlbyteorder_test_LDADD                         = $(COMMON_LDADD)
80 nlbyteorder_test_SOURCES                       = nlbyteorder-test.c          
81
82 nlbyteorder_test_cxx_LDADD                     = $(COMMON_LDADD)
83 nlbyteorder_test_cxx_SOURCES                   = nlbyteorder-test-cxx.cpp    
84
85 nlio_byteorder_test_LDADD                      = $(COMMON_LDADD)
86 nlio_byteorder_test_SOURCES                    = nlio-byteorder-test.c       
87
88 nlio_byteorder_test_cxx_LDADD                  = $(COMMON_LDADD)
89 nlio_byteorder_test_cxx_SOURCES                = nlio-byteorder-test-cxx.cpp 
90
91 nlio_test_LDADD                                = $(COMMON_LDADD)
92 nlio_test_SOURCES                              = nlio-test.c                 
93
94 nlio_test_cxx_LDADD                            = $(COMMON_LDADD)
95 nlio_test_cxx_SOURCES                          = nlio-test-cxx.cpp           
96
97 #
98 # Foreign make dependencies
99 #
100
101 NLFOREIGN_SUBDIR_DEPENDENCIES                  = \
102    $(NLUNIT_TEST_FOREIGN_SUBDIR_DEPENDENCY)      \
103    $(NULL)
104
105 if NLIO_BUILD_COVERAGE
106 CLEANFILES                                     = $(wildcard *.gcda *.gcno)
107
108 if NLIO_BUILD_COVERAGE_REPORTS
109 # The bundle should positively be qualified with the absolute build
110 # path. Otherwise, VPATH will get auto-prefixed to it if there is
111 # already such a directory in the non-colocated source tree.
112
113 NLIO_COVERAGE_BUNDLE                           = ${abs_builddir}/${PACKAGE}${NL_COVERAGE_BUNDLE_SUFFIX}
114 NLIO_COVERAGE_INFO                             = ${NLIO_COVERAGE_BUNDLE}/${PACKAGE}${NL_COVERAGE_INFO_SUFFIX}
115
116 $(NLIO_COVERAGE_BUNDLE):
117         $(call create-directory)
118
119 $(NLIO_COVERAGE_INFO): check-local | $(NLIO_COVERAGE_BUNDLE)
120         $(call generate-coverage-report,${top_builddir})
121
122 coverage-local: $(NLIO_COVERAGE_INFO)
123
124 clean-local: clean-local-coverage
125
126 .PHONY: clean-local-coverage
127 clean-local-coverage:
128         -$(AM_V_at)rm -rf $(NLIO_COVERAGE_BUNDLE)
129 endif # NLIO_BUILD_COVERAGE_REPORTS
130 endif # NLIO_BUILD_COVERAGE
131 endif # NLIO_BUILD_TESTS
132
133 include $(abs_top_nlbuild_autotools_dir)/automake/post.am