diff --git a/README.md b/README.md index 5bcb50572c..dfaf72b281 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,9 @@ Compile on Linux ---------------- Please see [INSTALL](https://github.com/tpruvot/ccminer/blob/linux/INSTALL) file or [project Wiki](https://github.com/tpruvot/ccminer/wiki/Compatibility) + + +Compile on FreeBSD +------------------ + +Make sure you have `gmake` installed from the ports tree. Use `build-freebsd.sh` diff --git a/build-freebsd.sh b/build-freebsd.sh new file mode 100755 index 0000000000..7b8d3fe256 --- /dev/null +++ b/build-freebsd.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Simple script to create the Makefile and build + +# export PATH="$PATH:/usr/local/cuda/bin/" + +make distclean || echo clean + +rm -f Makefile.in +rm -f config.status +./autogen.sh || echo done + +# CFLAGS="-O2" ./configure +./configure.sh + +gmake -j $(sysctl hw.ncpu|awk '{print $2}') diff --git a/build.sh b/build.sh index cd8b5e9f86..0488f95ef7 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Simple script to create the Makefile and build diff --git a/miner.h b/miner.h index b67aaae301..761cae5202 100644 --- a/miner.h +++ b/miner.h @@ -214,6 +214,13 @@ static inline void le32enc(void *pp, uint32_t x) } #endif +#if defined(__FreeBSD__) +#define HAVE_DECL_BE16DEC 1 +#define HAVE_DECL_LE16DEC 1 +#define HAVE_DECL_BE16ENC 1 +#define HAVE_DECL_LE16ENC 1 +#endif + #if !HAVE_DECL_BE16DEC static inline uint16_t be16dec(const void *pp) {