Files
Ryzen-Power/build.sh
MOVZX aa3d0e5951 Various Changes
- Code refactorisations
- Logic optimisations
- Update README.md
- etc

Signed-off-by: MOVZX <movzx@yahoo.com>
2025-07-01 17:14:05 +07:00

19 lines
775 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
gcc -O3 -o ryzen ryzen.c -lm
gcc -O3 -o cpuf cpuf.c -lm
if [ -d /opt/cuda ]; then
# NVIDIA
echo -e "\e[32m✔ NVIDIA CUDA SDK found. Compiling with NVIDIA support. 🚀\e[0m"
gcc -O3 -Wall -Werror -Wextra -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wvla -I/opt/cuda/include -o powerusage powerusage.c -lpci -lnvidia-ml -lm -DNVIDIA_GPU
gcc -O3 -o sens sens.c -lm
else
# AMD/Intel
echo -e "\e[33m NVIDIA CUDA SDK not found. Compiling without NVIDIA support. CPU only. 💻\e[0m"
gcc -O3 -Wall -Werror -Wextra -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wvla -o powerusage powerusage.c -lpci -lm
gcc -O3 -o sens sens.c -lm
fi