LinkTarget.mk (48bea759) LinkTarget.mk (1bb309c6)
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 48 unchanged lines hidden (view full) ---

57
58endef
59else
60gb_Object__command_dep = \
61 $(call gb_Output_error,gb_Object__command_dep is only for gb_FULLDEPS)
62endif
63
64
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 48 unchanged lines hidden (view full) ---

57
58endef
59else
60gb_Object__command_dep = \
61 $(call gb_Output_error,gb_Object__command_dep is only for gb_FULLDEPS)
62endif
63
64
65# AsmObject class
66
67gb_AsmObject_REPOS := $(gb_REPOS)
68
69gb_AsmObject_get_source = $(1)/$(2)$(gb_AsmObject_EXT)
70
71define gb_AsmObject__rules
72$$(call gb_AsmObject_get_target,%) : $$(call gb_AsmObject_get_source,$(1),%)
73 $$(call gb_AsmObject__command,$$@,$$*,$$<))
74
75endef
76
77$(foreach repo,$(gb_AsmObject_REPOS),$(eval $(call gb_AsmObject__rules,$(repo))))
78
79gb_AsmObject_AsmObject =
80
81
65# CObject class
66
67gb_CObject_REPOS := $(gb_REPOS)
68
69gb_CObject_get_source = $(1)/$(2).c
70# defined by platform
71# gb_CObject__command
72

--- 135 unchanged lines hidden (view full) ---

208# gb_LinkTarget_LDFLAGS
209# gb_LinkTarget_INCLUDE
210# gb_LinkTarget_INCLUDE_STL
211
212.PHONY : $(call gb_LinkTarget_get_clean_target,%)
213$(call gb_LinkTarget_get_clean_target,%) :
214 $(call gb_Output_announce,$*,$(false),LNK,4)
215 RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),200,\
82# CObject class
83
84gb_CObject_REPOS := $(gb_REPOS)
85
86gb_CObject_get_source = $(1)/$(2).c
87# defined by platform
88# gb_CObject__command
89

--- 135 unchanged lines hidden (view full) ---

225# gb_LinkTarget_LDFLAGS
226# gb_LinkTarget_INCLUDE
227# gb_LinkTarget_INCLUDE_STL
228
229.PHONY : $(call gb_LinkTarget_get_clean_target,%)
230$(call gb_LinkTarget_get_clean_target,%) :
231 $(call gb_Output_announce,$*,$(false),LNK,4)
232 RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),200,\
233 $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
216 $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
217 $(foreach object,$(COBJECTS),$(call gb_CObject_get_dep_target,$(object))) \
218 $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
219 $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_dep_target,$(object))) \
220 $(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_target,$(object))) \
221 $(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_dep_target,$(object))) \
222 $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
223 $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_dep_target,$(object))) \

--- 96 unchanged lines hidden (view full) ---

320# A note about flags: because the overriding the global variables with a target
321# local variable of the same name is considered obscure, the target local
322# variables have a T_ prefix.
323define gb_LinkTarget_LinkTarget
324$(call gb_LinkTarget_get_clean_target,$(1)) : AUXTARGETS :=
325$(call gb_LinkTarget_get_external_headers_target,$(1)) : SELF := $(1)
326$(call gb_LinkTarget_get_target,$(1)) : DLLTARGET :=
327$(call gb_LinkTarget_get_clean_target,$(1)) \
234 $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
235 $(foreach object,$(COBJECTS),$(call gb_CObject_get_dep_target,$(object))) \
236 $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
237 $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_dep_target,$(object))) \
238 $(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_target,$(object))) \
239 $(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_dep_target,$(object))) \
240 $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
241 $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_dep_target,$(object))) \

--- 96 unchanged lines hidden (view full) ---

338# A note about flags: because the overriding the global variables with a target
339# local variable of the same name is considered obscure, the target local
340# variables have a T_ prefix.
341define gb_LinkTarget_LinkTarget
342$(call gb_LinkTarget_get_clean_target,$(1)) : AUXTARGETS :=
343$(call gb_LinkTarget_get_external_headers_target,$(1)) : SELF := $(1)
344$(call gb_LinkTarget_get_target,$(1)) : DLLTARGET :=
345$(call gb_LinkTarget_get_clean_target,$(1)) \
346$(call gb_LinkTarget_get_target,$(1)) : ASMOBJECTS :=
347$(call gb_LinkTarget_get_clean_target,$(1)) \
328$(call gb_LinkTarget_get_target,$(1)) : COBJECTS :=
329$(call gb_LinkTarget_get_clean_target,$(1)) \
330$(call gb_LinkTarget_get_target,$(1)) : CXXOBJECTS :=
331$(call gb_LinkTarget_get_clean_target,$(1)) \
332$(call gb_LinkTarget_get_target,$(1)) : OBJCXXOBJECTS :=
333$(call gb_LinkTarget_get_clean_target,$(1)) \
334$(call gb_LinkTarget_get_target,$(1)) : GENCXXOBJECTS :=
335$(call gb_LinkTarget_get_headers_target,$(1)) \

