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 29STORE_CFLAGS = $(MODEL_CFLAGS) $(UTILS_CFLAGS) 30STORE_LIBS = libstore.a $(MODEL_LIBS) $(UTILS_LIBS) 31 32noinst_LIBRARIES += libstore.a 33libstore_a_CPPFLAGS = -DKYUA_STOREDIR=\"$(storedir)\" 34libstore_a_CPPFLAGS += $(UTILS_CFLAGS) 35libstore_a_SOURCES = store/dbtypes.cpp 36libstore_a_SOURCES += store/dbtypes.hpp 37libstore_a_SOURCES += store/exceptions.cpp 38libstore_a_SOURCES += store/exceptions.hpp 39libstore_a_SOURCES += store/layout.cpp 40libstore_a_SOURCES += store/layout.hpp 41libstore_a_SOURCES += store/layout_fwd.hpp 42libstore_a_SOURCES += store/metadata.cpp 43libstore_a_SOURCES += store/metadata.hpp 44libstore_a_SOURCES += store/metadata_fwd.hpp 45libstore_a_SOURCES += store/migrate.cpp 46libstore_a_SOURCES += store/migrate.hpp 47libstore_a_SOURCES += store/read_backend.cpp 48libstore_a_SOURCES += store/read_backend.hpp 49libstore_a_SOURCES += store/read_backend_fwd.hpp 50libstore_a_SOURCES += store/read_transaction.cpp 51libstore_a_SOURCES += store/read_transaction.hpp 52libstore_a_SOURCES += store/read_transaction_fwd.hpp 53libstore_a_SOURCES += store/write_backend.cpp 54libstore_a_SOURCES += store/write_backend.hpp 55libstore_a_SOURCES += store/write_backend_fwd.hpp 56libstore_a_SOURCES += store/write_transaction.cpp 57libstore_a_SOURCES += store/write_transaction.hpp 58libstore_a_SOURCES += store/write_transaction_fwd.hpp 59 60dist_store_DATA = store/migrate_v1_v2.sql 61dist_store_DATA += store/migrate_v2_v3.sql 62dist_store_DATA += store/schema_v3.sql 63 64if WITH_ATF 65tests_storedir = $(pkgtestsdir)/store 66 67tests_store_DATA = store/Kyuafile 68tests_store_DATA += store/schema_v1.sql 69tests_store_DATA += store/schema_v2.sql 70tests_store_DATA += store/testdata_v1.sql 71tests_store_DATA += store/testdata_v2.sql 72tests_store_DATA += store/testdata_v3_1.sql 73tests_store_DATA += store/testdata_v3_2.sql 74tests_store_DATA += store/testdata_v3_3.sql 75tests_store_DATA += store/testdata_v3_4.sql 76EXTRA_DIST += $(tests_store_DATA) 77 78tests_store_PROGRAMS = store/dbtypes_test 79store_dbtypes_test_SOURCES = store/dbtypes_test.cpp 80store_dbtypes_test_CXXFLAGS = $(STORE_CFLAGS) $(ENGINE_CFLAGS) \ 81 $(ATF_CXX_CFLAGS) 82store_dbtypes_test_LDADD = $(STORE_LIBS) $(ENGINE_LIBS) $(ATF_CXX_LIBS) 83 84tests_store_PROGRAMS += store/exceptions_test 85store_exceptions_test_SOURCES = store/exceptions_test.cpp 86store_exceptions_test_CXXFLAGS = $(STORE_CFLAGS) $(ENGINE_CFLAGS) \ 87 $(ATF_CXX_CFLAGS) 88store_exceptions_test_LDADD = $(STORE_LIBS) $(ENGINE_LIBS) $(ATF_CXX_LIBS) 89 90tests_store_PROGRAMS += store/layout_test 91store_layout_test_SOURCES = store/layout_test.cpp 92store_layout_test_CXXFLAGS = $(STORE_CFLAGS) $(ENGINE_CFLAGS) $(ATF_CXX_CFLAGS) 93store_layout_test_LDADD = $(STORE_LIBS) $(ENGINE_LIBS) $(ATF_CXX_LIBS) 94 95tests_store_PROGRAMS += store/metadata_test 96store_metadata_test_SOURCES = store/metadata_test.cpp 97store_metadata_test_CXXFLAGS = $(STORE_CFLAGS) $(ENGINE_CFLAGS) \ 98 $(ATF_CXX_CFLAGS) 99store_metadata_test_LDADD = $(STORE_LIBS) $(ENGINE_LIBS) $(ATF_CXX_LIBS) 100 101tests_store_PROGRAMS += store/migrate_test 102store_migrate_test_SOURCES = store/migrate_test.cpp 103store_migrate_test_CPPFLAGS = -DKYUA_STOREDIR=\"$(storedir)\" 104store_migrate_test_CXXFLAGS = $(STORE_CFLAGS) $(ENGINE_CFLAGS) $(ATF_CXX_CFLAGS) 105store_migrate_test_LDADD = $(STORE_LIBS) $(ENGINE_LIBS) $(ATF_CXX_LIBS) 106 107tests_store_PROGRAMS += store/read_backend_test 108store_read_backend_test_SOURCES = store/read_backend_test.cpp 109store_read_backend_test_CXXFLAGS = $(STORE_CFLAGS) $(ENGINE_CFLAGS) \ 110 $(ATF_CXX_CFLAGS) 111store_read_backend_test_LDADD = $(STORE_LIBS) $(ENGINE_LIBS) $(ATF_CXX_LIBS) 112 113tests_store_PROGRAMS += store/read_transaction_test 114store_read_transaction_test_SOURCES = store/read_transaction_test.cpp 115store_read_transaction_test_CXXFLAGS = $(STORE_CFLAGS) $(ENGINE_CFLAGS) \ 116 $(ATF_CXX_CFLAGS) 117store_read_transaction_test_LDADD = $(STORE_LIBS) $(ENGINE_LIBS) $(ATF_CXX_LIBS) 118 119tests_store_PROGRAMS += store/schema_inttest 120store_schema_inttest_SOURCES = store/schema_inttest.cpp 121store_schema_inttest_CPPFLAGS = -DKYUA_STORETESTDATADIR=\"$(tests_storedir)\" 122store_schema_inttest_CXXFLAGS = $(STORE_CFLAGS) $(ENGINE_CFLAGS) \ 123 $(ATF_CXX_CFLAGS) 124store_schema_inttest_LDADD = $(STORE_LIBS) $(ENGINE_LIBS) $(ATF_CXX_LIBS) 125 126tests_store_PROGRAMS += store/transaction_test 127store_transaction_test_SOURCES = store/transaction_test.cpp 128store_transaction_test_CXXFLAGS = $(STORE_CFLAGS) $(ENGINE_CFLAGS) \ 129 $(ATF_CXX_CFLAGS) 130store_transaction_test_LDADD = $(STORE_LIBS) $(ENGINE_LIBS) $(ATF_CXX_LIBS) 131 132tests_store_PROGRAMS += store/write_backend_test 133store_write_backend_test_SOURCES = store/write_backend_test.cpp 134store_write_backend_test_CPPFLAGS = -DKYUA_STOREDIR=\"$(storedir)\" 135store_write_backend_test_CXXFLAGS = $(STORE_CFLAGS) $(ENGINE_CFLAGS) \ 136 $(ATF_CXX_CFLAGS) 137store_write_backend_test_LDADD = $(STORE_LIBS) $(ENGINE_LIBS) $(ATF_CXX_LIBS) 138 139tests_store_PROGRAMS += store/write_transaction_test 140store_write_transaction_test_SOURCES = store/write_transaction_test.cpp 141store_write_transaction_test_CXXFLAGS = $(STORE_CFLAGS) $(ENGINE_CFLAGS) \ 142 $(ATF_CXX_CFLAGS) 143store_write_transaction_test_LDADD = $(STORE_LIBS) $(ENGINE_LIBS) \ 144 $(ATF_CXX_LIBS) 145endif 146