]> git.sesse.net Git - ffmpeg/blobdiff - common.mak
ffmpeg: make 'bits_per_raw_sample' option more useful
[ffmpeg] / common.mak
index d4eda1b4f241584b9a62e63231f063dae315a5c0..2b7baa2e158060711760b3bc0b2fa2f87507754b 100644 (file)
@@ -33,8 +33,12 @@ endif
 
 ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
 
-CPPFLAGS := -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS)
+IFLAGS   := -I$(BUILD_ROOT_REL) -I$(SRC_PATH)
+CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
 CFLAGS   += $(ECFLAGS)
+YASMFLAGS += $(IFLAGS) -Pconfig.asm
+
+HOSTCFLAGS += $(IFLAGS)
 
 %.o: %.c
        $(CCDEP)
@@ -54,6 +58,10 @@ CFLAGS   += $(ECFLAGS)
 
 %.c %.h: TAG = GEN
 
+# Dummy rule to stop make trying to rebuild removed or renamed headers
+%.h:
+       @:
+
 install: install-libs install-headers
 install-libs: install-libs-yes
 
@@ -81,7 +89,7 @@ FFLDFLAGS   := $(addprefix -L$(BUILD_ROOT)/lib,$(ALLFFLIBS)) $(LDFLAGS)
 
 EXAMPLES  := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES)))
 OBJS      := $(addprefix $(SUBDIR),$(sort $(OBJS)))
-TESTOBJS  := $(addprefix $(SUBDIR),$(TESTOBJS))
+TESTOBJS  := $(addprefix $(SUBDIR),$(TESTOBJS) $(TESTPROGS:%=%-test.o))
 TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS)))
 HOSTOBJS  := $(addprefix $(SUBDIR),$(addsuffix .o,$(HOSTPROGS)))
 HOSTPROGS := $(addprefix $(SUBDIR),$(addsuffix $(HOSTEXESUF),$(HOSTPROGS)))
@@ -99,11 +107,8 @@ $(HOSTOBJS): %.o: %.c
 $(HOSTPROGS): %$(HOSTEXESUF): %.o
        $(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
 
-DEPS := $(OBJS:.o=.d)
-depend dep: $(DEPS)
-
 CLEANSUFFIXES     = *.d *.o *~ *.ho *.map *.ver
 DISTCLEANSUFFIXES = *.pc
 LIBSUFFIXES       = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
 
--include $(wildcard $(DEPS))
+-include $(wildcard $(OBJS:.o=.d) $(TESTOBJS:.o=.d))