thin-provisioning-tools/Makefile
2011-07-14 15:31:00 +01:00

44 lines
864 B
Makefile

SOURCE=\
metadata.cc
PROGRAM_SOURCE=\
block_t.cc \
space_map_t.cc \
transaction_manager_t.cc
OBJECTS=$(subst .cc,.o,$(SOURCE))
CPPFLAGS=-Wall -std=c++0x
INCLUDES=
LIBS=-lstdc++
.PHONEY: unit-tests
unit-tests: block_t space_map_t transaction_manager_t
./block_t
./space_map_t
./transaction_manager_t
.SUFFIXES: .cc .o .d
%.d: %.cc
$(CC) -MM $(CPPFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
.cc.o:
g++ -c $(CPPFLAGS) $(INCLUDES) -o $@ $<
multisnap_display: $(OBJECTS) main.o
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
block_t: block_t.o
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
space_map_t: space_map_t.o
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
transaction_manager_t: transaction_manager_t.o
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
include $(subst .cc,.d,$(SOURCE))
include $(subst .cc,.d,$(PROGRAM_SOURCE))