Browse Source

build nanomsg for both linux and osx

dev
satindergrewal 7 years ago
parent
commit
2452da0c5a
  1. 18
      iguana/build_static_nanomsg.sh
  2. 3
      iguana/m_mm

18
iguana/build_static_nanomsg.sh

@ -1,7 +1,19 @@
#!/bin/bash
#Check if libnanomsg-static.a file is already exists or not
file="../OSlibs/linux/$(uname -m)/libnanomsg-static.a"
if [[ "$OSTYPE" == "linux-gnu" ]]; then
echo "Linux"
file="../OSlibs/linux/$(uname -m)/libnanomsg-static.a"
makedir="../OSlibs/linux/$(uname -m)/"
copytarget="../OSlibs/linux/$(uname -m)/libnanomsg-static.a"
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
echo "Mac OSX"
file="../OSlibs/osx/$(uname -m)/libnanomsg-static.a"
makedir="../OSlibs/osx/$(uname -m)/"
copytarget="../OSlibs/osx/$(uname -m)/libnanomsg-static.a"
fi
if [ ! -f "$file" ]
then
echo "$0: File '${file}' not found."
@ -26,8 +38,8 @@ then
cd ../..
pwd
mkdir -p ../OSlibs/linux/$(uname -m)/
cp -av nanomsglib/lib/libnanomsg.a ../OSlibs/linux/$(uname -m)/libnanomsg-static.a
mkdir -p $makedir
cp -av nanomsglib/lib/libnanomsg.a $copytarget
fi

3
iguana/m_mm

@ -1,3 +1,4 @@
cd secp256k1; ./m_unix; cd ..
cd ../crypto777; ./m_LP; cd ../iguana
gcc -g -o marketmaker -I../crypto777 exchanges/mm.c ../crypto777/cJSON.c mini-gmp.c groestl.c segwit_addr.c secp256k1.o ../agents/libcrypto777.a -lnanomsg -lcurl -lpthread -lm
./build_static_nanomsg.sh
gcc -g -o marketmaker -I../crypto777 exchanges/mm.c ../crypto777/cJSON.c mini-gmp.c groestl.c segwit_addr.c secp256k1.o ../agents/libcrypto777.a ../OSlibs/osx/$(uname -m)/libnanomsg-static.a -lcurl -lpthread -lm

Loading…
Cancel
Save