diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /media/webrtc/trunk/tools/gyp/test/library/src | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'media/webrtc/trunk/tools/gyp/test/library/src')
7 files changed, 146 insertions, 0 deletions
diff --git a/media/webrtc/trunk/tools/gyp/test/library/src/lib1.c b/media/webrtc/trunk/tools/gyp/test/library/src/lib1.c new file mode 100644 index 000000000..3866b1b84 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/library/src/lib1.c @@ -0,0 +1,10 @@ +#include <stdio.h> + +#ifdef _WIN32 +__declspec(dllexport) +#endif +void lib1_function(void) +{ + fprintf(stdout, "Hello from lib1.c\n"); + fflush(stdout); +} diff --git a/media/webrtc/trunk/tools/gyp/test/library/src/lib1_moveable.c b/media/webrtc/trunk/tools/gyp/test/library/src/lib1_moveable.c new file mode 100644 index 000000000..5d3cc1d9a --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/library/src/lib1_moveable.c @@ -0,0 +1,10 @@ +#include <stdio.h> + +#ifdef _WIN32 +__declspec(dllexport) +#endif +void moveable_function(void) +{ + fprintf(stdout, "Hello from lib1_moveable.c\n"); + fflush(stdout); +} diff --git a/media/webrtc/trunk/tools/gyp/test/library/src/lib2.c b/media/webrtc/trunk/tools/gyp/test/library/src/lib2.c new file mode 100644 index 000000000..21dda7265 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/library/src/lib2.c @@ -0,0 +1,10 @@ +#include <stdio.h> + +#ifdef _WIN32 +__declspec(dllexport) +#endif +void lib2_function(void) +{ + fprintf(stdout, "Hello from lib2.c\n"); + fflush(stdout); +} diff --git a/media/webrtc/trunk/tools/gyp/test/library/src/lib2_moveable.c b/media/webrtc/trunk/tools/gyp/test/library/src/lib2_moveable.c new file mode 100644 index 000000000..f645071d1 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/library/src/lib2_moveable.c @@ -0,0 +1,10 @@ +#include <stdio.h> + +#ifdef _WIN32 +__declspec(dllexport) +#endif +void moveable_function(void) +{ + fprintf(stdout, "Hello from lib2_moveable.c\n"); + fflush(stdout); +} diff --git a/media/webrtc/trunk/tools/gyp/test/library/src/library.gyp b/media/webrtc/trunk/tools/gyp/test/library/src/library.gyp new file mode 100644 index 000000000..bc3551642 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/library/src/library.gyp @@ -0,0 +1,58 @@ +# 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. + +{ + 'variables': { + 'moveable_function%': 0, + }, + 'targets': [ + { + 'target_name': 'program', + 'type': 'executable', + 'dependencies': [ + 'lib1', + 'lib2', + ], + 'sources': [ + 'program.c', + ], + }, + { + 'target_name': 'lib1', + 'type': '<(library)', + 'sources': [ + 'lib1.c', + ], + 'conditions': [ + ['moveable_function=="lib1"', { + 'sources': [ + 'lib1_moveable.c', + ], + }], + ], + }, + { + 'target_name': 'lib2', + 'type': '<(library)', + 'sources': [ + 'lib2.c', + ], + 'conditions': [ + ['moveable_function=="lib2"', { + 'sources': [ + 'lib2_moveable.c', + ], + }], + ], + }, + ], + 'conditions': [ + ['OS=="linux"', { + 'target_defaults': { + # Support 64-bit shared libs (also works fine for 32-bit). + 'cflags': ['-fPIC'], + }, + }], + ], +} diff --git a/media/webrtc/trunk/tools/gyp/test/library/src/program.c b/media/webrtc/trunk/tools/gyp/test/library/src/program.c new file mode 100644 index 000000000..d460f60e4 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/library/src/program.c @@ -0,0 +1,15 @@ +#include <stdio.h> + +extern void lib1_function(void); +extern void lib2_function(void); +extern void moveable_function(void); + +int main(void) +{ + fprintf(stdout, "Hello from program.c\n"); + fflush(stdout); + lib1_function(); + lib2_function(); + moveable_function(); + return 0; +} diff --git a/media/webrtc/trunk/tools/gyp/test/library/src/shared_dependency.gyp b/media/webrtc/trunk/tools/gyp/test/library/src/shared_dependency.gyp new file mode 100644 index 000000000..7d29f5de5 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/library/src/shared_dependency.gyp @@ -0,0 +1,33 @@ +# 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': 'lib1', + 'type': 'shared_library', + 'sources': [ + 'lib1.c', + ], + }, + { + 'target_name': 'lib2', + 'type': 'shared_library', + 'sources': [ + 'lib2.c', + ], + 'dependencies': [ + 'lib1', + ], + }, + ], + 'conditions': [ + ['OS=="linux"', { + 'target_defaults': { + # Support 64-bit shared libs (also works fine for 32-bit). + 'cflags': ['-fPIC'], + }, + }], + ], +} |