thin-provisioning-tools/Makefile

50 lines
1.0 KiB
Makefile
Raw Normal View History

2011-08-31 18:31:48 +05:30
.PHONEY: all
all: thin_repair thin_dump thin_restore
2011-06-16 12:46:10 +05:30
SOURCE=\
2011-09-12 16:19:42 +05:30
checksum.cc \
2011-08-22 15:12:13 +05:30
endian_utils.cc \
error_set.cc \
2011-09-16 14:36:37 +05:30
hex_dump.cc \
2011-10-10 18:40:30 +05:30
human_readable_format.cc \
2011-08-23 16:25:37 +05:30
metadata.cc \
2011-10-10 18:40:30 +05:30
metadata_dump.cc \
metadata_disk_structures.cc \
space_map_disk.cc \
2011-10-10 19:36:07 +05:30
transaction_manager.cc \
xml_format.cc
2011-08-22 15:12:13 +05:30
2011-06-16 12:46:10 +05:30
OBJECTS=$(subst .cc,.o,$(SOURCE))
2011-08-22 15:12:13 +05:30
TOP_DIR:=$(PWD)
CPPFLAGS=-Wall -g -I$(TOP_DIR) -O8
2011-09-01 15:12:57 +05:30
#CPPFLAGS=-Wall -std=c++0x -g -I$(TOP_DIR)
2011-10-10 20:29:37 +05:30
LIBS=-lstdc++ -lboost_program_options
2011-06-16 12:46:10 +05:30
.PHONEY: test-programs
2011-07-22 20:39:56 +05:30
test-programs: $(TEST_PROGRAMS)
2011-06-27 15:15:30 +05:30
.SUFFIXES: .cc .o .d
2011-06-16 12:46:10 +05:30
2011-06-27 15:15:30 +05:30
%.d: %.cc
2011-10-24 22:34:19 +05:30
g++ -MM -MT $(subst .cc,.o,$<) $(CPPFLAGS) $< > $@.$$$$; \
sed 's,\([^ :]*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
2011-06-27 15:15:30 +05:30
rm -f $@.$$$$
2011-06-16 12:46:10 +05:30
.cc.o:
g++ -c $(CPPFLAGS) $(INCLUDES) -o $@ $<
2011-08-23 16:25:37 +05:30
thin_dump: $(OBJECTS) thin_dump.o
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
2011-08-31 18:31:48 +05:30
thin_restore: $(OBJECTS) thin_restore.o
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
2011-08-23 16:25:37 +05:30
thin_repair: $(OBJECTS) thin_repair.o
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
include unit-tests/Makefile.in
2011-07-13 19:39:33 +05:30
include $(subst .cc,.d,$(SOURCE))
include $(subst .cc,.d,$(TEST_SOURCE))