--- 352 unchanged lines hidden (view full) ---

688
689$(call gb_LinkTarget_get_target,$(1)) : $$(foreach lib,$(2),$$(call gb_Library_get_target,$$(lib)))
690$(call gb_LinkTarget_get_external_headers_target,$(1)) : \
691$$(foreach lib,$(2),$$(call gb_Library_get_headers_target,$$(lib)))
692
693endef
694
695
348$(call gb_LinkTarget_get_target,$(1)) : COBJECTS :=
349$(call gb_LinkTarget_get_clean_target,$(1)) \
350$(call gb_LinkTarget_get_target,$(1)) : CXXOBJECTS :=
351$(call gb_LinkTarget_get_clean_target,$(1)) \
352$(call gb_LinkTarget_get_target,$(1)) : OBJCXXOBJECTS :=
353$(call gb_LinkTarget_get_clean_target,$(1)) \
354$(call gb_LinkTarget_get_target,$(1)) : GENCXXOBJECTS :=
355$(call gb_LinkTarget_get_headers_target,$(1)) \

--- 352 unchanged lines hidden (view full) ---

708
709$(call gb_LinkTarget_get_target,$(1)) : $$(foreach lib,$(2),$$(call gb_Library_get_target,$$(lib)))
710$(call gb_LinkTarget_get_external_headers_target,$(1)) : \
711$$(foreach lib,$(2),$$(call gb_Library_get_headers_target,$$(lib)))
712
713endef
714
715
716define gb_LinkTarget_add_asmobject
717$(call gb_LinkTarget_get_target,$(1)) : ASMOBJECTS += $(2)
718$(call gb_LinkTarget_get_clean_target,$(1)) : ASMOBJECTS += $(2)
719
720$(call gb_LinkTarget_get_target,$(1)) : $(call gb_AsmObject_get_target,$(2))
721
722endef
723
696define gb_LinkTarget_add_cobject
697$(call gb_LinkTarget_get_target,$(1)) : COBJECTS += $(2)
698$(call gb_LinkTarget_get_clean_target,$(1)) : COBJECTS += $(2)
699
700$(call gb_LinkTarget_get_target,$(1)) : $(call gb_CObject_get_target,$(2))
701$(call gb_CObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
702$(call gb_CObject_get_target,$(2)) : T_CFLAGS += $(3)
703

--- 52 unchanged lines hidden (view full) ---

756define gb_LinkTarget_add_noexception_object
757$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_NOEXCEPTIONFLAGS))
758endef
759
760define gb_LinkTarget_add_exception_object
761$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_EXCEPTIONFLAGS))
762endef
763
724define gb_LinkTarget_add_cobject
725$(call gb_LinkTarget_get_target,$(1)) : COBJECTS += $(2)
726$(call gb_LinkTarget_get_clean_target,$(1)) : COBJECTS += $(2)
727
728$(call gb_LinkTarget_get_target,$(1)) : $(call gb_CObject_get_target,$(2))
729$(call gb_CObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
730$(call gb_CObject_get_target,$(2)) : T_CFLAGS += $(3)
731

--- 52 unchanged lines hidden (view full) ---

784define gb_LinkTarget_add_noexception_object
785$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_NOEXCEPTIONFLAGS))
786endef
787
788define gb_LinkTarget_add_exception_object
789$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_EXCEPTIONFLAGS))
790endef
791
792define gb_LinkTarget_add_asmbojects
793$(foreach obj,$(2),$(call gb_LinkTarget_add_asmobject,$(1),$(obj),$(3)))
794endef
795
764define gb_LinkTarget_add_cobjects
765$(foreach obj,$(2),$(call gb_LinkTarget_add_cobject,$(1),$(obj),$(3)))
766endef
767
768define gb_LinkTarget_add_cxxobjects
769$(foreach obj,$(2),$(call gb_LinkTarget_add_cxxobject,$(1),$(obj),$(3)))
770endef
771

--- 101 unchanged lines hidden ---
796define gb_LinkTarget_add_cobjects
797$(foreach obj,$(2),$(call gb_LinkTarget_add_cobject,$(1),$(obj),$(3)))
798endef
799
800define gb_LinkTarget_add_cxxobjects
801$(foreach obj,$(2),$(call gb_LinkTarget_add_cxxobject,$(1),$(obj),$(3)))
802endef
803

--- 101 unchanged lines hidden ---