~cpick/mongrel2/release

« back to all changes in this revision

Viewing changes to tools/config_modules/Makefile

  • Committer: Chris Pick
  • Date: 2013-06-30 16:39:57 UTC
  • mfrom: (1106.1.15)
  • Revision ID: git-v1:ec39967acb6bc9867ed9b9dc3774304ca6b9c294
Merge tag 'v1.8.1' into debian

Hotfix for github issue 148

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
CFLAGS=-I../../src $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build
3
3
LDFLAGS=$(OPTLIBS)
4
4
 
 
5
MONGO_SRC = mongo-c-driver/src/bson.c \
 
6
            mongo-c-driver/src/encoding.c \
 
7
            mongo-c-driver/src/gridfs.c \
 
8
            mongo-c-driver/src/md5.c \
 
9
            mongo-c-driver/src/mongo.c \
 
10
            mongo-c-driver/src/numbers.c \
 
11
            mongo-c-driver/src/env_posix.c
 
12
MONGO_CFLAGS = -fPIC -Imongo-c-driver/src -DMONGO_HAVE_STDINT
 
13
 
5
14
all: null.so zmq.so
6
15
 
 
16
.PHONY: fetch_mongo_c_driver
 
17
fetch_mongo_c_driver:
 
18
        if test ! -d mongo-c-driver; then git clone https://github.com/mongodb/mongo-c-driver.git; fi
 
19
        cd mongo-c-driver && git checkout v0.6
 
20
        
 
21
 
 
22
mongodb.so: CFLAGS += $(MONGO_CFLAGS)
 
23
mongodb.so: fetch_mongo_c_driver
 
24
mongodb.so: mongodb.c
 
25
        $(CC) $(CFLAGS) -c $(MONGO_SRC)
 
26
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< bson.o encoding.o gridfs.o md5.o mongo.o env_posix.o numbers.o ../../build/libm2.a
 
27
 
7
28
%.so : %.c
8
29
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< ../../build/libm2.a
9
30
 
10
31
clean:
11
 
        rm -f *.so
12
 
 
 
32
        rm -f *.o *.so
 
33
        rm -Rf mongo-c-driver
13
34
 
14
35
install:
15
36
        install -d $(DESTDIR)/$(PREFIX)/lib/mongrel2/config_modules/