Skip to content

Instantly share code, notes, and snippets.

@alhafoudh
Last active December 30, 2015 02:29
Show Gist options
  • Save alhafoudh/7762649 to your computer and use it in GitHub Desktop.
Save alhafoudh/7762649 to your computer and use it in GitHub Desktop.
LINUX=$(shell uname | grep Linux | wc -l | xargs echo)
DEPS=../deps
ifeq ($(LINUX),1)
ZMQ_FLAGS="--with-pgm=libpgm-5.2.122"
else
ZMQ_FLAGS="--with-pgm=libpgm-5.2.122"
endif
ifndef ZEROMQ_VERSION
ZEROMQ_VERSION=3.2.2
endif
all: $(DEPS)/zeromq3/src/.libs/libzmq.a
clean:
if test -e $(DEPS)/zeromq3/Makefile; then \
cd $(DEPS)/zeromq3; make clean; \
else \
true; \
fi
distclean:
@rm -rf $(DEPS)
$(DEPS)/zeromq3:
@mkdir -p $(DEPS)
@curl http://download.zeromq.org/zeromq-$(ZEROMQ_VERSION).tar.gz -o $(DEPS)/zeromq-$(ZEROMQ_VERSION).tar.gz
@cd $(DEPS) && tar xzvfp zeromq-$(ZEROMQ_VERSION).tar.gz && mv zeromq-$(ZEROMQ_VERSION) zeromq3 && curl https://openpgm.googlecode.com/files/libpgm-5.2.122.tar.gz > ./zeromq3/foreign/openpgm/libpgm-5.2.122.tar.gz && curl https://gist.githubusercontent.com/alhafoudh/7979717/raw | patch -p1 -d ./zeromq3/
$(DEPS)/zeromq3/src/.libs/libzmq.a: $(DEPS)/zeromq3
@cd $(DEPS)/zeromq3 && ./configure $(ZMQ_FLAGS) && make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment