Makefile 759 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
CXXFLAGS =	-O0 -g -Wall -fmessage-length=0 -I../../thrift/lib/cpp/src/ -I/opt/local/include/

OBJS =		CollectAgent.o cassandra/Cassandra.o cassandra/cassandra_constants.o cassandra/cassandra_types.o

LIBS =		-L../../thrift/lib/cpp/.libs/ -lthrift

TARGET =	CollectAgent

SUBTARGETS = cassandra-lib

$(TARGET):	$(SUBTARGETS) $(OBJS) 
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS)

all:	$(TARGET)

cassandra-lib: cassandra-headers

cassandra-headers:
	@if [ ! -e cassandra ]; then \
	printf "Building Thrift interface headers... "; \
	../../thrift/compiler/cpp/thrift --gen cpp ../../cassandra/interface/cassandra.thrift; \
	mv gen-cpp cassandra; \
	echo "Done."; \
	fi

clean: clean-cassandra-headers
	rm -f $(OBJS) $(TARGET)

clean-cassandra-headers:
	rm -rf cassandra