-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
57 lines (42 loc) · 1.36 KB
/
Makefile
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
SWIG = swig -DSWIGWORDSIZE64
CXX = g++
ARCH = $(shell arch)
LDFLAGS = -Llibs -lpthread -lrt -lgridstore
LDFLAGS_RUBY = -L. -Wl,-Bsymbolic-functions -Wl,-z,relro \
-rdynamic -Wl,-export-dynamic -ldl -lcrypt -lm -lc
CPPFLAGS = -fPIC -std=c++0x -g -O2
INCLUDES = -Iinclude -Isrc
INCLUDES_RUBY = $(INCLUDES) \
-I${HOME}/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/x86_64-linux \
-I${HOME}/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0
PROGRAM = griddb_ruby.so
EXTRA =
SOURCES = src/TimeSeriesProperties.cpp \
src/ContainerInfo.cpp \
src/AggregationResult.cpp \
src/Container.cpp \
src/Store.cpp \
src/StoreFactory.cpp \
src/PartitionController.cpp \
src/Query.cpp \
src/QueryAnalysisEntry.cpp \
src/RowKeyPredicate.cpp \
src/RowSet.cpp \
src/TimestampUtils.cpp
all: $(PROGRAM)
SWIG_DEF = src/griddb.i
SWIG_RUBY_SOURCES = src/griddb_ruby.cxx
OBJS = $(SOURCES:.cpp=.o)
SWIG_RUBY_OBJS = $(SWIG_RUBY_SOURCES:.cxx=.o)
$(SWIG_RUBY_SOURCES) : $(SWIG_DEF)
$(SWIG) -outdir . -o $@ -c++ -ruby $<
.cpp.o:
$(CXX) $(CPPFLAGS) -c -o $@ $(INCLUDES) $<
$(SWIG_RUBY_OBJS): $(SWIG_RUBY_SOURCES)
$(CXX) $(CPPFLAGS) -c -o $@ $(INCLUDES_RUBY) $<
$(PROGRAM): $(OBJS) $(SWIG_RUBY_OBJS)
$(CXX) -shared -o $@ $(OBJS) $(SWIG_RUBY_OBJS) $(LDFLAGS) $(LDFLAGS_RUBY)
clean:
rm -rf $(OBJS) $(SWIG_RUBY_OBJS)
rm -rf $(SWIG_RUBY_SOURCES)
rm -rf $(PROGRAM) $(EXTRA)