2011-12-21 15:34:00 +05:30
|
|
|
# Copyright (C) 2011 Red Hat, Inc. All rights reserved.
|
|
|
|
#
|
|
|
|
# This file is part of the thin-provisioning-tools source.
|
|
|
|
#
|
|
|
|
# thin-provisioning-tools is free software: you can redistribute it
|
|
|
|
# and/or modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation, either version 3 of
|
|
|
|
# the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# thin-provisioning-tools is distributed in the hope that it will be
|
|
|
|
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
|
|
|
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License along
|
|
|
|
# with thin-provisioning-tools. If not, see
|
|
|
|
# <http://www.gnu.org/licenses/>.
|
|
|
|
|
2011-12-21 16:01:56 +05:30
|
|
|
.PHONY: all
|
2011-08-31 18:31:48 +05:30
|
|
|
|
2013-03-22 17:49:31 +05:30
|
|
|
V=@
|
2011-12-06 21:17:24 +05:30
|
|
|
PROGRAMS=\
|
2013-08-16 20:59:41 +05:30
|
|
|
cache_check \
|
2013-08-19 17:10:03 +05:30
|
|
|
cache_dump \
|
2013-08-16 20:59:41 +05:30
|
|
|
cache_restore \
|
2013-10-09 15:12:14 +05:30
|
|
|
cache_repair \
|
2014-01-15 21:22:05 +05:30
|
|
|
cache_metadata_size \
|
2013-08-16 20:59:41 +05:30
|
|
|
\
|
2014-01-10 04:10:34 +05:30
|
|
|
era_check \
|
2014-01-23 06:16:03 +05:30
|
|
|
era_dump \
|
2014-01-30 03:07:25 +05:30
|
|
|
era_invalidate \
|
2014-01-10 04:10:34 +05:30
|
|
|
\
|
2012-03-02 15:30:31 +05:30
|
|
|
thin_check \
|
2011-12-06 21:17:24 +05:30
|
|
|
thin_dump \
|
2013-05-23 17:45:00 +05:30
|
|
|
thin_restore \
|
2013-06-19 17:09:28 +05:30
|
|
|
thin_repair \
|
2013-07-15 20:18:36 +05:30
|
|
|
thin_rmap \
|
|
|
|
thin_metadata_size
|
2011-12-06 21:17:24 +05:30
|
|
|
|
|
|
|
all: $(PROGRAMS)
|
2011-08-31 18:31:48 +05:30
|
|
|
|
2013-08-16 18:37:04 +05:30
|
|
|
SOURCE=\
|
2013-10-10 14:48:46 +05:30
|
|
|
base/base64.cc \
|
2013-11-19 15:53:35 +05:30
|
|
|
base/endian_utils.cc \
|
2013-08-16 18:37:04 +05:30
|
|
|
base/error_state.cc \
|
|
|
|
\
|
2013-09-24 16:30:09 +05:30
|
|
|
caching/hint_array.cc \
|
2013-08-16 18:37:04 +05:30
|
|
|
caching/superblock.cc \
|
2013-09-12 18:51:25 +05:30
|
|
|
caching/mapping_array.cc \
|
2013-09-11 16:10:46 +05:30
|
|
|
caching/metadata.cc \
|
2013-10-09 14:52:06 +05:30
|
|
|
caching/metadata_dump.cc \
|
2013-09-12 17:03:32 +05:30
|
|
|
caching/restore_emitter.cc \
|
2013-09-11 16:10:46 +05:30
|
|
|
caching/xml_format.cc \
|
2013-08-16 18:37:04 +05:30
|
|
|
\
|
2014-01-23 06:16:03 +05:30
|
|
|
era/era_array.cc \
|
2013-11-19 15:53:35 +05:30
|
|
|
era/era_detail.cc \
|
2014-01-08 21:01:42 +05:30
|
|
|
era/superblock.cc \
|
2014-01-30 03:07:25 +05:30
|
|
|
era/writeset_tree.cc \
|
2014-01-23 06:16:03 +05:30
|
|
|
era/metadata.cc \
|
|
|
|
era/metadata_dump.cc \
|
|
|
|
era/xml_format.cc \
|
2013-11-19 15:53:35 +05:30
|
|
|
\
|
2013-01-02 18:25:41 +05:30
|
|
|
persistent-data/checksum.cc \
|
|
|
|
persistent-data/error_set.cc \
|
2013-09-11 16:10:46 +05:30
|
|
|
persistent-data/file_utils.cc \
|
2013-01-02 18:25:41 +05:30
|
|
|
persistent-data/hex_dump.cc \
|
2013-01-07 20:29:41 +05:30
|
|
|
persistent-data/lock_tracker.cc \
|
2013-01-12 00:56:51 +05:30
|
|
|
persistent-data/transaction_manager.cc \
|
|
|
|
\
|
2013-10-10 16:47:34 +05:30
|
|
|
persistent-data/data-structures/bitset.cc \
|
2013-11-18 18:38:07 +05:30
|
|
|
persistent-data/data-structures/bloom_filter.cc \
|
2013-06-20 18:57:40 +05:30
|
|
|
persistent-data/data-structures/btree.cc \
|
|
|
|
\
|
2013-01-02 18:25:41 +05:30
|
|
|
persistent-data/space_map.cc \
|
2013-01-11 03:06:38 +05:30
|
|
|
persistent-data/space-maps/disk.cc \
|
|
|
|
persistent-data/space-maps/recursive.cc \
|
2013-08-16 18:37:04 +05:30
|
|
|
persistent-data/space-maps/careful_alloc.cc \
|
2013-03-15 21:54:17 +05:30
|
|
|
\
|
2013-05-20 20:39:13 +05:30
|
|
|
thin-provisioning/device_tree.cc \
|
2013-01-02 18:25:41 +05:30
|
|
|
thin-provisioning/human_readable_format.cc \
|
2013-05-21 16:16:37 +05:30
|
|
|
thin-provisioning/mapping_tree.cc \
|
2013-01-02 18:25:41 +05:30
|
|
|
thin-provisioning/metadata.cc \
|
|
|
|
thin-provisioning/metadata_checker.cc \
|
|
|
|
thin-provisioning/metadata_dumper.cc \
|
|
|
|
thin-provisioning/restore_emitter.cc \
|
2013-05-24 18:00:17 +05:30
|
|
|
thin-provisioning/rmap_visitor.cc \
|
2013-05-21 17:16:07 +05:30
|
|
|
thin-provisioning/superblock.cc \
|
2013-01-02 18:25:41 +05:30
|
|
|
thin-provisioning/thin_pool.cc \
|
|
|
|
thin-provisioning/xml_format.cc
|
2013-04-29 17:54:19 +05:30
|
|
|
|
2013-04-11 18:11:43 +05:30
|
|
|
PDATA_OBJECTS=$(subst .cc,.o,$(SOURCE))
|
2011-08-22 15:12:13 +05:30
|
|
|
|
2013-07-16 19:03:38 +05:30
|
|
|
CXX_PROGRAM_SOURCE=\
|
2013-08-16 18:37:04 +05:30
|
|
|
caching/cache_check.cc \
|
2013-08-16 20:59:41 +05:30
|
|
|
caching/cache_restore.cc \
|
2013-03-15 21:54:17 +05:30
|
|
|
\
|
2013-01-02 18:25:41 +05:30
|
|
|
thin-provisioning/thin_check.cc \
|
|
|
|
thin-provisioning/thin_dump.cc \
|
2013-05-23 17:45:00 +05:30
|
|
|
thin-provisioning/thin_restore.cc \
|
2013-06-19 17:09:28 +05:30
|
|
|
thin-provisioning/thin_repair.cc \
|
2013-05-23 17:45:00 +05:30
|
|
|
thin-provisioning/thin_rmap.cc
|
2011-11-03 20:14:00 +05:30
|
|
|
|
2013-07-15 20:18:36 +05:30
|
|
|
C_PROGRAM_SOURCE=\
|
|
|
|
thin-provisioning/thin_metadata_size.c
|
|
|
|
|
|
|
|
CC:=@CC@
|
2011-12-21 15:34:00 +05:30
|
|
|
CXX:=@CXX@
|
|
|
|
OBJECTS:=$(subst .cc,.o,$(SOURCE))
|
2011-12-09 18:24:51 +05:30
|
|
|
TOP_DIR:=@top_srcdir@
|
2011-12-21 15:34:00 +05:30
|
|
|
TOP_BUILDDIR:=@top_builddir@
|
2013-07-15 20:18:36 +05:30
|
|
|
CFLAGS+=-g -Wall -O3
|
2013-08-08 15:19:59 +05:30
|
|
|
CXXFLAGS+=-g -Wall -fno-strict-aliasing
|
2011-12-09 18:24:51 +05:30
|
|
|
CXXFLAGS+=@CXXOPTIMISE_FLAG@
|
|
|
|
CXXFLAGS+=@CXXDEBUG_FLAG@
|
2013-01-02 18:25:41 +05:30
|
|
|
INCLUDES+=-I$(TOP_BUILDDIR) -I$(TOP_DIR) -I$(TOP_DIR)/thin-provisioning
|
2011-12-21 15:34:00 +05:30
|
|
|
LIBS:=-lstdc++
|
|
|
|
LIBEXPAT:=-lexpat
|
|
|
|
INSTALL:=@INSTALL@
|
2012-03-15 17:35:37 +05:30
|
|
|
PREFIX:=@prefix@
|
|
|
|
BINDIR:=$(DESTDIR)$(PREFIX)/sbin
|
2011-12-21 15:34:00 +05:30
|
|
|
MANPATH:=$(DESTDIR)$(MANDIR)
|
|
|
|
|
|
|
|
vpath %.cc $(TOP_DIR)
|
|
|
|
|
|
|
|
INSTALL_DIR = $(INSTALL) -m 755 -d
|
2013-07-10 20:46:56 +05:30
|
|
|
INSTALL_PROGRAM = $(INSTALL) -m 755
|
2011-12-21 15:34:00 +05:30
|
|
|
INSTALL_DATA = $(INSTALL) -p -m 644
|
2011-06-16 12:46:10 +05:30
|
|
|
|
2013-03-25 18:26:03 +05:30
|
|
|
ifeq ("@TESTING@", "yes")
|
|
|
|
TEST_INCLUDES=\
|
|
|
|
-Igmock-1.6.0/include \
|
|
|
|
-Igmock-1.6.0/gtest/include
|
|
|
|
else
|
|
|
|
TEST_INCLUDES=
|
|
|
|
endif
|
2011-07-22 20:39:56 +05:30
|
|
|
|
2011-12-21 15:34:00 +05:30
|
|
|
.SUFFIXES: .d
|
2011-06-16 12:46:10 +05:30
|
|
|
|
2013-07-15 20:18:36 +05:30
|
|
|
%.o: %.c
|
|
|
|
@echo " [CC] $<"
|
|
|
|
$(V) $(CC) -c $(INCLUDES) $(CFLAGS) -o $@ $<
|
|
|
|
@echo " [DEP] $<"
|
|
|
|
$(V) $(CC) -MM -MT $(subst .c,.o,$<) $(INCLUDES) $(CFLAGS) $< > $*.$$$$; \
|
|
|
|
sed 's,\([^ :]*\)\.o[ :]*,\1.o \1.gmo $* : Makefile ,g' < $*.$$$$ > $*.d; \
|
|
|
|
$(RM) $*.$$$$
|
|
|
|
|
2011-12-21 15:34:00 +05:30
|
|
|
%.o: %.cc
|
2013-03-22 21:11:13 +05:30
|
|
|
@echo " [CXX] $<"
|
2013-03-22 17:49:31 +05:30
|
|
|
$(V) $(CXX) -c $(INCLUDES) $(CXXFLAGS) -o $@ $<
|
2013-06-27 14:47:38 +05:30
|
|
|
@echo " [DEP] $<"
|
|
|
|
$(V) $(CXX) -MM -MT $(subst .cc,.o,$<) $(INCLUDES) $(TEST_INCLUDES) $(CXXFLAGS) $< > $*.$$$$; \
|
2013-06-27 17:12:52 +05:30
|
|
|
sed 's,\([^ :]*\)\.o[ :]*,\1.o \1.gmo $* : Makefile ,g' < $*.$$$$ > $*.d; \
|
2013-06-27 14:47:38 +05:30
|
|
|
$(RM) $*.$$$$
|
2011-06-16 12:46:10 +05:30
|
|
|
|
2013-03-22 19:12:20 +05:30
|
|
|
#----------------------------------------------------------------
|
2013-05-24 18:13:55 +05:30
|
|
|
|
2013-03-22 19:12:20 +05:30
|
|
|
lib/libpdata.a: $(PDATA_OBJECTS)
|
2013-03-22 21:18:43 +05:30
|
|
|
@echo " [AR] $<"
|
|
|
|
$(V)ar -rv $@ $(PDATA_OBJECTS) > /dev/null 2>&1
|
2013-03-22 19:12:20 +05:30
|
|
|
|
2013-03-15 21:54:17 +05:30
|
|
|
#----------------------------------------------------------------
|
|
|
|
# Thin provisioning tools
|
2013-01-02 18:25:41 +05:30
|
|
|
|
2012-03-08 22:50:46 +05:30
|
|
|
THIN_DEBUG_SOURCE=$(SOURCE)
|
2011-12-15 19:23:07 +05:30
|
|
|
THIN_DUMP_SOURCE=$(SOURCE)
|
2013-06-19 17:09:28 +05:30
|
|
|
THIN_REPAIR_SOURCE=$(SOURCE)
|
2011-12-15 19:23:07 +05:30
|
|
|
THIN_RESTORE_SOURCE=$(SOURCE)
|
2012-03-02 15:30:31 +05:30
|
|
|
THIN_CHECK_SOURCE=\
|
2013-08-16 18:37:04 +05:30
|
|
|
base/error_state.cc \
|
2013-11-19 15:53:35 +05:30
|
|
|
base/endian_utils.cc \
|
|
|
|
\
|
2013-01-02 18:25:41 +05:30
|
|
|
persistent-data/checksum.cc \
|
|
|
|
persistent-data/error_set.cc \
|
2013-09-11 16:10:46 +05:30
|
|
|
persistent-data/file_utils.cc \
|
2013-01-02 18:25:41 +05:30
|
|
|
persistent-data/hex_dump.cc \
|
2013-01-07 20:29:41 +05:30
|
|
|
persistent-data/lock_tracker.cc \
|
2013-06-20 19:16:46 +05:30
|
|
|
persistent-data/data-structures/btree.cc \
|
2013-01-02 18:25:41 +05:30
|
|
|
persistent-data/space_map.cc \
|
2013-01-12 00:56:51 +05:30
|
|
|
persistent-data/space-maps/disk.cc \
|
|
|
|
persistent-data/space-maps/recursive.cc \
|
|
|
|
persistent-data/space-maps/careful_alloc.cc \
|
2013-01-02 18:25:41 +05:30
|
|
|
persistent-data/transaction_manager.cc \
|
2013-11-19 15:53:35 +05:30
|
|
|
\
|
2013-05-21 20:19:20 +05:30
|
|
|
thin-provisioning/device_tree.cc \
|
2013-05-22 19:25:28 +05:30
|
|
|
thin-provisioning/mapping_tree.cc \
|
2013-01-02 18:25:41 +05:30
|
|
|
thin-provisioning/metadata.cc \
|
|
|
|
thin-provisioning/metadata_checker.cc \
|
2013-05-21 17:50:03 +05:30
|
|
|
thin-provisioning/superblock.cc
|
2013-01-02 18:25:41 +05:30
|
|
|
|
2013-05-23 17:45:00 +05:30
|
|
|
THIN_RMAP_SOURCE=\
|
2013-11-19 15:53:35 +05:30
|
|
|
base/endian_utils.cc \
|
|
|
|
\
|
2013-05-23 17:45:00 +05:30
|
|
|
persistent-data/checksum.cc \
|
|
|
|
persistent-data/error_set.cc \
|
2013-09-11 16:10:46 +05:30
|
|
|
persistent-data/file_utils.cc \
|
2013-05-23 17:45:00 +05:30
|
|
|
persistent-data/hex_dump.cc \
|
|
|
|
persistent-data/lock_tracker.cc \
|
2013-06-20 19:16:46 +05:30
|
|
|
persistent-data/data-structures/btree.cc \
|
2013-05-23 17:45:00 +05:30
|
|
|
persistent-data/space_map.cc \
|
|
|
|
persistent-data/space-maps/disk.cc \
|
|
|
|
persistent-data/space-maps/recursive.cc \
|
|
|
|
persistent-data/space-maps/careful_alloc.cc \
|
|
|
|
persistent-data/transaction_manager.cc \
|
|
|
|
thin-provisioning/device_tree.cc \
|
|
|
|
thin-provisioning/mapping_tree.cc \
|
|
|
|
thin-provisioning/metadata.cc \
|
|
|
|
thin-provisioning/metadata_checker.cc \
|
2013-05-24 18:13:55 +05:30
|
|
|
thin-provisioning/rmap_visitor.cc \
|
2013-05-23 17:45:00 +05:30
|
|
|
thin-provisioning/superblock.cc
|
|
|
|
|
2012-03-08 22:50:46 +05:30
|
|
|
THIN_DEBUG_OBJECTS=$(subst .cc,.o,$(THIN_DEBUG_SOURCE))
|
2011-12-15 19:23:07 +05:30
|
|
|
THIN_DUMP_OBJECTS=$(subst .cc,.o,$(THIN_DUMP_SOURCE))
|
2013-06-19 17:09:28 +05:30
|
|
|
THIN_REPAIR_OBJECTS=$(subst .cc,.o,$(THIN_REPAIR_SOURCE))
|
2011-12-15 19:23:07 +05:30
|
|
|
THIN_RESTORE_OBJECTS=$(subst .cc,.o,$(THIN_RESTORE_SOURCE))
|
2012-03-02 15:30:31 +05:30
|
|
|
THIN_CHECK_OBJECTS=$(subst .cc,.o,$(THIN_CHECK_SOURCE))
|
2013-05-23 17:45:00 +05:30
|
|
|
THIN_RMAP_OBJECTS=$(subst .cc,.o,$(THIN_RMAP_SOURCE))
|
2011-12-15 19:23:07 +05:30
|
|
|
|
2013-01-02 18:25:41 +05:30
|
|
|
thin_debug: $(THIN_DEBUG_OBJECTS) thin-provisioning/thin_debug.o
|
2013-03-22 21:18:43 +05:30
|
|
|
@echo " [LD] $@"
|
2013-07-15 02:40:28 +05:30
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT)
|
2012-03-08 22:50:46 +05:30
|
|
|
|
2013-06-19 17:09:28 +05:30
|
|
|
thin_repair: $(THIN_REPAIR_OBJECTS) thin-provisioning/thin_repair.o
|
|
|
|
@echo " [LD] $@"
|
2013-07-15 02:40:28 +05:30
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT)
|
2013-06-19 17:09:28 +05:30
|
|
|
|
2013-01-02 18:25:41 +05:30
|
|
|
thin_dump: $(THIN_DUMP_OBJECTS) thin-provisioning/thin_dump.o
|
2013-03-22 21:18:43 +05:30
|
|
|
@echo " [LD] $@"
|
2013-07-15 02:40:28 +05:30
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT)
|
2011-12-15 19:23:07 +05:30
|
|
|
|
2013-01-02 18:25:41 +05:30
|
|
|
thin_restore: $(THIN_RESTORE_OBJECTS) thin-provisioning/thin_restore.o
|
2013-03-22 21:18:43 +05:30
|
|
|
@echo " [LD] $@"
|
2013-07-15 02:40:28 +05:30
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT)
|
2011-08-31 18:31:48 +05:30
|
|
|
|
2013-06-19 16:02:16 +05:30
|
|
|
thin_check: $(THIN_CHECK_OBJECTS) thin-provisioning/thin_check.o
|
|
|
|
@echo " [LD] $@"
|
2013-07-15 02:40:28 +05:30
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
|
2013-06-19 16:02:16 +05:30
|
|
|
|
2013-05-23 17:45:00 +05:30
|
|
|
thin_rmap: $(THIN_RMAP_OBJECTS) thin-provisioning/thin_rmap.o
|
2013-03-22 21:18:43 +05:30
|
|
|
@echo " [LD] $@"
|
2013-07-15 02:40:28 +05:30
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
|
2011-08-23 16:25:37 +05:30
|
|
|
|
2013-07-15 20:18:36 +05:30
|
|
|
thin_metadata_size: thin-provisioning/thin_metadata_size.o
|
|
|
|
@echo " [LD] $@"
|
2013-10-07 18:57:08 +05:30
|
|
|
$(V) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ -lm
|
2013-07-15 20:18:36 +05:30
|
|
|
|
2013-03-15 21:54:17 +05:30
|
|
|
#----------------------------------------------------------------
|
|
|
|
# Cache tools
|
|
|
|
|
|
|
|
CACHE_CHECK_SOURCE=\
|
2013-10-10 14:48:46 +05:30
|
|
|
base/base64.cc \
|
2013-10-02 15:20:42 +05:30
|
|
|
base/error_state.cc \
|
2013-11-19 15:53:35 +05:30
|
|
|
base/endian_utils.cc \
|
|
|
|
\
|
2013-03-15 21:54:17 +05:30
|
|
|
persistent-data/checksum.cc \
|
|
|
|
persistent-data/error_set.cc \
|
2013-10-02 15:20:42 +05:30
|
|
|
persistent-data/file_utils.cc \
|
2013-03-15 21:54:17 +05:30
|
|
|
persistent-data/hex_dump.cc \
|
|
|
|
persistent-data/lock_tracker.cc \
|
2013-06-20 19:16:46 +05:30
|
|
|
persistent-data/data-structures/btree.cc \
|
2013-10-10 17:38:04 +05:30
|
|
|
persistent-data/data-structures/bitset.cc \
|
2013-03-15 21:54:17 +05:30
|
|
|
persistent-data/space_map.cc \
|
|
|
|
persistent-data/space-maps/disk.cc \
|
|
|
|
persistent-data/space-maps/recursive.cc \
|
|
|
|
persistent-data/space-maps/careful_alloc.cc \
|
|
|
|
persistent-data/transaction_manager.cc \
|
2013-11-19 15:53:35 +05:30
|
|
|
\
|
2013-09-24 16:30:09 +05:30
|
|
|
caching/hint_array.cc \
|
2013-09-11 16:10:46 +05:30
|
|
|
caching/superblock.cc \
|
2013-09-12 18:51:25 +05:30
|
|
|
caching/mapping_array.cc \
|
2013-09-11 16:10:46 +05:30
|
|
|
caching/metadata.cc \
|
2013-10-09 14:52:06 +05:30
|
|
|
caching/metadata_dump.cc \
|
2013-09-12 17:03:32 +05:30
|
|
|
caching/restore_emitter.cc \
|
2013-09-11 16:10:46 +05:30
|
|
|
caching/xml_format.cc
|
|
|
|
|
2013-03-15 21:54:17 +05:30
|
|
|
CACHE_CHECK_OBJECTS=$(subst .cc,.o,$(CACHE_CHECK_SOURCE))
|
|
|
|
|
2013-08-19 17:10:03 +05:30
|
|
|
CACHE_DUMP_SOURCE=$(SOURCE)
|
|
|
|
CACHE_DUMP_OBJECTS=$(subst .cc,.o,$(CACHE_DUMP_SOURCE))
|
|
|
|
|
2013-10-09 15:12:14 +05:30
|
|
|
CACHE_REPAIR_SOURCE=$(SOURCE)
|
|
|
|
CACHE_REPAIR_OBJECTS=$(subst .cc,.o,$(CACHE_REPAIR_SOURCE))
|
|
|
|
|
2013-08-16 20:59:41 +05:30
|
|
|
CACHE_RESTORE_SOURCE=$(SOURCE)
|
|
|
|
CACHE_RESTORE_OBJECTS=$(subst .cc,.o,$(CACHE_RESTORE_SOURCE))
|
|
|
|
|
|
|
|
cache_check: $(CACHE_CHECK_OBJECTS) caching/cache_check.o
|
2013-03-22 21:18:43 +05:30
|
|
|
@echo " [LD] $@"
|
2013-09-12 17:03:32 +05:30
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT)
|
2013-03-22 19:12:20 +05:30
|
|
|
|
2013-08-19 17:10:03 +05:30
|
|
|
cache_dump: $(CACHE_DUMP_OBJECTS) caching/cache_dump.o
|
|
|
|
@echo " [LD] $@"
|
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT)
|
|
|
|
|
2013-10-09 15:12:14 +05:30
|
|
|
cache_repair: $(CACHE_REPAIR_OBJECTS) caching/cache_repair.o
|
|
|
|
@echo " [LD] $@"
|
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT)
|
|
|
|
|
2013-08-16 20:59:41 +05:30
|
|
|
cache_restore: $(CACHE_RESTORE_OBJECTS) caching/cache_restore.o
|
|
|
|
@echo " [LD] $@"
|
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT)
|
|
|
|
|
2014-01-15 21:22:05 +05:30
|
|
|
cache_metadata_size: caching/cache_metadata_size.o
|
|
|
|
@echo " [LD] $@"
|
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
|
|
|
|
|
2014-01-10 04:10:34 +05:30
|
|
|
#----------------------------------------------------------------
|
|
|
|
# Era tools
|
|
|
|
|
|
|
|
ERA_CHECK_SOURCE=\
|
|
|
|
base/base64.cc \
|
|
|
|
base/error_state.cc \
|
|
|
|
base/endian_utils.cc \
|
|
|
|
\
|
2014-01-30 03:07:25 +05:30
|
|
|
era/writeset_tree.cc \
|
2014-01-10 04:10:34 +05:30
|
|
|
era/era_detail.cc \
|
2014-01-23 06:16:03 +05:30
|
|
|
era/era_array.cc \
|
|
|
|
era/metadata.cc \
|
|
|
|
era/superblock.cc \
|
2014-01-10 04:10:34 +05:30
|
|
|
\
|
|
|
|
persistent-data/checksum.cc \
|
|
|
|
persistent-data/error_set.cc \
|
|
|
|
persistent-data/file_utils.cc \
|
|
|
|
persistent-data/hex_dump.cc \
|
|
|
|
persistent-data/lock_tracker.cc \
|
|
|
|
persistent-data/data-structures/btree.cc \
|
|
|
|
persistent-data/data-structures/bitset.cc \
|
|
|
|
persistent-data/space_map.cc \
|
|
|
|
persistent-data/space-maps/disk.cc \
|
|
|
|
persistent-data/space-maps/recursive.cc \
|
|
|
|
persistent-data/space-maps/careful_alloc.cc \
|
|
|
|
persistent-data/transaction_manager.cc \
|
|
|
|
|
|
|
|
ERA_CHECK_OBJECTS=$(subst .cc,.o,$(ERA_CHECK_SOURCE))
|
|
|
|
|
|
|
|
era_check: $(ERA_CHECK_OBJECTS) era/era_check.o
|
|
|
|
@echo " [LD] $@"
|
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT)
|
|
|
|
|
2014-01-23 06:16:03 +05:30
|
|
|
ERA_DUMP_SOURCE=\
|
|
|
|
base/base64.cc \
|
|
|
|
base/error_state.cc \
|
|
|
|
base/endian_utils.cc \
|
|
|
|
\
|
2014-01-30 03:07:25 +05:30
|
|
|
era/writeset_tree.cc \
|
2014-01-23 06:16:03 +05:30
|
|
|
era/era_detail.cc \
|
|
|
|
era/era_array.cc \
|
|
|
|
era/metadata.cc \
|
|
|
|
era/metadata_dump.cc \
|
|
|
|
era/superblock.cc \
|
|
|
|
era/xml_format.cc \
|
|
|
|
\
|
|
|
|
persistent-data/checksum.cc \
|
|
|
|
persistent-data/error_set.cc \
|
|
|
|
persistent-data/file_utils.cc \
|
|
|
|
persistent-data/hex_dump.cc \
|
|
|
|
persistent-data/lock_tracker.cc \
|
|
|
|
persistent-data/data-structures/btree.cc \
|
|
|
|
persistent-data/data-structures/bitset.cc \
|
|
|
|
persistent-data/space_map.cc \
|
|
|
|
persistent-data/space-maps/disk.cc \
|
|
|
|
persistent-data/space-maps/recursive.cc \
|
|
|
|
persistent-data/space-maps/careful_alloc.cc \
|
|
|
|
persistent-data/transaction_manager.cc \
|
|
|
|
|
|
|
|
ERA_DUMP_OBJECTS=$(subst .cc,.o,$(ERA_DUMP_SOURCE))
|
|
|
|
|
|
|
|
era_dump: $(ERA_DUMP_OBJECTS) era/era_dump.o
|
|
|
|
@echo " [LD] $@"
|
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
|
|
|
|
|
2014-01-30 03:07:25 +05:30
|
|
|
ERA_INVALIDATE_SOURCE=\
|
|
|
|
base/base64.cc \
|
|
|
|
base/error_state.cc \
|
|
|
|
base/endian_utils.cc \
|
|
|
|
\
|
|
|
|
era/writeset_tree.cc \
|
|
|
|
era/era_detail.cc \
|
|
|
|
era/era_array.cc \
|
|
|
|
era/metadata.cc \
|
|
|
|
era/metadata_dump.cc \
|
|
|
|
era/superblock.cc \
|
|
|
|
era/xml_format.cc \
|
|
|
|
\
|
|
|
|
persistent-data/checksum.cc \
|
|
|
|
persistent-data/error_set.cc \
|
|
|
|
persistent-data/file_utils.cc \
|
|
|
|
persistent-data/hex_dump.cc \
|
|
|
|
persistent-data/lock_tracker.cc \
|
|
|
|
persistent-data/data-structures/btree.cc \
|
|
|
|
persistent-data/data-structures/bitset.cc \
|
|
|
|
persistent-data/space_map.cc \
|
|
|
|
persistent-data/space-maps/disk.cc \
|
|
|
|
persistent-data/space-maps/recursive.cc \
|
|
|
|
persistent-data/space-maps/careful_alloc.cc \
|
|
|
|
persistent-data/transaction_manager.cc \
|
|
|
|
|
|
|
|
ERA_INVALIDATE_OBJECTS=$(subst .cc,.o,$(ERA_INVALIDATE_SOURCE))
|
|
|
|
|
|
|
|
era_invalidate: $(ERA_INVALIDATE_OBJECTS) era/era_invalidate.o
|
|
|
|
@echo " [LD] $@"
|
|
|
|
$(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
|
|
|
|
|
2014-01-10 04:10:34 +05:30
|
|
|
#----------------------------------------------------------------
|
|
|
|
|
2013-03-25 18:26:03 +05:30
|
|
|
DEPEND_FILES=\
|
|
|
|
$(subst .cc,.d,$(SOURCE)) \
|
|
|
|
$(subst .cc,.d,$(TEST_SOURCE)) \
|
2013-07-16 19:03:38 +05:30
|
|
|
$(subst .cc,.d,$(CXX_PROGRAM_SOURCE)) \
|
2013-07-15 20:18:36 +05:30
|
|
|
$(subst .c,.d,$(C_PROGRAM_SOURCE))
|
2013-03-25 18:26:03 +05:30
|
|
|
|
2013-03-22 19:12:20 +05:30
|
|
|
.PHONY: clean distclean
|
2013-01-02 18:25:41 +05:30
|
|
|
|
2011-12-06 21:17:24 +05:30
|
|
|
clean:
|
2013-06-19 17:40:12 +05:30
|
|
|
find . -name \*.o -delete
|
|
|
|
find . -name \*.gmo -delete
|
2013-07-15 20:18:36 +05:30
|
|
|
find . -name \*.d -delete
|
|
|
|
$(RM) $(TEST_PROGRAMS) $(PROGRAMS) $(GMOCK_OBJECTS) lib/*.a
|
2013-03-22 19:12:20 +05:30
|
|
|
|
2011-12-21 15:34:00 +05:30
|
|
|
distclean: clean
|
2011-12-21 15:38:37 +05:30
|
|
|
$(RM) config.cache config.log config.status configure.h version.h Makefile unit-tests/Makefile
|
2011-12-06 21:17:24 +05:30
|
|
|
|
2011-12-09 18:24:51 +05:30
|
|
|
install: $(PROGRAMS)
|
2011-12-21 15:34:00 +05:30
|
|
|
$(INSTALL_DIR) $(BINDIR)
|
2013-10-18 19:47:06 +05:30
|
|
|
$(INSTALL_PROGRAM) cache_check $(BINDIR)
|
|
|
|
$(INSTALL_PROGRAM) cache_dump $(BINDIR)
|
|
|
|
$(INSTALL_PROGRAM) cache_repair $(BINDIR)
|
|
|
|
$(INSTALL_PROGRAM) cache_restore $(BINDIR)
|
2013-07-19 16:58:38 +05:30
|
|
|
$(INSTALL_PROGRAM) thin_check $(BINDIR)
|
|
|
|
$(INSTALL_PROGRAM) thin_dump $(BINDIR)
|
|
|
|
$(INSTALL_PROGRAM) thin_repair $(BINDIR)
|
|
|
|
$(INSTALL_PROGRAM) thin_restore $(BINDIR)
|
|
|
|
$(INSTALL_PROGRAM) thin_rmap $(BINDIR)
|
|
|
|
$(INSTALL_PROGRAM) thin_metadata_size $(BINDIR)
|
2014-03-06 22:00:33 +05:30
|
|
|
$(INSTALL_PROGRAM) era_check $(BINDIR)
|
|
|
|
$(INSTALL_PROGRAM) era_dump $(BINDIR)
|
|
|
|
$(INSTALL_PROGRAM) era_invalidate $(BINDIR)
|
2011-12-21 15:34:00 +05:30
|
|
|
$(INSTALL_DIR) $(MANPATH)/man8
|
2013-10-18 19:47:06 +05:30
|
|
|
$(INSTALL_DATA) man8/cache_check.8 $(MANPATH)/man8
|
|
|
|
$(INSTALL_DATA) man8/cache_dump.8 $(MANPATH)/man8
|
|
|
|
$(INSTALL_DATA) man8/cache_repair.8 $(MANPATH)/man8
|
|
|
|
$(INSTALL_DATA) man8/cache_restore.8 $(MANPATH)/man8
|
2013-07-10 20:46:56 +05:30
|
|
|
$(INSTALL_DATA) man8/thin_check.8 $(MANPATH)/man8
|
|
|
|
$(INSTALL_DATA) man8/thin_dump.8 $(MANPATH)/man8
|
2013-07-18 19:24:15 +05:30
|
|
|
$(INSTALL_DATA) man8/thin_repair.8 $(MANPATH)/man8
|
2013-07-10 20:46:56 +05:30
|
|
|
$(INSTALL_DATA) man8/thin_restore.8 $(MANPATH)/man8
|
2013-07-18 19:24:15 +05:30
|
|
|
$(INSTALL_DATA) man8/thin_rmap.8 $(MANPATH)/man8
|
|
|
|
$(INSTALL_DATA) man8/thin_metadata_size.8 $(MANPATH)/man8
|
2013-07-18 17:49:06 +05:30
|
|
|
|
2011-12-21 16:01:56 +05:30
|
|
|
.PHONY: install
|
2011-12-21 15:34:00 +05:30
|
|
|
|
|
|
|
ifeq ("@TESTING@", "yes")
|
2011-12-21 15:38:37 +05:30
|
|
|
include unit-tests/Makefile
|
2013-01-15 10:59:40 +05:30
|
|
|
|
2013-03-25 17:23:55 +05:30
|
|
|
.PHONEY: features
|
|
|
|
|
2013-08-16 20:59:41 +05:30
|
|
|
features: $(PROGRAMS)
|
2013-03-25 17:23:55 +05:30
|
|
|
cucumber --no-color --format progress
|
|
|
|
|
2013-03-25 18:26:03 +05:30
|
|
|
test: features unit-test
|
|
|
|
endif
|
|
|
|
|
|
|
|
-include $(DEPEND_FILES)
|
|
|
|
|