diff --git a/com.oracle.truffle.r.native/fficall/Makefile b/com.oracle.truffle.r.native/fficall/Makefile
index b192f66dfdeb13df3ee4d8df0b6ef6a98bb30bb7..adecfd6c3d6da5c80ee902eedf09487b29bed9a4 100644
--- a/com.oracle.truffle.r.native/fficall/Makefile
+++ b/com.oracle.truffle.r.native/fficall/Makefile
@@ -67,7 +67,7 @@ endif
 	install_name_tool -change libRlapack.dylib @rpath/libRlapack.dylib $(R_LIB)
 	install_name_tool -id @rpath/libR.dylib $(R_LIB)
 # check if we captured libpcre/libz, rpath those in libR
-	mx rupdatelib $(FASTR_LIB_DIR)
+	mx -p $(FASTR_R_HOME) rupdatelib $(FASTR_LIB_DIR)
 else
 	FASTR_RFFI="nfi-only" $(DYLIB_LD) $(DYLIB_LDFLAGS) $(shell echo $(PKG_LDFLAGS_OVERRIDE)) -Wl,-rpath,'$$ORIGIN' -o $(R_LIB) $(wildcard lib/*.o) -L$(FASTR_LIB_DIR) -lRblas -lRlapack -ldl -lpcre -lz
 ifeq ($(FASTR_RFFI),llvm)
diff --git a/com.oracle.truffle.r.native/gnur/Makefile.libs b/com.oracle.truffle.r.native/gnur/Makefile.libs
index ada6d3547740dc0b90ea634f164d038c32ef9eb6..5b41da317716476db10f2ef08e04c5e80cb504c0 100644
--- a/com.oracle.truffle.r.native/gnur/Makefile.libs
+++ b/com.oracle.truffle.r.native/gnur/Makefile.libs
@@ -65,7 +65,7 @@ endif
 # file to indicate that the check has been done.
 rcopylib.done: 
 	for target in $(OTHER_LIB_TARGETS); do \
-		mx rcopylib $$target $(FASTR_LIB_DIR) || exit 1; \
+		mx -p $(FASTR_R_HOME) rcopylib $$target $(FASTR_LIB_DIR) || exit 1; \
 	done
 	touch rcopylib.done
 
diff --git a/com.oracle.truffle.r.native/include/Makefile b/com.oracle.truffle.r.native/include/Makefile
index e25642d890396ef92543bc3f4d3aface92aec2ac..b5cd5f97ec1ad406dfa131897c374b74f3768ec9 100644
--- a/com.oracle.truffle.r.native/include/Makefile
+++ b/com.oracle.truffle.r.native/include/Makefile
@@ -47,7 +47,7 @@ all: linked
 linked:
 	mkdir -p R_ext
 	$(foreach file,$(R_HEADERS_TO_LINK),ln -sf $(GNUR_HOME)/include/$(file) $(file);)
-	mx edinclude $(GNUR_HOME)/include
+	mx -p $(FASTR_R_HOME) edinclude $(GNUR_HOME)/include
 	$(foreach file,$(R_EXT_HEADERS_TO_LINK),ln -sf $(GNUR_HOME)/include/R_ext/$(file) R_ext/$(file);)
 #	cp $(R_EXT_HEADERS_LOCAL) R_ext
 	touch linked