forked from lix-project/lix
Add variable GLOBAL_COMMON_DEPS
This is a list of dependencies on which all C/C++ object files depend. Primarily useful for global precompiled headers.
This commit is contained in:
parent
7bef965d6f
commit
4e7e498ff9
|
@ -109,7 +109,7 @@ define build-library
|
||||||
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj)_CXXFLAGS=$$($(1)_CXXFLAGS)))
|
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj)_CXXFLAGS=$$($(1)_CXXFLAGS)))
|
||||||
|
|
||||||
# Make each object file depend on the common dependencies.
|
# Make each object file depend on the common dependencies.
|
||||||
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): $$($(1)_COMMON_DEPS)))
|
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): $$($(1)_COMMON_DEPS) $$(GLOBAL_COMMON_DEPS)))
|
||||||
|
|
||||||
# Include .dep files, if they exist.
|
# Include .dep files, if they exist.
|
||||||
$(1)_DEPS := $$(foreach fn, $$($(1)_OBJS), $$(call filename-to-dep, $$(fn)))
|
$(1)_DEPS := $$(foreach fn, $$($(1)_OBJS), $$(call filename-to-dep, $$(fn)))
|
||||||
|
|
|
@ -57,7 +57,7 @@ define build-program
|
||||||
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj)_CXXFLAGS=$$($(1)_CXXFLAGS)))
|
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj)_CXXFLAGS=$$($(1)_CXXFLAGS)))
|
||||||
|
|
||||||
# Make each object file depend on the common dependencies.
|
# Make each object file depend on the common dependencies.
|
||||||
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): $$($(1)_COMMON_DEPS)))
|
$$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj): $$($(1)_COMMON_DEPS) $$(GLOBAL_COMMON_DEPS)))
|
||||||
|
|
||||||
# Include .dep files, if they exist.
|
# Include .dep files, if they exist.
|
||||||
$(1)_DEPS := $$(foreach fn, $$($(1)_OBJS), $$(call filename-to-dep, $$(fn)))
|
$(1)_DEPS := $$(foreach fn, $$($(1)_OBJS), $$(call filename-to-dep, $$(fn)))
|
||||||
|
|
Loading…
Reference in a new issue