Address Use ldconfig alternative on macos.
update_dyld_shared_cache seems to work on macos.
@@ -41,10 +41,14 @@ CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -Isrc/conf -fpic -O2 -fvisibility=hi
-DJANET_BUILD=$(JANET_BUILD)
LDFLAGS=-rdynamic
+# For installation
+LDCONFIG:=ldconfig
+
# Check OS
UNAME:=$(shell uname -s)
ifeq ($(UNAME), Darwin)
CLIBS:=$(CLIBS) -ldl
+ LDCONFIG:=update_dyld_shared_cache
else ifeq ($(UNAME), Linux)
CLIBS:=$(CLIBS) -lrt -ldl
endif
@@ -307,7 +311,7 @@ install: $(JANET_TARGET) build/janet.pc
cp jpm.1 '$(MANPATH)'
mkdir -p '$(PKG_CONFIG_PATH)'
cp build/janet.pc '$(PKG_CONFIG_PATH)/janet.pc'
- -ldconfig $(LIBDIR)
+ -$(LDCONFIG) $(LIBDIR)
uninstall:
-rm '$(BINDIR)/janet'
