Commit f879284b authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

make: Allow to compile sources from external directories

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 764f0781
......@@ -77,6 +77,23 @@ all-objs += $(asm-e)
deps += $(asm-e:.o=.d)
endif
##
##
## Standalone files where sources are kept in external
## directories. Usually needed when same source files
## are compiled with different flags.
ifneq ($(obj-ext-src-y),)
__obj-ext-src-y := $(addprefix $(obj)/, $(notdir $(obj-ext-src-y)))
$(foreach file, \
$(obj-ext-src-y), \
$(eval \
$(call gen-target-c-bundle, \
$(file:.o=), \
$(addprefix $(obj)/,$(notdir $(file:.o=))))))
all-objs += $(__obj-ext-src-y)
deps += $(__obj-ext-src-y:.o=.d)
endif
##
##
## Generate rules for a target
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment