forked from moai/luamongo
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
53 lines (45 loc) · 1.55 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
CXX= g++
LUA_INC= -I/usr/include/lua5.1/
CXXFLAGS= -g -O2 -shared -fPIC $(LUA_INC) -I/usr/include/mongo/
AR= ar rcu
RANLIB= ranlib
RM= rm -f
LIBS=-lmongoclient -lboost_thread -lboost_filesystem
OUTLIB=mongo.so
LDFLAGS= $(LIBS)
OBJS = main.o mongo_bsontypes.o mongo_dbclient.o mongo_replicaset.o mongo_connection.o mongo_cursor.o mongo_gridfile.o mongo_gridfs.o mongo_gridfschunk.o mongo_query.o utils.o
all: luamongo
clean:
$(RM) $(OBJS) $(OUTLIB)
luamongo: $(OBJS)
$(CXX) $(CXXFLAGS) $(OBJS) -o $(OUTLIB) $(LDFLAGS)
echo:
@echo "CXX = $(CXX)"
@echo "CXXFLAGS = $(CXXFLAGS)"
@echo "AR = $(AR)"
@echo "RANLIB = $(RANLIB)"
@echo "RM = $(RM)"
@echo "LDFLAGS = $(LDFLAGS)"
main.o: main.cpp utils.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
mongo_dbclient.o: mongo_dbclient.cpp common.h utils.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
mongo_connection.o: mongo_connection.cpp common.h utils.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
mongo_cursor.o: mongo_cursor.cpp common.h utils.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
mongo_gridfile.o: mongo_gridfile.cpp common.h utils.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
mongo_gridfs.o: mongo_gridfs.cpp common.h utils.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
mongo_gridfschunk.o: mongo_gridfschunk.cpp common.h utils.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
mongo_query.o: mongo_query.cpp common.h utils.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
mongo_replicaset.o: mongo_replicaset.cpp common.h utils.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
mongo_bsontypes.o: mongo_bsontypes.cpp common.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
utils.o: utils.cpp common.h utils.h
$(CXX) -c -o $@ $< $(CXXFLAGS)
.PHONY: all