]> rtime.felk.cvut.cz Git - frescor/demo.git/commitdiff
Export ffmpeg's config.h under a different name
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 19 Apr 2010 07:57:54 +0000 (09:57 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 19 Apr 2010 07:57:54 +0000 (09:57 +0200)
For external applications (recorder), it is still necessary to use the
config under the original name because it is included from ffmpeg headers.

build/Makefile.omk.ffmpeg
build/config.target
src/forb
src/recorder/Makefile.omk
src/recorder/cmdutils.c
src/recorder/ffmpeg.c

index 72ef76434169876f17f88e6c2a0e27d744390ebd..e6f1084a6b7cbc7fb30f60670b565b93b424ea43 100644 (file)
@@ -10,7 +10,7 @@ SUBDIRS = tools libavcodec libavdevice libavfilter libavformat        \
          libavutil libpostproc libswscale
 renamed_include_HEADERS=
 
-include_HEADERS=config.h
+renamed_include_GEN_HEADERS=config.h->ffmpeg-config.h
 
 bin_PROGRAMS = ffmpeg #pktdumper
 pktdumper_SOURCES = tools/pktdumper.c
index 8b89134e188bdfc2bb4267ba8f3be9e6137211fc..735382fb4f65050e25ece033cded37f50a7d6909 100644 (file)
@@ -1,4 +1,4 @@
-# -*- makefile -*-
+# -*- makefile-gmake -*-
 # Config file for compilation by OMK for AQuoSA/Linux OS target
 
 OMIT_KERNEL_PASSES=y
@@ -8,33 +8,40 @@ ifndef RELATIVE_DIR
 RELATIVE_DIR := $(SOURCES_DIR:$(OUTPUT_DIR)%=%)
 endif
 
+FFMPEG_BUILD_DIR=$(OUTPUT_DIR)/_build/user/ffmpeg
+
 # Allow building ffmpeg by OMK
 ifeq ($(RELATIVE_DIR:ffmpeg%=ffmpeg),ffmpeg)
-$(SOURCES_DIR)/Makefile.omk: $(SOURCES_DIR)/Makefile \
-                            $(MAKERULES_DIR)/ffmpeg/libswscale \
+$(SOURCES_DIR)/Makefile.omk: $(MAKERULES_DIR)/ffmpeg/libswscale \
                             $(MAKERULES_DIR)/Makefile.omk.ffmpeg \
-                            $(MAKERULES_DIR)/ffmpeg/config.mak \
-                            $(MAKERULES_DIR)/ffmpeg/version.h
+                            $(FFMPEG_BUILD_DIR)/config.mak \
+                            $(FFMPEG_BUILD_DIR)/version.h \
+                            $(OUTPUT_DIR)/_build/user/$(RELATIVE_DIR)/Makefile
        @echo "  FFOMK   $@"
-       $(Q)make DEPS="" -C $(SOURCES_DIR) -qp -f $< |sed -ne '/# Pattern-specific Variable Values/,$$ d' -e '/# makefile/,+1 p'|\
-                       sed -e /^define/d -e "/^#/d" -e "/^MAKE/d" > $@
+       $(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 := $(CFLAGS) $$(CFLAGS)' >> $@
+       $(Q)echo 'CFLAGS := -I. $(CFLAGS) $$(CFLAGS)' >> $@
 
 
-$(MAKERULES_DIR)/ffmpeg/tools/Makefile:
+$(FFMPEG_BUILD_DIR)/tools/Makefile:
        touch $@
 
-$(MAKERULES_DIR)/ffmpeg/libavcodec/x86/Makefile:
+$(FFMPEG_BUILD_DIR)/libavcodec/x86/Makefile:
        touch $@
 
 $(MAKERULES_DIR)/ffmpeg/libswscale:
        ln -sf ../../src/libswscale $@
-$(MAKERULES_DIR)/ffmpeg/config.mak: $(MAKERULES_DIR)/../build/config.target # this file
-       cd $(MAKERULES_DIR)/ffmpeg && ./configure
-$(MAKERULES_DIR)/ffmpeg/version.h:
-       cd $(MAKERULES_DIR)/ffmpeg && ./version.sh $$PWD $@
+
+$(FFMPEG_BUILD_DIR)/config.mak: \
+               $(MAKERULES_DIR)/ffmpeg/configure \
+               $(MAKERULES_DIR)/../build/config.target # this file
+       cd $(dir $@) && $(MAKERULES_DIR)/ffmpeg/configure
+
+$(FFMPEG_BUILD_DIR)/version.h:
+       cd $(dir $@) && $(MAKERULES_DIR)/ffmpeg/version.sh $(PWD) $@
 endif
 
 
index 8ca1f9efdd920a3eeb7cdefed9c340fad6a7f169..b9fa3cf5f82c7618be292a0bd07a5d8b610e27ba 160000 (submodule)
--- a/src/forb
+++ b/src/forb
@@ -1 +1 @@
-Subproject commit 8ca1f9efdd920a3eeb7cdefed9c340fad6a7f169
+Subproject commit b9fa3cf5f82c7618be292a0bd07a5d8b610e27ba
index 99813d62a8c6eb7a01e5991c555cfd948df21832..08005ade6f4e92d591dc83fa0e4276fbf3fc315f 100644 (file)
@@ -5,10 +5,11 @@ default_CONFIG += FRSH_CPU_ID_DEFAULT=x
 
 LOCAL_CONFIG_H = recorder_config.h
 
+INCLUDES += -I$(OUTPUT_DIR)/_build/user/ffmpeg
+
 CFLAGS += -Wall
 CFLAGS += -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls
 CFLAGS += -Wno-pointer-sign 
-CFLAGS += -I /usr/local/include
 CFLAGS += -g -O1
 
 # ifdef CONFIG_AQUOSA
index 2d32e980b501a69e1784c0b0786985923e270b67..655d004f8bbbda00f2bd006d2f9922d96ffee9aa 100644 (file)
@@ -28,7 +28,7 @@
    Studio) will not omit unused inline functions and create undefined
    references to libraries that are not being built. */
 
-#include "config.h"
+#include <ffmpeg-config.h>
 #include "libavformat/avformat.h"
 #include "libavfilter/avfilter.h"
 #include "libavdevice/avdevice.h"
index 22dc35310c434ba8e6b7b401c45854746f494ee9..7c01754e603f405d81f5ff3a6ad620af335aa065 100644 (file)
@@ -22,7 +22,7 @@
 /* needed for usleep() */
 #define _XOPEN_SOURCE 600
 
-#include "config.h"
+#include <ffmpeg-config.h>
 #include <ctype.h>
 #include <string.h>
 #include <math.h>