From: Michal Sojka Date: Wed, 25 Nov 2009 19:10:10 +0000 (+0100) Subject: Attempt to compile ffmpeg binaries by OMK X-Git-Tag: jsa-paper-casestudy~34 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/frescor/demo.git/commitdiff_plain/97bff2de1bfad506d7567df7225a0b371413bd88 Attempt to compile ffmpeg binaries by OMK To be able to debug them. --- 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 $@