Add a NOOP target for merge libs.

Also allow certain components to not be built.

TEST=build merged_lib

Review URL: http://webrtc-codereview.appspot.com/328001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1254 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/src/build/merge_libs.py b/src/build/merge_libs.py
index e2b96bf..f3938ee 100644
--- a/src/build/merge_libs.py
+++ b/src/build/merge_libs.py
@@ -26,31 +26,33 @@
   if sys.platform.startswith('linux'):
     Popen(["rm -f " + output_lib], shell=True)
     Popen(["rm -rf " + search_path + "/obj.target/*do_not_use*"], shell=True)
-    Popen(["ar crs " + output_lib + " $(find " + search_path + " -name *\.o)"], 
-        shell=True)
+    Popen(["ar crs " + output_lib + " $(find " + search_path +
+          "/obj.target -name *\.o)"], shell=True)
+    Popen(["ar crs " + output_lib + " $(find " + search_path +
+          "/obj/gen -name *\.o)"], shell=True)
 
   elif sys.platform == 'darwin':
     Popen(["rm -f " + output_lib], shell=True)
     Popen(["rm -f " + search_path + "/*do_not_use*"], shell=True)
-    Popen(["libtool -static -v -o " + output_lib + " $(find " + search_path + 
-        " -name *\.a)"], shell=True)
+    Popen(["libtool -static -v -o " + output_lib + " " + search_path + "/*.a"],
+          shell=True)
 
   elif sys.platform == 'win32':
     # We need to execute a batch file to set some environment variables for the
-    # lib command. VS 8 uses vsvars.bat and VS 9 uses vsvars32.bat. 
-    # It's required that at least one of them is in the system PATH. 
-    # We try both and suppress stderr and stdout to fail silently.
+    # lib command. VS 8 uses vsvars.bat and VS 9 uses vsvars32.bat. It's
+    # required that at least one of them is in the system PATH. We try both and
+    # suppress stderr and stdout to fail silently.
     Popen(["del " + output_lib], stderr=PIPE, stdout=PIPE, shell=True)
-    Popen(["del /F /S /Q " + search_path + "/lib/*do_not_use*"], 
-        shell=True)
+    Popen(["del /F /S /Q " + search_path + "/lib/*do_not_use*"],
+          shell=True)
     Popen(["vsvars.bat"], stderr=PIPE, stdout=PIPE, shell=True)
     Popen(["vsvars32.bat"], stderr=PIPE, stdout=PIPE, shell=True)
-    Popen(["lib /OUT:" + output_lib + " " + search_path + "/lib/*.lib"], 
-        shell=True)
+    Popen(["lib /OUT:" + output_lib + " " + search_path + "/lib/*.lib"],
+          shell=True)
 
   else:
     sys.stderr.write('Platform not supported: %r\n\n' % sys.platform)
     sys.exit(1)
 
+  sys.exit(0)
 
-sys.exit(0)