summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2012-01-20 08:03:37 (GMT)
committerArun Raghavan <arun.raghavan@collabora.co.uk>2012-01-20 08:03:37 (GMT)
commit8f88fa544d87f32a0bb10286c0800aa89424e7e6 (patch)
tree590f76d98e1f2ad5b4025b4f7fdb72bc73bc89f8
parentc2a8c13d64caf385f29dbde884d526be03a75243 (diff)
downloadsalsa-lib-8f88fa544d87f32a0bb10286c0800aa89424e7e6.tar.gz
salsa-lib-8f88fa544d87f32a0bb10286c0800aa89424e7e6.tar.xz
Add an Android-friendly build systemHEADmaster
-rw-r--r--Android.mk56
-rw-r--r--src/Makefile.am13
2 files changed, 69 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..4799fcd
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,56 @@
+# This file is the top android makefile for all sub-modules.
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+salsa_lib_TOP := $(LOCAL_PATH)
+
+SALSA_LIB_BUILT_SOURCES := src/Android.mk
+
+SALSA_LIB_BUILT_SOURCES := $(patsubst %, $(abspath $(salsa_lib_TOP))/%, $(SALSA_LIB_BUILT_SOURCES))
+
+.PHONY: salsa-lib-configure salsa-lib-configure-real
+salsa-lib-configure-real:
+ echo $(SALSA_LIB_BUILT_SOURCES)
+ cd $(salsa_lib_TOP) ; \
+ CC="$(CONFIGURE_CC)" \
+ CFLAGS="$(CONFIGURE_CFLAGS)" \
+ CXX="$(CONFIGURE_CXX)" \
+ CXXFLAGS="$(CONFIGURE_CXXFLAGS)" \
+ LD=$(TARGET_LD) \
+ LDFLAGS="$(CONFIGURE_LDFLAGS)" \
+ CPP=$(CONFIGURE_CPP) \
+ CPPFLAGS="$(CONFIGURE_CPPFLAGS)" \
+ CXXCPP="$(CONFIGURE_CXXCPP)" \
+ CXXCPPFLAGS="$(CONFIGURE_CXXCPPFLAGS)" \
+ PKG_CONFIG_LIBDIR=$(CONFIGURE_PKG_CONFIG_LIBDIR) \
+ PKG_CONFIG_TOP_BUILD_DIR=/ \
+ GITCOMPILE_NO_MAKE=1 $(abspath $(salsa_lib_TOP))/gitcompile --host=$(CONFIGURE_HOST) \
+ --prefix=/system \
+ --enable-shared --disable-static \
+ --enable-pcm \
+ --enable-mixer \
+ --disable-rawmidi \
+ --disable-hwdep \
+ --enable-timer \
+ --disable-conf \
+ --disable-seq \
+ --enable-tlv \
+ --disable-async \
+ --disable-libasound \
+ --enable-deprecated \
+ --disable-output-buffer \
+ --disable-symbolic-functions \
+ --enable-float \
+ --disable-4bit \
+ && \
+ for file in $(SALSA_LIB_BUILT_SOURCES); do \
+ rm -f $$file && \
+ make -C $$(dirname $$file) $$(basename $$file) ; \
+ done
+
+salsa-lib-configure: salsa-lib-configure-real
+
+PA_CONFIGURE_TARGETS += salsa-lib-configure
+
+-include $(salsa_lib_TOP)/src/Android.mk
diff --git a/src/Makefile.am b/src/Makefile.am
index d5d04e5..680cdad 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -103,3 +103,16 @@ libasound_la_LDFLAGS = -version-info 2:0:0 $(VSYMS) $(SYMFUNCS)
libasound_la_LIBADD = @SALSA_DEPLIBS@
endif
+
+Android.mk: Makefile.am
+ androgenizer -:PROJECT salsa-lib \
+ -:SHARED libsalsa \
+ -:TAGS eng debug \
+ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+ -:SOURCES $(libsalsa_la_SOURCES) $(nodist_libsalsa_la_SOURCES) \
+ -:CFLAGS $(DEFS) $(ANDROID_CFLAGS) $(libsalsa_la_CFLAGS) \
+ -:LDFLAGS $(libsalsa_la_LDFLAGS) $(libsalsa_la_LIBADD) \
+ -:HEADER_TARGET alsa \
+ -:HEADERS $(alsainclude_HEADERS) \
+ -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
+ > $@