From: Michal Sojka Date: Mon, 19 Apr 2010 08:30:53 +0000 (+0200) Subject: Fix simultaneous building of ffmpeg with and w/o FRSH X-Git-Tag: jsa-paper-casestudy-v2~68 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/demo.git/commitdiff_plain/82419aa47183d0f9dd9afa0903b9b6421c5bdf4b Fix simultaneous building of ffmpeg with and w/o FRSH Now, all files which need to be different for different configuration are generated under _build directory. Thanks to this, we can build as many configurations of ffmpeg from the same sources as we want. --- diff --git a/build/Makefile.omk.ffmpeg b/build/Makefile.omk.ffmpeg index e6f1084..91435bc 100644 --- a/build/Makefile.omk.ffmpeg +++ b/build/Makefile.omk.ffmpeg @@ -1,4 +1,5 @@ # -*- makefile-gmake -*- +include $(OUTPUT_DIR)/_build/user/$(RELATIVE_DIR)/Makefile.inc.ffmpeg lib_LIBRARIES:=$(NAME) $(NAME)_SOURCES:=$(OBJS:%.o=%.c) $(OBJS-y:%.o=%.c) $(OBJS-yes:%.o=%.c) diff --git a/build/config.target b/build/config.target index 735382f..7c88240 100644 --- a/build/config.target +++ b/build/config.target @@ -18,13 +18,15 @@ $(SOURCES_DIR)/Makefile.omk: $(MAKERULES_DIR)/ffmpeg/libswscale \ $(FFMPEG_BUILD_DIR)/version.h \ $(OUTPUT_DIR)/_build/user/$(RELATIVE_DIR)/Makefile @echo " FFOMK $@" - $(Q)make DEPS="" -C $(OUTPUT_DIR)/_build/user/$(RELATIVE_DIR) -rqp \ - | sed -ne '/# Pattern-specific Variable Values/,$$ d' -e '/# makefile/,+1 p' \ - | sed -e /^define/d -e "/^#/d" -e "/^MAKE/d" > $@ $(Q)echo "FFMPEG_SUBDIR=$(RELATIVE_DIR:ffmpeg/%=%)" >> $@ $(Q)cat $(MAKERULES_DIR)/Makefile.omk.ffmpeg >> $@ - $(Q)echo 'CFLAGS := -I. $(CFLAGS) $$(CFLAGS)' >> $@ + $(Q)echo 'CFLAGS := $(CFLAGS) $$(CFLAGS)' >> $@ +$(OUTPUT_DIR)/_build/user/$(RELATIVE_DIR)/Makefile.inc.ffmpeg: $(OUTPUT_DIR)/_build/user/$(RELATIVE_DIR)/Makefile + @echo " SCRIPT $@" + $(Q)make DEPS="" -C $(OUTPUT_DIR)/_build/user/$(RELATIVE_DIR) -rqp \ + | sed -ne '/# Pattern-specific Variable Values/,$$ d' -e '/# makefile/,+1 p' \ + | sed -e /^define/d -e "/^#/d" -e "/^MAKE/d" > $@ $(FFMPEG_BUILD_DIR)/tools/Makefile: touch $@ @@ -38,7 +40,7 @@ $(MAKERULES_DIR)/ffmpeg/libswscale: $(FFMPEG_BUILD_DIR)/config.mak: \ $(MAKERULES_DIR)/ffmpeg/configure \ $(MAKERULES_DIR)/../build/config.target # this file - cd $(dir $@) && $(MAKERULES_DIR)/ffmpeg/configure + cd $(dir $@) && $(MAKERULES_DIR)/ffmpeg/configure $(if $(CONFIG_FFMPEG_WITH_FRSH:y=),--disable-protocol=frsh) $(FFMPEG_BUILD_DIR)/version.h: cd $(dir $@) && $(MAKERULES_DIR)/ffmpeg/version.sh $(PWD) $@