mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-18 20:57:56 +00:00
Fix broken Android build
Renamed libservald.so to libservaldaemon.so everywhere to avoid conflicts with the "servald" module name in Android.mk, and to avoid the overly generic name "libserval". Include the JNI entry points in the Android build.
This commit is contained in:
parent
641298b0e6
commit
5191d424cb
@ -11,6 +11,7 @@ SERVALD_SRC_FILES = \
|
||||
$(SERVAL_CLIENT_SOURCES) \
|
||||
$(MDP_CLIENT_SOURCES) \
|
||||
$(SERVAL_DAEMON_SOURCES) \
|
||||
$(SERVAL_DAEMON_JNI_SOURCES) \
|
||||
$(ANDROID_SOURCES)
|
||||
SQLITE3_INC := $(LOCAL_PATH)/$(SQLITE3_AMALGAMATION)
|
||||
|
||||
@ -55,7 +56,7 @@ LOCAL_SRC_FILES := $(SERVALD_SRC_FILES) version_servald.c
|
||||
LOCAL_CFLAGS += $(SERVALD_LOCAL_CFLAGS)
|
||||
LOCAL_C_INCLUDES += $(SODIUM_INCLUDE)
|
||||
LOCAL_LDLIBS := $(SERVALD_LOCAL_LDLIBS)
|
||||
LOCAL_MODULE := serval
|
||||
LOCAL_MODULE := servaldaemon
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
# Build servald executable, a wrapper around libservald.so
|
||||
|
15
Makefile.in
15
Makefile.in
@ -100,7 +100,7 @@ DEFS= @DEFS@
|
||||
|
||||
all: libs servald servaldwrap test
|
||||
|
||||
libs: libservald.so \
|
||||
libs: libservaldaemon.so \
|
||||
libservalclient.so libservalclient.a \
|
||||
libmonitorclient.so libmonitorclient.a
|
||||
|
||||
@ -115,7 +115,7 @@ uninstall:
|
||||
clean:
|
||||
@$(RM) -r $(OBJSDIRS:%=%/*) \
|
||||
servald \
|
||||
libservald.so libservald.a \
|
||||
libservaldaemon.so libservaldaemon.a \
|
||||
libservalclient.so libservalclient.a \
|
||||
libmonitorclient.so libmonitorclient.a \
|
||||
tfw_createfile directory_service fakeradio simulator serval-tests
|
||||
@ -237,19 +237,20 @@ $(SIMULATOR_OBJS): $(SOURCE_PREFIX)Makefile.in $(SOURCE_PREFIX)config.h $(PREF
|
||||
|
||||
# Rules for main targets.
|
||||
|
||||
libservald.a: $(SERVALD_OBJS) \
|
||||
libservaldaemon.a: \
|
||||
$(SERVALD_OBJS) \
|
||||
$(OBJSDIR_TOOLS)/version.o
|
||||
@echo AR $@
|
||||
@$(AR) -cr $@ $^
|
||||
|
||||
libservald.so: \
|
||||
libservaldaemon.so: \
|
||||
$(OBJSDIR_SERVALD)/servald_features.o \
|
||||
$(SERVAL_DAEMON_JNI_OBJS) \
|
||||
libservald.a
|
||||
libservaldaemon.a
|
||||
@echo LINK $@
|
||||
@$(CC) -Wall -shared -o $@ $^ $(LDFLAGS)
|
||||
|
||||
servald: $(OBJSDIR_SERVALD)/servald_features.o libservald.a
|
||||
servald: $(OBJSDIR_SERVALD)/servald_features.o libservaldaemon.a
|
||||
@echo LINK $@
|
||||
@$(CC) -Wall -o $@ $^ $(LDFLAGS)
|
||||
|
||||
@ -257,7 +258,7 @@ servaldwrap: $(OBJSDIR_SERVALD)/servalwrap.o $(OBJSDIR_TOOLS)/version.o
|
||||
@echo LINK $@
|
||||
@$(CC) -Wall -o $@ $^ $(LDFLAGS)
|
||||
|
||||
serval-tests: $(OBJSDIR_SERVALD)/test_features.o libservald.a
|
||||
serval-tests: $(OBJSDIR_SERVALD)/test_features.o libservaldaemon.a
|
||||
@echo LINK $@
|
||||
@$(CC) -Wall -o $@ $^ $(LDFLAGS)
|
||||
|
||||
|
@ -35,7 +35,7 @@ public class ServalDCommand
|
||||
|
||||
static
|
||||
{
|
||||
System.loadLibrary("servald");
|
||||
System.loadLibrary("servaldaemon");
|
||||
}
|
||||
|
||||
public static final int STATUS_ERROR = 255;
|
||||
|
@ -26,9 +26,9 @@ int main(int argc,char **argv)
|
||||
{
|
||||
const char *libservald_path =
|
||||
#ifdef ANDROID
|
||||
"/data/data/org.servalproject/lib/libserval.so"
|
||||
"/data/data/org.servalproject/lib/libservaldaemon.so"
|
||||
#else
|
||||
"libservald.so"
|
||||
"libservaldaemon.so"
|
||||
#endif
|
||||
;
|
||||
const char *entry_point ="servald_main";
|
||||
|
Loading…
Reference in New Issue
Block a user