Enable / Disable modules

- Enable libjpeg build
- Disable peerconnection as it refers to internal libjingle (may enable it again in the future)
- Disable audio aec and video content_analysis sse2 version
- Disable X11 related flag
- Disable vp8 as there's no way to support it by software
- Disable unnecessary tests build as no gflags and X11 (video renderer).

Change-Id: Ie25b2da8b1c33c67a32b4f8d104b2922b652731e
diff --git a/src/engine_configurations.h b/src/engine_configurations.h
index a78583e..2bc5e95 100644
--- a/src/engine_configurations.h
+++ b/src/engine_configurations.h
@@ -43,7 +43,7 @@
 // ----------------------------------------------------------------------------
 
 #define VIDEOCODEC_I420
-#define VIDEOCODEC_VP8
+// #define VIDEOCODEC_VP8
 
 // ============================================================================
 //                                 VoiceEngine
diff --git a/src/modules/audio_processing/aec/aec.gypi b/src/modules/audio_processing/aec/aec.gypi
index 4b3a08d..bdd1884 100644
--- a/src/modules/audio_processing/aec/aec.gypi
+++ b/src/modules/audio_processing/aec/aec.gypi
@@ -46,23 +46,29 @@
         }],
       ],
     },
-    {
-      'target_name': 'aec_sse2',
-      'type': '<(library)',
-      'sources': [
-        'aec_core_sse2.c',
-        'aec_rdft_sse2.c',
+  ],
+  'conditions': [
+    ['bruno==0', {
+      'targets': [
+        {
+          'target_name': 'aec_sse2',
+          'type': '<(library)',
+          'sources': [
+            'aec_core_sse2.c',
+            'aec_rdft_sse2.c',
+          ],
+          'conditions': [
+            ['os_posix==1 and OS!="mac"', {
+              'cflags': [ '-msse2', ],
+            }],
+            ['OS=="mac"', {
+              'xcode_settings': {
+                'OTHER_CFLAGS': [ '-msse2', ],
+              },
+            }],
+          ],
+        },
       ],
-      'conditions': [
-        ['os_posix==1 and OS!="mac"', {
-          'cflags': [ '-msse2', ],
-        }],
-        ['OS=="mac"', {
-          'xcode_settings': {
-            'OTHER_CFLAGS': [ '-msse2', ],
-          },
-        }],
-      ],
-    },
+    }],
   ],
 }
diff --git a/src/modules/modules.gyp b/src/modules/modules.gyp
index 83b5cc6..5450aab 100644
--- a/src/modules/modules.gyp
+++ b/src/modules/modules.gyp
@@ -31,7 +31,6 @@
     'utility/source/utility.gypi',
     'video_coding/codecs/i420/main/source/i420.gypi',
     'video_coding/codecs/test_framework/test_framework.gypi',
-    'video_coding/codecs/vp8/main/source/vp8.gypi',
     'video_coding/main/source/video_coding.gypi',
     'video_capture/main/source/video_capture.gypi',
     'video_processing/main/source/video_processing.gypi',
@@ -40,8 +39,9 @@
   ],
 
   # Test targets, excluded when building with Chromium.
