Android: first running vers of dynamically linked NDK binary. Pushing this from the...
authorSven-Ola Tuecke <sven-ola@gmx.de>
Tue, 15 Sep 2009 07:21:36 +0000 (09:21 +0200)
committerSven-Ola Tuecke <sven-ola@gmx.de>
Tue, 15 Sep 2009 07:21:36 +0000 (09:21 +0200)
make/Makefile.android

index 0bb6af9..2a8891a 100644 (file)
@@ -14,11 +14,18 @@ HDRS +=             $(wildcard src/linux/*.h src/unix/*.h)
 
 CPPFLAGS +=    -Dlinux
 CPPFLAGS +=    -Dandroid
+CPPFLAGS +=    -DOLSRD_GLOBAL_CONF_FILE=\"$(CFGFILE)\"
+
+# bionic libc: setbuf() segfaults, do not use
+CPPFLAGS +=    -D'setbuf(a,b)='
+
+# bionic libc: missing declaration
 CPPFLAGS +=    -DINET_ADDRSTRLEN=16
+# bionic libc: renamed declaration
 CPPFLAGS +=    -Dipv6mr_interface=ipv6mr_ifindex
+# bionic libc: missing declarations
 CPPFLAGS +=    -D'IPTOS_PREC(tos)=((tos)&0xe0)'
 CPPFLAGS +=    -D'IPTOS_TOS(tos)=((tos)&0x1e)'
-CPPFLAGS +=    -DOLSRD_GLOBAL_CONF_FILE=\"$(CFGFILE)\"
 
 PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
 INSTALL_LIB =  install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \
@@ -48,9 +55,9 @@ endif
 CFLAGS += -I$(NDK_ARCH)/usr/include
 
 LDFLAGS += -nostartfiles -nodefaultlibs -nostdlib
-LDFLAGS += -Wl,--dynamic-linker -Wl,/system/bin/linker
-LDFLAGS += -Wl,-L$(NDK_ARCH)/usr/lib
+LDFLAGS += -L$(NDK_ARCH)/usr/lib
 LDFLAGS += -Wl,-rpath-link -Wl,$(NDK_ARCH)/usr/lib
+LDFLAGS += -Wl,--dynamic-linker -Wl,/system/bin/linker
 ifndef OLSRD_PLUGIN
 LDFLAGS += $(NDK_ARCH)/usr/lib/crtbegin_dynamic.o
 endif