---
 jni/GNUmakefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/jni/GNUmakefile b/jni/GNUmakefile
index d7b2369..40f5275 100755
--- a/jni/GNUmakefile
+++ b/jni/GNUmakefile
@@ -274,7 +274,7 @@ debug:
 	@echo "JFFI_BUILD_DIR=$(JFFI_BUILD_DIR)"
 	@echo "OBJS=$(OBJS)"
 
-$(LIBJFFI):  $(OBJS) $(LIBFFI_LIBS)
+$(LIBJFFI):  $(OBJS)
 	$(CC) -o $@ $(LDFLAGS) $(SOFLAGS) $(OBJS) $(LIBFFI_LIBS) $(LIBS)
 	$(STRIP) $@
 
@@ -286,7 +286,9 @@ $(BUILD_DIR)/%.o : $(SRC_DIR)/%.S $(wildcard $(JFFI_SRC_DIR)/*.h)
 	@mkdir -p $(@D)
 	@$(CC) $(CFLAGS) -o $@ -c $<
 
+ifneq ($(USE_SYSTEM_LIBFFI),1)
 $(OBJS) : $(LIBFFI_LIBS)
+endif
 
 ifeq ($(OS), darwin)
 build_ffi = \
-- 
2.33.0

