From de2f77d865e7400c9bf5839ca0952f2aa532677c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Wed, 5 Mar 2008 21:27:58 +0000 Subject: [PATCH] allow vpath search only for source files Originally committed as revision 12343 to svn://svn.ffmpeg.org/ffmpeg/trunk --- Makefile | 4 +++- common.mak | 11 ++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8191165ac8..1a300c9d7e 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,9 @@ # include config.mak -VPATH=$(SRC_PATH_BARE) +vpath %.c $(SRC_PATH_BARE) +vpath %.h $(SRC_PATH_BARE) +vpath %.texi $(SRC_PATH_BARE) CFLAGS=$(OPTFLAGS) -I$(BUILD_ROOT) -I$(SRC_PATH) -I$(SRC_PATH)/libavutil \ -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libswscale \ diff --git a/common.mak b/common.mak index 2ba85157be..ac317d99d9 100644 --- a/common.mak +++ b/common.mak @@ -2,8 +2,13 @@ # common bits used by all libraries # -VPATH = $(SRC_PATH_BARE)/lib$(NAME) -SRC_DIR = "$(VPATH)" +LIBSRC = $(SRC_PATH_BARE)/lib$(NAME) + +vpath %.c $(LIBSRC) +vpath %.h $(LIBSRC) +vpath %.S $(LIBSRC) + +SRC_DIR = "$(LIBSRC)" CFLAGS += $(CFLAGS-yes) OBJS += $(OBJS-yes) @@ -44,7 +49,7 @@ $(SLIBNAME_WITH_MAJOR): $(OBJS) %.ho: %.h $(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $< -ALLHEADERS = $(subst $(VPATH)/,,$(wildcard $(VPATH)/*.h)) +ALLHEADERS = $(subst $(LIBSRC)/,,$(wildcard $(LIBSRC)/*.h)) checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho)) depend dep: $(SRCS)