diff options
Diffstat (limited to 'media/webrtc/trunk/tools/gyp/test/rules/src/subdir1')
4 files changed, 61 insertions, 0 deletions
diff --git a/media/webrtc/trunk/tools/gyp/test/rules/src/subdir1/executable.gyp b/media/webrtc/trunk/tools/gyp/test/rules/src/subdir1/executable.gyp new file mode 100644 index 000000000..c34cce5a9 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/rules/src/subdir1/executable.gyp @@ -0,0 +1,37 @@ +# Copyright (c) 2009 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + 'target_name': 'program', + 'type': 'executable', + 'msvs_cygwin_shell': 0, + 'sources': [ + 'program.c', + 'function1.in', + 'function2.in', + ], + 'rules': [ + { + 'rule_name': 'copy_file', + 'extension': 'in', + 'inputs': [ + '../copy-file.py', + ], + 'outputs': [ + # TODO: fix Make to support generated files not + # in a variable-named path like <(INTERMEDIATE_DIR) + #'<(RULE_INPUT_ROOT).c', + '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).c', + ], + 'action': [ + 'python', '<(_inputs)', '<(RULE_INPUT_PATH)', '<@(_outputs)', + ], + 'process_outputs_as_sources': 1, + }, + ], + }, + ], +} diff --git a/media/webrtc/trunk/tools/gyp/test/rules/src/subdir1/function1.in b/media/webrtc/trunk/tools/gyp/test/rules/src/subdir1/function1.in new file mode 100644 index 000000000..60ff28949 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/rules/src/subdir1/function1.in @@ -0,0 +1,6 @@ +#include <stdio.h> + +void function1(void) +{ + printf("Hello from function1.in\n"); +} diff --git a/media/webrtc/trunk/tools/gyp/test/rules/src/subdir1/function2.in b/media/webrtc/trunk/tools/gyp/test/rules/src/subdir1/function2.in new file mode 100644 index 000000000..0fcfc03fd --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/rules/src/subdir1/function2.in @@ -0,0 +1,6 @@ +#include <stdio.h> + +void function2(void) +{ + printf("Hello from function2.in\n"); +} diff --git a/media/webrtc/trunk/tools/gyp/test/rules/src/subdir1/program.c b/media/webrtc/trunk/tools/gyp/test/rules/src/subdir1/program.c new file mode 100644 index 000000000..6b11ff9f6 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/rules/src/subdir1/program.c @@ -0,0 +1,12 @@ +#include <stdio.h> + +extern void function1(void); +extern void function2(void); + +int main(void) +{ + printf("Hello from program.c\n"); + function1(); + function2(); + return 0; +} |