diff options
-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. |