]> rtime.felk.cvut.cz Git - frescor/demo.git/blobdiff - build/config.target
Merge branch 'master' of rtime.felk.cvut.cz:frescor/demo
[frescor/demo.git] / build / config.target
index 0faf559c2c816bf5b58a2112591d137572b8c0a6..f4fa427d9cbf322e8d93fa6f45f4c2843556813a 100644 (file)
@@ -1,8 +1,58 @@
-# -*- makefile -*-
+# -*- makefile-gmake -*-
 # 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
+
+FFMPEG_BUILD_DIR=$(OUTPUT_DIR)/_build/user/ffmpeg
+
+# Allow building ffmpeg by OMK
+ifeq ($(RELATIVE_DIR:ffmpeg%=ffmpeg),ffmpeg)
+$(SOURCES_DIR)/Makefile.omk: $(MAKERULES_DIR)/ffmpeg/libswscale \
+                            $(MAKERULES_DIR)/Makefile.omk.ffmpeg \
+                            $(FFMPEG_BUILD_DIR)/config.mak \
+                            $(FFMPEG_BUILD_DIR)/version.h \
+                            $(OUTPUT_DIR)/_build/user/$(RELATIVE_DIR)/Makefile \
+                            $(MAKERULES_DIR)/../build/config.target # this file
+       @echo "  FFOMK   $@"
+       $(Q)echo "FFMPEG_SUBDIR=$(RELATIVE_DIR:ffmpeg/%=%)" > $@
+       $(Q)cat $(MAKERULES_DIR)/Makefile.omk.ffmpeg >> $@
+
+$(OUTPUT_DIR)/_build/user/$(RELATIVE_DIR)/Makefile.inc.ffmpeg: $(OUTPUT_DIR)/_build/user/$(RELATIVE_DIR)/Makefile
+       @echo "  SCRIPT  $@"
+       $(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" > $@
+
+$(FFMPEG_BUILD_DIR)/tools/Makefile:
+       touch $@
+
+$(FFMPEG_BUILD_DIR)/libavcodec/x86/Makefile:
+       touch $@
+
+$(MAKERULES_DIR)/ffmpeg/libswscale:
+       ln -sf ../../src/libswscale $@
+
+ifeq ($(wildcard $(FFMPEG_BUILD_DIR)/Makefile),)
+$(FFMPEG_BUILD_DIR)/Makefile: $(FFMPEG_BUILD_DIR)/config.mak
+endif
+
+$(FFMPEG_BUILD_DIR)/config.mak: \
+               $(MAKERULES_DIR)/ffmpeg/configure \
+               $(MAKERULES_DIR)/../build/config.target # this file
+       cd $(dir $@) && $(MAKERULES_DIR)/ffmpeg/configure $(if $(CONFIG_FFMPEG_WITH_FRSH:y=),--disable-protocol=frsh)
+
+$(FFMPEG_BUILD_DIR)/version.h:
+       cd $(dir $@) && $(MAKERULES_DIR)/ffmpeg/version.sh $(PWD) $@
+endif
+
+
 # You can override these variables in config.omk
-AQUOSA_ROOT?=/usr/local/aquosa
+AQUOSA_ROOT ?= $(wildcard /usr/local/aquosa)
 QTDIR ?= $(wildcard /usr/share/qt4)
 
 export PLATFORM=AQuoSA
@@ -14,6 +64,14 @@ LN_HEADERS=y
 # We do not want to overwrite original FRESCOR Makefiles
 USE_LEAF_MAKEFILES=n
 
+# For demo, we use FORB's inet protocol, to show how FRESCOR works in a
+# 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
 ########################################
@@ -24,7 +82,8 @@ USE_LEAF_MAKEFILES=n
 
 # Instead, we call normal gcc with parameters which mgcc adds
 
-CFLAGS=$(ARCH_GCC_OPTS) -fpic -Wall -Wuninitialized -g -O1 -D_REENTRANT -D$(PLATFORM) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
+CFLAGS=$(ARCH_GCC_OPTS) -Wall -Wuninitialized -g -O2 $(CFLAGS-y) -D_REENTRANT -D$(PLATFORM) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -fPIC
+
 LDFLAGS=$(ARCH_LD_OPTS) $(LIBS_PATH) $(LIBS)
 LDFLAGS += '-Wl,-rpath,$$ORIGIN/../lib' -z origin --enable-new-dtags