]> git.sesse.net Git - ffmpeg/blobdiff - Makefile
Hint why SDL_Init() may have failed.
[ffmpeg] / Makefile
index 8b3a51fb6f38b020bd6112b90123486f366d2615..5bc9c25b089de98dcb8298301491b78ccccdc97b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+MAIN_MAKEFILE=1
 include config.mak
 
 vpath %.c    $(SRC_PATH)
@@ -15,7 +16,6 @@ PROGS-$(CONFIG_FFSERVER) += ffserver
 PROGS      := $(PROGS-yes:%=%$(EXESUF))
 PROGS_G     = $(PROGS-yes:%=%_g$(EXESUF))
 OBJS        = $(PROGS-yes:%=%.o) cmdutils.o
-TOOLS       = $(addprefix tools/, $(addsuffix $(EXESUF), cws2fws graph2dot lavfi-showfiltfmts pktdumper probetest qt-faststart trasher))
 TESTTOOLS   = audiogen videogen rotozoom tiny_psnr base64
 HOSTPROGS  := $(TESTTOOLS:%=tests/%)
 
@@ -39,8 +39,7 @@ DATA_FILES := $(wildcard $(SRC_PATH)/ffpresets/*.ffpreset)
 
 SKIPHEADERS = cmdutils_common_opts.h
 
-MAIN_MAKEFILE=1
-include common.mak
+include $(SRC_PATH)/common.mak
 
 FF_LDFLAGS   := $(FFLDFLAGS)
 FF_EXTRALIBS := $(FFEXTRALIBS)
@@ -70,7 +69,7 @@ endef
 define DOSUBDIR
 $(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V))))
 SUBDIR := $(1)/
-include $(1)/Makefile
+include $(SRC_PATH)/$(1)/Makefile
 endef
 
 $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
@@ -82,14 +81,20 @@ ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
 %_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
        $(LD) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
 
+TOOLS     = cws2fws graph2dot lavfi-showfiltfmts pktdumper probetest qt-faststart trasher
+TOOLOBJS := $(TOOLS:%=tools/%.o)
+TOOLS    := $(TOOLS:%=tools/%$(EXESUF))
+
 alltools: $(TOOLS)
 
 tools/%$(EXESUF): tools/%.o
        $(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
 
-tools/%.o: tools/%.c
+$(TOOLOBJS): %.o: %.c | tools
        $(CC) $(CPPFLAGS) $(CFLAGS) -c $(CC_O) $<
 
+OBJDIRS += tools
+
 -include $(wildcard tools/*.d)
 
 VERSION_SH  = $(SRC_PATH)/version.sh
@@ -145,10 +150,19 @@ distclean::
 config:
        $(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
 
-check: test
+include $(SRC_PATH)/doc/Makefile
+include $(SRC_PATH)/tests/Makefile
+
+$(sort $(OBJDIRS)):
+       $(Q)mkdir -p $@
+
+# Dummy rule to stop make trying to rebuild removed or renamed headers
+%.h:
+       @:
 
-include doc/Makefile
-include tests/Makefile
+# Disable suffix rules.  Most of the builtin rules are suffix rules,
+# so this saves some time on slow systems.
+.SUFFIXES:
 
-.PHONY: all alltools *clean check config examples install*
+.PHONY: all all-yes alltools *clean config examples install*
 .PHONY: testprogs uninstall*