File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 11# Destination folder for the downloaded libraries
22LIBS_DIR := $(abspath ./libs)
33
4- UNAME_S := $(shell uname -s)
5-
64# Flags for CGO to find the headers and the shared library
7- ifeq ($(UNAME_S ) ,Darwin)
8- CGO_CFLAGS := -I$(LIBS_DIR)
9- CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,@executable_path/libs
10- else
11- CGO_CFLAGS := -I$(LIBS_DIR)
12- CGO_LDFLAGS := -L$(LIBS_DIR) -lcodex -Wl,-rpath,$(LIBS_DIR)
13- endif
5+ CGO_CFLAGS := -I$(LIBS_DIR )
6+ CGO_LDFLAGS := -L$(LIBS_DIR ) -lcodex -Wl,-rpath,$(LIBS_DIR )
147
158ifeq ($(OS ) ,Windows_NT)
169 BIN_NAME := example.exe
3326 unzip -o -qq $(LIBS_DIR ) /codex-${OS} -${ARCH} .zip -d $(LIBS_DIR )
3427 rm -f $(LIBS_DIR ) /* .zip
3528ifeq ($(UNAME_S ) ,Darwin)
36- install_name_tool -id @rpath/libcodex.dylib libs /libcodex.dylib
29+ install_name_tool -id @rpath/libcodex.dylib $(LIBS_DIR) /libcodex.dylib
3730endif
3831build :
3932 @echo " CGO_CFLAGS=$( CGO_CFLAGS) "
You can’t perform that action at this time.
0 commit comments