Skip to content

Commit

Permalink
Android build updates for monolithic build
Browse files Browse the repository at this point in the history
Android is now built as a static library.

Signed-off-by: Nate Bargmann <[email protected]>
  • Loading branch information
zia73 authored and N0NB committed Sep 19, 2013
1 parent 9210621 commit f632695
Show file tree
Hide file tree
Showing 42 changed files with 68 additions and 78 deletions.
2 changes: 2 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
TOP_PATH := $(call my-dir)

include $(TOP_PATH)/src/Android.mk

include $(TOP_PATH)/adat/Android.mk
Expand All @@ -10,6 +11,7 @@ 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)/ether6/Android.mk
include $(TOP_PATH)/flexradio/Android.mk
include $(TOP_PATH)/fodtrack/Android.mk
include $(TOP_PATH)/gs232a/Android.mk
Expand Down
3 changes: 1 addition & 2 deletions adat/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions alinco/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions amsat/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
8 changes: 7 additions & 1 deletion android/hamlib-compile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

tmp=`dirname $0`
HAMLIB=`readlink -f $tmp/..`
Expand All @@ -8,11 +9,16 @@ cd $HAMLIB

rm -f $HAMLIB/include/config.h

if [ "$1" = "clean"]; then
ndk-build NDK_PROJECT_PATH=$HAMLIB APP_BUILD_SCRIPT=$HAMLIB/Android.mk clean
exit
fi

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 hamlib
ndk-build NDK_PROJECT_PATH=$HAMLIB APP_BUILD_SCRIPT=$HAMLIB/Android.mk
3 changes: 1 addition & 2 deletions aor/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions ars/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions celestron/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions drake/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions dummy/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions easycomm/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
12 changes: 12 additions & 0 deletions ether6/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := ether6.c
LOCAL_MODULE := ether6

LOCAL_CFLAGS := -DHAVE_CONFIG_H
LOCAL_C_INCLUDES := android include src
LOCAL_LDLIBS := -lhamlib -Lobj/local/armeabi

include $(BUILD_STATIC_LIBRARY)
2 changes: 1 addition & 1 deletion ether6/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
noinst_LTLIBRARIES = libhamlib-ether6.la
libhamlib_ether6_la_SOURCES = ether6.c ether6.h

EXTRA_DIST = README.ether6 ether6.txt
EXTRA_DIST = README.ether6 ether6.txt Android.mk
3 changes: 1 addition & 2 deletions flexradio/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions fodtrack/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions gs232a/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions heathkit/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions icom/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ LOCAL_SRC_FILES := ic706.c icr8500.c ic735.c ic775.c ic756.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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions jrc/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions kachina/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions kenwood/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ LOCAL_SRC_FILES := ts850.c ts870s.c ts570.c ts450s.c ts950.c ts50s.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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions kit/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ LOCAL_SRC_FILES := elektor304.c drt1.c dwt.c usrp.c elektor507.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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions lowe/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions m2/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions pcr/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions prm80/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions racal/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions rft/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions rotorez/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions rs/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions sartek/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions skanti/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
3 changes: 1 addition & 2 deletions spid/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ 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)
include $(BUILD_STATIC_LIBRARY)
7 changes: 7 additions & 0 deletions src/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ LOCAL_SRC_FILES := \
LOCAL_MODULE := libhamlib
LOCAL_CFLAGS := -DHAVE_CONFIG_H
LOCAL_C_INCLUDES := android include
LOCAL_STATIC_LIBRARIES := adat alinco amsat aor ars celestron \
drake dummy easycomm ether6 flexradio fodtrack \
gnuradio gs232a heathkit icom jrc kachina kenwood kit \
kylix lowe m2 microtune minivna pcr prm80 racal rft \
rotorez rs sartek skanti spid tapr tentec ts7400 tuner \
uniden winradio wj yaesu

LOCAL_LDLIBS := -llog

include $(BUILD_SHARED_LIBRARY)
Loading

0 comments on commit f632695

Please sign in to comment.