github.com/0chain/gosdk@v1.17.11/_util/herumi_linux.mk (about) 1 ifndef PLATFORM 2 $(error PLATFORM is not set. Unable to add platform specific targets) 3 endif 4 5 ifneq ($(PLATFORM), linux) 6 $(error PLATFORM doesn't match linux) 7 endif 8 9 REDHATOS := $(shell command cat /etc/redhat-release 2> /dev/null) 10 11 .PHONY: install-herumi-deps install-gmp install-openssl upgrade-gmp upgrade-openssl 12 13 install-herumi-deps: install-openssl install-gmp 14 15 install-openssl: 16 @echo "Installing openssl ..." 17 ifdef REDHATOS 18 yum install openssl-devel 19 else 20 sudo apt-get -y install libssl-dev 21 endif 22 23 upgrade-openssl: 24 @echo "Upgrading openssl ..." 25 ifdef REDHATOS 26 yum update openssl-devel 27 else 28 sudo apt-get -y install libssl-dev 29 endif 30 31 install-gmp: 32 @echo "Installing gmp ..." 33 ifdef REDHATOS 34 yum install gmp-devel 35 else 36 sudo apt-get -y install libgmp3-dev 37 endif 38 39 upgrade-gmp: 40 @echo "Upgrading gmp ..." 41 ifdef REDHATOS 42 yum update gmp-devel 43 else 44 sudo apt-get -y upgrade libgmp3-dev 45 endif 46 47 ldload-herumi: 48 ifdef REDHATOS 49 @echo ">>> SET LD_LIBRARY_PATH manually as follows" 50 @echo "export LD_LIBRARY_PATH=/usr/local/lib" 51 else 52 @echo "Loading herumi library - linux" 53 @sudo ldconfig 54 @sudo ldconfig -p | egrep "bls|mcl" 55 endif