-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from pabloromeu/master
Adapted for Lua 5.2
- Loading branch information
Showing
26 changed files
with
846 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
gmon.out | ||
|
||
# Building files # | ||
################## | ||
*.o | ||
*.so | ||
|
||
# Emacs backups # | ||
################# | ||
*~ | ||
\#*\# | ||
.\#* | ||
|
||
# Vim swap # | ||
*.swp | ||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
Icon? | ||
ehthumbs.db | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,30 @@ | ||
CC= g++ | ||
CFLAGS= -g -O2 -shared -fPIC -I /usr/include/lua5.1/ -I/usr/local/include/mongo/ | ||
CFLAGS= -Wall -g -O2 -shared -fPIC -I/usr/include/mongo `pkg-config --cflags lua5.2` `pkg-config --cflags libmongo-client` | ||
AR= ar rcu | ||
RANLIB= ranlib | ||
RM= rm -f | ||
LIBS=-lmongoclient -lboost_thread -lboost_filesystem | ||
LIBS=`pkg-config --libs lua5.2` -lmongoclient -lssl -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 | ||
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 | ||
UNAME = `uname` | ||
PLAT = DetectOS | ||
|
||
all: $(PLAT) | ||
|
||
DetectOS: | ||
@make $(UNAME) | ||
|
||
Linux: | ||
@make -f Makefile.linux | ||
|
||
Darwin: | ||
@make -f Makefile.macports | ||
|
||
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) | ||
|
||
.PHONY: all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
CC= g++ | ||
CFLAGS= -Wall -g -O2 -shared -fPIC -I/usr/include/mongo `pkg-config --cflags lua5.2` `pkg-config --cflags libmongo-client` | ||
AR= ar rcu | ||
RANLIB= ranlib | ||
RM= rm -f | ||
LIBS=`pkg-config --libs lua5.2` -lmongoclient -lssl -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 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
Source: luamongo | ||
Section: database | ||
Priority: optional | ||
Maintainer: Evan Wies <neomantra@gmail.com> | ||
Build-Depends: debhelper (>= 7.0.50), liblua5.1-0-dev, | ||
Maintainer: Francisco Zamora-Martinez <pakozm@gmail.com> | ||
Build-Depends: debhelper (>= 7.0.50), liblua5.2-dev, | ||
mongodb (>= 1.6) | mongodb-stable (>= 1.6) | mongodb-unstable (>= 1.6) | ||
| mongodb-snapshot (>= 1.6) | libmongoclient-dev (>= 1.6) | mongodb-dev (>= 1.6), | ||
libboost-thread-dev (>= 1.40), libboost-filesystem-dev (>= 1.40) | ||
Standards-Version: 3.8.4 | ||
Homepage: http://code.google.com/p/luamongo/ | ||
Homepage: https://github.com/pabloromeu/luamongo | ||
|
||
Package: liblua5.1-mongo | ||
Package: liblua5.2-mongo | ||
Architecture: any | ||
Depends: ${shlibs:Depends}, ${misc:Depends}, lua5.1 | ||
Depends: ${shlibs:Depends}, ${misc:Depends}, lua5.2 | ||
Description: Lua driver for MongoDB | ||
Lua (http://www.lua.org) driver for MongoDB (http://www.mongodb.org). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
mongo.so usr/lib/lua/5.1 | ||
mongo.so usr/lib/lua/5.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.