diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-24 16:51:31 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-25 09:05:09 +0100 |
commit | c47496fdf9f0ec396f15fb9ddde6bd8d244a1797 (patch) | |
tree | 739b259a6d79e53ddfc673c5c7d40ebc4c634387 /solenv | |
parent | 9d17966632a8e756c26b6569ff5e282a719a1ac1 (diff) |
Add config_libraries.h definitions to get library names easily.
Works for libmerged too, so we can get rid of LIBO_MERGELIBS.
And remove few more #defines in vcl.
It's generated by gbuild, so probably abusing config_host directory.
Open to improvements.
Change-Id: I87ab109bf109e42751766011daf076e9cdf8f5ee
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/Helper.mk | 9 | ||||
-rw-r--r-- | solenv/gbuild/gbuild.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 5 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_MSC_defs.mk | 5 |
4 files changed, 11 insertions, 10 deletions
diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk index 93ff03ef5737..a1a29f745341 100644 --- a/solenv/gbuild/Helper.mk +++ b/solenv/gbuild/Helper.mk @@ -204,6 +204,15 @@ else mv $(1) $(2) $(if $(3),&& touch -r $(3) $(2)); \ fi endef +define gb_Helper_generate_config_libraries +$(shell FILE=$(BUILDDIR)/config_$(gb_Side)/config_libraries.h && \ +printf "// This file is generated by gbuild: gb_Helper_generate_config_libraries.\n\n" >> $$FILE.tmp && \ +$(foreach lib,$(gb_Library_KNOWNLIBS), \ + printf "#define LIBO_LIB_$(subst -,_,$(lib)) \"$(call gb_Library_get_runtime_filename,$(call gb_Library__get_name,$(lib)))\"\n" >> $$FILE.tmp &&) \ +printf "\n#define LIBO_LIBRARY(name) LIBO_LIB_##name\n" >> $$FILE.tmp && \ +$(call gb_Helper_replace_if_different_and_touch,$$FILE.tmp,$$FILE)) +endef + define gb_Helper_define_if_set $(foreach def,$(1),$(if $(filter TRUE YES,$($(def))),-D$(def))) endef diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index 8c0f8b420c74..a864eb8c0811 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -326,6 +326,8 @@ include $(foreach class, \ $(eval $(call gb_Helper_process_executable_registrations)) $(eval $(call gb_Postprocess_make_targets)) +$(eval $(call gb_Helper_generate_config_libraries)) + # optional extensions that should never be essential ifneq ($(wildcard $(GBUILDDIR)/extensions/post_*.mk),) include $(wildcard $(GBUILDDIR)/extensions/post_*.mk) diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 986ef39d3bc5..93d3fe75d3f3 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -94,11 +94,6 @@ endif gb_CFLAGS_WERROR := $(if $(ENABLE_WERROR),-Werror) -ifneq ($(MERGELIBS),) -gb_CFLAGS_COMMON += -DLIBO_MERGELIBS -gb_CXXFLAGS_COMMON += -DLIBO_MERGELIBS -endif - ifeq ($(ENABLE_LTO),TRUE) ifeq ($(COM_GCC_IS_CLANG),TRUE) gb_LTOFLAGS := -flto diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk index 0779b02d6e6f..67d2b6bfb56a 100644 --- a/solenv/gbuild/platform/com_MSC_defs.mk +++ b/solenv/gbuild/platform/com_MSC_defs.mk @@ -246,11 +246,6 @@ gb_STDLIBS := \ gb_CFLAGS_WERROR := $(if $(ENABLE_WERROR),-WX) -ifneq ($(MERGELIBS),) -gb_CFLAGS += -DLIBO_MERGELIBS -gb_CXXFLAGS += -DLIBO_MERGELIBS -endif - gb_LinkTarget_EXCEPTIONFLAGS := \ -DEXCEPTIONS_ON \ -EHa \ |