From c1a816f23df18b465908bae40de20c0bea4f7c8c Mon Sep 17 00:00:00 2001 From: satindergrewal Date: Thu, 8 Feb 2018 00:45:30 +1300 Subject: [PATCH] gitignore updated, m_mm updated for linux: m_mm script will use dynamic nanomsg lib like before for osx: m_mm script will compile static nanomsg lib and generate static marketmaker binary --- .gitignore | 5 +++++ iguana/m_mm | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 37c54960f..67876dc66 100755 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,11 @@ x64 agents/iguana.exe Debug/* +iguana/nanomsglib +iguana/nanomsgsrc +OSlibs/linux +OSlibs/osx + iguana/pnacl/Release/iguana_unstripped.pexe iguana/pnacl/Release/iguana.pexe diff --git a/iguana/m_mm b/iguana/m_mm index be58df6a3..0f42e38da 100755 --- a/iguana/m_mm +++ b/iguana/m_mm @@ -1,4 +1,16 @@ cd secp256k1; ./m_unix; cd .. cd ../crypto777; ./m_LP; cd ../iguana -./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 + +if [[ "$OSTYPE" == "linux-gnu" ]]; then + echo "Linux" + # Default is dynamic nanomsg for linux using this script + nanomsg_lib="-lnanomsg" +elif [[ "$OSTYPE" == "darwin"* ]]; then + # Mac OSX + echo "Mac OSX" + # on osx this script generates static libnanomsg and uses it to compile static marketmaker binary + ./build_static_nanomsg.sh + nanomsg_lib="../OSlibs/osx/$(uname -m)/libnanomsg-static.a" +fi + +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 $nanomsg_lib -lcurl -lpthread -lm