summaryrefslogtreecommitdiff
blob: 0e42b385e7b749cb8b695d2554e48e3d241dbb4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/jni/GNUmakefile b/jni/GNUmakefile
index cfe570a..c8bbb51 100755
--- a/jni/GNUmakefile
+++ b/jni/GNUmakefile
@@ -278,7 +278,7 @@ debug:
 	@echo "OBJS=$(OBJS)"
 
 $(LIBJFFI):  $(OBJS) $(LIBFFI_LIBS)
-	$(CC) -o $@ $(LDFLAGS) $(SOFLAGS) $(OBJS) $(LIBFFI) $(LIBS)
+	$(CC) -o $@ $(LDFLAGS) $(SOFLAGS) $(OBJS) $(LIBFFI) $(LIBS) $(LIBFFI_LIBS)
 	$(STRIP) $@
 ifeq ($(OS), darwin)
 	codesign -s - $@
@@ -287,10 +287,14 @@ endif
 $(BUILD_DIR)/%.o : $(SRC_DIR)/%.c $(wildcard $(JFFI_SRC_DIR)/*.h)
 	@mkdir -p $(@D)
 	@$(CCACHE) $(CC) $(CFLAGS) -c $< -o $@
+	mkdir -p $(@D)
+	$(CCACHE) $(CC) $(CFLAGS) -c $< -o $@
 
 $(BUILD_DIR)/%.o : $(SRC_DIR)/%.S $(wildcard $(JFFI_SRC_DIR)/*.h)
 	@mkdir -p $(@D)
 	@$(CC) $(CFLAGS) -o $@ -c $<
+	mkdir -p $(@D)
+	$(CC) $(CFLAGS) -o $@ -c $<
 
 $(OBJS) : $(LIBFFI)