aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-06-28 18:45:13 +0100
committerMans Rullgard <mans@mansr.com>2011-06-29 09:14:56 +0100
commit5e27ec28f0aa263fc6af60ea88677e2c40631920 (patch)
treeb3a4e30d26dad20d77effee6f3ba962da50fbc69 /Makefile
parentda55ee6ccc05efdd9006bb8c31db9012a3326857 (diff)
downloadffmpeg-5e27ec28f0aa263fc6af60ea88677e2c40631920.tar.gz
build: create output directories as needed
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 24a5951ec1..3510a1ed59 100644
--- a/Makefile
+++ b/Makefile
@@ -122,9 +122,11 @@ alltools: $(TOOLS)
tools/%$(EXESUF): tools/%.o
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
-tools/%.o: tools/%.c
+tools/%.o: tools/%.c | tools
$(CC) $(CPPFLAGS) $(CFLAGS) -c $(CC_O) $<
+OBJDIRS += tools
+
-include $(wildcard tools/*.d)
VERSION_SH = $(SRC_PATH)/version.sh
@@ -185,6 +187,9 @@ check: test checkheaders
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:
@: