Skip to content

Commit 3633146

Browse files
committed
Debug
1 parent cfeeb3f commit 3633146

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# Destination folder for the downloaded libraries
22
LIBS_DIR := $(abspath ./libs)
33

4+
UNAME_S := $(shell uname -s)
45
# Flags for CGO to find the headers and the shared library
5-
CGO_CFLAGS := -I$(LIBS_DIR)
6-
CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,$(LIBS_DIR)
6+
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+
CGO_CFLAGS := -I$(LIBS_DIR)
11+
CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,$(LIBS_DIR)
12+
endif
713

814
ifeq ($(OS),Windows_NT)
915
BIN_NAME := example.exe

0 commit comments

Comments
 (0)