From 6d4295af2c241312683993d540fedebd0aa097a6 Mon Sep 17 00:00:00 2001 From: Ladislav Vaiz Date: Wed, 19 Dec 2012 12:59:59 +0100 Subject: [PATCH] Add Android build support Android makefile fragments are distributed as extra distribution files by the GNU build system but are otherwise ignored. The Android build support is independent and does not rely on the GNU build system. See android/README.android for more info. Signed-off-by: Nate Bargmann --- Android.mk | 40 ++++ Makefile.am | 6 +- NEWS | 10 +- adat/Android.mk | 13 ++ adat/Makefile.am | 2 + alinco/Android.mk | 13 ++ alinco/Makefile.am | 2 + amsat/Android.mk | 13 ++ amsat/Makefile.am | 1 + android/Makefile.am | 2 + android/README.android | 17 ++ android/config.h | 469 +++++++++++++++++++++++++++++++++++++++++ android/hamlib-compile | 18 ++ android/ltdl.c | 123 +++++++++++ android/ltdl.h | 20 ++ aor/Android.mk | 14 ++ aor/Makefile.am | 4 +- ars/Android.mk | 13 ++ ars/Makefile.am | 2 + celestron/Android.mk | 13 ++ celestron/Makefile.am | 2 + configure.ac | 1 + drake/Android.mk | 13 ++ drake/Makefile.am | 2 + dummy/Android.mk | 13 ++ dummy/Makefile.am | 2 + easycomm/Android.mk | 13 ++ easycomm/Makefile.am | 2 +- flexradio/Android.mk | 13 ++ flexradio/Makefile.am | 2 + fodtrack/Android.mk | 13 ++ fodtrack/Makefile.am | 2 + gs232a/Android.mk | 13 ++ gs232a/Makefile.am | 2 + heathkit/Android.mk | 13 ++ heathkit/Makefile.am | 2 + icom/Android.mk | 22 ++ icom/Makefile.am | 2 +- jrc/Android.mk | 13 ++ jrc/Makefile.am | 2 + kachina/Android.mk | 13 ++ kachina/Makefile.am | 2 + kenwood/Android.mk | 18 ++ kenwood/Makefile.am | 4 +- kit/Android.mk | 15 ++ kit/Makefile.am | 2 +- lowe/Android.mk | 13 ++ lowe/Makefile.am | 2 + m2/Android.mk | 13 ++ m2/Makefile.am | 2 + pcr/Android.mk | 13 ++ pcr/Makefile.am | 2 + prm80/Android.mk | 13 ++ prm80/Makefile.am | 2 + racal/Android.mk | 13 ++ racal/Makefile.am | 2 + rft/Android.mk | 13 ++ rft/Makefile.am | 2 + rotorez/Android.mk | 13 ++ rotorez/Makefile.am | 2 +- rs/Android.mk | 13 ++ rs/Makefile.am | 2 + sartek/Android.mk | 13 ++ sartek/Makefile.am | 2 + skanti/Android.mk | 13 ++ skanti/Makefile.am | 2 + spid/Android.mk | 13 ++ spid/Makefile.am | 4 +- src/Android.mk | 35 +++ src/Makefile.am | 1 + src/debug.c | 26 +++ tapr/Android.mk | 13 ++ tapr/Makefile.am | 2 + tentec/Android.mk | 15 ++ tentec/Makefile.am | 2 +- ts7400/Android.mk | 13 ++ ts7400/Makefile.am | 2 +- tuner/Android.mk | 13 ++ tuner/Makefile.am | 2 + uniden/Android.mk | 15 ++ uniden/Makefile.am | 2 + winradio/Android.mk | 14 ++ winradio/Makefile.am | 2 +- wj/Android.mk | 13 ++ wj/Makefile.am | 2 + yaesu/Android.mk | 19 ++ yaesu/Makefile.am | 2 +- 87 files changed, 1338 insertions(+), 18 deletions(-) create mode 100644 Android.mk create mode 100644 adat/Android.mk create mode 100644 alinco/Android.mk create mode 100644 amsat/Android.mk create mode 100644 android/Makefile.am create mode 100644 android/README.android create mode 100644 android/config.h create mode 100644 android/hamlib-compile create mode 100644 android/ltdl.c create mode 100644 android/ltdl.h create mode 100644 aor/Android.mk create mode 100644 ars/Android.mk create mode 100644 celestron/Android.mk create mode 100644 drake/Android.mk create mode 100644 dummy/Android.mk create mode 100644 easycomm/Android.mk create mode 100644 flexradio/Android.mk create mode 100644 fodtrack/Android.mk create mode 100644 gs232a/Android.mk create mode 100644 heathkit/Android.mk create mode 100644 icom/Android.mk create mode 100644 jrc/Android.mk create mode 100644 kachina/Android.mk create mode 100644 kenwood/Android.mk create mode 100644 kit/Android.mk create mode 100644 lowe/Android.mk create mode 100644 m2/Android.mk create mode 100644 pcr/Android.mk create mode 100644 prm80/Android.mk create mode 100644 racal/Android.mk create mode 100644 rft/Android.mk create mode 100644 rotorez/Android.mk create mode 100644 rs/Android.mk create mode 100644 sartek/Android.mk create mode 100644 skanti/Android.mk create mode 100644 spid/Android.mk create mode 100644 src/Android.mk create mode 100644 tapr/Android.mk create mode 100644 tentec/Android.mk create mode 100644 ts7400/Android.mk create mode 100644 tuner/Android.mk create mode 100644 uniden/Android.mk create mode 100644 winradio/Android.mk create mode 100644 wj/Android.mk create mode 100644 yaesu/Android.mk diff --git a/Android.mk b/Android.mk new file mode 100644 index 000000000..aa63f3b0c --- /dev/null +++ b/Android.mk @@ -0,0 +1,40 @@ +TOP_PATH := $(call my-dir) +include $(TOP_PATH)/src/Android.mk + +include $(TOP_PATH)/adat/Android.mk +include $(TOP_PATH)/alinco/Android.mk +include $(TOP_PATH)/amsat/Android.mk +include $(TOP_PATH)/aor/Android.mk +include $(TOP_PATH)/ars/Android.mk +include $(TOP_PATH)/celestron/Android.mk +include $(TOP_PATH)/drake/Android.mk +include $(TOP_PATH)/dummy/Android.mk +include $(TOP_PATH)/easycomm/Android.mk +include $(TOP_PATH)/flexradio/Android.mk +include $(TOP_PATH)/fodtrack/Android.mk +include $(TOP_PATH)/gs232a/Android.mk +include $(TOP_PATH)/heathkit/Android.mk +include $(TOP_PATH)/icom/Android.mk +include $(TOP_PATH)/jrc/Android.mk +include $(TOP_PATH)/kachina/Android.mk +include $(TOP_PATH)/kenwood/Android.mk +include $(TOP_PATH)/kit/Android.mk +include $(TOP_PATH)/lowe/Android.mk +include $(TOP_PATH)/m2/Android.mk +include $(TOP_PATH)/pcr/Android.mk +include $(TOP_PATH)/prm80/Android.mk +include $(TOP_PATH)/racal/Android.mk +include $(TOP_PATH)/rft/Android.mk +include $(TOP_PATH)/rotorez/Android.mk +include $(TOP_PATH)/rs/Android.mk +include $(TOP_PATH)/sartek/Android.mk +include $(TOP_PATH)/skanti/Android.mk +include $(TOP_PATH)/spid/Android.mk +include $(TOP_PATH)/tapr/Android.mk +include $(TOP_PATH)/tentec/Android.mk +include $(TOP_PATH)/ts7400/Android.mk +include $(TOP_PATH)/tuner/Android.mk +include $(TOP_PATH)/uniden/Android.mk +include $(TOP_PATH)/winradio/Android.mk +include $(TOP_PATH)/wj/Android.mk +include $(TOP_PATH)/yaesu/Android.mk diff --git a/Makefile.am b/Makefile.am index b903e3d41..6d1702cfb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,7 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = hamlib.pc EXTRA_DIST = PLAN TODO LICENSE hamlib.m4 hamlib.pc.in README.developer \ - README.betatester README.win32 + README.betatester README.win32 Android.mk SUBDIRS = if BUILD_LIBLTDL @@ -17,13 +17,13 @@ SUBDIRS += macros include lib src \ @BACKEND_LIST@ \ @ROT_BACKEND_LIST@ \ @BINDINGS@ \ - tests doc + tests doc android DIST_SUBDIRS = libltdl macros include lib src c++ bindings tests doc \ icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc \ winradio adat easycomm fodtrack drake rotorez \ flexradio sartek lowe rft rs tapr kit skanti prm80 wj racal tuner \ - gs232a heathkit spid ars m2 amsat scripts ts7400 celestron + gs232a heathkit spid ars m2 amsat scripts ts7400 celestron android # Install any third party macros into our tree for distribution ACLOCAL_AMFLAGS = -I macros --install diff --git a/NEWS b/NEWS index cf0cad22c..090656c1c 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,7 @@ Hamlib -- History of visible changes. Copyright (C) 2000-2003 Frank Singleton -Copyright (C) 2000-2012 Stephane Fillod, and others +Copyright (C) 2000-2013 Stephane Fillod, and others Please send Hamlib bug reports to hamlib-developer@lists.sourceforge.net @@ -28,9 +28,13 @@ Version 3.0 fixes, pcr.c, pcr1500.c: Add DSP support. TNX Paul, KE7ZZ * WinRadio G313 updates. TNX Julian Campbel * Readline editing and history support added to rigctl interactive - mode. Implement options for reading and writing history file. + mode. Implement options for reading and writing history file. * Readline editing and history support added to rotctl interactive - mode. Implement options for reading and writing history file. + mode. Implement options for reading and writing history file. + * A new manual draft written in Texinfo added. Both GNU Info and single + HTML files are built and distributed, requires makeinfo. + * Android build system support. See android/README.android. Android + Makefile fragments are included in source tarballs. Version 1.2.15.3 2012-11-01 diff --git a/adat/Android.mk b/adat/Android.mk new file mode 100644 index 000000000..adf4807f5 --- /dev/null +++ b/adat/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := adat.c adt_200a.c +LOCAL_MODULE := adat + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/adat/Makefile.am b/adat/Makefile.am index 4e2835cc9..0cc448a18 100644 --- a/adat/Makefile.am +++ b/adat/Makefile.am @@ -6,3 +6,5 @@ hamlib_adat_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_adat_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = adat.h adt_200a.h + +EXTRA_DIST = Android.mk diff --git a/alinco/Android.mk b/alinco/Android.mk new file mode 100644 index 000000000..92573b9d2 --- /dev/null +++ b/alinco/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := dx77.c alinco.c +LOCAL_MODULE := alinco + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/alinco/Makefile.am b/alinco/Makefile.am index b23604059..9c5be7898 100644 --- a/alinco/Makefile.am +++ b/alinco/Makefile.am @@ -6,3 +6,5 @@ hamlib_alinco_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_alinco_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = alinco.h + +EXTRA_DIST = Android.mk diff --git a/amsat/Android.mk b/amsat/Android.mk new file mode 100644 index 000000000..16949f874 --- /dev/null +++ b/amsat/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := if100.c +LOCAL_MODULE := amsat + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/amsat/Makefile.am b/amsat/Makefile.am index c45861b52..8443970b7 100644 --- a/amsat/Makefile.am +++ b/amsat/Makefile.am @@ -5,3 +5,4 @@ hamlib_amsat_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_amsat_la_LIBADD = $(top_builddir)/lib/libmisc.la \ $(top_builddir)/src/libhamlib.la +EXTRA_DIST = Android.mk diff --git a/android/Makefile.am b/android/Makefile.am new file mode 100644 index 000000000..d0c0da2a5 --- /dev/null +++ b/android/Makefile.am @@ -0,0 +1,2 @@ + +EXTRA_DIST = config.h hamlib-compile ltdl.c ltdl.h README.android diff --git a/android/README.android b/android/README.android new file mode 100644 index 000000000..853d2b7bf --- /dev/null +++ b/android/README.android @@ -0,0 +1,17 @@ +This is android port of hamlib +(C) 2012 Ladislav Vaiz + +Notes: +* use hamlib-compile script to build hamlib for android +* script deletes file include/config.h, it conflicts with android/config.h +* android port implements ltdl interface and calls dlfcn functions directly +* RPC is not present on android +* ARS backend is compiled without pthreads because of deprecated pthread_cancel +* I don'k know how to connect to real radio: +** Bluetooth API is available only under Java, not from native code +** FTDI USB to serial converter driver is not included in standard kernel. It should work on rooted device. +** But NET rigctl works fine +* Backends are named libhamlib-vendor.so, I don't know how to include libraries without lib prefix into APK + +Happy hacking +73 Lada, OK1ZIA diff --git a/android/config.h b/android/config.h new file mode 100644 index 000000000..237176c4d --- /dev/null +++ b/android/config.h @@ -0,0 +1,469 @@ +/* config.h for android port */ + +/* Frontend ABI version */ +#define ABI_VERSION 2 + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#define HAVE_ALLOCA_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARGZ_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the `atexit' function. */ +#define HAVE_ATEXIT 1 + +/* Define to 1 if you have the `cfmakeraw' function. */ +#define HAVE_CFMAKERAW 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DEV_PPBUS_PPBCONF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DEV_PPBUS_PPI_H */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `gai_strerror' function. */ +#define HAVE_GAI_STRERROR 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GD_H */ + +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getopt' function. */ +#define HAVE_GETOPT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `ioctl' function. */ +#define HAVE_IOCTL 1 + +/* Define to 1 if you have the `syslog' library (-lsyslog). */ +/* #undef HAVE_LIBSYSLOG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LINUX_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NET_ERRNO_H */ + +/* If available, contains the Python version number currently in use. */ +/* #undef HAVE_PYTHON */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_RPC_RPCENT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_RPC_RPC_H 1 + +/* Define to 1 if you have the `select' function. */ +#define HAVE_SELECT 1 + +/* Define to 1 if you have the `setitimer' function. */ +#define HAVE_SETITIMER 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SGTTY_H 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define to 1 if the system has the type `siginfo_t'. */ +#define HAVE_SIGINFO_T 1 + +/* Define to 1 if you have the `sleep' function. */ +#define HAVE_SLEEP 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if the system has the type `ssize_t'. */ +#define HAVE_SSIZE_T 1 + +/* Define to 1 if you have win32 Sleep */ +/* #undef HAVE_SSLEEP */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strrchr' function. */ +#define HAVE_STRRCHR 1 + +/* Define to 1 if you have the `strstr' function. */ +#define HAVE_STRSTR 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if the system has the type `struct addrinfo'. */ +#define HAVE_STRUCT_ADDRINFO 1 + +/* Define to 1 if the system has the type `struct timezone'. */ +#define HAVE_STRUCT_TIMEZONE 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_IOCCOM_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_TCL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TERMIO_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_TERM_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_USB_H 1 + +/* Define to 1 if you have the `usleep' function. */ +#define HAVE_USLEEP 1 + +/* Define if usrp is available */ +/* #undef HAVE_USRP */ + +/* Define to 1 if you have the header file. */ +#define HAVE_VALUES_H 1 + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINBASE_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINIOCTL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2TCPIP_H */ + +/* Define if libxml2 is available */ +/* #undef HAVE_XML2 */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "hamlib-developer@lists.sourceforge.net" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "Hamlib" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "Hamlib 1.2.15" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "hamlib" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "http://www.hamlib.org" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.2.15" + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + + +/* Define missing prototypes, implemented in replacement lib */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef HAVE_GETOPT +int getopt (int argc, char * const argv[], const char * optstring); +extern char * optarg; +extern int optind, opterr, optopt; +#endif +#ifndef HAVE_GETOPT_LONG +struct option; +int getopt_long (int argc, char * const argv[], const char * optstring, + const struct option * longopts, int * longindex); +#endif + +#ifndef HAVE_USLEEP +int usleep(unsigned long usec); /* SUSv2 */ +#endif + +#if defined(HAVE_SSLEEP) && !defined(HAVE_SLEEP) +#ifdef HAVE_WINBASE_H +#include +#include +#endif +/* TODO: what about SleepEx? */ +static inline unsigned int sleep (unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; } +#endif + +#ifndef HAVE_GETTIMEOFDAY +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifndef HAVE_STRUCT_TIMEZONE +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; +#endif +int gettimeofday(struct timeval *tv, struct timezone *tz); +#endif + +#ifndef HAVE_SSIZE_T +typedef size_t ssize_t; +#endif + +#ifdef __cplusplus +} +#endif + + + +/* Define missing prototypes, implemented in replacement lib */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef HAVE_STRUCT_ADDRINFO +#ifdef HAVE_NETINET_IN_H +#include +#endif +#if HAVE_NETDB_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#elif HAVE_WS2TCPIP_H +#include +#endif +struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + socklen_t ai_addrlen; + struct sockaddr *ai_addr; +}; +#endif + +#ifndef HAVE_GETADDRINFO + +#ifdef HAVE_NETINET_IN_H +#include +#endif +#if HAVE_NETDB_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#elif HAVE_WS2TCPIP_H +#include +#endif + +#ifndef AI_PASSIVE +#define AI_PASSIVE 0x0001 +#endif + +int getaddrinfo(const char *node, const char *service, + const struct addrinfo *hints, struct addrinfo **res); +void freeaddrinfo(struct addrinfo *res); +#endif + +#if !defined(HAVE_GAI_STRERROR) && !defined(gai_strerror) +const char *gai_strerror(int errcode); +#endif /* !HAVE_GAI_STRERROR */ + +#ifdef __cplusplus +} +#endif + + +#define HAMLIB_MODULE_DIR "." diff --git a/android/hamlib-compile b/android/hamlib-compile new file mode 100644 index 000000000..c664114fe --- /dev/null +++ b/android/hamlib-compile @@ -0,0 +1,18 @@ +#!/bin/bash +set -e + +tmp=`dirname $0` +HAMLIB=`readlink -f $tmp/..` + +cd $HAMLIB + +rm -f $HAMLIB/include/config.h + +if [ -n "$1" ]; then + ndk-build NDK_PROJECT_PATH=$HAMLIB APP_BUILD_SCRIPT=$HAMLIB/Android.mk $1 + exit +fi + + +ndk-build NDK_PROJECT_PATH=$HAMLIB APP_BUILD_SCRIPT=$HAMLIB/Android.mk hamlib +ndk-build NDK_PROJECT_PATH=$HAMLIB APP_BUILD_SCRIPT=$HAMLIB/Android.mk diff --git a/android/ltdl.c b/android/ltdl.c new file mode 100644 index 000000000..0c04cb631 --- /dev/null +++ b/android/ltdl.c @@ -0,0 +1,123 @@ +/* + ltdl.c - ltdl emulation for android + Copyright (C) 2012 Ladislav Vaiz + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + +*/ + +#include +#include +#include +#include +#include + +#ifdef ANDROID +#include +#endif + +#define APREFIX "lib" +#define ASUFFIX ".so" +#define AMAXSTR 1024 +#define ASONAME "libhamlib.so" + +// path to application's libraries with trailing slash +char *libpath = NULL; + +char *getlibpath(void){ + char s[AMAXSTR]; + FILE *f; + + if (libpath != NULL) return libpath; + + f = fopen("/proc/self/maps", "rt"); + if (!f) return "./"; + + while (fgets(s, AMAXSTR - 1, f)){ + char *c; + + s[AMAXSTR - 1] = '\0'; + c = strstr(s, ASONAME); + if (!c) continue; + + // s is like "4a8a5000-4a8a6000 r--p 00018000 1f:01 743 /data/data/cz.nagano.tucnak/lib/libhamlib.so\n" + *c = '\0'; + c = strchr(s, '/'); + if (!c) continue; + libpath = malloc(strlen(c) + 1); + strcpy(libpath, c); + break; + } + fclose(f); + return libpath; +} + +int lt_dlinit(void){ +// __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "lt_dlinit"); + return 0; +} + +// not called from hamlib +int lt_dlexit(void){ +// __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "lt_dlexit"); + + if (libpath != NULL){ + free(libpath); + libpath = NULL; + } + return 0; +} + +int lt_dladdsearchdir(const char *search_dir){ +// __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "lt_dladdsearchdir"); + return 0; +} + +lt_dlhandle adlopen(const char *filename){ + char *c; + lt_dlhandle *ret; + +// __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "adlopen('%s')", filename); + getlibpath(); + if (libpath == NULL || filename == NULL) return NULL; + + c = malloc(strlen(libpath) + strlen(APREFIX) + strlen(filename) + strlen(ASUFFIX) + 1); + strcpy(c, libpath); + strcat(c, APREFIX); + strcat(c, filename); + strcat(c, ASUFFIX); + + ret = dlopen(c, 0); +// __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "adlopen('%s')=%p", c, ret); + free(c); + return ret; +} + +lt_dlhandle lt_dlopen(const char *filename){ +// __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "lt_dlopen(%s)", filename); + return adlopen(filename); +} + +lt_dlhandle lt_dlopenext(const char *filename){ +// __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "lt_dlopenext(%s)", filename); + return adlopen(filename); +} + +int lt_dlclose(lt_dlhandle handle){ +// __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "lt_dlclose"); + return dlclose(handle); +} + +void *lt_dlsym(lt_dlhandle handle, const char *name){ + void *ret = dlsym(handle, name); +// __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "lt_dlsym(%s)=%p", name, ret); + return ret; +} + +const char *lt_dlerror(void){ + const char *ret = dlerror(); +// __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "lt_dlerror=%s", ret); + return ret; +} diff --git a/android/ltdl.h b/android/ltdl.h new file mode 100644 index 000000000..ea758189d --- /dev/null +++ b/android/ltdl.h @@ -0,0 +1,20 @@ +/* + ltdl.h - ltdl emulation for android + Copyright (C) 2012 Ladislav Vaiz + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + +*/ + +typedef void *lt_dlhandle; + +int lt_dlinit(void); +int lt_dlexit(void); +int lt_dladdsearchdir(const char *search_dir); +lt_dlhandle lt_dlopen(const char *filename); +lt_dlhandle lt_dlopenext(const char *filename); +int lt_dlclose(lt_dlhandle handle); +void *lt_dlsym(lt_dlhandle handle, const char *name); +const char *lt_dlerror(void); diff --git a/aor/Android.mk b/aor/Android.mk new file mode 100644 index 000000000..20abdf52d --- /dev/null +++ b/aor/Android.mk @@ -0,0 +1,14 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := ar8200.c ar8000.c ar5000.c ar3000.c ar7030.c ar3030.c \ + ar2700.c ar8600.c ar7030p.c ar7030p_utils.c sr2200.c aor.c +LOCAL_MODULE := aor + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/aor/Makefile.am b/aor/Makefile.am index 481887c6d..8d73348ca 100644 --- a/aor/Makefile.am +++ b/aor/Makefile.am @@ -6,6 +6,8 @@ hamlib_aor_la_SOURCES = $(AORSRCLIST) aor.c hamlib_aor_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_aor_la_LIBADD = $(top_builddir)/src/libhamlib.la -EXTRA_DIST = README.aor README.ar5000 README.ar7030 +EXTRA_DIST = README.aor README.ar5000 README.ar7030 Android.mk noinst_HEADERS = aor.h ar7030p.h + + diff --git a/ars/Android.mk b/ars/Android.mk new file mode 100644 index 000000000..41aa1f176 --- /dev/null +++ b/ars/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := ars.c +LOCAL_MODULE := ars + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/ars/Makefile.am b/ars/Makefile.am index 642a1dd70..ca1950f77 100644 --- a/ars/Makefile.am +++ b/ars/Makefile.am @@ -6,3 +6,5 @@ hamlib_ars_la_LIBADD = $(top_builddir)/lib/libmisc.la \ $(top_builddir)/src/libhamlib.la noinst_HEADERS = ars.h + +EXTRA_DIST = Android.mk diff --git a/celestron/Android.mk b/celestron/Android.mk new file mode 100644 index 000000000..2557f6b90 --- /dev/null +++ b/celestron/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := celestron.c +LOCAL_MODULE := celestron + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/celestron/Makefile.am b/celestron/Makefile.am index f501a1b5b..4ca8ce8d4 100644 --- a/celestron/Makefile.am +++ b/celestron/Makefile.am @@ -5,3 +5,5 @@ hamlib_celestron_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_celestron_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = celestron.h + +EXTRA_DIST = Android.mk diff --git a/configure.ac b/configure.ac index 648ef4c2b..04ce9ab0b 100644 --- a/configure.ac +++ b/configure.ac @@ -706,6 +706,7 @@ adat/Makefile ts7400/Makefile celestron/Makefile scripts/Makefile +android/Makefile hamlib.pc]) AC_OUTPUT diff --git a/drake/Android.mk b/drake/Android.mk new file mode 100644 index 000000000..4344209e6 --- /dev/null +++ b/drake/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := r8a.c r8b.c drake.c +LOCAL_MODULE := drake + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/drake/Makefile.am b/drake/Makefile.am index 654965de7..c0e67f881 100644 --- a/drake/Makefile.am +++ b/drake/Makefile.am @@ -6,3 +6,5 @@ hamlib_drake_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_drake_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = drake.h + +EXTRA_DIST = Android.mk diff --git a/dummy/Android.mk b/dummy/Android.mk new file mode 100644 index 000000000..adf71bd02 --- /dev/null +++ b/dummy/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := dummy.c rot_dummy.c netrigctl.c netrotctl.c +LOCAL_MODULE := dummy + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/dummy/Makefile.am b/dummy/Makefile.am index 9f84d74e6..84b2e2a35 100644 --- a/dummy/Makefile.am +++ b/dummy/Makefile.am @@ -6,3 +6,5 @@ hamlib_dummy_la_LIBADD = $(top_builddir)/src/libhamlib.la \ @MATH_LIBS@ noinst_HEADERS = dummy.h rot_dummy.h + +EXTRA_DIST = Android.mk diff --git a/easycomm/Android.mk b/easycomm/Android.mk new file mode 100644 index 000000000..2ef3895a5 --- /dev/null +++ b/easycomm/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := easycomm.c +LOCAL_MODULE := easycomm + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/easycomm/Makefile.am b/easycomm/Makefile.am index d3610a66b..15e5e3816 100644 --- a/easycomm/Makefile.am +++ b/easycomm/Makefile.am @@ -4,6 +4,6 @@ hamlib_easycomm_la_SOURCES = easycomm.c hamlib_easycomm_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_easycomm_la_LIBADD = $(top_builddir)/src/libhamlib.la -EXTRA_DIST = easycomm.txt +EXTRA_DIST = easycomm.txt Android.mk noinst_HEADERS = easycomm.h diff --git a/flexradio/Android.mk b/flexradio/Android.mk new file mode 100644 index 000000000..fa9d6223b --- /dev/null +++ b/flexradio/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := flexradio.c sdr1k.c dttsp.c +LOCAL_MODULE := flexradio + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/flexradio/Makefile.am b/flexradio/Makefile.am index 1ce951d22..1c8b21b2e 100644 --- a/flexradio/Makefile.am +++ b/flexradio/Makefile.am @@ -6,3 +6,5 @@ hamlib_flexradio_la_LIBADD = $(top_builddir)/lib/libmisc.la \ $(top_builddir)/src/libhamlib.la noinst_HEADERS = flexradio.h + +EXTRA_DIST = Android.mk diff --git a/fodtrack/Android.mk b/fodtrack/Android.mk new file mode 100644 index 000000000..614d4ae84 --- /dev/null +++ b/fodtrack/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := fodtrack.c +LOCAL_MODULE := fodtrack + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/fodtrack/Makefile.am b/fodtrack/Makefile.am index 58feca323..c9b623aeb 100644 --- a/fodtrack/Makefile.am +++ b/fodtrack/Makefile.am @@ -6,3 +6,5 @@ hamlib_fodtrack_la_LIBADD = $(top_builddir)/lib/libmisc.la \ $(top_builddir)/src/libhamlib.la noinst_HEADERS = fodtrack.h + +EXTRA_DIST = Android.mk diff --git a/gs232a/Android.mk b/gs232a/Android.mk new file mode 100644 index 000000000..753425aa2 --- /dev/null +++ b/gs232a/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := gs232a.c gs232b.c gs232.c +LOCAL_MODULE := gs232a + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/gs232a/Makefile.am b/gs232a/Makefile.am index f070434fb..ff404f476 100644 --- a/gs232a/Makefile.am +++ b/gs232a/Makefile.am @@ -5,3 +5,5 @@ hamlib_gs232a_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_gs232a_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = gs232a.h + +EXTRA_DIST = Android.mk diff --git a/heathkit/Android.mk b/heathkit/Android.mk new file mode 100644 index 000000000..f17391f25 --- /dev/null +++ b/heathkit/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := hd1780.c +LOCAL_MODULE := heathkit + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/heathkit/Makefile.am b/heathkit/Makefile.am index 1fb48cc1b..c3f878a92 100644 --- a/heathkit/Makefile.am +++ b/heathkit/Makefile.am @@ -5,3 +5,5 @@ hamlib_heathkit_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_heathkit_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = hd1780.h + +EXTRA_DIST = Android.mk diff --git a/icom/Android.mk b/icom/Android.mk new file mode 100644 index 000000000..658d51cb8 --- /dev/null +++ b/icom/Android.mk @@ -0,0 +1,22 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := ic706.c icr8500.c ic735.c ic775.c ic756.c \ + ic275.c ic475.c ic1275.c ic820h.c ic821h.c \ + icr7000.c ic910.c ic9100.c ic970.c ic725.c ic737.c ic718.c \ + os535.c os456.c omni.c delta2.c ic92d.c \ + ic736.c ic738.c ic7410.c ic746.c ic703.c ic726.c ic271.c \ + ic765.c ic781.c ic471.c id1.c icr9000.c icr9500.c \ + icr10.c icr20.c icr71.c icr72.c icr75.c icrx7.c \ + ic707.c ic728.c ic751.c ic761.c \ + ic78.c ic7800.c ic7000.c ic7200.c ic7600.c ic7700.c \ + icom.c frame.c optoscan.c +LOCAL_MODULE := icom + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/icom/Makefile.am b/icom/Makefile.am index 2cac417d3..5cf9be208 100644 --- a/icom/Makefile.am +++ b/icom/Makefile.am @@ -14,6 +14,6 @@ hamlib_icom_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_icom_la_LIBADD = $(top_builddir)/lib/libmisc.la \ $(top_builddir)/src/libhamlib.la -EXTRA_DIST = README.icom TODO.icom +EXTRA_DIST = README.icom TODO.icom Android.mk noinst_HEADERS = frame.h icom.h icom_defs.h optoscan.h diff --git a/jrc/Android.mk b/jrc/Android.mk new file mode 100644 index 000000000..31d3884e4 --- /dev/null +++ b/jrc/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := nrd535.c nrd545.c nrd525.c jrc.c +LOCAL_MODULE := jrc + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/jrc/Makefile.am b/jrc/Makefile.am index d063773a3..9870db425 100644 --- a/jrc/Makefile.am +++ b/jrc/Makefile.am @@ -6,3 +6,5 @@ hamlib_jrc_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_jrc_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = jrc.h + +EXTRA_DIST = Android.mk diff --git a/kachina/Android.mk b/kachina/Android.mk new file mode 100644 index 000000000..72d9d1764 --- /dev/null +++ b/kachina/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := 505dsp.c kachina.c +LOCAL_MODULE := kachina + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/kachina/Makefile.am b/kachina/Makefile.am index 19f8e94ef..24a3202c6 100644 --- a/kachina/Makefile.am +++ b/kachina/Makefile.am @@ -6,3 +6,5 @@ hamlib_kachina_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_kachina_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = kachina.h + +EXTRA_DIST = Android.mk diff --git a/kenwood/Android.mk b/kenwood/Android.mk new file mode 100644 index 000000000..d3e5b5060 --- /dev/null +++ b/kenwood/Android.mk @@ -0,0 +1,18 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := ts850.c ts870s.c ts570.c ts450s.c ts950.c ts50s.c \ + ts790.c ts2000.c k2.c k3.c ts930.c \ + ts680.c ts690.c ts140.c ts480.c trc80.c ts590.c \ + ts440.c ts940.c ts711.c ts811.c r5000.c \ + thd7.c thf7.c thg71.c tmd700.c tmv7.c thf6a.c thd72.c tmd710.c \ + kenwood.c th.c ic10.c elecraft.c transfox.c +LOCAL_MODULE := kenwood + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/kenwood/Makefile.am b/kenwood/Makefile.am index 46d9e02ec..cf46943a3 100644 --- a/kenwood/Makefile.am +++ b/kenwood/Makefile.am @@ -9,11 +9,11 @@ THSRCLIST = thd7.c thf7.c thg71.c tmd700.c tmv7.c thf6a.c thd72.c tmd710.c pkglib_LTLIBRARIES = hamlib-kenwood.la hamlib_kenwood_la_SOURCES = $(TSSRCLIST) $(THSRCLIST) $(IC10SRCLIST) \ - kenwood.c th.c ic10.c elecraft.c transfox.c + kenwood.c th.c ic10.c elecraft.c transfox.c hamlib_kenwood_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_kenwood_la_LIBADD = $(top_builddir)/src/libhamlib.la @MATH_LIBS@ -EXTRA_DIST = README.kenwood README.k2 README.k3 +EXTRA_DIST = README.kenwood README.k2 README.k3 Android.mk noinst_HEADERS = kenwood.h th.h ic10.h elecraft.h diff --git a/kit/Android.mk b/kit/Android.mk new file mode 100644 index 000000000..9c6720772 --- /dev/null +++ b/kit/Android.mk @@ -0,0 +1,15 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := elektor304.c drt1.c dwt.c usrp.c elektor507.c \ + dds60.c miniVNA.c si570avrusb.c funcube.c fifisdr.c hiqsdr.c \ + pcrotor.c kit.c +LOCAL_MODULE := kit + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/kit/Makefile.am b/kit/Makefile.am index 669df44c6..3517113f4 100644 --- a/kit/Makefile.am +++ b/kit/Makefile.am @@ -28,4 +28,4 @@ hamlib_kit_la_LIBADD = $(top_builddir)/lib/libmisc.la \ noinst_HEADERS = kit.h usrp_impl.h si570avrusb.h funcube.h -EXTRA_DIST = README.funcubedongle +EXTRA_DIST = README.funcubedongle Android.mk diff --git a/lowe/Android.mk b/lowe/Android.mk new file mode 100644 index 000000000..64819be69 --- /dev/null +++ b/lowe/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := hf235.c lowe.c +LOCAL_MODULE := lowe + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/lowe/Makefile.am b/lowe/Makefile.am index 72b653b09..b4d277439 100644 --- a/lowe/Makefile.am +++ b/lowe/Makefile.am @@ -6,3 +6,5 @@ hamlib_lowe_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_lowe_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = lowe.h + +EXTRA_DIST = Android.mk diff --git a/m2/Android.mk b/m2/Android.mk new file mode 100644 index 000000000..9759bce89 --- /dev/null +++ b/m2/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := rc2800.c +LOCAL_MODULE := m2 + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/m2/Makefile.am b/m2/Makefile.am index 06b569fff..86cbae75b 100644 --- a/m2/Makefile.am +++ b/m2/Makefile.am @@ -5,3 +5,5 @@ hamlib_m2_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_m2_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = rc2800.h + +EXTRA_DIST = Android.mk diff --git a/pcr/Android.mk b/pcr/Android.mk new file mode 100644 index 000000000..dac5a8dbe --- /dev/null +++ b/pcr/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := pcr1000.c pcr100.c pcr1500.c pcr2500.c pcr.c +LOCAL_MODULE := pcr + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/pcr/Makefile.am b/pcr/Makefile.am index 7e0bb0331..7c2cb0bda 100644 --- a/pcr/Makefile.am +++ b/pcr/Makefile.am @@ -7,3 +7,5 @@ hamlib_pcr_la_LIBADD = $(top_builddir)/src/libhamlib.la \ $(top_builddir)/lib/libmisc.la noinst_HEADERS = pcr.h + +EXTRA_DIST = Android.mk diff --git a/prm80/Android.mk b/prm80/Android.mk new file mode 100644 index 000000000..8e0cc00a1 --- /dev/null +++ b/prm80/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := prm8060.c prm80.c +LOCAL_MODULE := prm80 + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/prm80/Makefile.am b/prm80/Makefile.am index 570adabcb..6150611c4 100644 --- a/prm80/Makefile.am +++ b/prm80/Makefile.am @@ -6,3 +6,5 @@ hamlib_prm80_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_prm80_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = prm80.h + +EXTRA_DIST = Android.mk diff --git a/racal/Android.mk b/racal/Android.mk new file mode 100644 index 000000000..7ad23e5c4 --- /dev/null +++ b/racal/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := ra6790.c ra3702.c racal.c ra37xx.c +LOCAL_MODULE := racal + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/racal/Makefile.am b/racal/Makefile.am index f3e308fe8..dc2c54242 100644 --- a/racal/Makefile.am +++ b/racal/Makefile.am @@ -7,3 +7,5 @@ hamlib_racal_la_LIBADD = $(top_builddir)/src/libhamlib.la \ $(top_builddir)/lib/libmisc.la noinst_HEADERS = racal.h ra37xx.h + +EXTRA_DIST = Android.mk diff --git a/rft/Android.mk b/rft/Android.mk new file mode 100644 index 000000000..a45c142cb --- /dev/null +++ b/rft/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := ekd500.c rft.c +LOCAL_MODULE := rft + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/rft/Makefile.am b/rft/Makefile.am index 6c7bcbb92..06c8b35b7 100644 --- a/rft/Makefile.am +++ b/rft/Makefile.am @@ -6,3 +6,5 @@ hamlib_rft_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_rft_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = rft.h + +EXTRA_DIST = Android.mk diff --git a/rotorez/Android.mk b/rotorez/Android.mk new file mode 100644 index 000000000..e8fbb966f --- /dev/null +++ b/rotorez/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := rotorez.c +LOCAL_MODULE := rotorez + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/rotorez/Makefile.am b/rotorez/Makefile.am index c9735b376..f0fa1ed2c 100644 --- a/rotorez/Makefile.am +++ b/rotorez/Makefile.am @@ -4,6 +4,6 @@ hamlib_rotorez_la_SOURCES = rotorez.c hamlib_rotorez_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_rotorez_la_LIBADD = $(top_builddir)/src/libhamlib.la -EXTRA_DIST = README.rotorez rotorez.txt +EXTRA_DIST = README.rotorez rotorez.txt Android.mk noinst_HEADERS = rotorez.h diff --git a/rs/Android.mk b/rs/Android.mk new file mode 100644 index 000000000..19c740964 --- /dev/null +++ b/rs/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := esmc.c eb200.c rs.c +LOCAL_MODULE := rs + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/rs/Makefile.am b/rs/Makefile.am index 286d0e4b7..f5718d484 100644 --- a/rs/Makefile.am +++ b/rs/Makefile.am @@ -6,3 +6,5 @@ hamlib_rs_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_rs_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = rs.h + +EXTRA_DIST = Android.mk diff --git a/sartek/Android.mk b/sartek/Android.mk new file mode 100644 index 000000000..6ce28beae --- /dev/null +++ b/sartek/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := sartek.c +LOCAL_MODULE := sartek + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/sartek/Makefile.am b/sartek/Makefile.am index 277b0149f..227e35194 100644 --- a/sartek/Makefile.am +++ b/sartek/Makefile.am @@ -5,3 +5,5 @@ hamlib_sartek_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_sartek_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = sartek.h + +EXTRA_DIST = Android.mk diff --git a/skanti/Android.mk b/skanti/Android.mk new file mode 100644 index 000000000..2c9f9fe26 --- /dev/null +++ b/skanti/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := trp8000.c trp8255.c skanti.c +LOCAL_MODULE := skanti + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/skanti/Makefile.am b/skanti/Makefile.am index 3e5ad9237..8af9f7199 100644 --- a/skanti/Makefile.am +++ b/skanti/Makefile.am @@ -6,3 +6,5 @@ hamlib_skanti_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_skanti_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = skanti.h + +EXTRA_DIST = Android.mk diff --git a/spid/Android.mk b/spid/Android.mk new file mode 100644 index 000000000..b22dbaea3 --- /dev/null +++ b/spid/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := spid.c +LOCAL_MODULE := spid + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/spid/Makefile.am b/spid/Makefile.am index e74ae160a..f67288fcc 100644 --- a/spid/Makefile.am +++ b/spid/Makefile.am @@ -4,6 +4,8 @@ hamlib_spid_la_SOURCES = spid.c hamlib_spid_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_spid_la_LIBADD = $(top_builddir)/src/libhamlib.la -EXTRA_DIST = spid.txt +EXTRA_DIST = spid.txt Android.mk noinst_HEADERS = spid.h + + diff --git a/src/Android.mk b/src/Android.mk new file mode 100644 index 000000000..d39cccee3 --- /dev/null +++ b/src/Android.mk @@ -0,0 +1,35 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + ../android/ltdl.c \ + rig.c \ + serial.c \ + misc.c \ + register.c \ + event.c \ + cal.c \ + conf.c \ + tones.c \ + rotator.c \ + locator.c \ + rot_reg.c \ + rot_conf.c \ + iofunc.c \ + ext.c \ + mem.c \ + settings.c \ + parallel.c \ + usb_port.c \ + debug.c \ + network.c \ + cm108.c + + +LOCAL_MODULE := libhamlib +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include +LOCAL_LDLIBS := -llog + +include $(BUILD_SHARED_LIBRARY) diff --git a/src/Makefile.am b/src/Makefile.am index fc95cf619..7162528af 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,3 +21,4 @@ noinst_HEADERS = event.h misc.h serial.h iofunc.h cal.h tones.h \ rot_conf.h token.h idx_builtin.h register.h par_nt.h \ parallel.h usb_port.h network.h cm108.h +EXTRA_DIST = Android.mk diff --git a/src/debug.c b/src/debug.c index 85c5e9f2b..6a4adc066 100644 --- a/src/debug.c +++ b/src/debug.c @@ -43,6 +43,10 @@ #include #include +#ifdef ANDROID +#include +#endif + #include #include "misc.h" @@ -142,6 +146,28 @@ void HAMLIB_API rig_debug(enum rig_debug_level_e debug_level, const char *fmt, . } va_end(ap); +#ifdef ANDROID + int a; + va_start(ap, fmt); + switch (debug_level){ +// case RIG_DEBUG_NONE: + case RIG_DEBUG_BUG: + a = ANDROID_LOG_FATAL; break; + case RIG_DEBUG_ERR: + a = ANDROID_LOG_ERROR; break; + case RIG_DEBUG_WARN: + a = ANDROID_LOG_WARN; break; + case RIG_DEBUG_VERBOSE: + a = ANDROID_LOG_VERBOSE; break; + case RIG_DEBUG_TRACE: + a = ANDROID_LOG_VERBOSE; break; + default: + a = ANDROID_LOG_DEBUG; break; + } + __android_log_vprint(a, PACKAGE_NAME, fmt, ap); + + va_end(ap); +#endif } /** diff --git a/tapr/Android.mk b/tapr/Android.mk new file mode 100644 index 000000000..a23aae93a --- /dev/null +++ b/tapr/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := dsp10.c tapr.c +LOCAL_MODULE := tapr + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/tapr/Makefile.am b/tapr/Makefile.am index 445c78a52..87ea1b114 100644 --- a/tapr/Makefile.am +++ b/tapr/Makefile.am @@ -6,3 +6,5 @@ hamlib_tapr_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_tapr_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = tapr.h + +EXTRA_DIST = Android.mk diff --git a/tentec/Android.mk b/tentec/Android.mk new file mode 100644 index 000000000..62e42709a --- /dev/null +++ b/tentec/Android.mk @@ -0,0 +1,15 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := rx320.c rx340.c rx350.c rx331.c \ + pegasus.c argonaut.c orion.c jupiter.c omnivii.c paragon.c \ + tentec.c tentec2.c tt550.c +LOCAL_MODULE := tentec + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/tentec/Makefile.am b/tentec/Makefile.am index a21a0bfc3..36662c05c 100644 --- a/tentec/Makefile.am +++ b/tentec/Makefile.am @@ -7,6 +7,6 @@ hamlib_tentec_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_tentec_la_LIBADD = $(top_builddir)/src/libhamlib.la \ $(top_builddir)/lib/libmisc.la -EXTRA_DIST = README +EXTRA_DIST = README Android.mk noinst_HEADERS = tentec.h tentec2.h tt550.h orion.h rx331.h diff --git a/ts7400/Android.mk b/ts7400/Android.mk new file mode 100644 index 000000000..a72e2d4a8 --- /dev/null +++ b/ts7400/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := ts7400.c +LOCAL_MODULE := ts7400 + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/ts7400/Makefile.am b/ts7400/Makefile.am index 7d190c528..0e129502c 100644 --- a/ts7400/Makefile.am +++ b/ts7400/Makefile.am @@ -1,6 +1,6 @@ EXTRA_DIST = include/ep93xx_adc.h include/io.h include/peekpoke.h \ include/readADC.h include/io.c include/peekpoke.c include/readADC.c \ - include/test7400ADC.c + include/test7400ADC.c Android.mk pkglib_LTLIBRARIES = hamlib-ts7400.la hamlib_ts7400_la_SOURCES = ts7400.c diff --git a/tuner/Android.mk b/tuner/Android.mk new file mode 100644 index 000000000..41619d41a --- /dev/null +++ b/tuner/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := v4l.c v4l2.c +LOCAL_MODULE := tuner + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/tuner/Makefile.am b/tuner/Makefile.am index 45af43422..a9dd753d0 100644 --- a/tuner/Makefile.am +++ b/tuner/Makefile.am @@ -6,3 +6,5 @@ hamlib_tuner_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_tuner_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = tuner.h videodev.h videodev2.h + +EXTRA_DIST = Android.mk diff --git a/uniden/Android.mk b/uniden/Android.mk new file mode 100644 index 000000000..fb8e8ae44 --- /dev/null +++ b/uniden/Android.mk @@ -0,0 +1,15 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := bc895.c bc898.c bc245.c pro2052.c bc780.c bc250.c \ + bcd396t.c bcd996t.c \ + uniden.c uniden_digital.c +LOCAL_MODULE := uniden + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/uniden/Makefile.am b/uniden/Makefile.am index 01ec1cd4b..18b38c5ca 100644 --- a/uniden/Makefile.am +++ b/uniden/Makefile.am @@ -7,3 +7,5 @@ hamlib_uniden_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_uniden_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = uniden.h uniden_digital.h + +EXTRA_DIST = Android.mk diff --git a/winradio/Android.mk b/winradio/Android.mk new file mode 100644 index 000000000..8f96b7510 --- /dev/null +++ b/winradio/Android.mk @@ -0,0 +1,14 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := wr1000.c wr1500.c wr1550.c wr3100.c wr3150.c wr3500.c wr3700.c \ + g303.c g313.c g305.c winradio.c +LOCAL_MODULE := winradio + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/winradio/Makefile.am b/winradio/Makefile.am index 67867a7c8..b3ce96e9c 100644 --- a/winradio/Makefile.am +++ b/winradio/Makefile.am @@ -7,6 +7,6 @@ hamlib_winradio_la_SOURCES = $(WRSRCLIST) winradio.c hamlib_winradio_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_winradio_la_LIBADD = $(top_builddir)/src/libhamlib.la -EXTRA_DIST = NOTES +EXTRA_DIST = NOTES Android.mk noinst_HEADERS = winradio.h linradio/radio_ioctl.h linradio/wrapi.h linradio/wrg313api.h diff --git a/wj/Android.mk b/wj/Android.mk new file mode 100644 index 000000000..317d4b403 --- /dev/null +++ b/wj/Android.mk @@ -0,0 +1,13 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := wj8888.c wj.c +LOCAL_MODULE := wj + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/wj/Makefile.am b/wj/Makefile.am index 872b9761a..333680d65 100644 --- a/wj/Makefile.am +++ b/wj/Makefile.am @@ -6,3 +6,5 @@ hamlib_wj_la_LDFLAGS = -no-undefined -module -avoid-version hamlib_wj_la_LIBADD = $(top_builddir)/src/libhamlib.la noinst_HEADERS = wj.h + +EXTRA_DIST = Android.mk diff --git a/yaesu/Android.mk b/yaesu/Android.mk new file mode 100644 index 000000000..6a665c30f --- /dev/null +++ b/yaesu/Android.mk @@ -0,0 +1,19 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := ft100.c ft747.c ft817.c ft847.c ft890.c ft900.c ft920.c \ + ft1000mp.c ft857.c ft897.c ft990.c frg8800.c \ + ft757gx.c ft736.c frg100.c frg9600.c ft1000d.c \ + vr5000.c ft767gx.c ft840.c ft980.c vx1700.c \ + newcat.c ft450.c ft950.c ft2000.c ft9000.c ft5000.c \ + yaesu.c + +LOCAL_MODULE := yaesu + +LOCAL_MODULE_FILENAME := libhamlib-$(LOCAL_MODULE) +LOCAL_CFLAGS := -DHAVE_CONFIG_H +LOCAL_C_INCLUDES := android include src +LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi + +include $(BUILD_SHARED_LIBRARY) diff --git a/yaesu/Makefile.am b/yaesu/Makefile.am index 608c1eb4d..80cbe748d 100644 --- a/yaesu/Makefile.am +++ b/yaesu/Makefile.am @@ -16,7 +16,7 @@ hamlib_yaesu_la_LIBADD = $(top_builddir)/lib/libmisc.la \ @MATH_LIBS@ \ $(top_builddir)/src/libhamlib.la -EXTRA_DIST = README.ft890 README.ft920 +EXTRA_DIST = README.ft890 README.ft920 Android.mk noinst_HEADERS = ft100.h ft747.h ft817.h ft847.h ft890.h ft900.h ft920.h \ ft1000mp.h ft857.h ft897.h ft990.h yaesu.h \