xmrig/scripts/build.hwloc.sh

24 lines
713 B
Bash
Raw Permalink Normal View History

2024-03-20 19:13:01 +00:00
#!/bin/sh -e
2020-05-22 12:14:38 +00:00
2022-03-06 17:27:49 +00:00
HWLOC_VERSION_MAJOR="2"
2024-10-20 02:49:06 +00:00
HWLOC_VERSION_MINOR="11"
HWLOC_VERSION_PATCH="2"
2022-03-06 17:27:49 +00:00
HWLOC_VERSION="${HWLOC_VERSION_MAJOR}.${HWLOC_VERSION_MINOR}.${HWLOC_VERSION_PATCH}"
2020-05-22 12:14:38 +00:00
mkdir -p deps
mkdir -p deps/include
mkdir -p deps/lib
mkdir -p build && cd build
2022-03-06 17:27:49 +00:00
wget https://download.open-mpi.org/release/hwloc/v${HWLOC_VERSION_MAJOR}.${HWLOC_VERSION_MINOR}/hwloc-${HWLOC_VERSION}.tar.gz -O hwloc-${HWLOC_VERSION}.tar.gz
tar -xzf hwloc-${HWLOC_VERSION}.tar.gz
2020-05-22 12:14:38 +00:00
cd hwloc-${HWLOC_VERSION}
./configure --disable-shared --enable-static --disable-io --disable-libudev --disable-libxml2
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
cp -fr include ../../deps
2020-05-22 12:14:38 +00:00
cp hwloc/.libs/libhwloc.a ../../deps/lib
2022-03-06 17:27:49 +00:00
cd ..