forked from moai/luamongo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.macports
56 lines (48 loc) · 1.86 KB
/
Makefile.macports
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
CC= g++
CFLAGS= -Wall -g -O2 -fPIC `pkg-config --cflags "lua >= 5.2"` -I/opt/local/include/mongo/
AR= ar rcu
RANLIB= ranlib
RM= rm -f
LIBS=`pkg-config --libs "lua >= 5.2"` -lmongoclient -lssl -lboost_thread-mt -lboost_filesystem-mt -flat_namespace -bundle -L/opt/local/lib -rdynamic
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 mongo_cxx_extension.o mongo_gridfilebuilder.o
all: luamongo
clean:
$(RM) $(OBJS) $(OUTLIB)
luamongo: $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $(OUTLIB) $(LDFLAGS)
echo:
@echo "CC = $(CC)"
@echo "CFLAGS = $(CFLAGS)"
@echo "AR = $(AR)"
@echo "RANLIB = $(RANLIB)"
@echo "RM = $(RM)"
@echo "LDFLAGS = $(LDFLAGS)"
main.o: main.cpp utils.h
$(CC) -c -o $@ $< $(CFLAGS)
mongo_dbclient.o: mongo_dbclient.cpp common.h utils.h
$(CC) -c -o $@ $< $(CFLAGS)
mongo_connection.o: mongo_connection.cpp common.h utils.h
$(CC) -c -o $@ $< $(CFLAGS)
mongo_cursor.o: mongo_cursor.cpp common.h utils.h
$(CC) -c -o $@ $< $(CFLAGS)
mongo_gridfile.o: mongo_gridfile.cpp common.h utils.h
$(CC) -c -o $@ $< $(CFLAGS)
mongo_gridfs.o: mongo_gridfs.cpp common.h utils.h
$(CC) -c -o $@ $< $(CFLAGS)
mongo_gridfschunk.o: mongo_gridfschunk.cpp common.h utils.h
$(CC) -c -o $@ $< $(CFLAGS)
mongo_query.o: mongo_query.cpp common.h utils.h
$(CC) -c -o $@ $< $(CFLAGS)
mongo_replicaset.o: mongo_replicaset.cpp common.h utils.h
$(CC) -c -o $@ $< $(CFLAGS)
mongo_bsontypes.o: mongo_bsontypes.cpp common.h
$(CC) -c -o $@ $< $(CFLAGS)
utils.o: utils.cpp common.h utils.h
$(CC) -c -o $@ $< $(CFLAGS)
mongo_cxx_extension.o: mongo_cxx_extension.cpp mongo_cxx_extension.h
$(CC) -c -o $@ $< $(CFLAGS)
mongo_gridfilebuilder.o: mongo_gridfilebuilder.cpp mongo_cxx_extension.h common.h utils.h
$(CC) -c -o $@ $< $(CFLAGS)
.PHONY: all