Debian Codegraph @

src/modules/ndb_cassandra/Makefile

raw
1 # WARNING: do not run this directly, it should be run by the main Makefile
2
3 # Based on Makefile of 'db_cassandra' module. Thanks to 'Anca Vamanu' and 'Boudewyn Ligthart'.
4
5 include ../../Makefile.defs
6
7 CXX=g++
8 LD=g++
9 auto_gen=
10 NAME=ndb_cassandra.so
11
12 ifeq ($(CROSS_COMPILE),)
13 BUILDER = $(shell which pkg-config)
14 ifneq ($(BUILDER),)
15 PKGLIBTHRIFT = $(shell $(BUILDER) --exists thrift > /dev/null 2>&1 ; echo $$? )
16 ifneq ($(PKGLIBTHRIFT),0)
17 BUILDER =
18 endif
19 endif
20 endif
21
22 ifneq ($(BUILDER),)
23 THRIFT_INC = $(shell $(BUILDER) --cflags thrift)
24 DEFS += $(THRIFT_INC)
25 LIBS += $(shell $(BUILDER) --libs thrift)
26 else
27 THRIFT_INC = -I/usr/local/include
28 DEFS += $(THRIFT_INC)
29 LIBS += -L/usr/local/lib thrift_wrapper.o cassandra_constants.o cassandra_types.o Cassandra.o -lthrift
30 endif
31
32 CXXFLAGS=$(CFLAGS:-Wno-deprecated option=)
33 CXXFLAGS+=-Wno-write-strings -Wno-deprecated -Wno-unused-function -Wno-sign-compare -Wno-strict-aliasing
34
35 include ../../Makefile.modules
36
37 cassandra_constants.o: cassandra_constants.cpp cassandra_constants.h
38 @echo "Compiling $<"
39 $(CXX) $(CXXFLAGS) $(THRIFT_INC) -c $< -o $@
40
41 cassandra_types.o: cassandra_types.cpp cassandra_types.h
42 @echo "Compiling $<"
43 $(CXX) $(CXXFLAGS) $(THRIFT_INC) -c $< -o $@
44
45 Cassandra.o: Cassandra.cpp Cassandra.h
46 @echo "Compiling $<"
47 $(CXX) $(CXXFLAGS) $(THRIFT_INC) -c $< -o $@
48
49 thrift_wrapper.o: thrift_wrapper.cpp thrift_wrapper.h
50 @echo "Compiling $<"
51 $(CXX) $(CXXFLAGS) $(CFLAGS) $(C_DEFS) $(DEFS) -c $< -o $@
52
53 ndb_cassandra.so: thrift_wrapper.o cassandra_constants.o cassandra_types.o Cassandra.o