From a1aed54fee058fdedb7d50b96291af701a327e57 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 23 Aug 2012 22:23:33 +0300 Subject: Build basebmp as a static library for Android Reduces shared library count by one... This is tedious. Change-Id: I3bdc0a5c4ee4cabf9bbcedc469ca6e94d0103d6b --- Library_merged.mk | 5 ++- Repository.mk | 7 ++++- android/experimental/DocumentLoader/Makefile | 1 - android/experimental/LibreOffice4Android/Makefile | 1 - android/qa/desktop/Makefile | 1 - android/qa/sc/Makefile | 1 - basebmp/CppunitTest_basebmp.mk | 9 ++++++ basebmp/Module_basebmp.mk | 9 ++++++ basebmp/StaticLibrary_basebmp.mk | 37 +++++++++++++++++++++++ vcl/Library_vcl.mk | 2 +- 10 files changed, 66 insertions(+), 7 deletions(-) create mode 100644 basebmp/StaticLibrary_basebmp.mk diff --git a/Library_merged.mk b/Library_merged.mk index 1ac02e5d9c26..b7935444c249 100644 --- a/Library_merged.mk +++ b/Library_merged.mk @@ -123,8 +123,11 @@ $(eval $(call gb_Library_use_externals,merged,\ endif ifeq ($(OS),ANDROID) -$(eval $(call gb_Library_use_libraries,merged,\ +$(eval $(call gb_Library_use_static_libraries,merged,\ basebmp \ +)) + +$(eval $(call gb_Library_use_libraries,merged,\ libotouch \ )) diff --git a/Repository.mk b/Repository.mk index c8f96923b16e..df57a96ca4c2 100644 --- a/Repository.mk +++ b/Repository.mk @@ -215,7 +215,9 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \ analysis \ animcore \ basctl \ - basebmp \ + $(if $(filter $(OS),ANDROID),, \ + basebmp \ + ) \ bib \ canvastools \ communi \ @@ -628,6 +630,9 @@ $(eval $(call gb_Helper_register_libraries,EXTENSIONLIBS, \ )) $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \ + $(if $(filter $(OS),ANDROID), \ + basebmp \ + ) \ basegfx_s \ codemaker \ codemaker_cpp \ diff --git a/android/experimental/DocumentLoader/Makefile b/android/experimental/DocumentLoader/Makefile index a6a2898bdff6..063bef237de8 100644 --- a/android/experimental/DocumentLoader/Makefile +++ b/android/experimental/DocumentLoader/Makefile @@ -52,7 +52,6 @@ copy-stuff: # for F in $(strip \ analysislo \ - basebmplo \ basegfxlo \ bootstrap.uno \ comphelpgcc3 \ diff --git a/android/experimental/LibreOffice4Android/Makefile b/android/experimental/LibreOffice4Android/Makefile index 837f930b7cc2..baeabdfabf7f 100644 --- a/android/experimental/LibreOffice4Android/Makefile +++ b/android/experimental/LibreOffice4Android/Makefile @@ -21,7 +21,6 @@ copy-stuff: # for F in $(strip \ analysislo \ - basebmplo \ basegfxlo \ bootstrap.uno \ chartcontrollerlo \ diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile index 2fbd815e3ab8..734cb56bab91 100644 --- a/android/qa/desktop/Makefile +++ b/android/qa/desktop/Makefile @@ -92,7 +92,6 @@ copy-stuff: buildrcs # for F in $(strip \ analysislo \ - basebmplo \ basegfxlo \ bootstrap.uno \ comphelpgcc3 \ diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile index b77c5cfe78ca..a455939407bd 100644 --- a/android/qa/sc/Makefile +++ b/android/qa/sc/Makefile @@ -61,7 +61,6 @@ copy-stuff: # for F in $(strip \ analysislo \ - basebmplo \ basegfxlo \ bootstrap.uno \ comphelpgcc3 \ diff --git a/basebmp/CppunitTest_basebmp.mk b/basebmp/CppunitTest_basebmp.mk index cbdfef63a0c1..f11b46297e30 100644 --- a/basebmp/CppunitTest_basebmp.mk +++ b/basebmp/CppunitTest_basebmp.mk @@ -14,8 +14,17 @@ $(eval $(call gb_CppunitTest_set_include,basebmp_cpputest,\ $$(INCLUDE) \ )) +ifeq ($(OS),ANDROID) +$(eval $(call gb_CppunitTest_use_static_libraries,basebmp_cpputest,\ + basebmp \ +)) +else $(eval $(call gb_CppunitTest_use_libraries,basebmp_cpputest,\ basebmp \ +)) +endif + +$(eval $(call gb_CppunitTest_use_libraries,basebmp_cpputest,\ basegfx \ sal \ $(gb_STDLIBS) \ diff --git a/basebmp/Module_basebmp.mk b/basebmp/Module_basebmp.mk index f6080f656571..b1c45fed11fb 100644 --- a/basebmp/Module_basebmp.mk +++ b/basebmp/Module_basebmp.mk @@ -9,8 +9,17 @@ $(eval $(call gb_Module_Module,basebmp)) +ifeq ($(OS),ANDROID) +$(eval $(call gb_Module_add_targets,basebmp,\ + StaticLibrary_basebmp \ +)) +else $(eval $(call gb_Module_add_targets,basebmp,\ Library_basebmp \ +)) +endif + +$(eval $(call gb_Module_add_targets,basebmp,\ Package_inc \ )) diff --git a/basebmp/StaticLibrary_basebmp.mk b/basebmp/StaticLibrary_basebmp.mk new file mode 100644 index 000000000000..29f3d5906bb0 --- /dev/null +++ b/basebmp/StaticLibrary_basebmp.mk @@ -0,0 +1,37 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_StaticLibrary_StaticLibrary,basebmp)) + +$(eval $(call gb_StaticLibrary_use_package,basebmp,basebmp_inc)) + +$(eval $(call gb_StaticLibrary_use_sdk_api,basebmp)) + +$(eval $(call gb_StaticLibrary_use_libraries,basebmp,\ + basegfx \ + sal \ + $(gb_STDLIBS) \ +)) + +$(eval $(call gb_StaticLibrary_set_include,basebmp,\ + -I$(SRCDIR)/basebmp/inc/ \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_StaticLibrary_add_defs,basebmp,\ + -DBASEBMP_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_StaticLibrary_add_exception_objects,basebmp,\ + basebmp/source/bitmapdevice \ + basebmp/source/debug \ + basebmp/source/polypolygonrenderer \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index f8e7fa80e5e8..77ea23255ae6 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -568,7 +568,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ $(vcl_headless_code) \ )) -$(eval $(call gb_Library_use_libraries,vcl,\ +$(eval $(call gb_Library_use_static_libraries,vcl,\ basebmp \ )) -- cgit