Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add operating system detection check in Makefile #173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ ifeq ($(OS),Windows_NT)
COMPILER_SHARED_LIB_DST = compiler.dll
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),)
$(error "Failed to detect operating system")
endif
ifeq ($(UNAME_S),Linux)
SHARED_LIB_SRC = libmovevm.so
SHARED_LIB_DST = libmovevm.$(shell rustc --print cfg | grep target_arch | cut -d '"' -f 2).so
COMPILER_SHARED_LIB_SRC = libcompiler.so
COMPILER_SHARED_LIB_DST = libcompiler.$(shell rustc --print cfg | grep target_arch | cut -d '"' -f 2).so
endif
ifeq ($(UNAME_S),Darwin)
ifeq ($(UNAME_S),Darwin)
SHARED_LIB_SRC = libmovevm.dylib
SHARED_LIB_DST = libmovevm.dylib
COMPILER_SHARED_LIB_SRC = libcompiler.dylib
Expand Down