From 4e7e498ff95b553227a26fc20549bd69995a0b08 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 28 Feb 2014 12:01:42 +0100 Subject: [PATCH] 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. --- libraries.mk | 2 +- programs.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries.mk b/libraries.mk index 21718c496..547f393e3 100644 --- a/libraries.mk +++ b/libraries.mk @@ -109,7 +109,7 @@ define build-library $$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj)_CXXFLAGS=$$($(1)_CXXFLAGS))) # 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. $(1)_DEPS := $$(foreach fn, $$($(1)_OBJS), $$(call filename-to-dep, $$(fn))) diff --git a/programs.mk b/programs.mk index 04ba282b2..d07c91448 100644 --- a/programs.mk +++ b/programs.mk @@ -57,7 +57,7 @@ define build-program $$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj)_CXXFLAGS=$$($(1)_CXXFLAGS))) # 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. $(1)_DEPS := $$(foreach fn, $$($(1)_OBJS), $$(call filename-to-dep, $$(fn)))