build: fix path to libfakeroot on macOS
authorFelix Fietkau <nbd@nbd.name>
Tue, 1 Sep 2020 15:00:45 +0000 (17:00 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 1 Sep 2020 15:01:56 +0000 (17:01 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
rules.mk

index 481c04549d8783ab11e8d2a7c9766f7767acc419..8b2424f2bad57f71fca1df6d444f9c77d0d15181 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -264,7 +264,13 @@ endif
 
 BUILD_KEY=$(TOPDIR)/key-build
 
-FAKEROOT:=$(STAGING_DIR_HOST)/bin/fakeroot -l $(STAGING_DIR_HOST)/lib/libfakeroot.so -f $(STAGING_DIR_HOST)/bin/faked
+ifeq ($(HOST_OS),Darwin)
+  FAKEROOT_SO:=$(STAGING_DIR_HOST)/lib/libfakeroot.dylib
+else
+  FAKEROOT_SO:=$(STAGING_DIR_HOST)/lib/libfakeroot.so
+endif
+FAKEROOT:=$(STAGING_DIR_HOST)/bin/fakeroot -l $(FAKEROOT_SO) -f $(STAGING_DIR_HOST)/bin/faked
+
 TARGET_CC:=$(TARGET_CROSS)gcc
 TARGET_CXX:=$(TARGET_CROSS)g++
 KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh