2 # Copyright (c) 2020 Project nlio Authors
3 # Copyright (c) 2015-2016 Nest Labs Inc. All Rights Reserved.
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
9 # http://www.apache.org/licenses/LICENSE-2.0
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.
20 # This file is the GNU automake template for the Nest Labs Memory-
21 # mapped I/O library unit tests.
24 include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
27 # Local headers to build against and distribute but not to install
28 # since they are not part of the package.
32 nlio-byteorder-test.h \
37 # Other files we do want to distribute with the NLIO SDK.
43 # C preprocessor option flags that will apply to all compiled objects in this
47 -I$(top_srcdir)/include \
53 # Test applications that should be run when the 'check' target is run.
57 nlbyteorder-test-cxx \
59 nlio-byteorder-test-cxx \
64 # Test applications and scripts that should be built and run when the
65 # 'check' target is run.
71 # The additional environment variables and their values that will be
72 # made available to all programs and scripts in TESTS.
77 # Source, compiler, and linker options for test programs.
79 nlbyteorder_test_LDADD = $(COMMON_LDADD)
80 nlbyteorder_test_SOURCES = nlbyteorder-test.c
82 nlbyteorder_test_cxx_LDADD = $(COMMON_LDADD)
83 nlbyteorder_test_cxx_SOURCES = nlbyteorder-test-cxx.cpp
85 nlio_byteorder_test_LDADD = $(COMMON_LDADD)
86 nlio_byteorder_test_SOURCES = nlio-byteorder-test.c
88 nlio_byteorder_test_cxx_LDADD = $(COMMON_LDADD)
89 nlio_byteorder_test_cxx_SOURCES = nlio-byteorder-test-cxx.cpp
91 nlio_test_LDADD = $(COMMON_LDADD)
92 nlio_test_SOURCES = nlio-test.c
94 nlio_test_cxx_LDADD = $(COMMON_LDADD)
95 nlio_test_cxx_SOURCES = nlio-test-cxx.cpp
98 # Foreign make dependencies
101 NLFOREIGN_SUBDIR_DEPENDENCIES = \
102 $(NLUNIT_TEST_FOREIGN_SUBDIR_DEPENDENCY) \
105 if NLIO_BUILD_COVERAGE
106 CLEANFILES = $(wildcard *.gcda *.gcno)
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.
113 NLIO_COVERAGE_BUNDLE = ${abs_builddir}/${PACKAGE}${NL_COVERAGE_BUNDLE_SUFFIX}
114 NLIO_COVERAGE_INFO = ${NLIO_COVERAGE_BUNDLE}/${PACKAGE}${NL_COVERAGE_INFO_SUFFIX}
116 $(NLIO_COVERAGE_BUNDLE):
117 $(call create-directory)
119 $(NLIO_COVERAGE_INFO): check-local | $(NLIO_COVERAGE_BUNDLE)
120 $(call generate-coverage-report,${top_builddir})
122 coverage-local: $(NLIO_COVERAGE_INFO)
124 clean-local: clean-local-coverage
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
133 include $(abs_top_nlbuild_autotools_dir)/automake/post.am