We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfeeb3f commit 3633146Copy full SHA for 3633146
Makefile
@@ -1,9 +1,15 @@
1
# Destination folder for the downloaded libraries
2
LIBS_DIR := $(abspath ./libs)
3
4
+UNAME_S := $(shell uname -s)
5
# Flags for CGO to find the headers and the shared library
-CGO_CFLAGS := -I$(LIBS_DIR)
6
-CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,$(LIBS_DIR)
+ifeq ($(UNAME_S),Darwin)
7
+ CGO_CFLAGS := -I$(LIBS_DIR)
8
+ CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,@executable_path/libs
9
+else
10
11
+ CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,$(LIBS_DIR)
12
+endif
13
14
ifeq ($(OS),Windows_NT)
15
BIN_NAME := example.exe
0 commit comments