diff --git a/.gitignore b/.gitignore index ab4fdcbed..422f95783 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,4 @@ testsuite testsuite.dir testsuite.log vc-diffs +/.vs diff --git a/libltdl/Android/jni/Android.mk b/libltdl/Android/jni/Android.mk new file mode 100644 index 000000000..320c23672 --- /dev/null +++ b/libltdl/Android/jni/Android.mk @@ -0,0 +1,26 @@ +LOCAL_PATH := $(call my-dir) + +# build the library +include $(CLEAR_VARS) +LOCAL_MODULE := ltdl + +LOCAL_SRC_FILES := \ + $(LOCAL_PATH)/../../loaders/dlopen.c \ + $(LOCAL_PATH)/../../loaders/preopen.c \ + $(LOCAL_PATH)/../../lt__alloc.c \ + $(LOCAL_PATH)/../../lt__argz.c \ + $(LOCAL_PATH)/../../lt__dirent.c \ + $(LOCAL_PATH)/../../lt__strl.c \ + $(LOCAL_PATH)/../../lt_dlloader.c \ + $(LOCAL_PATH)/../../lt_error.c \ + $(LOCAL_PATH)/../../ltdl.c \ + $(LOCAL_PATH)/../../slist.c + +LOCAL_C_INCLUDES := \ + $(LOCAL_PATH)/../.. \ + $(LOCAL_PATH)/../../libltdl + +LOCAL_CFLAGS := -DHAVE_CONFIG_H -DHAVE_LIBDL -W -Wall -O3 -fPIC -DPIC -DLTDL #-DSTDC_HEADERS +LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl + +include $(BUILD_SHARED_LIBRARY) diff --git a/libltdl/Android/jni/Application.mk b/libltdl/Android/jni/Application.mk new file mode 100644 index 000000000..986cdce0a --- /dev/null +++ b/libltdl/Android/jni/Application.mk @@ -0,0 +1,3 @@ +APP_ABI := armeabi-v7a arm64-v8a x86 +APP_PLATFORM := android-24 +APP_STL := stlport_static diff --git a/libltdl/Android/jni/lt__argz.h b/libltdl/Android/jni/lt__argz.h new file mode 100644 index 000000000..28df4b822 --- /dev/null +++ b/libltdl/Android/jni/lt__argz.h @@ -0,0 +1,69 @@ +/* lt__argz.h -- internal argz interface for non-glibc systems + + Copyright (C) 2004, 2007-2008, 2011-2019 Free Software Foundation, + Inc. + Written by Gary V. Vaughan, 2004 + + NOTE: The canonical source of this file is maintained with the + GNU Libtool package. Report bugs to bug-libtool@gnu.org. + +GNU Libltdl is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +As a special exception to the GNU Lesser General Public License, +if you distribute this file as part of a program or library that +is built using GNU Libtool, you may include this file under the +same distribution terms that you use for the rest of that program. + +GNU Libltdl is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with GNU Libltdl; see the file COPYING.LIB. If not, a +copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, +or obtained by writing to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#if !defined LT__ARGZ_H +#define LT__ARGZ_H 1 + +#include +#define __need_error_t +#include +#include + +#if defined LTDL +# include "lt__glibc.h" +# include "lt_system.h" +#else +# define LT_SCOPE +#endif + +#if defined __cplusplus +extern "C" { +#endif + +LT_SCOPE error_t argz_append (char **pargz, size_t *pargz_len, + const char *buf, size_t buf_len); +LT_SCOPE error_t argz_create_sep(const char *str, int delim, + char **pargz, size_t *pargz_len); +LT_SCOPE error_t argz_insert (char **pargz, size_t *pargz_len, + char *before, const char *entry); +LT_SCOPE char * argz_next (char *argz, size_t argz_len, + const char *entry); +LT_SCOPE void argz_stringify (char *argz, size_t argz_len, int sep); + +#if defined __cplusplus +} +#endif + +#if !defined LTDL +# undef LT_SCOPE +#endif + +#endif /*!defined LT__ARGZ_H*/ diff --git a/libltdl/README.Android b/libltdl/README.Android new file mode 100644 index 000000000..20f47004b --- /dev/null +++ b/libltdl/README.Android @@ -0,0 +1,31 @@ +Requirements to build libltdl for Android +========================================= +- Android NDK for Windows +or +- Android NDK for Linux + +Build steps on Windows +====================== +1. Open cmd.exe console + +2. Navigate to \libltdl\Android\jni, for example: +cd "C:\Users\held\source\repos\laheller\libtool\libltdl\Android\jni" + +3. Execute build by callink ndk-build.cmd, for example: +"E:\Android\NDK\android-ndk-r15c\ndk-build.cmd" + +4. On successful build the output libraries will be located at: +\libltdl\Android\libs\\libltdl.so + +Build steps on Linux (Ubuntu) +============================= +1. Open terminal + +2. Navigate to /libltdl/Android/jni, for example: +cd ~/libtool/libltdl/Android/jni + +3. Execute build by callink ndk-build.cmd, for example on Ubuntu: +/usr/lib/android-ndk/ndk-build + +4. On successful build the output libraries will be located at: +~/libtool/libltdl/Android/libs//libltdl.so