Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

build fixes for netbsd #40

Merged
merged 2 commits into from

2 participants

@yamt

No description provided.

@yrashk
Owner

Thanks!

@yrashk yrashk merged commit 5179c87 into zeromq:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 41 additions and 31 deletions.
  1. +33 −0 c_src/GNUmakefile
  2. +7 −31 c_src/Makefile
  3. +1 −0  rebar.config
View
33 c_src/GNUmakefile
@@ -0,0 +1,33 @@
+LINUX=$(shell uname | grep -E "(Linux|NetBSD)" | wc -l | xargs echo)
+DEPS=../deps
+
+ifeq ($(LINUX),1)
+ZMQ_FLAGS=--with-pic
+else
+ZMQ_FLAGS=
+endif
+
+ifndef ZEROMQ_VERSION
+ZEROMQ_VERSION=v2.1.11
+endif
+
+all: $(DEPS)/zeromq2/src/.libs/libzmq.a
+
+clean:
+ if test -e $(DEPS)/zeromq2/Makefile; then \
+ cd $(DEPS)/zeromq2; make clean; \
+ else \
+ true; \
+ fi
+
+distclean:
+ @rm -rf $(DEPS)
+
+$(DEPS)/zeromq2:
+ @mkdir $(DEPS)
+ @git clone git://github.com/zeromq/zeromq2-x.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
View
38 c_src/Makefile
@@ -1,33 +1,9 @@
-LINUX=$(shell uname | grep Linux | wc -l | xargs echo)
-DEPS=../deps
+# a stub makefile for BSD make.
+# just redirect to GNU make, which is commonly available as "gmake".
-ifeq ($(LINUX),1)
-ZMQ_FLAGS=--with-pic
-else
-ZMQ_FLAGS=
-endif
+TARGETS=all clean distclean
-ifndef ZEROMQ_VERSION
-ZEROMQ_VERSION=v2.1.11
-endif
-
-all: $(DEPS)/zeromq2/src/.libs/libzmq.a
-
-clean:
- if test -e $(DEPS)/zeromq2/Makefile; then \
- cd $(DEPS)/zeromq2; make clean; \
- else \
- true; \
- fi
-
-distclean:
- @rm -rf $(DEPS)
-
-$(DEPS)/zeromq2:
- @mkdir $(DEPS)
- @git clone git://github.com/zeromq/zeromq2-x.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
+.for T in ${TARGETS}
+${T}:
+ @gmake ${T}
+.endfor
View
1  rebar.config
@@ -3,6 +3,7 @@
{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"},
+ {"netbsd", "DRV_LDFLAGS", "deps/zeromq2/src/.libs/libzmq.a -shared $ERL_LDFLAGS -lstdc++"},
{"DRV_CFLAGS","-Ic_src -Ideps/zeromq2/include -g -Wall -fPIC $ERL_CFLAGS"}]}.
{pre_hooks,[{compile,"make -C c_src"},
Something went wrong with that request. Please try again.