summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-04-16 15:50:35 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-04-16 15:50:35 +0200
commitbd7533cc013fb0d5cbd1c649e5a7500597584baa (patch)
treeb763c3f288d1071fbd6fa9b5a97c606a4e43da6b
parentf2bd453dc618144b066678cb70d68b57c2cda96c (diff)
introduce toolshelpers static lib to avoid duplicate linking errors
-rw-r--r--tools/Executable_mkunroll.mk10
-rw-r--r--tools/Executable_rscdep.mk8
-rw-r--r--[-rwxr-xr-x]tools/StaticLibrary_ooopathutils.mk0
-rw-r--r--tools/StaticLibrary_toolshelpers.mk62
4 files changed, 70 insertions, 10 deletions
diff --git a/tools/Executable_mkunroll.mk b/tools/Executable_mkunroll.mk
index 16cc39fd991d..fb3662c1740a 100644
--- a/tools/Executable_mkunroll.mk
+++ b/tools/Executable_mkunroll.mk
@@ -46,14 +46,12 @@ $(eval $(call gb_Executable_add_linked_libs,mkunroll,\
$(gb_STDLIBS) \
))
-# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 - seems to be superficial
-
$(eval $(call gb_Executable_add_exception_objects,mkunroll,\
tools/bootstrp/addexes2/mkfilt \
- tools/bootstrp/appdef \
- tools/bootstrp/cppdep \
- tools/bootstrp/inimgr \
- tools/bootstrp/prj \
+))
+
+$(eval $(call gb_Executable_add_linked_static_libs,rscdep,\
+ toolshelpers \
))
# vim: set noet sw=4 ts=4:
diff --git a/tools/Executable_rscdep.mk b/tools/Executable_rscdep.mk
index f12a09296783..87c4b3776033 100644
--- a/tools/Executable_rscdep.mk
+++ b/tools/Executable_rscdep.mk
@@ -46,13 +46,13 @@ $(eval $(call gb_Executable_add_linked_libs,rscdep,\
))
$(eval $(call gb_Executable_add_exception_objects,rscdep,\
- tools/bootstrp/appdef \
- tools/bootstrp/cppdep \
- tools/bootstrp/inimgr \
- tools/bootstrp/prj \
tools/bootstrp/rscdep \
))
+$(eval $(call gb_Executable_add_linked_static_libs,rscdep,\
+ toolshelpers \
+))
+
ifeq ($(OS),WNT)
ifeq ($(HAVE_GETOPT),YES)
$(eval $(call gb_Executable_set_cxxflags,rscdep,\
diff --git a/tools/StaticLibrary_ooopathutils.mk b/tools/StaticLibrary_ooopathutils.mk
index e58becb175d3..e58becb175d3 100755..100644
--- a/tools/StaticLibrary_ooopathutils.mk
+++ b/tools/StaticLibrary_ooopathutils.mk
diff --git a/tools/StaticLibrary_toolshelpers.mk b/tools/StaticLibrary_toolshelpers.mk
new file mode 100644
index 000000000000..b7c479677854
--- /dev/null
+++ b/tools/StaticLibrary_toolshelpers.mk
@@ -0,0 +1,62 @@
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# Bjoern Michaelsen, Canonical Ltd. <bjoern.michaelsen@canonical.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,toolshelpers))
+
+$(eval $(call gb_StaticLibrary_set_include,toolshelpers,\
+ $$(INCLUDE) \
+ -I$(realpath $(SRCDIR)/tools/inc) \
+ -I$(realpath $(SRCDIR)/tools/inc/pch) \
+ -I$(realpath $(SRCDIR)/tools/bootstrp) \
+))
+
+$(eval $(call gb_StaticLibrary_set_cxxflags,toolshelpers,\
+ $$(CXXFLAGS) \
+ -D_TOOLS_STRINGLIST \
+))
+
+$(eval $(call gb_StaticLibrary_add_exception_objects,toolshelpers,\
+ tools/bootstrp/appdef \
+ tools/bootstrp/cppdep \
+ tools/bootstrp/inimgr \
+ tools/bootstrp/prj \
+))
+
+ifeq ($(OS),WNT)
+ifeq ($(HAVE_GETOPT),YES)
+$(eval $(call gb_StaticLibrary_set_cxxflags,toolshelpers,\
+ $$(CXXFLAGS) \
+ -DHAVE_GETOPT \
+))
+else
+$(eval $(call gb_StaticLibrary_add_linked_libs,toolshelpers,\
+ gnu_getopt \
+))
+endif
+endif
+
+# vim: set noet sw=4 ts=4: