-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (48 loc) · 1.43 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
SWIG = swig -DSWIGWORDSIZE64
CXX = g++
ARCH = $(shell arch)
LDFLAGS = -lpthread -lrt -lgridstore
LDFLAGS_PHP =
CPPFLAGS = -fPIC -std=c++0x -g -O2
INCLUDES = -Iinclude -Isrc
INCLUDES_PHP = $(INCLUDES) \
-I. \
-I/usr/include/php \
-I/usr/include/php/main \
-I/usr/include/php/TSRM \
-I/usr/include/php/Zend \
-I/usr/include/php/ext \
-I/usr/include/php/ext/date/lib
CPPFLAGS_PHP = $(CPPFLAGS) $(INCLUDES_PHP)
PROGRAM = griddb_php_client.so
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 \
src/Field.cpp \
src/Util.cpp
all: $(PROGRAM)
SWIG_DEF = src/griddb.i
SWIG_PHP_SOURCES = src/griddb_php_client.cxx
OBJS = $(SOURCES:.cpp=.o)
SWIG_PHP_OBJS = $(SWIG_PHP_SOURCES:.cxx=.o)
$(SWIG_PHP_SOURCES) : $(SWIG_DEF)
$(SWIG) -outdir . -o $@ -c++ -php7 $<
.cpp.o:
$(CXX) $(CPPFLAGS) -c -o $@ $(INCLUDES) $<
$(SWIG_PHP_OBJS): $(SWIG_PHP_SOURCES)
$(CXX) $(CPPFLAGS_PHP) -c -o $@ $<
griddb_php_client.so: $(OBJS) $(SWIG_PHP_OBJS)
$(CXX) -shared -o $@ $(OBJS) $(SWIG_PHP_OBJS) $(LDFLAGS) $(LDFLAGS_PHP)
clean:
rm -rf $(OBJS) $(SWIG_PHP_OBJS)
rm -rf $(SWIG_PHP_SOURCES)
rm -rf $(PROGRAM)