-
Notifications
You must be signed in to change notification settings - Fork 83
/
Makefile
67 lines (48 loc) · 1.45 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
58
59
60
61
62
63
64
65
66
67
SWIG = swig -DSWIGWORDSIZE64
CXX = g++
JS_ENGINE ?= node
JS_OPTION = v8
ARCH = $(shell arch)
LDFLAGS = -Llibs -lpthread -lrt -lgridstore
LDFLAGS_JS = -rdynamic -pthread
CPPFLAGS = -fPIC -std=c++0x -g -O2
INCLUDES = -Iinclude -Isrc
INCLUDES_JS = $(INCLUDES)
INCLUDES_JS += -I/usr/include/node
INCLUDES_JS += -Inode_modules/nan
CPPFLAGS_JS = $(CPPFLAGS) $(INCLUDES_JS) \
-DNODE_GYP_MODULE_NAME=griddb \
-DV8_DEPRECATION_WARNINGS=1 \
-DBUILDING_NODE_EXTENSION
PROGRAM = griddb_client.node
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/Field.cpp \
src/Util.cpp \
all: $(PROGRAM)
SWIG_DEF = src/griddb.i
SWIG_JS_SOURCES = src/griddb_js.cxx
OBJS = $(SOURCES:.cpp=.o)
SWIG_JS_OBJS = $(SWIG_JS_SOURCES:.cxx=.o)
$(SWIG_JS_SOURCES) : $(SWIG_DEF)
$(SWIG) -Ilibs/js/$(JS_OPTION) -outdir . -o $@ -c++ -javascript -$(JS_ENGINE) $<
.cpp.o:
$(CXX) $(CPPFLAGS) -c -o $@ $(INCLUDES) $<
$(SWIG_JS_OBJS): $(SWIG_JS_SOURCES)
$(CXX) $(CPPFLAGS_JS) -c -o $@ $<
$(PROGRAM): $(OBJS) $(SWIG_JS_OBJS)
$(CXX) -shared -o $@ $(OBJS) $(SWIG_JS_OBJS) $(LDFLAGS) $(LDFLAGS_JS)
clean:
rm -rf $(OBJS) $(SWIG_JS_OBJS)
rm -rf $(SWIG_JS_SOURCES)
rm -rf $(PROGRAM) $(EXTRA)