build: introduced extension path
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Fri, 3 Jul 2015 01:36:06 +0000 (10:36 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Fri, 3 Jul 2015 01:50:44 +0000 (10:50 +0900)
The "extension path" is additional source path that can be used by
product specific sources.
The path can be prepared by symbolic link or git submodule.

Change-Id: Ie169410d551c88cc4506e19f64d2255dabb3d44f
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
configure
tizen/src/Makefile.objs

index cc4cf93..252426c 100755 (executable)
--- a/configure
+++ b/configure
@@ -339,6 +339,7 @@ dxva2=""
 vaapi=""
 qt="no"
 qtabi="5.0"
+extension_path=""
 #
 glusterfs=""
 glusterfs_discard="no"
@@ -1154,6 +1155,8 @@ for opt do
   ;;
   --enable-qt) qt="yes"
   ;;
+  --extension-path=*) extension_path="$optarg"
+  ;;
 #
   --disable-glusterfs) glusterfs="no"
   ;;
@@ -1493,6 +1496,7 @@ TIZEN-maru options:
   --disable-dxva2          disable dxva2 support
   --ensable-vaapi          enable vaapi support
   --disable-vaapi          disable vaapi support
+  --extension-path=PATH    set extension path
 
 NOTE: The object files are built at the place where configure is launched
 EOF
@@ -4271,6 +4275,13 @@ else
        fi
 fi
 
+########################################
+# check extension path
+
+if [ ! -d "$source_path/tizen/src/$extension_path" ] ; then
+       error_exit "Extension path is not valid $source_path/tizen/src/$extension_path"
+fi
+
 ##########################################
 # libav probe
 
@@ -4656,6 +4667,7 @@ echo "TIZEN-maru libav support $libav"
 echo "TIZEN-maru libpng support $libpng"
 echo "TIZEN-maru DXVA2 support $dxva2"
 echo "TIZEN-maru vaapi support $vaapi"
+echo "TIZEN-maru extension path $extension_path"
 #
 
 if test "$sdl_too_old" = "yes"; then
@@ -5178,6 +5190,9 @@ if test "$vaapi" = "yes" ; then
   echo "CONFIG_VAAPI=y" >> $config_host_mak
   echo "LIBVA_CFLAGS=$libva_cflags $libva_x11_cflags" >> $config_host_mak
 fi
+if [ ! -z "$extension_path" ] ; then
+  echo "CONFIG_EXTENSION_PATH=$extension_path" >> $config_host_mak
+fi
 
 # TPM passthrough support?
 if test "$tpm" = "yes"; then
index 9197368..1ff95c8 100644 (file)
@@ -33,4 +33,8 @@ obj-y += hw/
 obj-$(CONFIG_DARWIN) += ns_event.o
 obj-$(CONFIG_DARWIN) += emul_state_darwin.o
 
+ifdef CONFIG_EXTENSION_PATH
+obj-y += $(CONFIG_EXTENSION_PATH)/
+endif
+
 $(obj)/emulator.o $(obj)/emulator_legacy.o: QEMU_CFLAGS += $(SDL_CFLAGS)