LinkTarget.mk (7871dc3e) | LinkTarget.mk (44c25570) |
---|---|
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 --- 234 unchanged lines hidden (view full) --- 243define gb_LinkTarget__command_dep 244$(call gb_Output_announce,LNK:$(2),$(true),DEP,1) 245$(call gb_Helper_abbreviate_dirs,\ 246 mkdir -p $(dir $(1)) && \ 247 RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),200,\ 248 $(foreach object,$(3),$(call gb_CObject_get_dep_target,$(object))) \ 249 $(foreach object,$(4),$(call gb_CxxObject_get_dep_target,$(object))) \ 250 $(foreach object,$(5),$(call gb_ObjCxxObject_get_dep_target,$(object)))\ | 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 --- 234 unchanged lines hidden (view full) --- 243define gb_LinkTarget__command_dep 244$(call gb_Output_announce,LNK:$(2),$(true),DEP,1) 245$(call gb_Helper_abbreviate_dirs,\ 246 mkdir -p $(dir $(1)) && \ 247 RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),200,\ 248 $(foreach object,$(3),$(call gb_CObject_get_dep_target,$(object))) \ 249 $(foreach object,$(4),$(call gb_CxxObject_get_dep_target,$(object))) \ 250 $(foreach object,$(5),$(call gb_ObjCxxObject_get_dep_target,$(object)))\ |
251 $(foreach object,$(6),$(call gb_GenCxxObject_get_dep_target,$(object)))\ | 251 $(foreach object,$(6),$(call gb_GenCxxObject_get_dep_target,$(object)))\ |
252 ) && \ 253 cat $${RESPONSEFILE} /dev/null | xargs -n 200 cat > $(1)) && \ 254 rm -f $${RESPONSEFILE} 255 256endef 257 258$(call gb_LinkTarget_get_target,%) : $(call gb_LinkTarget_get_headers_target,%) $(gb_Helper_MISCDUMMY) 259 $(call gb_LinkTarget__command,$@,$*) --- 87 unchanged lines hidden (view full) --- 347$(call gb_LinkTarget_get_target,$(1)) : PCH_DEFS := $$(gb_LinkTarget_DEFAULTDEFS) 348$(call gb_LinkTarget_get_headers_target,$(1)) \ 349$(call gb_LinkTarget_get_target,$(1)) : INCLUDE := $$(gb_LinkTarget_INCLUDE) 350$(call gb_LinkTarget_get_headers_target,$(1)) \ 351$(call gb_LinkTarget_get_target,$(1)) : INCLUDE_STL := $$(gb_LinkTarget_INCLUDE_STL) 352$(call gb_LinkTarget_get_target,$(1)) : LDFLAGS := $$(gb_LinkTarget_LDFLAGS) 353$(call gb_LinkTarget_get_target,$(1)) : LINKED_LIBS := 354$(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS := | 252 ) && \ 253 cat $${RESPONSEFILE} /dev/null | xargs -n 200 cat > $(1)) && \ 254 rm -f $${RESPONSEFILE} 255 256endef 257 258$(call gb_LinkTarget_get_target,%) : $(call gb_LinkTarget_get_headers_target,%) $(gb_Helper_MISCDUMMY) 259 $(call gb_LinkTarget__command,$@,$*) --- 87 unchanged lines hidden (view full) --- 347$(call gb_LinkTarget_get_target,$(1)) : PCH_DEFS := $$(gb_LinkTarget_DEFAULTDEFS) 348$(call gb_LinkTarget_get_headers_target,$(1)) \ 349$(call gb_LinkTarget_get_target,$(1)) : INCLUDE := $$(gb_LinkTarget_INCLUDE) 350$(call gb_LinkTarget_get_headers_target,$(1)) \ 351$(call gb_LinkTarget_get_target,$(1)) : INCLUDE_STL := $$(gb_LinkTarget_INCLUDE_STL) 352$(call gb_LinkTarget_get_target,$(1)) : LDFLAGS := $$(gb_LinkTarget_LDFLAGS) 353$(call gb_LinkTarget_get_target,$(1)) : LINKED_LIBS := 354$(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS := |
355$(call gb_LinkTarget_get_target,$(1)) : EXTERNAL_LIBS := |
|
355$(call gb_LinkTarget_get_target,$(1)) : TARGETTYPE := 356$(call gb_LinkTarget_get_headers_target,$(1)) \ 357$(call gb_LinkTarget_get_target,$(1)) : PCH_NAME := 358$(call gb_LinkTarget_get_target,$(1)) : PCHOBJS := 359$(call gb_LinkTarget_get_headers_target,$(1)) \ 360$(call gb_LinkTarget_get_target,$(1)) : PDBFILE := 361$(call gb_LinkTarget_get_target,$(1)) : NATIVERES := 362 --- 107 unchanged lines hidden (view full) --- 470$(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS += $(2) 471 472$(call gb_LinkTarget_get_target,$(1)) : $$(foreach lib,$(2),$$(call gb_StaticLibrary_get_target,$$(lib))) 473$(call gb_LinkTarget_get_external_headers_target,$(1)) : \ 474$$(foreach lib,$(2),$$(call gb_StaticLibrary_get_headers_target,$$(lib))) 475 476endef 477 | 356$(call gb_LinkTarget_get_target,$(1)) : TARGETTYPE := 357$(call gb_LinkTarget_get_headers_target,$(1)) \ 358$(call gb_LinkTarget_get_target,$(1)) : PCH_NAME := 359$(call gb_LinkTarget_get_target,$(1)) : PCHOBJS := 360$(call gb_LinkTarget_get_headers_target,$(1)) \ 361$(call gb_LinkTarget_get_target,$(1)) : PDBFILE := 362$(call gb_LinkTarget_get_target,$(1)) : NATIVERES := 363 --- 107 unchanged lines hidden (view full) --- 471$(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS += $(2) 472 473$(call gb_LinkTarget_get_target,$(1)) : $$(foreach lib,$(2),$$(call gb_StaticLibrary_get_target,$$(lib))) 474$(call gb_LinkTarget_get_external_headers_target,$(1)) : \ 475$$(foreach lib,$(2),$$(call gb_StaticLibrary_get_headers_target,$$(lib))) 476 477endef 478 |
479# 480# Add external libs for linking. External libaries are not built by any module. 481# 482# The list of libraries is used as is, ie it is not filtered with gb_Library_KNOWNLIBS. 483# 484# An error is signaled, when any of the library names does not look like 485# a base name, ie is prefixed by -l or lib or is folled by .lib or .so. 486# 487# @param target 488# @param libraries 489# A list of (base names of) libraries that will be added to the target 490# local EXTERNAL_LIBS variable and eventually linked in when the 491# target is made. 492# 493define gb_LinkTarget_add_external_libs 494 495# Make sure that all libraries are given as base names. 496ifneq (,$$(filter -l% lib% %.so %.lib, $(2))) 497$$(eval $$(call gb_Output_announce,ERROR: Please give only libary basenames to gb_LinkTarget_add_external_libs)) 498$$(eval $$(call gb_Output_announce,ERROR: (no prefixes -l% or lib%, no suffixes %.so or %.lib))) 499$$(eval $$(call gb_Output_announce,ERROR: libraries given: $(2))) 500$$(eval $$(call gb_Output_announce,ERROR: offending: $$(filter -l% lib% %.so %.lib, $(2)))) 501$$(eval $$(call gb_Output_error, )) 502endif 503 504$(call gb_LinkTarget_get_target,$(1)) : EXTERNAL_LIBS += $(2) 505 506$(call gb_LinkTarget_get_target,$(1)) : $$(foreach lib,$(2),$$(call gb_Library_get_target,$$(lib))) 507$(call gb_LinkTarget_get_external_headers_target,$(1)) : \ 508$$(foreach lib,$(2),$$(call gb_Library_get_headers_target,$$(lib))) 509 510endef 511 512 |
|
478define gb_LinkTarget_add_cobject 479$(call gb_LinkTarget_get_target,$(1)) : COBJECTS += $(2) 480$(call gb_LinkTarget_get_clean_target,$(1)) : COBJECTS += $(2) 481 482$(call gb_LinkTarget_get_target,$(1)) : $(call gb_CObject_get_target,$(2)) 483$(call gb_CObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1)) 484$(call gb_CObject_get_target,$(2)) : CFLAGS += $(3) 485 --- 153 unchanged lines hidden --- | 513define gb_LinkTarget_add_cobject 514$(call gb_LinkTarget_get_target,$(1)) : COBJECTS += $(2) 515$(call gb_LinkTarget_get_clean_target,$(1)) : COBJECTS += $(2) 516 517$(call gb_LinkTarget_get_target,$(1)) : $(call gb_CObject_get_target,$(2)) 518$(call gb_CObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1)) 519$(call gb_CObject_get_target,$(2)) : CFLAGS += $(3) 520 --- 153 unchanged lines hidden --- |