This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.put_env("EVISION_PREFER_PRECOMPILED", "true") # Remove if you use a platform on which Evision does not provide a pre-compiled library. | |
System.put_env("EVISION_PRECOMPILED_CACHE_DIR", "#{System.user_home!()}/.cache") | |
Mix.install( | |
[ | |
{:nx, "~> 0.3"}, | |
{:exla, "~> 0.3"}, | |
{:evision, "~> 0.1.2", github: "cocoa-xu/evision", tag: "v0.1.2"} | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setting for Evision to use precompiled version | |
System.put_env("EVISION_PREFER_PRECOMPILED", "true") # Remove if you use a platform on which Evision does not provide a pre-compiled library. | |
System.put_env("EVISION_PRECOMPILED_CACHE_DIR", "#{System.user_home!()}/.cache") | |
# Setting integration of Nx, EXLA and Evision | |
Mix.install( | |
[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.phony: all clean | |
PRIV = $(MIX_APP_PATH)/priv | |
BUILD = $(MIX_APP_PATH)/obj | |
NIF = $(PRIV)/libnif.so | |
ifeq ($(CROSSCOMPILE),) | |
ifeq ($(shell uname -s),Linux) | |
LDFLAGS += -fPIC -shared | |
CFLAFGS += -fPIC |