61 lines
1.2 KiB
Makefile
Raw Normal View History

2011-08-31 14:01:48 +01:00
.PHONEY: all
all: thin_repair thin_dump thin_restore
2011-06-16 08:16:10 +01:00
SOURCE=\
2011-09-12 11:49:42 +01:00
checksum.cc \
2011-08-22 10:42:13 +01:00
endian_utils.cc \
error_set.cc \
2011-09-16 10:06:37 +01:00
hex_dump.cc \
2011-10-10 14:10:30 +01:00
human_readable_format.cc \
2011-10-28 12:25:06 +01:00
metadata.cc \
2011-10-28 12:07:21 +01:00
metadata_checker.cc \
2011-10-28 12:13:03 +01:00
metadata_dumper.cc \
metadata_disk_structures.cc \
2011-10-28 14:01:44 +01:00
restore_emitter.cc \
2011-11-08 11:08:16 +00:00
space_map.cc \
space_map_disk.cc \
2011-11-09 10:21:25 +00:00
space_map_recursive.cc \
2011-10-28 12:21:58 +01:00
thin_pool.cc \
2011-10-10 15:06:07 +01:00
transaction_manager.cc \
xml_format.cc
2011-08-22 10:42:13 +01:00
PROGRAM_SOURCE=\
thin_dump.cc \
thin_repair.cc \
thin_restore.cc
2011-06-16 08:16:10 +01:00
OBJECTS=$(subst .cc,.o,$(SOURCE))
2011-08-22 10:42:13 +01:00
TOP_DIR:=$(PWD)
2011-11-08 11:08:16 +00:00
CPPFLAGS=-Wall -g -I$(TOP_DIR)
2011-09-01 10:42:57 +01:00
#CPPFLAGS=-Wall -std=c++0x -g -I$(TOP_DIR)
LIBS=-lstdc++ -lboost_program_options -lexpat
2011-06-16 08:16:10 +01:00
.PHONEY: test-programs
2011-07-22 16:09:56 +01:00
test-programs: $(TEST_PROGRAMS)
2011-06-27 10:45:30 +01:00
.SUFFIXES: .cc .o .d
2011-06-16 08:16:10 +01:00
2011-06-27 10:45:30 +01:00
%.d: %.cc
g++ -MM -MT $(subst .cc,.o,$<) $(CPPFLAGS) $< > $@.$$$$; \
2011-10-24 18:04:19 +01:00
sed 's,\([^ :]*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
2011-06-27 10:45:30 +01:00
rm -f $@.$$$$
2011-06-16 08:16:10 +01:00
.cc.o:
g++ -c $(CPPFLAGS) $(INCLUDES) -o $@ $<
2011-08-23 11:55:37 +01:00
thin_dump: $(OBJECTS) thin_dump.o
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
2011-08-31 14:01:48 +01:00
thin_restore: $(OBJECTS) thin_restore.o
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
2011-08-23 11:55:37 +01:00
thin_repair: $(OBJECTS) thin_repair.o
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
include unit-tests/Makefile.in
2011-07-13 15:09:33 +01:00
include $(subst .cc,.d,$(SOURCE))
include $(subst .cc,.d,$(TEST_SOURCE))
include $(subst .cc,.d,$(PROGRAM_SOURCE))