From ec74d9294c98e86cfdd06269444c1c6fdd155d65 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 6 Aug 2011 02:48:57 -0700 Subject: [PATCH] Add GYP file for integration into GYP projects. --- http_parser.gyp | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 http_parser.gyp diff --git a/http_parser.gyp b/http_parser.gyp new file mode 100644 index 0000000..e9183b8 --- /dev/null +++ b/http_parser.gyp @@ -0,0 +1,50 @@ +# This file is used with the GYP meta build system. +# http://code.google.com/p/gyp/ +# To build try this: +# svn co http://gyp.googlecode.com/svn/trunk gyp +# ./gyp/gyp -f make --depth=`pwd` http_parser.gyp +# ./out/Debug/test +{ + 'target_defaults': { + 'configurations': { + 'Debug': { + 'defines': [ 'DEBUG', '_DEBUG' ] + }, + 'Release': { + 'defines': [ 'NDEBUG' ] + } + } + }, + + 'targets': [ + { + 'target_name': 'http_parser', + 'type': 'static_library', + 'include_dirs': [ '.' ], + 'direct_dependent_settings': { + 'include_dirs': [ '.' ], + }, + 'defines': [ 'HTTP_PARSER_STRICT=0' ], + 'sources': [ './http_parser.c', ], + 'conditions': [ + ['OS=="win"', { + 'msvs_settings': { + 'VCCLCompilerTool': { + # Compile as C++. http_parser.c is actually C99, but C++ is + # close enough in this case. + 'CompileAs': 2, + }, + }, + }] + ], + }, + + { + 'target_name': 'test', + 'type': 'executable', + 'dependencies': [ 'http_parser' ], + 'sources': [ 'test.c' ] + } + ] +} +