# -*- makefile -*-
# Config file for compilation by OMK for AQuoSA/Linux OS target
+OMIT_KERNEL_PASSES=y
+
+# For the FFMPEG2OMK hack, we need RELATIVE_DIR earlier:
+ifndef RELATIVE_DIR
+RELATIVE_DIR := $(SOURCES_DIR:$(OUTPUT_DIR)%=%)
+endif
+
+# Allow building ffmpeg by OMK
+ifeq ($(RELATIVE_DIR:ffmpeg%=ffmpeg),ffmpeg)
+$(SOURCES_DIR)/Makefile.omk: $(SOURCES_DIR)/Makefile \
+ $(MAKERULES_DIR)/ffmpeg/libswscale \
+ $(MAKERULES_DIR)/Makefile.omk.ffmpeg \
+ $(MAKERULES_DIR)/ffmpeg/config.mak \
+ $(MAKERULES_DIR)/ffmpeg/version.h
+ @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)echo "FFMPEG_SUBDIR=$(RELATIVE_DIR:ffmpeg/%=%)" >> $@
+ $(Q)cat $(MAKERULES_DIR)/Makefile.omk.ffmpeg >> $@
+ $(Q)echo 'CFLAGS := $(CFLAGS) $$(CFLAGS)' >> $@
+
+
+$(MAKERULES_DIR)/ffmpeg/tools/Makefile:
+ touch $@
+
+$(MAKERULES_DIR)/ffmpeg/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 --disable-encoders --disable-decoders --disable-hwaccels --disable-muxers --disable-demuxers --disable-parsers --disable-bsfs --disable-protocols --disable-devices
+$(MAKERULES_DIR)/ffmpeg/version.h:
+ cd $(MAKERULES_DIR)/ffmpeg && ./version.sh $$PWD $@
+endif
+
+
# You can override these variables in config.omk
AQUOSA_ROOT ?= $(wildcard /usr/local/aquosa)
QTDIR ?= $(wildcard /usr/share/qt4)
# distributed environment
CONFIG_FORB_PROTO_UNIX=n
CONFIG_FORB_PROTO_INET_DEFAULT=y
+CONFIG_AQUOSA=y
+CONFIG_FFMPEG_WITH_FRSH=y
+CONFIG_DISKBFQ=y
########################################
# Setting of compiler
# Instead, we call normal gcc with parameters which mgcc adds
-CFLAGS=$(ARCH_GCC_OPTS) -Wall -Wuninitialized -g -O1 -D_REENTRANT -D$(PLATFORM) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
+CFLAGS=$(ARCH_GCC_OPTS) -Wall -Wuninitialized -g -O1 $(CFLAGS-y) -D_REENTRANT -D$(PLATFORM) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
+
LDFLAGS=$(ARCH_LD_OPTS) $(LIBS_PATH) $(LIBS)
LDFLAGS += '-Wl,-rpath,$$ORIGIN/../lib' -z origin --enable-new-dtags