-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
57 lines (41 loc) · 1.26 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
CPPFLAGS = -fPIC -std=c++0x -g -O2
INCLUDES = -Iinclude -Isrc
INCLUDES_PERL = $(INCLUDES) \
-I. \
-I/usr/lib64/perl5/CORE/ -Dbool=char
CPPFLAGS_PERL = $(CPPFLAGS) $(INCLUDES_PERL)
PROGRAM = griddb_perl.so
SOURCES = src/TimeSeriesProperties.cpp \
src/AggregationResult.cpp \
src/ContainerInfo.cpp \
src/Container.cpp \
src/Store.cpp \
src/StoreFactory.cpp \
src/PartitionController.cpp \
src/Query.cpp \
src/Row.cpp \
src/QueryAnalysisEntry.cpp \
src/RowKeyPredicate.cpp \
src/RowSet.cpp \
src/TimestampUtils.cpp \
all: $(PROGRAM)
SWIG_DEF = src/griddb.i
SWIG_PERL_SOURCES = src/griddb_perl.cxx
OBJS = $(SOURCES:.cpp=.o)
SWIG_PERL_OBJS = $(SWIG_PERL_SOURCES:.cxx=.o)
$(SWIG_PERL_SOURCES) : $(SWIG_DEF)
$(SWIG) -outdir . -o $@ -c++ -perl5 $<
.cpp.o:
$(CXX) $(CPPFLAGS) -c -o $@ $(INCLUDES) $<
$(SWIG_PERL_OBJS): $(SWIG_PERL_SOURCES)
$(CXX) $(CPPFLAGS_PERL) -c -o $@ $(INCLUDES_PERL) $<
griddb_perl.so: $(OBJS) $(SWIG_PERL_OBJS)
$(CXX) -shared -o $@ $(OBJS) $(SWIG_PERL_OBJS) $(LDFLAGS)
clean:
rm -rf $(OBJS) $(SWIG_PERL_OBJS)
rm -rf $(SWIG_PERL_SOURCES)
rm -rf $(PROGRAM)