mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 01:41:37 +03:00
24 lines
459 B
Bash
24 lines
459 B
Bash
|
#!/usr/bin/env sh
|
||
|
cc=$(which clang-3.6||which gcc-4.9||which clang||which gcc)
|
||
|
case $(uname) in
|
||
|
Linux)
|
||
|
so=$(printf so)
|
||
|
ARFLAGS='rvs -o'
|
||
|
;;
|
||
|
Darwin)
|
||
|
so=$(printf dylib)
|
||
|
ARFLAGS=rcs
|
||
|
;;
|
||
|
MINGW*)
|
||
|
so=$(printf lib)
|
||
|
ARFLAGS='rcs -o'
|
||
|
;;
|
||
|
*)
|
||
|
so=$(printf so)
|
||
|
ARFLAGS='rvs -o'
|
||
|
;;
|
||
|
esac
|
||
|
# TODO: Fix the compiler to work with any of the above compilers $cc
|
||
|
gcc -c keccak-tiny.c
|
||
|
ar ${ARFLAGS} libkeccak-tiny.$so keccak-tiny.o
|