From 97bff2de1bfad506d7567df7225a0b371413bd88 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Wed, 25 Nov 2009 20:10:10 +0100 Subject: [PATCH] Attempt to compile ffmpeg binaries by OMK To be able to debug them. --- build/Makefile.omk | 6 +----- build/Makefile.omk.ffmpeg | 19 +++++++++++++++++++ build/config.target | 12 +++++++++++- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/build/Makefile.omk b/build/Makefile.omk index be9e204..e5f6eaa 100644 --- a/build/Makefile.omk +++ b/build/Makefile.omk @@ -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 diff --git a/build/Makefile.omk.ffmpeg b/build/Makefile.omk.ffmpeg index 0161085..004755e 100644 --- a/build/Makefile.omk.ffmpeg +++ b/build/Makefile.omk.ffmpeg @@ -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 diff --git a/build/config.target b/build/config.target index ba998d4..487b7ae 100644 --- a/build/config.target +++ b/build/config.target @@ -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 $@ -- 2.39.2