[Libreoffice-commits] .: 8 commits - solenv/gbuild
Norbert Thiebaud
nthiebaud at kemper.freedesktop.org
Tue Nov 8 20:18:04 PST 2011
solenv/gbuild/AllLangResTarget.mk | 5
solenv/gbuild/Configuration.mk | 3
solenv/gbuild/SdiTarget.mk | 1
solenv/gbuild/UnoApiTarget.mk | 11 ++
solenv/gbuild/platform/android.mk | 21 ----
solenv/gbuild/platform/com_GCC_class.mk | 72 ++++++++++++++
solenv/gbuild/platform/com_GCC_defs.mk | 130 +++++++++++++++++++++++++
solenv/gbuild/platform/ios.mk | 145 ++--------------------------
solenv/gbuild/platform/macosx.mk | 163 +++-----------------------------
solenv/gbuild/platform/solaris.mk | 24 ----
solenv/gbuild/platform/unxgcc.mk | 155 +-----------------------------
solenv/gbuild/platform/windows.mk | 17 ---
solenv/gbuild/platform/winmingw.mk | 152 ++---------------------------
13 files changed, 276 insertions(+), 623 deletions(-)
New commits:
commit 9a71582047d7762255b280d5730aebbaabf9d115
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Nov 8 20:04:14 2011 -0600
clean-up after conflicting branch rebase
diff --git a/solenv/gbuild/SdiTarget.mk b/solenv/gbuild/SdiTarget.mk
index 9eb0db7..195e068 100644
--- a/solenv/gbuild/SdiTarget.mk
+++ b/solenv/gbuild/SdiTarget.mk
@@ -31,7 +31,6 @@
# (This can be workarounded by using gb_Package, but really should not.)
# SdiTarget class
-gb_SdiTarget_SVIDLPRECOMMAND := $(gb_Helper_set_ld_path)
gb_SdiTarget_SVIDLTARGET := $(call gb_Executable_get_target_for_build,svidl)
gb_SdiTarget_SVIDLCOMMAND := \
$(gb_Helper_set_ld_path) $(gb_SdiTarget_SVIDLTARGET)
commit 1d60e2032af3b9d4c39f595737e4111da27c1aaa
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Nov 8 14:37:24 2011 -0600
factorize RSCTARGET,RSCOMMANd out of platform, and __command_dep in com_GCC
diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk
index ba714df..78bfbf8 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -72,10 +72,11 @@ $(call gb_SrsPartMergeTarget_get_target,%) : $(SRCDIR)/% $(gb_Helper_MISCDUMMY)
# SrsPartTarget class
# defined by platform
-# gb_SrsPartTarget_RSCTARGET
-# gb_SrsPartTarget_RSCCOMMAND
# gb_SrsPartTarget__command_dep
+gb_SrsPartTarget_RSCTARGET := $(OUTDIR_FOR_BUILD)/bin/rsc$(gb_Executable_EXT_for_build)
+gb_SrsPartTarget_RSCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_SrsPartTarget_RSCTARGET)
+
define gb_SrsPartTarget__command
$(call gb_Helper_abbreviate_dirs_native,\
mkdir -p $(dir $(1)) && \
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 2a52626..61afbc1 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -59,3 +59,14 @@ $(call gb_Helper_abbreviate_dirs,\
$(INCLUDE_STL) $(INCLUDE))
endef
+define gb_SrsPartTarget__command_dep
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(call gb_SrsPartTarget_get_dep_target,$(1))) && \
+ $(gb_GCCP) \
+ -MM -MT $(call gb_SrsPartTarget_get_target,$(1)) \
+ $(INCLUDE) \
+ $(DEFS) \
+ -c -x c++-header $(2) \
+ -o $(call gb_SrsPartTarget_get_dep_target,$(1)))
+endef
+
diff --git a/solenv/gbuild/platform/ios.mk b/solenv/gbuild/platform/ios.mk
index 073633c..8f013fb 100644
--- a/solenv/gbuild/platform/ios.mk
+++ b/solenv/gbuild/platform/ios.mk
@@ -305,23 +305,6 @@ $(call gb_JunitTest_get_target,$(1)) : DEFS := \
endef
-# SrsPartTarget class
-
-gb_SrsPartTarget_RSCTARGET := $(OUTDIR_FOR_BUILD)/bin/rsc
-gb_SrsPartTarget_RSCCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_SrsPartTarget_RSCTARGET)
-
-define gb_SrsPartTarget__command_dep
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(call gb_SrsPartTarget_get_dep_target,$(1))) && \
- $(gb_GCCP) \
- -MM -MT $(call gb_SrsPartTarget_get_target,$(1)) \
- $(INCLUDE) \
- $(DEFS) \
- -c -x c++-header $(2) \
- -o $(call gb_SrsPartTarget_get_dep_target,$(1)))
-endef
-
-
# Python
gb_PYTHON_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 90a0432..49ac78b 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -398,23 +398,6 @@ $(call gb_JunitTest_get_target,$(1)) : DEFS := \
endef
-# SrsPartTarget class
-
-gb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc
-gb_SrsPartTarget_RSCCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
-
-define gb_SrsPartTarget__command_dep
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(call gb_SrsPartTarget_get_dep_target,$(1))) && \
- $(gb_GCCP) \
- -MM -MT $(call gb_SrsPartTarget_get_target,$(1)) \
- $(INCLUDE) \
- $(DEFS) \
- -c -x c++-header $(2) \
- -o $(call gb_SrsPartTarget_get_dep_target,$(1)))
-endef
-
-
# Python
gb_PYTHON_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index f13dd7e..711216a 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -364,11 +364,6 @@ $(call gb_JunitTest_get_target,$(1)) : DEFS := \
endef
-# SrsPartTarget class
-
-gb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc
-gb_SrsPartTarget_RSCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
-
# Sun cc/CC support -xM1/-xMF flags, but unfortunately refuse input files that
# do not have the right suffix, so use makedepend here...
define gb_SrsPartTarget__command_dep
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 944f129..ba984ff 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -385,23 +385,6 @@ $(call gb_JunitTest_get_target,$(1)) : DEFS := \
endef
-# SrsPartTarget class
-
-gb_SrsPartTarget_RSCTARGET := $(OUTDIR_FOR_BUILD)/bin/rsc
-gb_SrsPartTarget_RSCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(OUTDIR_FOR_BUILD)/bin/rsc
-
-define gb_SrsPartTarget__command_dep
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(call gb_SrsPartTarget_get_dep_target,$(1))) && \
- $(gb_GCCP) \
- -MM -MT $(call gb_SrsPartTarget_get_target,$(1)) \
- $(INCLUDE) \
- $(DEFS) \
- -c -x c++-header $(2) \
- -o $(call gb_SrsPartTarget_get_dep_target,$(1)))
-endef
-
-
# Python
gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index a4010f9..5638d63 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -689,9 +689,6 @@ endef
# SrsPartTarget class
-gb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe
-gb_SrsPartTarget_RSCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
-
ifeq ($(gb_FULLDEPS),$(true))
define gb_SrsPartTarget__command_dep
$(call gb_Helper_abbreviate_dirs_native,\
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index 1f02d5e..6906f82 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -508,31 +508,6 @@ $(call gb_LinkTarget_set_auxtargets,$(2),\
endef
-# SrsPartTarget class
-
-gb_SrsPartTarget_RSCTARGET := $(OUTDIR_FOR_BUILD)/bin/rsc
-gb_SrsPartTarget_RSCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_SrsPartTarget_RSCTARGET)
-
-ifeq ($(gb_FULLDEPS),$(true))
-define gb_SrsPartTarget__command_dep
-$(call gb_Helper_abbreviate_dirs,\
- $(OUTDIR_FOR_BUILD)/bin/makedepend \
- $(INCLUDE) \
- $(DEFS) \
- $(2) \
- -f - \
- | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
- -v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \
- -v OUTDIR=$(OUTDIR)/ \
- -v WORKDIR=$(WORKDIR)/ \
- -v SRCDIR=$(SRCDIR)/ \
- -v REPODIR=$(REPODIR)/ \
- > $(call gb_SrsPartTarget_get_dep_target,$(1)))
-endef
-else
-gb_SrsPartTarget__command_dep =
-endif
-
# WinResTarget class
gb_WinResTarget_POSTFIX :=.res
commit 63178f64b4967182fa8682203a5d89e18c341d93
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Nov 8 14:35:03 2011 -0600
factorize gb_SrsParMergeTarget_TRANSECPRECOMMAND our of platform/*
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 52425e2..a4010f9 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -687,7 +687,6 @@ $(call gb_JunitTest_get_target,$(1)) : DEFS := \
endef
-
# SrsPartTarget class
gb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc.exe
commit 391993ef60ae0c0aa25f90aedbf03ffdd0ea0efb
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Nov 8 14:32:26 2011 -0600
factorize gb_SdiTarget_SVIDLPRECOMMAND out of platform/*
diff --git a/solenv/gbuild/SdiTarget.mk b/solenv/gbuild/SdiTarget.mk
index 8ef4fe2..9eb0db7 100644
--- a/solenv/gbuild/SdiTarget.mk
+++ b/solenv/gbuild/SdiTarget.mk
@@ -31,7 +31,7 @@
# (This can be workarounded by using gb_Package, but really should not.)
# SdiTarget class
-
+gb_SdiTarget_SVIDLPRECOMMAND := $(gb_Helper_set_ld_path)
gb_SdiTarget_SVIDLTARGET := $(call gb_Executable_get_target_for_build,svidl)
gb_SdiTarget_SVIDLCOMMAND := \
$(gb_Helper_set_ld_path) $(gb_SdiTarget_SVIDLTARGET)
commit 0442869febf100c1c36d6a3a7368e4d1642f97b5
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Nov 8 14:29:28 2011 -0600
factorize gb_XSLTPROCPRECOMMAND out of platform/*
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 602e41f..f13dd7e 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -387,8 +387,6 @@ $(call gb_Helper_abbreviate_dirs_native,\
> $(call gb_SrsPartTarget_get_dep_target,$(1)))
endef
-# UnoApiTarget
-
# Python
gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index 5f3a7ae..1f02d5e 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -573,8 +573,6 @@ else
gb_WinResTarget__command_dep =
endif
-# UnoApiTarget
-
# Python
gb_PYTHON_PRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" PYTHONHOME="$(OUTDIR)/lib/python" PYTHONPATH="$(OUTDIR)/lib/python;$(OUTDIR)/lib/python/lib-dynload"
commit cc806434e7004a51be775fd482e70bd0f5db3431
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Tue Nov 8 14:26:30 2011 -0600
gb_CFGEXPRECOMMAND is not necessary and can be factorized out of platform/*
diff --git a/solenv/gbuild/Configuration.mk b/solenv/gbuild/Configuration.mk
index c08719d..b0134c0 100644
--- a/solenv/gbuild/Configuration.mk
+++ b/solenv/gbuild/Configuration.mk
@@ -222,8 +222,7 @@ $(call gb_XcuLangpackTarget_get_outdir_target,%) :
# XcuMergeTarget class
gb_XcuMergeTarget_CFGEXTARGET := $(call gb_Executable_get_target,cfgex)
-gb_XcuMergeTarget_CFGEXCOMMAND := \
- $(gb_Helper_set_ld_path) $(gb_XcuMergeTarget_CFGEXTARGET)
+gb_XcuMergeTarget_CFGEXCOMMAND := $(gb_Helper_set_ld_path) $(gb_XcuMergeTarget_CFGEXTARGET)
gb_XcuMergeTarget_SDFLOCATION := $(SRCDIR)/translations/$(INPATH)/misc/sdf/
# PRJNAME is computed from the stem (parameter $(2))
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 7673320..602e41f 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -389,7 +389,6 @@ endef
# UnoApiTarget
-
# Python
gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 89ff9dc..52425e2 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -753,7 +753,6 @@ else
gb_WinResTarget__command_dep =
endif
-
# Python
gb_PYTHON_PRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" PYTHONHOME="$(OUTDIR)/lib/python" PYTHONPATH="$(OUTDIR)/lib/python;$(OUTDIR)/lib/python/lib-dynload"
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index b467a2a..5f3a7ae 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -575,7 +575,6 @@ endif
# UnoApiTarget
-
# Python
gb_PYTHON_PRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" PYTHONHOME="$(OUTDIR)/lib/python" PYTHONPATH="$(OUTDIR)/lib/python;$(OUTDIR)/lib/python/lib-dynload"
commit dc15b67b1d4b71209d404773cdf2a7f23d8d79a2
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Mon Nov 7 22:23:54 2011 -0600
UnoApiTarget_* really do not need to be per platform
setting and using gb_Helper_set_ld_path and gb_Executable_EXT_for_build
is enough to factorize these out of platform/*
diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index de2dc74..d90090b 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -26,6 +26,17 @@
#
#*************************************************************************
+gb_UnoApiTarget_IDLCTARGET := $(OUTDIR_FOR_BUILD)/bin/idlc$(gb_Executable_EXT_for_build)
+gb_UnoApiTarget_IDLCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_IDLCTARGET)
+gb_UnoApiTarget_REGMERGETARGET := $(OUTDIR_FOR_BUILD)/bin/regmerge$(gb_Executable_EXT_for_build)
+gb_UnoApiTarget_REGMERGECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGMERGETARGET)
+gb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR_FOR_BUILD)/bin/regcompare$(gb_Executable_EXT_for_build)
+gb_UnoApiTarget_REGCOMPARECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
+gb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR_FOR_BUILD)/bin/cppumaker$(gb_Executable_EXT_for_build)
+gb_UnoApiTarget_CPPUMAKERCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
+gb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR_FOR_BUILD)/bin/regview$(gb_Executable_EXT_for_build)
+gb_UnoApiTarget_REGVIEWCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
+
define gb_UnoApiTarget_autopackage_inc
$$(eval $$(call gb_Package_Package,$(1)_inc,$$(patsubst %/empty,%,$$(call gb_UnoApiTarget_get_header_target,empty))))
$(foreach onefile,$(gb_UnoApiTarget_HPPFILES_$(1)), \
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index ccd76bf..2a52626 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -59,14 +59,3 @@ $(call gb_Helper_abbreviate_dirs,\
$(INCLUDE_STL) $(INCLUDE))
endef
-gb_UnoApiTarget_IDLCTARGET := $(OUTDIR_FOR_BUILD)/bin/idlc
-gb_UnoApiTarget_IDLCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_IDLCTARGET)
-gb_UnoApiTarget_REGMERGETARGET := $(OUTDIR_FOR_BUILD)/bin/regmerge
-gb_UnoApiTarget_REGMERGECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGMERGETARGET)
-gb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR_FOR_BUILD)/bin/regcompare
-gb_UnoApiTarget_REGCOMPARECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
-gb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR_FOR_BUILD)/bin/cppumaker
-gb_UnoApiTarget_CPPUMAKERCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
-gb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR_FOR_BUILD)/bin/regview
-gb_UnoApiTarget_REGVIEWCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
-
diff --git a/solenv/gbuild/platform/ios.mk b/solenv/gbuild/platform/ios.mk
index b10a391..073633c 100644
--- a/solenv/gbuild/platform/ios.mk
+++ b/solenv/gbuild/platform/ios.mk
@@ -321,18 +321,6 @@ $(call gb_Helper_abbreviate_dirs,\
-o $(call gb_SrsPartTarget_get_dep_target,$(1)))
endef
-# UnoApiTarget
-
-gb_UnoApiTarget_IDLCTARGET := $(OUTDIR_FOR_BUILD)/bin/idlc
-gb_UnoApiTarget_IDLCCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_IDLCTARGET)
-gb_UnoApiTarget_REGMERGETARGET := $(OUTDIR_FOR_BUILD)/bin/regmerge
-gb_UnoApiTarget_REGMERGECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGMERGETARGET)
-gb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR_FOR_BUILD)/bin/regcompare
-gb_UnoApiTarget_REGCOMPARECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
-gb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR_FOR_BUILD)/bin/cppumaker
-gb_UnoApiTarget_CPPUMAKERCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
-gb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR_FOR_BUILD)/bin/regview
-gb_UnoApiTarget_REGVIEWCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
# Python
gb_PYTHON_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 45fb9a7..90a0432 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -414,18 +414,6 @@ $(call gb_Helper_abbreviate_dirs,\
-o $(call gb_SrsPartTarget_get_dep_target,$(1)))
endef
-# UnoApiTarget
-
-gb_UnoApiTarget_IDLCTARGET := $(OUTDIR)/bin/idlc
-gb_UnoApiTarget_IDLCCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_IDLCTARGET)
-gb_UnoApiTarget_REGMERGETARGET := $(OUTDIR)/bin/regmerge
-gb_UnoApiTarget_REGMERGECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGMERGETARGET)
-gb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR)/bin/regcompare
-gb_UnoApiTarget_REGCOMPARECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
-gb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR)/bin/cppumaker
-gb_UnoApiTarget_CPPUMAKERCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
-gb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR)/bin/regview
-gb_UnoApiTarget_REGVIEWCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
# Python
gb_PYTHON_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 8d0dcd2..7673320 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -135,6 +135,8 @@ gb_COMPILERNOOPTFLAGS :=
gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
+gb_Helper_set_ld_path := LD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib
+
# convert parameters filesystem root to native notation
# does some real work only on windows, make sure not to
# break the dummy implementations on unx*
@@ -340,7 +342,7 @@ endef
# CppunitTest class
-gb_CppunitTest_CPPTESTPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib
+gb_CppunitTest_CPPTESTPRECOMMAND := $(gb_Helper_set_ld_path)
gb_CppunitTest_SYSPRE := libtest_
gb_CppunitTest_EXT := .so
gb_CppunitTest_LIBDIR := $(gb_Helper_OUTDIRLIBDIR)
@@ -365,7 +367,7 @@ endef
# SrsPartTarget class
gb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc
-gb_SrsPartTarget_RSCCOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
+gb_SrsPartTarget_RSCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
# Sun cc/CC support -xM1/-xMF flags, but unfortunately refuse input files that
# do not have the right suffix, so use makedepend here...
@@ -387,18 +389,8 @@ endef
# UnoApiTarget
-gb_UnoApiTarget_IDLCTARGET := $(OUTDIR)/bin/idlc
-gb_UnoApiTarget_IDLCCOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_IDLCTARGET)
-gb_UnoApiTarget_REGMERGETARGET := $(OUTDIR)/bin/regmerge
-gb_UnoApiTarget_REGMERGECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGMERGETARGET)
-gb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR)/bin/regcompare
-gb_UnoApiTarget_REGCOMPARECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
-gb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR)/bin/cppumaker
-gb_UnoApiTarget_CPPUMAKERCOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
-gb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR)/bin/regview
-gb_UnoApiTarget_REGVIEWCOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
# Python
-gb_PYTHON_PRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload
+gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload
# vim: set noet sw=4:
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index bc3f61a..944f129 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -29,6 +29,8 @@
GUI := UNX
COM := GCC
+gb_Executable_EXT:=
+
include $(GBUILDDIR)/platform/com_GCC_defs.mk
gb_MKTEMP := mktemp -t gbuild.XXXXXX
@@ -399,18 +401,6 @@ $(call gb_Helper_abbreviate_dirs,\
-o $(call gb_SrsPartTarget_get_dep_target,$(1)))
endef
-# UnoApiTarget
-
-gb_UnoApiTarget_IDLCTARGET := $(OUTDIR)/bin/idlc
-gb_UnoApiTarget_IDLCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_IDLCTARGET)
-gb_UnoApiTarget_REGMERGETARGET := $(OUTDIR)/bin/regmerge
-gb_UnoApiTarget_REGMERGECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGMERGETARGET)
-gb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR)/bin/regcompare
-gb_UnoApiTarget_REGCOMPARECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
-gb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR)/bin/cppumaker
-gb_UnoApiTarget_CPPUMAKERCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
-gb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR)/bin/regview
-gb_UnoApiTarget_REGVIEWCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
# Python
gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index c7e825b..89ff9dc 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -753,18 +753,6 @@ else
gb_WinResTarget__command_dep =
endif
-# UnoApiTarget
-
-gb_UnoApiTarget_IDLCTARGET := $(OUTDIR)/bin/idlc.exe
-gb_UnoApiTarget_IDLCCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_IDLCTARGET)
-gb_UnoApiTarget_REGMERGETARGET := $(OUTDIR)/bin/regmerge.exe
-gb_UnoApiTarget_REGMERGECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGMERGETARGET)
-gb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR)/bin/regcompare.exe
-gb_UnoApiTarget_REGCOMPARECOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
-gb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR)/bin/cppumaker.exe
-gb_UnoApiTarget_CPPUMAKERCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
-gb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR)/bin/regview.exe
-gb_UnoApiTarget_REGVIEWCOMMAND := SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
# Python
gb_PYTHON_PRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" PYTHONHOME="$(OUTDIR)/lib/python" PYTHONPATH="$(OUTDIR)/lib/python;$(OUTDIR)/lib/python/lib-dynload"
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index c25ef6f..b467a2a 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -575,16 +575,6 @@ endif
# UnoApiTarget
-gb_UnoApiTarget_IDLCTARGET := $(OUTDIR_FOR_BUILD)/bin/idlc
-gb_UnoApiTarget_IDLCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_IDLCTARGET)
-gb_UnoApiTarget_REGMERGETARGET := $(OUTDIR_FOR_BUILD)/bin/regmerge
-gb_UnoApiTarget_REGMERGECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGMERGETARGET)
-gb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR_FOR_BUILD)/bin/regcompare
-gb_UnoApiTarget_REGCOMPARECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
-gb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR_FOR_BUILD)/bin/cppumaker
-gb_UnoApiTarget_CPPUMAKERCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
-gb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR_FOR_BUILD)/bin/regview
-gb_UnoApiTarget_REGVIEWCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
# Python
gb_PYTHON_PRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" PYTHONHOME="$(OUTDIR)/lib/python" PYTHONPATH="$(OUTDIR)/lib/python;$(OUTDIR)/lib/python/lib-dynload"
commit 70270b53e764bf814ebb0c771db6280b951ee6b2
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Sat Nov 5 06:55:15 2011 -0500
begin factorization of common GCC stuff
a lot of configuration/definition is shared between platforms that build
using gcc.
This start to regroup things that are common into 2 files
com_GCC_defs.mk and com_GCC_class.mk
this can be expanded to be, more generically com_$(COM)_defs/class
The reson for 2 files is that some step need to modfify common definitions
based on the platform and some common definitions need platform defined
value.
with these 2 files we can do a
platform - compiler - platform - compiler - platfrom
sandwich that should cover every scenario.
diff --git a/solenv/gbuild/platform/android.mk b/solenv/gbuild/platform/android.mk
index 03f85ec..92ad366 100644
--- a/solenv/gbuild/platform/android.mk
+++ b/solenv/gbuild/platform/android.mk
@@ -39,25 +39,4 @@ include $(GBUILDDIR)/platform/unxgcc.mk
# No unit testing can be run
gb_CppunitTest_CPPTESTPRECOMMAND := :
-# Set the proper enirotment variable so that our BUILD platform
-# build-time shared libraries are found.
-ifeq ($(OS_FOR_BUILD),MACOSX)
-gb_Helper_set_ld_path := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib
-else
-gb_Helper_set_ld_path := LD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib
-endif
-
-# UnoApiTarget
-
-gb_UnoApiTarget_IDLCTARGET := $(OUTDIR_FOR_BUILD)/bin/idlc
-gb_UnoApiTarget_IDLCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_IDLCTARGET)
-gb_UnoApiTarget_REGMERGETARGET := $(OUTDIR_FOR_BUILD)/bin/regmerge
-gb_UnoApiTarget_REGMERGECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGMERGETARGET)
-gb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR_FOR_BUILD)/bin/regcompare
-gb_UnoApiTarget_REGCOMPARECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
-gb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR_FOR_BUILD)/bin/cppumaker
-gb_UnoApiTarget_CPPUMAKERCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
-gb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR_FOR_BUILD)/bin/regview
-gb_UnoApiTarget_REGVIEWCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
-
# vim: set noet sw=4:
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
new file mode 100644
index 0000000..ccd76bf
--- /dev/null
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -0,0 +1,72 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# 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. 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
+# Norbert Thiebaud <nthiebaud at gmail.com> (C) 2010, All Rights Reserved.
+#
+# 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.
+
+
+# CObject class
+
+# $(call gb_CObject__command,object,relative-source,source,dep-file)
+define gb_CObject__command
+$(call gb_Output_announce,$(2),$(true),C ,3)
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(1)) $(dir $(4)) && \
+ $(gb_CC) \
+ $(DEFS) \
+ $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
+ $(T_CFLAGS) \
+ -c $(3) \
+ -o $(1) \
+ -MMD -MT $(1) \
+ -MP -MF $(4) \
+ -I$(dir $(3)) \
+ $(INCLUDE))
+endef
+
+# CxxObject class
+
+# $(call gb_CxxObject__command,object,relative-source,source,dep-file)
+define gb_CxxObject__command
+$(call gb_Output_announce,$(2),$(true),CXX,3)
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(1)) $(dir $(4)) && \
+ $(gb_CXX) \
+ $(DEFS) \
+ $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
+ $(T_CXXFLAGS) \
+ -c $(3) \
+ -o $(1) \
+ -MMD -MT $(1) \
+ -MP -MF $(4) \
+ -I$(dir $(3)) \
+ $(INCLUDE_STL) $(INCLUDE))
+endef
+
+gb_UnoApiTarget_IDLCTARGET := $(OUTDIR_FOR_BUILD)/bin/idlc
+gb_UnoApiTarget_IDLCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_IDLCTARGET)
+gb_UnoApiTarget_REGMERGETARGET := $(OUTDIR_FOR_BUILD)/bin/regmerge
+gb_UnoApiTarget_REGMERGECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGMERGETARGET)
+gb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR_FOR_BUILD)/bin/regcompare
+gb_UnoApiTarget_REGCOMPARECOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGCOMPARETARGET)
+gb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR_FOR_BUILD)/bin/cppumaker
+gb_UnoApiTarget_CPPUMAKERCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET)
+gb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR_FOR_BUILD)/bin/regview
+gb_UnoApiTarget_REGVIEWCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiTarget_REGVIEWTARGET)
+
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
new file mode 100644
index 0000000..c73219e
--- /dev/null
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -0,0 +1,130 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# 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. 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
+# Norbert Thiebaud <nthiebaud at gmail.com> (C) 2010, All Rights Reserved.
+#
+# 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.
+
+gb_AWK := awk
+gb_YACC := bison
+
+gb_CLASSPATHSEP := :
+
+# use CC/CXX if they are nondefaults
+ifneq ($(origin CC),default)
+gb_CC := $(CC)
+gb_GCCP := $(CC)
+else
+gb_CC := gcc
+gb_GCCP := gcc
+endif
+
+ifneq ($(origin CXX),default)
+gb_CXX := $(CXX)
+else
+gb_CXX := g++
+endif
+
+ifneq ($(origin AR),default)
+gb_AR := $(AR)
+else
+gb_AR := $(shell $(CC) -print-prog-name=ar)
+endif
+
+ifeq ($(strip $(gb_COMPILERDEFAULTOPTFLAGS)),)
+gb_COMPILERDEFAULTOPTFLAGS := -O2
+endif
+
+gb_CCVER := $(shell $(gb_CC) -dumpversion | $(gb_AWK) -F. -- '{ print $$1*10000+$$2*100+$$3 }')
+
+gb_COMPILERDEFS := \
+ -D$(COM) \
+ -DCPPU_ENV=gcc3 \
+ -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \
+
+gb_CFLAGS_COMMON := \
+ -Wall \
+ -Wendif-labels \
+ -Wextra \
+ -fmessage-length=0 \
+ -fno-common \
+ -pipe \
+
+gb_CXXFLAGS_COMMON := \
+ -Wall \
+ -Wendif-labels \
+ -Wextra \
+ -fmessage-length=0 \
+ -fno-common \
+ -pipe \
+
+ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
+gb_CFLAGS_WERROR := -Werror -DLIBO_WERROR
+gb_CXXFLAGS_WERROR := -Werror -DLIBO_WERROR
+endif
+
+ifeq ($(ENABLE_LTO),TRUE)
+gb_Library_LTOFLAGS := -flto
+endif
+
+gb_LinkTarget_EXCEPTIONFLAGS := \
+ -DEXCEPTIONS_ON \
+ -fexceptions \
+ -fno-enforce-eh-specs \
+
+gb_LinkTarget_NOEXCEPTIONFLAGS := \
+ -DEXCEPTIONS_OFF \
+ -fno-exceptions \
+
+
+# optimization level
+ifneq ($(gb_DEBUGLEVEL),0)
+gb_COMPILEROPTFLAGS := -O0
+else
+gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
+endif
+gb_COMPILERNOOPTFLAGS := -O0
+
+gb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC)))
+gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
+
+
+
+ifeq ($(OS_FOR_BUILD),MACOSX)
+gb_Helper_LIBRARY_PATH_VAR := DYLD_LIBRARY_PATH
+else ifeq ($(OS_FOR_BUILD),WNT)
+# In theory possible if cross-compiling to some Unix from Windows,
+# in practice strongly discouraged to even try that
+gb_Helper_LIBRARY_PATH_VAR := PATH
+else
+gb_Helper_LIBRARY_PATH_VAR := LD_LIBRARY_PATH
+endif
+
+gb_Helper_set_ld_path := $(gb_Helper_LIBRARY_PATH_VAR)=$(OUTDIR_FOR_BUILD)/lib
+
+
+# convert parameters filesystem root to native notation
+# does some real work only on windows, make sure not to
+# break the dummy implementations on unx*
+define gb_Helper_convert_native
+$(1)
+endef
+
+gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/lib
+
+gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
diff --git a/solenv/gbuild/platform/ios.mk b/solenv/gbuild/platform/ios.mk
index 2f954c1..b10a391 100644
--- a/solenv/gbuild/platform/ios.mk
+++ b/solenv/gbuild/platform/ios.mk
@@ -29,8 +29,9 @@
GUI := UNX
COM := GCC
-# Darwin mktemp -t expects a prefix, not a pattern
-gb_MKTEMP := /usr/bin/mktemp -t gbuild.
+gb_CPUDEFS := -DARM32
+
+gb_COMPILERDEFAULTOPTFLAGS := -O2
ifeq ($(CC),)
$(error You must set CC in the environment. See README.cross for example.)
@@ -39,13 +40,10 @@ ifeq ($(CXX),)
$(error You must set CXX in the environment. See README.cross for example.)
endif
-gb_CC := $(CC)
-gb_CXX := $(CXX)
-gb_GCCP := $(CC)
-gb_AR := ar
-gb_AWK := awk
-gb_CLASSPATHSEP := :
-gb_YACC := bison
+include $(GBUILDDIR)/platform/com_GCC_defs.mk
+
+# Darwin mktemp -t expects a prefix, not a pattern
+gb_MKTEMP := /usr/bin/mktemp -t gbuild.
gb_OSDEFS := \
-D$(OS) \
@@ -56,35 +54,18 @@ gb_OSDEFS := \
-DNO_PTHREAD_PRIORITY \
$(EXTRA_CDEFS) \
-gb_COMPILERDEFS := \
- -D$(COM) \
- -DCPPU_ENV=gcc3 \
- -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \
-
-gb_CPUDEFS := -DARM32
-
gb_CFLAGS := \
- -Wall \
- -Wendif-labels \
- -Wextra \
+ $(gb_CFLAGS_COMMON) \
-Wshadow \
- -fmessage-length=0 \
- -fno-common \
-fno-strict-aliasing \
- -pipe \
gb_CXXFLAGS := \
- -Wall \
- -Wendif-labels \
- -Wextra \
+ $(gb_CXXFLAGS_COMMON) \
-Wno-ctor-dtor-privacy \
-Wno-non-virtual-dtor \
- -fmessage-length=0 \
- -fno-common \
-fno-strict-aliasing \
-fsigned-char \
-malign-natural \
- -pipe \
#-Wshadow \ break in compiler headers already
#-fsigned-char \ might be removed?
#-malign-natural \ might be removed?
@@ -96,47 +77,10 @@ gb_OBJCXXFLAGS := -x objective-c++ $(gb_OBJC_OBJCXX_COMMON_FLAGS)
gb_OBJCFLAGS := -x objective-c $(gb_OBJC_OBJCXX_COMMON_FLAGS)
-ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
-gb_CFLAGS_WERROR := -Werror -DLIBO_WERROR
-gb_CXXFLAGS_WERROR := -Werror -DLIBO_WERROR
-endif
-
-gb_LinkTarget_EXCEPTIONFLAGS := \
- -DEXCEPTIONS_ON \
- -fexceptions \
- -fno-enforce-eh-specs \
-
-gb_LinkTarget_NOEXCEPTIONFLAGS := \
- -DEXCEPTIONS_OFF \
- -fno-exceptions \
-
gb_LinkTarget_LDFLAGS := \
$(subst -L../lib , ,$(SOLARLIB)) \
#man ld says: obsolete -Wl,-multiply_defined,suppress \
-ifneq ($(gb_DEBUGLEVEL),0)
-gb_COMPILEROPTFLAGS := -O0
-else
-gb_COMPILEROPTFLAGS := -O2
-endif
-
-gb_COMPILERNOOPTFLAGS := -O0
-
-# Helper class
-
-gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
-
-gb_Helper_set_ld_path := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib
-
-# convert parameters filesystem root to native notation
-# does some real work only on windows, make sure not to
-# break the dummy implementations on unx*
-define gb_Helper_convert_native
-$(1)
-endef
-
-gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/lib
-
# YaccTarget class
define gb_YaccTarget__command
@@ -148,43 +92,6 @@ $(call gb_Helper_abbreviate_dirs,\
endef
-# CObject class
-
-define gb_CObject__command
-$(call gb_Output_announce,$(2),$(true),C ,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && \
- $(gb_CC) \
- $(DEFS) \
- $(T_CFLAGS) \
- -c $(3) \
- -o $(1) \
- -MMD -MT $(1) \
- -MP -MF $(4) \
- -I$(dir $(3)) \
- $(INCLUDE))
-endef
-
-
-# CxxObject class
-
-# N.B: $(T_CXXFLAGS) may contain -x objective-c++, which must come before -c
-define gb_CxxObject__command
-$(call gb_Output_announce,$(2),$(true),CXX,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && \
- $(gb_CXX) \
- $(DEFS) \
- $(T_CXXFLAGS) \
- -c $(3) \
- -o $(1) \
- -MMD -MT $(1) \
- -MP -MF $(4) \
- -I$(dir $(3)) \
- $(INCLUDE_STL) $(INCLUDE))
-endef
-
-
# ObjCxxObject class
define gb_ObjCxxObject__command
@@ -234,9 +141,6 @@ gb_LinkTarget_OBJCXXFLAGS += -g
gb_LinkTarget_OBJCFLAGS += -g
endif
-gb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC)))
-gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
-
# FIXME framework handling very hackish
define gb_LinkTarget__get_liblinkflags
$(patsubst lib%.a,-l%,$(foreach lib,$(filter-out $(gb_Library__FRAMEWORKS) $(gb_Library_UNOLIBS_OOO),$(1)),$(call gb_Library_get_filename,$(lib)))) \
@@ -433,4 +337,6 @@ gb_UnoApiTarget_REGVIEWCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib SOLA
# Python
gb_PYTHON_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib
+include $(GBUILDDIR)/platform/com_GCC_class.mk
+
# vim: set noet sw=4:
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 616550b..45fb9a7 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -29,26 +29,22 @@
GUI := UNX
COM := GCC
+gb_SDKDIR := $(MACOSX_SDK_PATH)
+
+ifeq ($(CPUNAME),POWERPC)
+gb_CPUDEFS := -DPPC
+else
+gb_CPUDEFS := -DX86
+endif
+
+gb_COMPILERDEFAULTOPTFLAGS := -O2
+
+include $(GBUILDDIR)/platform/com_GCC_defs.mk
+
+
# Darwin mktemp -t expects a prefix, not a pattern
gb_MKTEMP ?= /usr/bin/mktemp -t gbuild.
-gb_CC := cc
-gb_CXX := g++
-gb_GCCP := gcc
-gb_AR := ar
-gb_AWK := awk
-gb_CLASSPATHSEP := :
-gb_YACC := bison
-
-# use CC/CXX if they are nondefaults
-ifneq ($(origin CC),default)
-gb_CC := $(CC)
-gb_GCCP := $(CC)
-endif
-ifneq ($(origin CXX),default)
-gb_CXX := $(CXX)
-endif
-gb_CCVER := $(shell $(gb_CC) -dumpversion | $(gb_AWK) -F. -- '{ print $$1*10000+$$2*100+$$3 }')
gb_OSDEFS := \
-D$(OS) \
@@ -62,46 +58,28 @@ gb_OSDEFS := \
-DMAC_OS_X_VERSION_MAX_ALLOWED=$(MAC_OS_X_VERSION_MAX_ALLOWED) \
$(EXTRA_CDEFS) \
-gb_COMPILERDEFS := \
- -D$(COM) \
+
+gb_COMPILERDEFS += \
-DHAVE_GCC_VISIBILITY_FEATURE \
- -DCPPU_ENV=gcc3 \
- -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \
-ifeq ($(CPUNAME),POWERPC)
-gb_CPUDEFS := -DPPC
-else
-gb_CPUDEFS := -DX86
-endif
-gb_SDKDIR := $(MACOSX_SDK_PATH)
gb_CFLAGS := \
-isysroot $(gb_SDKDIR) \
- -Wall \
- -Wendif-labels \
- -Wextra \
+ $(gb_CFLAGS_COMMON) \
-Wshadow \
-fPIC \
- -fmessage-length=0 \
- -fno-common \
-fno-strict-aliasing \
- -pipe \
gb_CXXFLAGS := \
-isysroot $(gb_SDKDIR) \
- -Wall \
- -Wendif-labels \
- -Wextra \
+ $(gb_CXXFLAGS_COMMON) \
+ -fPIC \
-Wno-ctor-dtor-privacy \
-Wno-non-virtual-dtor \
- -fPIC \
- -fmessage-length=0 \
- -fno-common \
-fno-strict-aliasing \
-fsigned-char \
-malign-natural \
- -pipe \
#-Wshadow \ break in compiler headers already
#-fsigned-char \ might be removed?
#-malign-natural \ might be removed?
@@ -120,24 +98,6 @@ gb_OBJCXXFLAGS := -x objective-c++ -fobjc-exceptions
gb_OBJCFLAGS := -x objective-c
-ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
-gb_CFLAGS_WERROR := -Werror -DLIBO_WERROR
-gb_CXXFLAGS_WERROR := -Werror -DLIBO_WERROR
-endif
-
-ifeq ($(ENABLE_LTO),TRUE)
-gb_Library_LTOFLAGS := -flto
-endif
-
-gb_LinkTarget_EXCEPTIONFLAGS := \
- -DEXCEPTIONS_ON \
- -fexceptions \
- -fno-enforce-eh-specs \
-
-gb_LinkTarget_NOEXCEPTIONFLAGS := \
- -DEXCEPTIONS_OFF \
- -fno-exceptions \
-
gb_LinkTarget_LDFLAGS := \
-Wl,-syslibroot,$(gb_SDKDIR) \
$(subst -L../lib , ,$(SOLARLIB)) \
@@ -153,21 +113,6 @@ endif
gb_COMPILERNOOPTFLAGS := -O0
-# Helper class
-
-gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
-
-gb_Helper_set_ld_path := DYLD_LIBRARY_PATH=$(OUTDIR)/lib
-
-# convert parameters filesystem root to native notation
-# does some real work only on windows, make sure not to
-# break the dummy implementations on unx*
-define gb_Helper_convert_native
-$(1)
-endef
-
-gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/lib
-
# YaccTarget class
ifeq ($(CPUNAME),POWERPC)
@@ -194,44 +139,6 @@ $(call gb_Helper_abbreviate_dirs,\
endef
endif
-# CObject class
-
-define gb_CObject__command
-$(call gb_Output_announce,$(2),$(true),C ,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && \
- $(gb_CC) \
- $(DEFS) \
- $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
- $(T_CFLAGS) \
- -c $(3) \
- -o $(1) \
- -MMD -MT $(1) \
- -MP -MF $(4) \
- -I$(dir $(3)) \
- $(INCLUDE))
-endef
-
-
-# CxxObject class
-
-# N.B: $(CXXFLAGS) may contain -x objective-c++, which must come before -c
-define gb_CxxObject__command
-$(call gb_Output_announce,$(2),$(true),CXX,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && \
- $(gb_CXX) \
- $(DEFS) \
- $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
- $(T_CXXFLAGS) \
- -c $(3) \
- -o $(1) \
- -MMD -MT $(1) \
- -MP -MF $(4) \
- -I$(dir $(3)) \
- $(INCLUDE_STL) $(INCLUDE))
-endef
-
# ObjCxxObject class
@@ -298,9 +205,6 @@ gb_LinkTarget_OBJCFLAGS += -g
gb_LinkTarget_OBJCXXFLAGS += -g
endif
-gb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC)))
-gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
-
# FIXME framework handling very hackish
define gb_LinkTarget__get_liblinkflags
$(patsubst lib%.dylib,-l%,$(foreach lib,$(filter-out $(gb_Library__FRAMEWORKS),$(1)),$(call gb_Library_get_filename,$(lib)))) \
@@ -526,4 +430,6 @@ gb_UnoApiTarget_REGVIEWCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(
# Python
gb_PYTHON_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib
+include $(GBUILDDIR)/platform/com_GCC_class.mk
+
# vim: set noet sw=4:
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 0cf5991..bc3f61a 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -29,24 +29,10 @@
GUI := UNX
COM := GCC
+include $(GBUILDDIR)/platform/com_GCC_defs.mk
+
gb_MKTEMP := mktemp -t gbuild.XXXXXX
-gb_CC := gcc
-gb_CXX := g++
-gb_GCCP := gcc
-gb_AR := ar
-gb_AWK := awk
-gb_CLASSPATHSEP := :
-gb_YACC := bison
-
-# use CC/CXX if they are nondefaults
-ifneq ($(origin CC),default)
-gb_CC := $(CC)
-gb_GCCP := $(CC)
-endif
-ifneq ($(origin CXX),default)
-gb_CXX := $(CXX)
-endif
ifneq ($(origin AR),default)
gb_AR := $(AR)
endif
@@ -62,34 +48,19 @@ ifeq ($(GXX_INCLUDE_PATH),)
GXX_INCLUDE_PATH=$(COMPATH)/include/c++/$(shell gcc -dumpversion)
endif
-gb_COMPILERDEFS := \
- -D$(COM) \
- -DCPPU_ENV=gcc3 \
- -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \
-
gb_CFLAGS := \
- -Wall \
+ $(gb_CFLAGS_COMMON) \
+ -fPIC \
-Wdeclaration-after-statement \
- -Wendif-labels \
- -Wextra \
-Wshadow \
- -fPIC \
- -fmessage-length=0 \
- -fno-common \
- -pipe \
gb_CXXFLAGS := \
- -Wall \
- -Wendif-labels \
- -Wextra \
+ $(gb_CXXFLAGS_COMMON) \
+ -fPIC \
-Wshadow \
-Wsign-promo \
-Woverloaded-virtual \
-Wno-non-virtual-dtor \
- -fPIC \
- -fmessage-length=0 \
- -fno-common \
- -pipe \
ifeq ($(HAVE_GCC_VISIBILITY_FEATURE),TRUE)
gb_COMPILERDEFS += \
@@ -128,11 +99,6 @@ gb_CFLAGS += -fno-strict-aliasing
gb_CXXFLAGS += -fno-strict-aliasing
endif
-ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
-gb_CFLAGS_WERROR := -Werror -DLIBO_WERROR
-gb_CXXFLAGS_WERROR := -Werror -DLIBO_WERROR
-endif
-
ifeq ($(HAVE_CXX0X),TRUE)
#Currently, as well as for its own merits, c++11/c++0x mode allows use to use
#a template for SAL_N_ELEMENTS to detect at compiler time its misuse
@@ -151,7 +117,6 @@ endif
endif
ifeq ($(ENABLE_LTO),TRUE)
-gb_Library_LTOFLAGS := -flto
gb_LinkTarget_LDFLAGS += -fuse-linker-plugin $(gb_COMPILERDEFAULTOPTFLAGS)
endif
@@ -161,14 +126,6 @@ gb_CFLAGS += --sysroot=$(SYSBASE)
gb_LinkTarget_LDFLAGS += \
-Wl,--sysroot=$(SYSBASE)
endif
-gb_LinkTarget_EXCEPTIONFLAGS := \
- -DEXCEPTIONS_ON \
- -fexceptions \
- -fno-enforce-eh-specs \
-
-gb_LinkTarget_NOEXCEPTIONFLAGS := \
- -DEXCEPTIONS_OFF \
- -fno-exceptions \
gb_LinkTarget_LDFLAGS += \
-Wl,-rpath-link,$(SYSBASE)/lib:$(SYSBASE)/usr/lib \
@@ -209,31 +166,6 @@ gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
gb_COMPILERNOOPTFLAGS := -O0
-# Helper class
-
-gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
-
-ifeq ($(OS_FOR_BUILD),MACOSX)
-gb_Helper_LIBRARY_PATH_VAR := DYLD_LIBRARY_PATH
-else ifeq ($(OS_FOR_BUILD),WNT)
-# In theory possible if cross-compiling to some Unix from Windows,
-# in practice strongly discouraged to even try that
-gb_Helper_LIBRARY_PATH_VAR := PATH
-else
-gb_Helper_LIBRARY_PATH_VAR := LD_LIBRARY_PATH
-endif
-
-gb_Helper_set_ld_path := $(gb_Helper_LIBRARY_PATH_VAR)=$(OUTDIR_FOR_BUILD)/lib
-
-# convert parameters filesystem root to native notation
-# does some real work only on windows, make sure not to
-# break the dummy implementations on unx*
-define gb_Helper_convert_native
-$(1)
-endef
-
-gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/lib
-
# YaccTarget class
define gb_YaccTarget__command
@@ -244,45 +176,6 @@ $(call gb_Helper_abbreviate_dirs,\
endef
-# CObject class
-
-# $(call gb_CObject__command,object,relative-source,source,dep-file)
-define gb_CObject__command
-$(call gb_Output_announce,$(2),$(true),C ,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && \
- $(gb_CC) \
- $(DEFS) \
- $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
- $(T_CFLAGS) \
- -c $(3) \
- -o $(1) \
- -MMD -MT $(1) \
- -MP -MF $(4) \
- -I$(dir $(3)) \
- $(INCLUDE))
-endef
-
-
-# CxxObject class
-
-# $(call gb_CxxObject__command,object,relative-source,source,dep-file)
-define gb_CxxObject__command
-$(call gb_Output_announce,$(2),$(true),CXX,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && \
- $(gb_CXX) \
- $(DEFS) \
- $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
- $(T_CXXFLAGS) \
- -c $(3) \
- -o $(1) \
- -MMD -MT $(1) \
- -MP -MF $(4) \
- -I$(dir $(3)) \
- $(INCLUDE_STL) $(INCLUDE))
-endef
-
# AsmObject class
@@ -327,9 +220,6 @@ gb_LinkTarget_CXXFLAGS += -ggdb2
gb_LinkTarget_CFLAGS += -ggdb2
endif
-gb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC)))
-gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
-
# note that `cat $(extraobjectlist)` is needed to build with older gcc versions, e.g. 4.1.2 on SLED10
# we want to use @$(extraobjectlist) in the long run
define gb_LinkTarget__command_dynamiclink
@@ -525,4 +415,6 @@ gb_UnoApiTarget_REGVIEWCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR)
# Python
gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload
+include $(GBUILDDIR)/platform/com_GCC_class.mk
+
# vim: set noet sw=4:
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index ea3ae75..c25ef6f 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -29,17 +29,15 @@
GUI := WNT
COM := GCC
+gb_COMPILERDEFAULTOPTFLAGS := -Os
+gb_CPUDEFS := -D_M_IX86
+
+include $(GBUILDDIR)/platform/com_GCC_defs.mk
+
gb_TMPDIR:=$(if $(TMPDIR),$(TMPDIR),/tmp)
gb_MKTEMP := mktemp --tmpdir=$(gb_TMPDIR) gbuild.XXXXXX
-gb_CC := $(CC)
-gb_CXX := $(CXX)
-gb_AR := $(shell $(CC) -print-prog-name=ar)
-gb_AWK := awk
-gb_CLASSPATHSEP := :
-gb_YACC := bison
gb_RC := $(WINDRES)
-gb_CCVER := $(shell $(gb_CC) -dumpversion | $(gb_AWK) -F. -- '{ print $$1*10000+$$2*100+$$3 }')
gb_OSDEFS := \
-DWINVER=0x0500 \
@@ -52,17 +50,12 @@ ifeq ($(GXX_INCLUDE_PATH),)
GXX_INCLUDE_PATH=$(COMPATH)/include/c++/$(shell gcc -dumpversion)
endif
-gb_COMPILERDEFS := \
- -DGCC \
- -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \
- -DCPPU_ENV=gcc3 \
+gb_COMPILERDEFS += \
-D_MT \
-D_NATIVE_WCHAR_T_DEFINED \
-D_MSC_EXTENSIONS \
-D_FORCENAMELESSUNION \
-gb_CPUDEFS := -D_M_IX86
-
gb_RCDEFS := \
-DWINVER=0x0400 \
-DWIN32 \
@@ -70,49 +63,32 @@ gb_RCDEFS := \
gb_RCFLAGS := \
-V
-gb_CFLAGS := \
- -Wall \
+gb_CFLAGS += \
+ $(gb_CFLAGS_COMMON) \
-Wdeclaration-after-statement \
- -Wendif-labels \
- -Wextra \
- -fmessage-length=0 \
-fno-strict-aliasing \
- -pipe \
gb_CXXFLAGS := \
- -Wall \
- -Wendif-labels \
- -Wextra \
+ $(gb_CXXFLAGS_COMMON) \
-Wno-ctor-dtor-privacy \
-Wno-non-virtual-dtor \
-Wreturn-type \
-Wshadow \
-Wuninitialized \
- -fmessage-length=0 \
-fno-strict-aliasing \
- -pipe \
-ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
-gb_CFLAGS_WERROR := -Werror -DLIBO_WERROR
-gb_CXXFLAGS_WERROR := -Werror -DLIBO_WERROR
-endif
ifneq ($(SYSBASE),)
gb_CXXFLAGS += --sysroot=$(SYSBASE)
gb_CFLAGS += --sysroot=$(SYSBASE)
endif
-gb_LinkTarget_EXCEPTIONFLAGS := \
- -DEXCEPTIONS_ON \
- -fexceptions \
+
+gb_LinkTarget_EXCEPTIONFLAGS += \
-fno-enforce-eh-specs \
gb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS)
-gb_LinkTarget_NOEXCEPTIONFLAGS := \
- -DEXCEPTIONS_OFF \
- -fno-exceptions \
-
gb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS)
gb_LinkTarget_LDFLAGS := \
@@ -126,14 +102,6 @@ gb_LinkTarget_LDFLAGS += -shared-libgcc
endif
gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
-ifneq ($(gb_DEBUGLEVEL),0)
-
-gb_COMPILEROPTFLAGS := -O0
-else
-gb_COMPILEROPTFLAGS := -Os
-endif
-
-gb_COMPILERNOOPTFLAGS := -O0
gb_STDLIBS := \
mingwthrd \
@@ -152,16 +120,6 @@ gb_Helper_WORKDIR_NATIVE := $(WORKDIR)
gb_Helper_OUTDIR_NATIVE := $(OUTDIR)
gb_Helper_REPODIR_NATIVE := $(REPODIR)
-gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
-
-# Set the proper enirotment variable so that our BUILD platform
-# build-time shared libraries are found.
-ifeq ($(OS_FOR_BUILD),MACOSX)
-gb_Helper_set_ld_path := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib
-else
-gb_Helper_set_ld_path := LD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib
-endif
-
# Convert parameters filesystem root to native notation
# does some real work only on Windows, and this file is for
# cross-compilation.
@@ -169,8 +127,6 @@ define gb_Helper_convert_native
$(1)
endef
-gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/bin
-
# YaccTarget class
define gb_YaccTarget__command
@@ -181,47 +137,6 @@ $(call gb_Helper_abbreviate_dirs,\
endef
-# CObject class
-
-# We (LibreOffice) support MinGW only for cross-compilation. This is identical to
-# gb_CObject__command in unxgcc.mk
-
-# $(call gb_CObject__command,object,relative-source,source,dep-file)
-define gb_CObject__command
-$(call gb_Output_announce,$(2),$(true),C ,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && \
- $(gb_CC) \
- $(DEFS) \
- $(T_CFLAGS) \
- -c $(3) \
- -o $(1) \
- -MMD -MT $(1) \
- -MP -MF $(4) \
- -I$(dir $(3)) \
- $(INCLUDE))
-endef
-
-
-# CxxObject class
-
-# $(call gb_CxxObject__command,object,relative-source,source,dep-file)
-define gb_CxxObject__command
-$(call gb_Output_announce,$(2),$(true),CXX,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) $(dir $(4)) && \
- $(gb_CXX) \
- $(DEFS) \
- $(T_CXXFLAGS) \
- -c $(3) \
- -o $(1) \
- -MMD -MT $(1) \
- -MP -MF $(4) \
- -I$(dir $(3)) \
- $(INCLUDE_STL) $(INCLUDE))
-endef
-
-
# PrecompiledHeader class
gb_PrecompiledHeader_EXT := .gch
@@ -340,12 +255,9 @@ gb_LinkTarget_CXXFLAGS += -ggdb2
gb_LinkTarget_CFLAGS += -ggdb2
endif
-gb_LinkTarget_INCLUDE :=\
- $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \
+gb_LinkTarget_INCLUDE +=\
$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
-gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
-
define gb_LinkTarget__command_dynamiclinkexecutable
$(call gb_Output_announce,$(2),$(true),LNK,4)
$(call gb_Helper_abbreviate_dirs,\
@@ -677,4 +589,6 @@ gb_UnoApiTarget_REGVIEWCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_
# Python
gb_PYTHON_PRECOMMAND := PATH="$${PATH}:$(OUTDIR)/bin" PYTHONHOME="$(OUTDIR)/lib/python" PYTHONPATH="$(OUTDIR)/lib/python;$(OUTDIR)/lib/python/lib-dynload"
+include $(GBUILDDIR)/platform/com_GCC_class.mk
+
# vim: set noet sw=4:
More information about the Libreoffice-commits
mailing list