]> rtime.felk.cvut.cz Git - frescor/demo.git/commitdiff
Fix simultaneous building of ffmpeg with and w/o FRSH
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 19 Apr 2010 08:30:53 +0000 (10:30 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 19 Apr 2010 08:30:53 +0000 (10:30 +0200)
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.

build/Makefile.omk.ffmpeg
build/config.target

index e6f1084a6b7cbc7fb30f60670b565b93b424ea43..91435bc947b141cf28a7c3aba6dc6bb14d2b76fe 100644 (file)
@@ -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)
index 735382fb4f65050e25ece033cded37f50a7d6909..7c88240796c3d6a13186734e8db631c771e81c8a 100644 (file)
@@ -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) $@