0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/db/makefile

97 lines
3.3 KiB
Makefile
Raw Normal View History

2009-01-18 18:05:17 +01:00
# Mongo DB makefile
# "make db" is the main command
2008-09-30 00:00:53 +02:00
2009-01-18 18:05:17 +01:00
CFLAGS+= -fPIC -fno-strict-aliasing -ggdb -pthread -O3 -Wall -Wsign-compare -I .. -L/usr/local/lib -L/usr/lib -rdynamic
FLAGS= ${CFLAGS} -Wno-non-virtual-dtor
2007-10-29 04:04:25 +01:00
LIB_DEPS = -lpcrecpp -lpcre
2008-12-29 23:52:45 +01:00
LIB_BOOST = -lboost_thread -lboost_filesystem -lboost_program_options
2008-09-09 16:19:31 +02:00
LIBS= $(LIB_DEPS) $(LIB_BOOST) -lstdc++
DBGRID_LIBS = $(LIB_BOOST) -lstdc++
DBTEST_LIBS= $(LIBS) -lunittest
2007-11-04 19:11:38 +01:00
2008-03-14 23:24:48 +01:00
JVM_LIBS = -L/opt/java/lib/
2007-10-20 01:35:48 +02:00
OBJS=../stdafx.o ../util/sock.o ../grid/message.o ../util/mmap.o pdfile.o query.o jsobj.o introspect.o btree.o clientcursor.o ../util/util.o javajs.o tests.o json.o repl.o ../client/dbclient.o btreecursor.o cloner.o namespace.o commands.o matcher.o dbcommands.o dbeval.o ../util/background.o ../util/miniwebserver.o dbwebserver.o dbinfo.o instance.o dbhelpers.o lasterror.o ../util/md5.o ../util/md5main.o security.o cursor.o security_commands.o
2007-12-08 21:50:47 +01:00
2009-01-18 17:10:01 +01:00
DBGRID_OBJS=../stdafx.o json.o ../util/sock.o ../grid/message.o ../util/util.o jsobj.o ../client/dbclient.o ../dbgrid/dbgrid.o ../dbgrid/request.o ../client/connpool.o ../dbgrid/gridconfig.o commands.o ../dbgrid/dbgrid_commands.o ../dbgrid/griddatabase.o ../client/model.o ../util/background.o ../dbgrid/shard.o lasterror.o ../util/md5.o ../util/md5main.o security.o
2007-10-20 01:35:48 +02:00
DBTEST_OBJS= $(OBJS) ../dbtests/dbtests.o ../dbtests/btreetests.o ../dbtests/jsobjtests.o ../dbtests/jsontests.o ../dbtests/namespacetests.o ../dbtests/pairingtests.o ../dbtests/pdfiletests.o
2008-12-02 18:54:32 +01:00
GPP = g++
#
# get platform-specific flags and overrides
#
include makefile.$(shell uname -s).$(shell uname -m)
2008-03-14 23:24:48 +01:00
#
# get any local overrides from makefile.local Sorry about the double-negative
#
-include makefile.local
#
# now, get the version of GPP. Requirement is 4.2
#
_GPP_VER := $(shell $(GPP) -dumpversion 2>&1 )
_REQ_GPP_VER = 4.2
2007-10-20 01:35:48 +02:00
.cpp.o:
$(GPP) -c $(FLAGS) $< -o $@
2007-10-20 01:35:48 +02:00
# Our convention is that passing 'quicktest' on the command line means run
# fast regressions and then immediately exit. That way you know immediately if you
# broke something horribly.
db: $(OBJS) db.o
$(GPP) $(FLAGS) -o $@ $(OBJS) db.o $(LIBS) $(JVM_LIBS)
2008-12-02 18:54:32 +01:00
dbtests: $(DBTEST_OBJS)
$(GPP) $(FLAGS) -o $@ $(DBTEST_OBJS) $(DBTEST_LIBS) $(JVM_LIBS)
2008-09-09 16:19:31 +02:00
dbgrid: $(DBGRID_OBJS) ../dbgrid/dbgrid.o
$(GPP) $(FLAGS) -o $@ $(DBGRID_OBJS) $(DBGRID_LIBS)
2008-12-29 23:52:45 +01:00
2008-03-26 21:22:16 +01:00
javatest: javatest.o $(OBJS)
$(GPP) $(FLAGS) -o $@ javatest.o $(OBJS) $(LIBS) $(JVM_LIBS)
2008-03-20 01:56:35 +01:00
2008-03-26 21:22:16 +01:00
javatest2: javatest.o javajs.o
$(GPP) $(FLAGS) -o javatest2 javatest.o javajs.o $(LIBS) $(JVM_LIBS)
2008-03-14 23:24:48 +01:00
2009-01-02 22:43:14 +01:00
mongodump: ../tools/dump.o $(OBJS)
$(GPP) $(FLAGS) -o $@ $(OBJS) ../tools/dump.o $(LIBS) $(JVM_LIBS)
all: db dbgrid mongodump
2008-12-05 18:10:03 +01:00
# FIXME Currently javatests{,2} binaries not cleaned.
2007-10-20 01:35:48 +02:00
clean:
2008-12-05 18:10:03 +01:00
-rm -f $(OBJS) db.o $(DBTEST_OBJS) $(DBGRID_OBJS) ../dbgrid/dbgrid.o
2009-01-02 22:43:14 +01:00
-rm -f db dbtests dbgrid mongodump
2008-12-05 18:10:03 +01:00
-rm -f *.o ../dbgrid/*.o
2007-10-30 16:35:17 +01:00
2008-12-29 23:52:45 +01:00
tools:
mongodump
2007-10-30 16:35:17 +01:00
cleandb:
2007-11-04 19:11:38 +01:00
rm /data/db/*
/usr/local/lib/libpcrecpp.a:
2007-11-04 19:14:02 +01:00
cat pcre.txt
2007-11-04 22:42:34 +01:00
pcre:
curl -O ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.4.tar.gz
tar -xzf pcre-7.4.tar.gz
cd pcre-7.4 && ./configure --enable-utf8 --with-match-limit=200000 --with-match-limit-recursion=4000 && make && make install
info:
@echo ''
@echo 'GPP command :' $(GPP)
@echo 'Using version of GPP :' $(_GPP_VER)
@echo 'Req version of GPP :' $(_REQ_GPP_VER)
@# todo - determine if we have the right version of gcc and error if not
2008-06-25 23:03:08 +02:00
@echo ''
2009-01-03 17:31:01 +01:00
flushtest: flushtest.o
$(GPP) $(FLAGS) -o $@ flushtest.o $(LIBS)