+  # Disable for bruno too as not necessary
   'conditions': [
-    ['build_with_chromium==0', {
+    ['build_with_chromium==0 and bruno==0', {
       'includes': [
         'audio_coding/codecs/iSAC/isac_test.gypi',
         'audio_coding/codecs/iSAC/isacfix_test.gypi',
diff --git a/src/modules/video_capture/main/source/video_capture.gypi b/src/modules/video_capture/main/source/video_capture.gypi
index 41b9798..7854be9 100644
--- a/src/modules/video_capture/main/source/video_capture.gypi
+++ b/src/modules/video_capture/main/source/video_capture.gypi
@@ -219,7 +219,7 @@
                 '-lpthread -lm',
               ],
             }],
-            ['OS=="linux"', {
+            ['OS=="linux" and bruno==0', {
               'libraries': [
                 '-lrt',
                 '-lXext',
diff --git a/src/modules/video_coding/main/source/video_coding.gypi b/src/modules/video_coding/main/source/video_coding.gypi
index 2aed964..a1aff3c 100644
--- a/src/modules/video_coding/main/source/video_coding.gypi
+++ b/src/modules/video_coding/main/source/video_coding.gypi
@@ -13,7 +13,6 @@
       'type': '<(library)',
       'dependencies': [
         'webrtc_i420',
-        'webrtc_vp8',
         '<(webrtc_root)/common_video/common_video.gyp:webrtc_libyuv',
         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
       ],
diff --git a/src/modules/video_processing/main/source/video_processing.gypi b/src/modules/video_processing/main/source/video_processing.gypi
index dda0a78..cb2198b 100644
--- a/src/modules/video_processing/main/source/video_processing.gypi
+++ b/src/modules/video_processing/main/source/video_processing.gypi
@@ -56,27 +56,33 @@
         }],
       ],
     },
-    {
-      'target_name': 'video_processing_sse2',
-      'type': '<(library)',
-      'sources': [
-        'content_analysis_sse2.cc',
+  ],
+  'conditions': [
+    ['bruno==0', {
+      'targets': [
+        {
+          'target_name': 'video_processing_sse2',
+          'type': '<(library)',
+          'sources': [
+            'content_analysis_sse2.cc',
+          ],
+          'include_dirs': [
+            '../interface',
+            '../../../interface',
+          ],
+          'conditions': [
+            ['os_posix==1 and OS!="mac"', {
+              'cflags': [ '-msse2', ],
+            }],
+            ['OS=="mac"', {
+              'xcode_settings': {
+                'OTHER_CFLAGS': [ '-msse2', ],
+              },
+            }],
+          ],
+        },
       ],
-      'include_dirs': [
-        '../interface',
-        '../../../interface',
-      ],
-      'conditions': [
-        ['os_posix==1 and OS!="mac"', {
-          'cflags': [ '-msse2', ],
-        }],
-        ['OS=="mac"', {
-          'xcode_settings': {
-            'OTHER_CFLAGS': [ '-msse2', ],
-          },
-        }],
-      ],
-    },
+    }],
   ],
 }
 
diff --git a/src/modules/video_render/main/source/video_render.gypi b/src/modules/video_render/main/source/video_render.gypi
index c2deeac..ef24153 100644
--- a/src/modules/video_render/main/source/video_render.gypi
+++ b/src/modules/video_render/main/source/video_render.gypi
@@ -135,7 +135,7 @@
         'WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER',
       ],
     }],
-    ['build_with_chromium==0', {
+    ['build_with_chromium==0 and bruno==0', {
       'targets': [
         {
           'target_name': 'video_render_module_test',
diff --git a/src/video_engine/video_engine.gyp b/src/video_engine/video_engine.gyp
index 261292c..a9046d9 100644
--- a/src/video_engine/video_engine.gyp
+++ b/src/video_engine/video_engine.gyp
@@ -13,8 +13,9 @@
   ],
 
   # Test targets, excluded when building with Chromium.
+  # Exclude for bruno as it refers to gflag
   'conditions': [
-    ['build_with_chromium==0', {
+    ['build_with_chromium==0 and bruno==0', {
       'includes': [
         'test/auto_test/vie_auto_test.gypi',
         'main/test/WindowsTest/windowstest.gypi',
diff --git a/third_party/libjpeg/libjpeg.gyp b/third_party/libjpeg/libjpeg.gyp
index 12cc882..c8c34a8 100644
--- a/third_party/libjpeg/libjpeg.gyp
+++ b/third_party/libjpeg/libjpeg.gyp
@@ -5,7 +5,7 @@
 {
   'variables': {
     'conditions': [
-      [ 'os_posix == 1 and OS != "mac"', {
+      [ 'os_posix == 1 and OS != "mac" and bruno != 1', {
         # Link to system .so since we already use it due to GTK.
         'use_system_libjpeg%': 1,
       }, {  # os_posix != 1 or OS == "mac"
diff --git a/webrtc.gyp b/webrtc.gyp
index 4a53e66..23d37cf 100644
--- a/webrtc.gyp
+++ b/webrtc.gyp
@@ -13,15 +13,15 @@
       'target_name': 'All',
       'type': 'none',
       'dependencies': [
-        'peerconnection/peerconnection.gyp:*',
+        # 'peerconnection/peerconnection.gyp:*',
         'src/common_audio/common_audio.gyp:*',
         'src/common_video/common_video.gyp:*',
         'src/modules/modules.gyp:*',
         'src/system_wrappers/source/system_wrappers.gyp:*',
         'src/video_engine/video_engine.gyp:*',
         'src/voice_engine/voice_engine.gyp:*',
-        'test/metrics.gyp:*',
-        'test/test.gyp:*',
+        # 'test/metrics.gyp:*',
+        # 'test/test.gyp:*',
       ],
     },
   ],