forked from zeromq/erlzmq2
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 zeromq#10 from kevsmith/build_cleanup
Freshened up build to work via rebar only
- Loading branch information
Showing
4 changed files
with
45 additions
and
29 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
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,29 @@ | ||
LINUX=$(shell uname | grep Linux | wc -l | xargs echo) | ||
DEPS=../deps | ||
|
||
ifeq ($(LINUX),1) | ||
ZMQ_FLAGS=--with-pic | ||
else | ||
ZMQ_FLAGS= | ||
endif | ||
|
||
ifndef ZEROMQ_VERSION | ||
ZEROMQ_VERSION=v2.1.7 | ||
endif | ||
|
||
all: $(DEPS)/zeromq2/src/.libs/libzmq.a | ||
|
||
clean: | ||
@cd $(DEPS)/zeromq2; make clean | ||
|
||
distclean: | ||
@rm -rf $(DEPS) | ||
|
||
$(DEPS)/zeromq2: | ||
@mkdir $(DEPS) | ||
@git clone git://github.com/zeromq/zeromq2-1.git $(DEPS)/zeromq2 | ||
@echo $(ZEROMQ_VERSION) | ||
@cd $(DEPS)/zeromq2 && git checkout $(ZEROMQ_VERSION) | ||
|
||
$(DEPS)/zeromq2/src/.libs/libzmq.a: $(DEPS)/zeromq2 | ||
@cd $(DEPS)/zeromq2 && ./autogen.sh && ./configure $(ZMQ_FLAGS) && make |
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,4 +1,9 @@ | ||
{erl_opts, [debug_info, warnings_as_errors]}. | ||
|
||
{port_envs, | ||
[{"DRV_LDFLAGS","deps/zeromq2/src/.libs/libzmq.a -shared $ERL_LDFLAGS -lstdc++ -luuid"}, | ||
{"darwin", "DRV_LDFLAGS", "deps/zeromq2/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/zeromq2/include -g -Wall -fPIC $ERL_CFLAGS"}]}. | ||
|
||
{pre_hooks,[{compile,"make -C c_src"}, | ||
{clean, "make -C c_src clean"}]}. |