diff options
author | Todd Fiala <tfiala@google.com> | 2013-10-30 13:05:03 -0700 |
---|---|---|
committer | Todd Fiala <tfiala@google.com> | 2013-10-31 13:52:12 -0700 |
commit | 92d2359bcffabfcca85c64eb4908556aa69ef96a (patch) | |
tree | 2b4d770ea5f61f13523e10ab0f40677debe78bc1 | |
parent | 12e21689bc88a77c7b5b9b220fec31e049e5ec0f (diff) | |
download | libedit-92d2359bcffabfcca85c64eb4908556aa69ef96a.tar.gz |
Added Android build support for libedit prebuilts maintainerandroid-wear-5.0.0_r1android-cts-5.1_r9android-cts-5.1_r8android-cts-5.1_r7android-cts-5.1_r6android-cts-5.1_r5android-cts-5.1_r4android-cts-5.1_r3android-cts-5.1_r28android-cts-5.1_r27android-cts-5.1_r26android-cts-5.1_r25android-cts-5.1_r24android-cts-5.1_r23android-cts-5.1_r22android-cts-5.1_r21android-cts-5.1_r20android-cts-5.1_r2android-cts-5.1_r19android-cts-5.1_r18android-cts-5.1_r17android-cts-5.1_r16android-cts-5.1_r15android-cts-5.1_r14android-cts-5.1_r13android-cts-5.1_r10android-cts-5.1_r1android-cts-5.0_r9android-cts-5.0_r8android-cts-5.0_r7android-cts-5.0_r6android-cts-5.0_r5android-cts-5.0_r4android-cts-5.0_r3android-5.1.1_r9android-5.1.1_r8android-5.1.1_r7android-5.1.1_r6android-5.1.1_r5android-5.1.1_r4android-5.1.1_r38android-5.1.1_r37android-5.1.1_r36android-5.1.1_r35android-5.1.1_r34android-5.1.1_r33android-5.1.1_r30android-5.1.1_r3android-5.1.1_r29android-5.1.1_r28android-5.1.1_r26android-5.1.1_r25android-5.1.1_r24android-5.1.1_r23android-5.1.1_r22android-5.1.1_r20android-5.1.1_r2android-5.1.1_r19android-5.1.1_r18android-5.1.1_r17android-5.1.1_r16android-5.1.1_r15android-5.1.1_r14android-5.1.1_r13android-5.1.1_r12android-5.1.1_r10android-5.1.1_r1android-5.1.0_r5android-5.1.0_r4android-5.1.0_r3android-5.1.0_r1android-5.0.2_r3android-5.0.2_r1android-5.0.1_r1android-5.0.0_r7android-5.0.0_r6android-5.0.0_r5.1android-5.0.0_r5android-5.0.0_r4android-5.0.0_r3android-5.0.0_r2android-5.0.0_r1lollipop-wear-releaselollipop-releaselollipop-mr1-wfc-releaselollipop-mr1-releaselollipop-mr1-fi-releaselollipop-mr1-devlollipop-mr1-cts-releaselollipop-devlollipop-cts-release
This Android.mk support puts a thin layer around the libedit
./configure-based build. These build steps only need to be run by
somebody updating the prebuilts version of libedit located in
prebuilts/libs/libedit.
Currently this only supports building the libedit prebuilts for
linux-x86 (32-bit) on a linux host.
Tested on Ubuntu 12.04 x86_64:
cd external/libedit
mm ANDROID_BUILD_LIBEDIT=true prebuilts/libs/libedit/linux-x86/lib/libedit.a
cd ../../prebuilts/libs/libedit
find .
objdump -a linux-x86/lib/libedit.a | grep 'file format'
Note the file format for the libedit.a archive components are all
elf32-i386.
Change-Id: I04f8e2ba179749f197ade8b56bb6ae1e5196891a
-rw-r--r-- | Android.mk | 39 | ||||
-rw-r--r-- | MODULE_LICENSE_BSD | 0 | ||||
-rw-r--r-- | README.android | 12 |
3 files changed, 51 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..5792aa5 --- /dev/null +++ b/Android.mk @@ -0,0 +1,39 @@ +ifeq ($(ANDROID_BUILD_LIBEDIT),true) # only maintainer needs this +ifeq ($(HOST_OS),linux) # only build on linux hosts +ifeq ($(HOST_ARCH),x86) # only build on x86 hosts + +LOCAL_PATH := $(call my-dir) +PREBUILT_ROOT := prebuilts/libs/libedit +PREBUILT_ARCH_ROOT := $(PREBUILT_ROOT)/$(HOST_OS)-$(HOST_ARCH) + +PREBUILT_CFLAGS="CFLAGS=-m32" +PREBUILT_CXXFLAGS="CXXFLAGS=-m32" +PREBUILT_LDFLAGS="LDFLAGS=-m32" + +HOST_STATIC_LIB_EXT := .a + +# Light wrapper rules around ./configure-based build. +# Output goes to the prebuilts/libs/libedit directory. + +$(LOCAL_PATH)/lib/libedit.la: $(wildcard $(LOCAL_PATH)/src/*) $(LOCAL_PATH)/config.h + @echo making libedit for $(HOST_OS)-$(HOST_ARCH) + make -C $(LOCAL_PATH) + +$(PREBUILT_ARCH_ROOT)/lib/libedit.la: $(LOCAL_PATH)/lib/libedit.la + make -C $(LOCAL_PATH) all install + +$(LOCAL_PATH)/config.h: $(LOCAL_PATH)/config.h.in + $(hide) cd $(LOCAL_PATH) \ + && ./configure \ + --prefix=$(abspath $(PREBUILT_ROOT)) \ + --exec-prefix=$(abspath $(PREBUILT_ARCH_ROOT)) \ + --disable-shared \ + $(PREBUILT_CFLAGS) $(PREBUILT_CXXFLAGS) $(PREBUILT_LDFLAGS) \ + && make clean + +$(PREBUILT_ARCH_ROOT)/lib/libedit$(HOST_STATIC_LIB_EXT): \ + $(PREBUILT_ARCH_ROOT)/lib/libedit.la + +endif # only build on x86 hosts +endif # only build on linux hosts +endif # only maintainer needs this diff --git a/MODULE_LICENSE_BSD b/MODULE_LICENSE_BSD new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/MODULE_LICENSE_BSD diff --git a/README.android b/README.android new file mode 100644 index 0000000..323bb3a --- /dev/null +++ b/README.android @@ -0,0 +1,12 @@ +/* + * README.android describes in high-level the libedit changes that we + * cannot push upstream to the llvm.org repository: + * - Changes due to Android's build system. + * - Changes due to Android's toolchain. + */ + +* Initial downstream on 2013/10/30: Synched to libedit-20130712-3.1.tar.gz + from http://thrysoee.dk/editline/. + +* We add Android's *.mk files that are specific to Android's build system. + Currently for linux x86 (32-bit) host only. |