Skip to content

Commit

Permalink
install dev dependencies in make file
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelLeeHZ committed Apr 10, 2023
1 parent 0831a84 commit b17765f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,29 @@ miri:
ensure-disk-quota:
# ensure the target directory not to exceed 40GB
python3 ./scripts/clean-large-folder.py ./target 42949672960

# install dev dependencies
ifeq ($(shell uname), Darwin)
dev-setup:
echo "Detecting macOS system..."
brew --version >/dev/null 2>&1 || { echo "Error: Homebrew is not installed. Exiting..."; exit 1; }
echo "Installing dependencies using Homebrew..."
brew install git curl openssl protobuf cmake
else ifeq ($(shell uname), Linux)
dev-setup:
echo "Detecting Linux system..."
os_id=$(shell awk -F= '/^ID=/{print $$2}' /etc/os-release) && \
if [ "$$os_id" = "ubuntu" ]; then \
echo "Detected Ubuntu system..."; \
echo "Installing dependencies using apt-get..."; \
sudo apt-get update; \
sudo apt install git curl gcc g++ libssl-dev pkg-config protobuf-compiler cmake; \
else \
echo "Error: Unsupported Linux distribution. Exiting..."; \
exit 1; \
fi
else
dev-setup:
echo "Error: Unsupported OS. Exiting..."
exit 1
endif

0 comments on commit b17765f

Please sign in to comment.