Redid gyp changes in last commit to support debugging of samples on
Linux. Fixed bug in translator sample where it was confusing arguments
and filenames on POSIX platforms.
Review URL: http://codereview.appspot.com/4532108

git-svn-id: https://angleproject.googlecode.com/svn/trunk@665 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/build/common.gypi b/build/common.gypi
index 20c85f7..8682410 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -87,7 +87,32 @@
       'target_defaults': {
         'msvs_cygwin_dirs': ['../third_party/cygwin'],
       },
-    }]
+    }],
+    ['OS!="win" and OS!="mac"', {
+      'target_defaults': {
+        'cflags': [
+          '-pthread',
+          '-fno-exceptions',
+        ],
+        'ldflags': [
+          '-pthread',
+        ],
+        'configurations': {
+          'Debug': {
+            'variables': {
+              'debug_optimize%': '0',
+            },
+            'defines': [
+              '_DEBUG',
+            ],
+            'cflags': [
+              '-O>(debug_optimize)',
+              '-g',
+            ],
+          }
+        },
+      },
+    }],
   ],
 }
 
diff --git a/samples/translator/translator.cpp b/samples/translator/translator.cpp
index 03cdcdb..fb1fb49 100644
--- a/samples/translator/translator.cpp
+++ b/samples/translator/translator.cpp
@@ -75,7 +75,7 @@
     argc--;
     argv++;
     for (; (argc >= 1) && (failCode == ESuccess); argc--, argv++) {
-        if (argv[0][0] == '-' || argv[0][0] == '/') {
+        if (argv[0][0] == '-') {
             switch (argv[0][1]) {
             case 'i': compileOptions |= SH_INTERMEDIATE_TREE; break;
             case 'm': compileOptions |= SH_MAP_LONG_VARIABLE_NAMES; break;
diff --git a/src/build_angle.gyp b/src/build_angle.gyp
index b85f846..1f427f0 100644
--- a/src/build_angle.gyp
+++ b/src/build_angle.gyp
@@ -89,13 +89,6 @@
           'sources': ['compiler/ossource_win.cpp'],
         }, { # else: posix
           'sources': ['compiler/ossource_posix.cpp'],
-          'all_dependent_settings': {
-            'link_settings': {
-              'libraries': [
-                '-lpthread',
-              ],
-            },
-          },
         }],
       ],
     },