Skip to content

Commit

Permalink
build nanomsg for both linux and osx
Browse files Browse the repository at this point in the history
  • Loading branch information
satindergrewal committed Feb 7, 2018
1 parent 2a70735 commit 2452da0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
18 changes: 15 additions & 3 deletions iguana/build_static_nanomsg.sh
Original file line number Diff line number Diff line change
@@ -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."
Expand All @@ -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 changes: 2 additions & 1 deletion iguana/m_mm
Original file line number Diff line number Diff line change
@@ -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

1 comment on commit 2452da0

@lukechilds
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@satindergrewal Looks like some of these build script/nanomsg updates broke my Docker image, it won't build any more 🤔.

Any ideas?

More info here: #594 (comment)

Please sign in to comment.