diff --git a/common.mak b/common.mak index d7b54d0427..b55e921f54 100644 --- a/common.mak +++ b/common.mak @@ -31,7 +31,7 @@ endif ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale -CPPFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS) +CPPFLAGS := -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS) CFLAGS += $(ECFLAGS) %.o: %.c diff --git a/subdir.mak b/subdir.mak index b67288a4b7..db0d8763f7 100644 --- a/subdir.mak +++ b/subdir.mak @@ -5,6 +5,8 @@ include $(SUBDIR)../common.mak LIBVERSION := $(lib$(NAME)_VERSION) LIBMAJOR := $(lib$(NAME)_VERSION_MAJOR) +$(OBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H + ifdef CONFIG_STATIC all: $(SUBDIR)$(LIBNAME)