]> rtime.felk.cvut.cz Git - frescor/demo.git/commitdiff
Attempt to compile ffmpeg binaries by OMK
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 25 Nov 2009 19:10:10 +0000 (20:10 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 25 Nov 2009 19:11:46 +0000 (20:11 +0100)
To be able to debug them.

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

index be9e204fc3bd813530f68f4eab1012a1a892f913..e5f6eaa46bf2099d9bb6f00b9f6a01477b759da0 100644 (file)
@@ -1,7 +1,3 @@
-SUBDIRS=$(ALL_OMK_SUBDIRS)
+SUBDIRS=$(sort $(ALL_OMK_SUBDIRS) ffmpeg)
 
 default_CONFIG=CONFIG_FFMPEG_WITH_FRSH=y
-
-SUBDIRS += ffmpeg/libavcodec ffmpeg/libavdevice ffmpeg/libavfilter     \
-          ffmpeg/libavformat ffmpeg/libavutil ffmpeg/libpostproc       \
-          ffmpeg/libswscale
index 016108555ad392e4af6fbd4da159bd027e6c2c51..004755ec390c4171e818dbd59147aab05126549e 100644 (file)
@@ -3,10 +3,29 @@ $(NAME)_SOURCES:=$(OBJS:%.o=%.c) $(OBJS-y:%.o=%.c) $(OBJS-yes:%.o=%.c)
 renamed_include_HEADERS:=$(foreach h,$(HEADERS),$(h)->lib$(NAME)/$(h) )
 INCLUDES += -I $(dir $(srcdir:%/=%)) # this should point to ffmpeg sources
 
+ifeq ($(FFMPEG_SUBDIR),ffmpeg)
+SUBDIRS = tools libavcodec libavdevice libavfilter libavformat \
+         libavutil libpostproc libswscale
+renamed_include_HEADERS=
+
+# bin_PROGRAMS = ffmpeg pktdumper
+# pktdumper_SOURCES = tools/pktdumper.c
+# pktdumper_LIBS = avformat
+
+ffmpeg_SOURCES = ffmpeg.c cmdutils.c
+lib_LOADLIBES = $(ALLFFLIBS) $(FFEXTRALIBS:-l%=%)
+endif
+
 ifeq ($(FFMPEG_SUBDIR),libavcodec)
 SUBDIRS=x86
 endif
 
+ifeq ($(FFMPEG_SUBDIR),libavutil)
+renamed_include_HEADERS += internal.h->libavutil/internal.h
+renamed_include_HEADERS += timer.h->libavutil/timer.h
+renamed_include_HEADERS += x86/timer.h->libavutil/x86/timer.h
+endif
+
 ifeq ($(FFMPEG_SUBDIR),libavformat)
 ifeq ($(CONFIG_FFMPEG_WITH_FRSH),y)
 $(NAME)_SOURCES := $(filter-out udp.c,$(NAME)_SOURCES) frsh.c
index ba998d460dca34b6aff6cbe14270f9dc62586058..487b7aeb9d7cae30eaf1f6d5f6f032b25884c75c 100644 (file)
@@ -1,7 +1,13 @@
 # -*- makefile -*-
 # Config file for compilation by OMK for AQuoSA/Linux OS target
 
+# For the FFMPEG2OMK hack, we need RELATIVE_DIR earlier:
+ifndef RELATIVE_DIR
+RELATIVE_DIR := $(SOURCES_DIR:$(OUTPUT_DIR)%=%)
+endif
+
 ifeq ($(RELATIVE_DIR:ffmpeg%=ffmpeg),ffmpeg)
+
 # Allow building ffmpeg by OMK
 define FFMPEG_OMKIZE
 lib_LIBRARIES:=$(NAME)
@@ -10,7 +16,8 @@ renamed_include_HEADERS:=$(foreach h,$(HEADERS),$(h)->lib$(NAME)/$(h) )
 INCLUDES += -I $(srcdir)/..
 endef
 
-$(SOURCES_DIR)/Makefile.omk: $(SOURCES_DIR)/Makefile $(MAKERULES_DIR)/ffmpeg/libswscale
+
+$(SOURCES_DIR)/Makefile.omk: $(SOURCES_DIR)/Makefile $(MAKERULES_DIR)/ffmpeg/libswscale $(MAKERULES_DIR)/Makefile.omk.ffmpeg
        @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" > $@
@@ -20,6 +27,9 @@ $(SOURCES_DIR)/Makefile.omk: $(SOURCES_DIR)/Makefile $(MAKERULES_DIR)/ffmpeg/lib
        $(Q)echo 'CFLAGS := $(CFLAGS) $$(CFLAGS)' >> $@
 
 
+$(MAKERULES_DIR)/ffmpeg/tools/Makefile:
+       touch $@
+
 $(MAKERULES_DIR)/ffmpeg/libavcodec/x86/Makefile:
        touch $@