{
  'targets': [
    {
      'target_name': 'binding',
      'sources': [
        'src/binding.cc'
      ],
      'include_dirs': ['<!@(pg_config --includedir)'],
      'libraries' : ['-lpq -L<!@(pg_config --libdir)']
    }
  ]
}

@@ -101,16 +101,67 @@
      %5D,%0A
+      'conditions' : %5B%0A        %5B'OS==%22mac%22', %7B%0A    
       'i
@@ -213,16 +213,20 @@
 ,%0A      
+  
+  
 'librari
@@ -266,16 +266,521 @@
 bdir)'%5D%0A
+        %7D%5D,%0A        %5B'OS==%22linux%22', %7B%0A          'include_dirs': %5B'%3C!@(pg_config --includedir)'%5D,%0A          'libraries' : %5B'-lpq -L%3C!@(pg_config --libdir)'%5D%0A        %7D%5D,%0A        %5B'OS==%22win%22', %7B%0A          'include_dirs': %5B'%3C!@(pg_config --includedir)'%5D,%0A          'libraries' : %5B'libpq.dll'%5D,%0A          'msvs_settings': %7B%0A            'VCLinkerTool' : %7B%0A              'AdditionalLibraryDirectories' : %5B%0A                '%3C!@(pg_config --libdir)%5C%5C'%0A              %5D%0A            %7D,%0A          %7D%0A        %7D%5D%0A      %5D%0A
     %7D%0A  

Add conditions to the binding.gyp for windows, linux, mac.