From d99addb6b0d64ff35f29bd5c6f4bf43722d486fb Mon Sep 17 00:00:00 2001 From: marktwtn Date: Fri, 28 Jun 2019 15:02:22 +0800 Subject: [PATCH] fix: fix build error with BUILD_REMOTE and BUILD_JNI enabled The JNI related object file is included in the remote worker related object files if the build options BUILD_REMOTE and BUILD_JNI are enabled. This should not happen and it causes the building error. The commit make sure the un-related object files would not be included. Close #166. --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6c4d100..ebd4766 100644 --- a/Makefile +++ b/Makefile @@ -152,7 +152,11 @@ OBJS += \ remote_common.o \ remote_interface.o -WORKER_OBJS := $(addprefix $(OUT)/worker-,$(filter-out remote_interface.o, $(OBJS))) +WORKER_EXCLUDE_OBJS := remote_interface.o +ifeq ("$(BUILD_JNI)", "1") +WORKER_EXCLUDE_OBJS += jni/iri-pearldiver-exlib.o +endif +WORKER_OBJS := $(addprefix $(OUT)/worker-,$(filter-out $(WORKER_EXCLUDE_OBJS), $(OBJS))) WORKER_CFLAGS := $(filter-out -DENABLE_REMOTE, $(CFLAGS)) endif