{
  'targets': [

    {
      'target_name': 'tree_sitter',
      'type': 'static_library',
      'include_dirs': [
        'include',
        'src',
      ],
      'sources': [
        '<!@(find include src -name "*.h" -or -name "*.cc" -or -name "*.c")',
      ],
      'cflags_cc!': [ '-fno-rtti' ],
      'xcode_settings': {
        'GCC_ENABLE_CPP_RTTI': 'YES',
        'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
      },
      'direct_dependent_settings': {
        'include_dirs': ['include'],
      },

      # Mac OS has an old version of libstdc++ that doesn't support c++11.
      # libc++ is only present on 10.7 and later.
      'conditions': [
        ['OS == "mac"', {
          'cflags_cc': [ '-stdlib=libc++' ],
          'xcode_settings': {
            'CLANG_CXX_LIBRARY': 'libc++',
            'MACOSX_DEPLOYMENT_TARGET': '10.7',
          },
          'direct_dependent_settings': {
            'cflags_cc': [ '-stdlib=libc++' ],
            'xcode_settings': {
              'CLANG_CXX_LIBRARY': 'libc++',
            },
          },
        }]
      ],
    },

    {
      'target_name': 'compiler_specs',
      'type': 'executable',
      'dependencies': ['tree_sitter'],
      'include_dirs': [
        'src',
        'examples',
        'spec',
        'externals/bandit',
      ],
      'cflags': [
        '-Wno-unknown-pragmas',
      ],
      'sources': [
        '<!@(find spec/compiler examples/grammars -name "*.h" -or -name "*.cc")',
      ],
    },

    {
      'target_name': 'runtime_specs',
      'type': 'executable',
      'dependencies': ['tree_sitter'],
      'include_dirs': [
        'src',
        'examples',
        'spec',
        'externals/bandit',
      ],
      'variables': {
        'USE_BOOST_REGEX%': 'false',
      },
      'conditions': [
        ['USE_BOOST_REGEX != "false"', {
          'defines': ['USE_BOOST_REGEX'],
          'libraries': ['-lboost_regex'],
        }]
      ],
      'cflags': [
        '-Wno-unknown-pragmas',
      ],
      'sources': [
        '<!@(find spec/runtime -name "*.h" -or -name "*.cc" -or -name "*.c")',
        '<!@(find examples/parsers -name "*.c")',
        '<!@(find spec/runtime/languages -name "*.txt")',
      ],
    },
  ],

  'target_defaults': {
    'cflags': [
      '-Wall',
      '-Wextra',
      '-Wno-unused-parameter'
    ],
    'cflags_c': [
      '-std=c99'
    ],
    'cflags_cc': [
      '-std=c++0x',
    ],
    'xcode_settings': {
      'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
      'ALWAYS_SEARCH_USER_PATHS': 'NO',
      'WARNING_CFLAGS': [
        '-Wall',
        '-Wextra',
        '-Wno-unused-parameter'
      ],
    },
  }
}

@@ -39,25 +39,22 @@
 name': '
-tree_sitt
+compil
 er',%0A   
@@ -197,16 +197,25 @@
 lude src
+/compiler
  -name %22
@@ -235,32 +235,16 @@
 e %22*.cc%22
- -or -name %22*.c%22
 )',%0A    
@@ -1050,32 +1050,357 @@
      %5D,%0A    %7D,%0A%0A
+    %7B%0A      'target_name': 'runtime',%0A      'type': 'static_library',%0A      'include_dirs': %5B%0A        'include',%0A        'src',%0A      %5D,%0A      'sources': %5B%0A        '%3C!@(find include src/runtime -name %22*.h%22 -or -name %22*.c%22)',%0A      %5D,%0A      'direct_dependent_settings': %7B%0A        'include_dirs': %5B'include'%5D,%0A      %7D,%0A    %7D,%0A%0A
     %7B%0A      'tar
@@ -1476,33 +1476,30 @@
 dencies': %5B'
-tree_sitt
+compil
 er'%5D,%0A      
@@ -1881,19 +1881,15 @@
 : %5B'
-tree_sitter
+runtime
 '%5D,%0A
@@ -2508,23 +2508,24 @@
      %5D,%0A
-
     %7D,%0A
+%0A
   %5D,%0A%0A  

Make compiler and runtime libraries two separate targets