Skip to content

Commit

Permalink
support pulling zmq3.1 in c_src makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
ericbmerritt committed Mar 8, 2012
1 parent 4b17cb0 commit 08fe70c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions c_src/Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ ZMQ_FLAGS=
endif endif


ifndef ZEROMQ_VERSION ifndef ZEROMQ_VERSION
ZEROMQ_VERSION=v2.1.11 ZEROMQ_VERSION=v3.1.0
endif endif


all: $(DEPS)/zeromq2/src/.libs/libzmq.a all: $(DEPS)/zeromq3/src/.libs/libzmq.a


clean: clean:
if test -e $(DEPS)/zeromq2/Makefile; then \ if test -e $(DEPS)/zeromq3/Makefile; then \
cd $(DEPS)/zeromq2; make clean; \ cd $(DEPS)/zeromq3; make clean; \
else \ else \
true; \ true; \
fi fi


distclean: distclean:
@rm -rf $(DEPS) @rm -rf $(DEPS)


$(DEPS)/zeromq2: $(DEPS)/zeromq3:
@mkdir $(DEPS) @mkdir $(DEPS)
@git clone git://github.com/zeromq/zeromq2-1.git $(DEPS)/zeromq2 @git clone git://github.com/zeromq/libzmq.git $(DEPS)/zeromq3
@echo $(ZEROMQ_VERSION) @echo $(ZEROMQ_VERSION)
@cd $(DEPS)/zeromq2 && git checkout $(ZEROMQ_VERSION) @cd $(DEPS)/zeromq3 && git checkout $(ZEROMQ_VERSION)


$(DEPS)/zeromq2/src/.libs/libzmq.a: $(DEPS)/zeromq2 $(DEPS)/zeromq3/src/.libs/libzmq.a: $(DEPS)/zeromq3
@cd $(DEPS)/zeromq2 && ./autogen.sh && ./configure $(ZMQ_FLAGS) && make @cd $(DEPS)/zeromq3 && ./autogen.sh && ./configure $(ZMQ_FLAGS) && make
6 changes: 3 additions & 3 deletions rebar.config
Original file line number Original file line Diff line number Diff line change
@@ -1,9 +1,9 @@
{erl_opts, [debug_info, warnings_as_errors]}. {erl_opts, [debug_info, warnings_as_errors]}.


{port_envs, {port_envs,
[{"DRV_LDFLAGS","deps/zeromq2/src/.libs/libzmq.a -shared $ERL_LDFLAGS -lstdc++ -luuid"}, [{"DRV_LDFLAGS","deps/zeromq3/src/.libs/libzmq.a -shared $ERL_LDFLAGS -lstdc++"},
{"darwin", "DRV_LDFLAGS", "deps/zeromq2/src/.libs/libzmq.a -bundle -flat_namespace -undefined suppress $ERL_LDFLAGS"}, {"darwin", "DRV_LDFLAGS", "deps/zeromq3/src/.libs/libzmq.a -bundle -flat_namespace -undefined suppress $ERL_LDFLAGS"},
{"DRV_CFLAGS","-Ic_src -Ideps/zeromq2/include -g -Wall -fPIC $ERL_CFLAGS"}]}. {"DRV_CFLAGS","-Ic_src -Ideps/zeromq3/include -g -Wall -fPIC $ERL_CFLAGS"}]}.


{pre_hooks,[{compile,"make -C c_src"}, {pre_hooks,[{compile,"make -C c_src"},
{clean, "make -C c_src clean"}]}. {clean, "make -C c_src clean"}]}.

0 comments on commit 08fe70c

Please sign in to comment.