Use vpath directive

The vpath directive has two advantages over the VPATH variable:
1) it allows to skip searching of .o files; 2) the default semantics
are to append to the vpath, so there is no confusion between "VPATH=xyz"
and "VPATH+=xyz".

Since "vpath %.c %.h PATH" is not valid, I'm introducing a wrapper
macro to append one or more directories to the vpath.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Paolo Bonzini 2009-12-21 10:06:55 +01:00 committed by Anthony Liguori
parent e726fe7d60
commit 076d247142
7 changed files with 16 additions and 13 deletions

View file

@ -5,7 +5,8 @@ all: build-all
include ../../config-host.mak
include $(SRC_PATH)/rules.mak
VPATH=$(SRC_PATH)/pc-bios/optionrom
$(call set-vpath, $(SRC_PATH)/pc-bios/optionrom)
.PHONY : all clean build-all
CFLAGS := -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin