2011-06-16 12:46:10 +05:30
|
|
|
SOURCE=\
|
2011-06-27 15:15:30 +05:30
|
|
|
metadata.cc
|
2011-06-16 12:46:10 +05:30
|
|
|
|
2011-07-13 19:39:33 +05:30
|
|
|
PROGRAM_SOURCE=\
|
2011-07-13 21:29:12 +05:30
|
|
|
block_t.cc \
|
2011-07-15 19:51:28 +05:30
|
|
|
btree_t.cc \
|
2011-07-14 20:01:00 +05:30
|
|
|
space_map_t.cc \
|
|
|
|
transaction_manager_t.cc
|
2011-07-13 19:39:33 +05:30
|
|
|
|
2011-06-16 12:46:10 +05:30
|
|
|
OBJECTS=$(subst .cc,.o,$(SOURCE))
|
2011-07-15 19:51:28 +05:30
|
|
|
CPPFLAGS=-Wall -std=c++0x -g
|
2011-06-16 12:46:10 +05:30
|
|
|
INCLUDES=
|
|
|
|
LIBS=-lstdc++
|
|
|
|
|
2011-07-14 20:01:00 +05:30
|
|
|
.PHONEY: unit-tests
|
|
|
|
|
2011-07-15 19:51:28 +05:30
|
|
|
unit-tests: block_t btree_t space_map_t transaction_manager_t
|
2011-07-14 20:01:00 +05:30
|
|
|
./block_t
|
2011-07-15 19:51:28 +05:30
|
|
|
./btree_t
|
2011-07-14 20:01:00 +05:30
|
|
|
./space_map_t
|
|
|
|
./transaction_manager_t
|
|
|
|
|
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
|
|
|
|
$(CC) -MM $(CPPFLAGS) $< > $@.$$$$; \
|
|
|
|
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
|
|
|
|
rm -f $@.$$$$
|
2011-06-16 12:46:10 +05:30
|
|
|
|
|
|
|
.cc.o:
|
|
|
|
g++ -c $(CPPFLAGS) $(INCLUDES) -o $@ $<
|
|
|
|
|
2011-07-13 19:39:33 +05:30
|
|
|
multisnap_display: $(OBJECTS) main.o
|
2011-07-14 20:01:00 +05:30
|
|
|
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
|
2011-07-13 19:39:33 +05:30
|
|
|
|
|
|
|
block_t: block_t.o
|
2011-07-14 20:01:00 +05:30
|
|
|
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
|
2011-06-23 19:17:08 +05:30
|
|
|
|
2011-07-15 19:51:28 +05:30
|
|
|
btree_t: btree_t.o
|
|
|
|
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
|
|
|
|
|
2011-07-13 21:29:12 +05:30
|
|
|
space_map_t: space_map_t.o
|
2011-07-14 20:01:00 +05:30
|
|
|
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
|
|
|
|
|
|
|
|
transaction_manager_t: transaction_manager_t.o
|
|
|
|
g++ $(CPPFLAGS) -o $@ $+ $(LIBS)
|
2011-07-13 21:29:12 +05:30
|
|
|
|
2011-07-13 19:39:33 +05:30
|
|
|
include $(subst .cc,.d,$(SOURCE))
|
|
|
|
include $(subst .cc,.d,$(PROGRAM_SOURCE))
|