[Libreoffice-commits] core.git: Branch 'aoo/trunk' - solenv/gbuild
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Sep 26 06:10:32 UTC 2018
solenv/gbuild/LinkTarget.mk | 32 ++++++++++++++++++++++++++++++++
solenv/gbuild/TargetLocations.mk | 1 +
solenv/gbuild/platform/freebsd.mk | 19 +++++++++++++++++++
solenv/gbuild/platform/linux.mk | 19 +++++++++++++++++++
solenv/gbuild/platform/macosx.mk | 19 +++++++++++++++++++
solenv/gbuild/platform/os2.mk | 19 +++++++++++++++++++
solenv/gbuild/platform/solaris.mk | 18 ++++++++++++++++++
solenv/gbuild/platform/windows.mk | 20 ++++++++++++++++++++
solenv/gbuild/platform/winmingw.mk | 19 +++++++++++++++++++
9 files changed, 166 insertions(+)
New commits:
commit 02b6f157f1cf88c10330b45c34ce9c78489ccc80
Author: Damjan Jovanovic <damjan at apache.org>
AuthorDate: Wed Sep 26 05:21:59 2018 +0000
Commit: Damjan Jovanovic <damjan at apache.org>
CommitDate: Wed Sep 26 05:21:59 2018 +0000
Add a gbuild API for building assembly language source files.
This will be needed by basic, bridges and possibly other modules.
Patch by: me
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 62871966edfb..ed5eae4487ee 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -62,6 +62,23 @@ gb_Object__command_dep = \
endif
+# AsmObject class
+
+gb_AsmObject_REPOS := $(gb_REPOS)
+
+gb_AsmObject_get_source = $(1)/$(2)$(gb_AsmObject_EXT)
+
+define gb_AsmObject__rules
+$$(call gb_AsmObject_get_target,%) : $$(call gb_AsmObject_get_source,$(1),%)
+ $$(call gb_AsmObject__command,$$@,$$*,$$<))
+
+endef
+
+$(foreach repo,$(gb_AsmObject_REPOS),$(eval $(call gb_AsmObject__rules,$(repo))))
+
+gb_AsmObject_AsmObject =
+
+
# CObject class
gb_CObject_REPOS := $(gb_REPOS)
@@ -213,6 +230,7 @@ gb_LinkTarget_DEFAULTDEFS := $(gb_GLOBALDEFS)
$(call gb_LinkTarget_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),LNK,4)
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),200,\
+ $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
$(foreach object,$(COBJECTS),$(call gb_CObject_get_dep_target,$(object))) \
$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
@@ -325,6 +343,8 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : AUXTARGETS :=
$(call gb_LinkTarget_get_external_headers_target,$(1)) : SELF := $(1)
$(call gb_LinkTarget_get_target,$(1)) : DLLTARGET :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
+$(call gb_LinkTarget_get_target,$(1)) : ASMOBJECTS :=
+$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : COBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : CXXOBJECTS :=
@@ -693,6 +713,14 @@ $$(foreach lib,$(2),$$(call gb_Library_get_headers_target,$$(lib)))
endef
+define gb_LinkTarget_add_asmobject
+$(call gb_LinkTarget_get_target,$(1)) : ASMOBJECTS += $(2)
+$(call gb_LinkTarget_get_clean_target,$(1)) : ASMOBJECTS += $(2)
+
+$(call gb_LinkTarget_get_target,$(1)) : $(call gb_AsmObject_get_target,$(2))
+
+endef
+
define gb_LinkTarget_add_cobject
$(call gb_LinkTarget_get_target,$(1)) : COBJECTS += $(2)
$(call gb_LinkTarget_get_clean_target,$(1)) : COBJECTS += $(2)
@@ -761,6 +789,10 @@ define gb_LinkTarget_add_exception_object
$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_EXCEPTIONFLAGS))
endef
+define gb_LinkTarget_add_asmbojects
+$(foreach obj,$(2),$(call gb_LinkTarget_add_asmobject,$(1),$(obj),$(3)))
+endef
+
define gb_LinkTarget_add_cobjects
$(foreach obj,$(2),$(call gb_LinkTarget_add_cobject,$(1),$(obj),$(3)))
endef
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index bbe471feb963..36c44100dc45 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -46,6 +46,7 @@ endef
gb_AllLangResTarget_get_target = $(WORKDIR)/AllLangRes/$(1)
gb_Ant_get_target = $(WORKDIR)/Ant/$(1).jar
+gb_AsmObject_get_target = $(WORKDIR)/AsmObject/$(1).o
gb_BisonTarget_get_target = $(WORKDIR)/Bison/$(1)/$(2).cxx
gb_CObject_get_target = $(WORKDIR)/CObject/$(1).o
gb_ComponentTarget_get_target = $(WORKDIR)/ComponentTarget/$(1).component
diff --git a/solenv/gbuild/platform/freebsd.mk b/solenv/gbuild/platform/freebsd.mk
index e7f6a2836958..7e1c2844b57b 100644
--- a/solenv/gbuild/platform/freebsd.mk
+++ b/solenv/gbuild/platform/freebsd.mk
@@ -178,6 +178,25 @@ define gb_Helper_convert_native
$(1)
endef
+# AsmObject class
+
+gb_AsmObject_EXT := .s
+
+define gb_AsmObject__command
+$(call gb_Output_announce,$(2),$(true),ASM,3)
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(1)) && \
+ $(gb_CC) \
+ $(DEFS) \
+ $(T_CFLAGS) \
+ $(CFLAGS) \
+ -c $(3) \
+ -o $(1) \
+ -MT $(1) \
+ -I$(dir $(3)) \
+ $(INCLUDE))
+endef
+
# CObject class
# $(call gb_CObject__command,object,relative-source,source,dep-file)
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index e9e991f4d566..93c2e1462946 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -171,6 +171,25 @@ define gb_Helper_convert_native
$(1)
endef
+# AsmObject class
+
+gb_AsmObject_EXT := .s
+
+define gb_AsmObject__command
+$(call gb_Output_announce,$(2),$(true),ASM,3)
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(1)) && \
+ $(gb_CC) \
+ $(DEFS) \
+ $(T_CFLAGS) \
+ $(CFLAGS) \
+ -c $(3) \
+ -o $(1) \
+ -MT $(1) \
+ -I$(dir $(3)) \
+ $(INCLUDE))
+endef
+
# CObject class
# $(call gb_CObject__command,object,relative-source,source,dep-file)
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 5312895fdb7b..63343545c539 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -173,6 +173,25 @@ $(1)
endef
+# AsmObject class
+
+gb_AsmObject_EXT := .s
+
+define gb_AsmObject__command
+$(call gb_Output_announce,$(2),$(true),ASM,3)
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(1)) && \
+ $(gb_CC) \
+ $(DEFS) \
+ $(T_CFLAGS) \
+ $(CFLAGS) \
+ -c $(3) \
+ -o $(1) \
+ -MT $(1) \
+ -I$(dir $(3)) \
+ $(INCLUDE))
+endef
+
# CObject class
define gb_CObject__command
diff --git a/solenv/gbuild/platform/os2.mk b/solenv/gbuild/platform/os2.mk
index aa6965a46b55..59d64b9e2502 100644
--- a/solenv/gbuild/platform/os2.mk
+++ b/solenv/gbuild/platform/os2.mk
@@ -159,6 +159,25 @@ $(1)
endef
+# AsmObject class
+
+gb_AsmObject_EXT := .s
+
+define gb_AsmObject__command
+$(call gb_Output_announce,$(2),$(true),ASM,3)
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(1)) && \
+ $(gb_CC) \
+ $(DEFS) \
+ $(T_CFLAGS) \
+ $(CFLAGS) \
+ -c $(3) \
+ -o $(1) \
+ -MT $(1) \
+ -I$(dir $(3)) \
+ $(INCLUDE))
+endef
+
# CObject class
# $(call gb_CObject__command,object,relative-source,source,dep-file)
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index bf2f57318a73..8fb33ca8572b 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -145,6 +145,24 @@ $(1)
endef
+# AsmObject class
+
+gb_AsmObject_EXT := .s
+
+define gb_AsmObject__command
+$(call gb_Output_announce,$(2),$(true),ASM,3)
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(1)) && \
+ $(gb_CC) \
+ $(DEFS) \
+ $(T_CFLAGS) \
+ $(CFLAGS) \
+ -c $(3) \
+ -o $(1) \
+ -I$(dir $(3)) \
+ $(INCLUDE))
+endef
+
# CObject class
define gb_CObject__command
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 0b549aeeef5b..6cac100e57ed 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -263,6 +263,26 @@ $(1)))))
endef
+# AsmObject class
+
+gb_AsmObject_EXT := .asm
+
+define gb_AsmObject__command
+$(call gb_Output_announce,$(2),$(true),ASM,3)
+$(call gb_Helper_abbreviate_dirs_native,\
+ mkdir -p $(dir $(1)) && \
+ unset INCLUDE && \
+ $(gb_CC) \
+ $(DEFS) \
+ $(T_CFLAGS) \
+ -FD$(PDBFILE) \
+ $(CFLAGS) \
+ -I$(dir $(3)) \
+ $(INCLUDE) \
+ -c $(3) \
+ -Fo$(1))
+endef
+
# CObject class
ifeq ($(gb_FULLDEPS),$(true))
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index 4cbf914e25b9..9b9f3ce1f8c2 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -218,6 +218,25 @@ $(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \
$(1)))))
endef
+# AsmObject class
+
+gb_AsmObject_EXT := .s
+
+define gb_AsmObject__command
+$(call gb_Output_announce,$(2),$(true),ASM,3)
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(1)) && \
+ $(gb_CC) \
+ $(DEFS) \
+ $(T_CFLAGS) \
+ $(CFLAGS) \
+ -c $(3) \
+ -o $(1) \
+ -MT $(1) \
+ -I$(dir $(3)) \
+ $(INCLUDE))
+endef
+
# CObject class
ifeq ($(gb_FULLDEPS),$(true))
More information about the Libreoffice-commits
mailing list