Skip to content

Commit d0b50df

Browse files
committed
Merge pull request #10 from kevsmith/build_cleanup
Freshened up build to work via rebar only
2 parents 152e218 + 4122ef0 commit d0b50df

File tree

4 files changed

+45
-29
lines changed

4 files changed

+45
-29
lines changed

Makefile

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,24 @@
1-
LINUX=$(shell uname | grep Linux | wc -l | xargs echo)
1+
all: compile
22

3-
4-
ifeq ($(LINUX),1)
5-
ZMQ_FLAGS=--with-pic
6-
else
7-
ZMQ_FLAGS=
8-
endif
9-
10-
ifndef ZEROMQ_VERSION
11-
ZEROMQ_VERSION=v2.1.7
12-
endif
13-
14-
all: perf
15-
16-
deps/zeromq2:
17-
@mkdir -p deps
18-
@git clone git://github.com/zeromq/zeromq2-1.git deps/zeromq2
19-
@echo $(ZEROMQ_VERSION)
20-
@cd deps/zeromq2 && git checkout $(ZEROMQ_VERSION)
21-
22-
deps/zeromq2/src/.libs/libzmq.a: deps/zeromq2
23-
@cd deps/zeromq2 && ./autogen.sh && ./configure $(ZMQ_FLAGS) && make
24-
25-
dependencies: deps/zeromq2/src/.libs/libzmq.a
26-
27-
compile: dependencies
3+
compile:
284
@./rebar compile
295

30-
perf: compile
6+
perftest: compile
317
@cd perf && erlc erlzmq_perf.erl
328

9+
clean:
10+
@./rebar clean
11+
12+
distclean: clean
13+
@cd c_src;make distclean
14+
3315
test: compile
3416
@./rebar eunit
3517

3618
docs:
3719
@./rebar doc
3820

39-
bench: perf
21+
bench: perftest
4022
@echo 'Running benchmarks, this could take some time...'
4123
@mkdir -p graphs
4224
@./perf/perfgraphs.py

c_src/Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
LINUX=$(shell uname | grep Linux | wc -l | xargs echo)
2+
DEPS=../deps
3+
4+
ifeq ($(LINUX),1)
5+
ZMQ_FLAGS=--with-pic
6+
else
7+
ZMQ_FLAGS=
8+
endif
9+
10+
ifndef ZEROMQ_VERSION
11+
ZEROMQ_VERSION=v2.1.7
12+
endif
13+
14+
all: $(DEPS)/zeromq2/src/.libs/libzmq.a
15+
16+
clean:
17+
@cd $(DEPS)/zeromq2; make clean
18+
19+
distclean:
20+
@rm -rf $(DEPS)
21+
22+
$(DEPS)/zeromq2:
23+
@mkdir $(DEPS)
24+
@git clone git://github.com/zeromq/zeromq2-1.git $(DEPS)/zeromq2
25+
@echo $(ZEROMQ_VERSION)
26+
@cd $(DEPS)/zeromq2 && git checkout $(ZEROMQ_VERSION)
27+
28+
$(DEPS)/zeromq2/src/.libs/libzmq.a: $(DEPS)/zeromq2
29+
@cd $(DEPS)/zeromq2 && ./autogen.sh && ./configure $(ZMQ_FLAGS) && make

rebar

-91.9 KB
Binary file not shown.

rebar.config

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
{erl_opts, [debug_info, warnings_as_errors]}.
2+
13
{port_envs,
24
[{"DRV_LDFLAGS","deps/zeromq2/src/.libs/libzmq.a -shared $ERL_LDFLAGS -lstdc++ -luuid"},
35
{"darwin", "DRV_LDFLAGS", "deps/zeromq2/src/.libs/libzmq.a -bundle -flat_namespace -undefined suppress $ERL_LDFLAGS"},
4-
{"DRV_CFLAGS","-Ic_src -Ideps/zeromq2/include -g -Wall -fPIC $ERL_CFLAGS"}]}.
6+
{"DRV_CFLAGS","-Ic_src -Ideps/zeromq2/include -g -Wall -fPIC $ERL_CFLAGS"}]}.
7+
8+
{pre_hooks,[{compile,"make -C c_src"},
9+
{clean, "make -C c_src clean"}]}.

0 commit comments

Comments
 (0)