Browse files

fix up make file & update rebar/rebar.config

  • Loading branch information...
1 parent 16dc092 commit c7e3435b0f9c6dd12ae9daaaecfa5a02339c8026 Ali Yakamercan committed Aug 21, 2012
Showing with 21 additions and 9 deletions.
  1. +15 −5 c_src/GNUmakefile
  2. BIN rebar
  3. +6 −4 rebar.config
View
20 c_src/GNUmakefile
@@ -1,22 +1,32 @@
DEPS=../deps
-all: $(DEPS)/libcouchbase
+all: $(DEPS)/libcouchbase/.libs/libcouchbase.la
clean:
+ if test -e $(DEPS)/libcouchbase/Makefile; then \
+ cd $(DEPS)/libcouchbase; make clean;\
+ cd ../libvbucket; make clean;\
+ cd ../libevent; make clean;\
+ cd ..; rm -rf libevent libcouchbase libvbucket;\
+ else \
+ true;\
+ fi
+
+distclean:
@rm -rf $(DEPS)
$(DEPS)/libevent:
@mkdir -p $(DEPS)
@git clone https://github.com/nmathewson/Libevent.git $(DEPS)/libevent
- @cd $(DEPS)/libevent && ./autogen.sh && ./configure && make
+ @cd $(DEPS)/libevent && ./autogen.sh && ./configure CFLAGS='' LDFLAGS='' && make
$(DEPS)/libvbucket: $(DEPS)/libevent
@git clone https://github.com/couchbase/libvbucket.git $(DEPS)/libvbucket
- @cd $(DEPS)/libvbucket && ./config/autorun.sh && ./configure && make
+ @cd $(DEPS)/libvbucket && ./config/autorun.sh && ./configure CFLAGS='' LDFLAGS='' && make
-$(DEPS)/libcouchbase: $(DEPS)/libvbucket
+$(DEPS)/libcouchbase/.libs/libcouchbase.la: $(DEPS)/libvbucket
@git clone https://github.com/couchbase/libcouchbase.git $(DEPS)/libcouchbase
@cd $(DEPS)/libcouchbase && ./config/autorun.sh && ./configure\
CPPFLAGS='-I../libvbucket/include -I../libevent/include'\
- LDFLAGS='-L../libvbucket/.libs -L../libevent/.libs'\
+ LDFLAGS='-L../libvbucket/.libs -L../libevent/.libs' --disable-couchbasemock\
&& make
View
BIN rebar
Binary file not shown.
View
10 rebar.config
@@ -1,12 +1,14 @@
-
{port_env, [
- {"(linux|solaris|darwin)", "LD_RUN_PATH", "$LD_RUN_PATH:deps/libcouchbase/.libs"},
- {"(linux|solaris|darwin)", "LDFLAGS", "$LDFLAGS -lstdc++ -Ldeps/libcouchbase/.libs -lcouchbase"},
- {"(linux|solaris|darwin)", "CFLAGS", "$CFLAGS -Ideps/libcouchbase/include"}
+ {"(linux|solaris|darwin)", "LD_RUN_PATH", "$LD_RUN_PATH:deps/libcouchbase/.libs:deps/libvbucket/.libs"},
+ {"(linux|solaris|darwin)","DRV_LDFLAGS", "$DRV_LDFLAGS -lstdc++ -Ldeps/libcouchbase/.libs -lcouchbase -Ldeps/libvbucket/.libs -lvbucket"},
+ {"(linux|solaris|darwin)","DRV_CFLAGS", "$DRV_CFLAGS -Ideps/libcouchbase/include -fPIC"}
]}.
+
{pre_hooks,[{'compile',"make -C c_src"},
{clean, "make -C c_src clean"}]}.
+{port_specs, [{"priv/cberl_drv.so", ["c_src/*.c"]}]}.
+
{deps, [
{'jiffy', "", {git, "https://github.com/davisp/jiffy.git", {branch, master}}}
]}.

0 comments on commit c7e3435

Please sign in to comment.