[OTS] Improve GYP build
- Added gyp_ots script which fetches gyp and creates build files.
- Cleanup ots-standalone.gyp and added further test program targets.
- Fixed some compile errors of test programs on Mac.
Review URL: https://chromiumcodereview.appspot.com/10314003
git-svn-id: http://ots.googlecode.com/svn/trunk@90 a4e77c2c-9104-11de-800e-5b313e0d2bf3
diff --git a/ots-standalone.gyp b/ots-standalone.gyp
index 263360f..481b75f 100644
--- a/ots-standalone.gyp
+++ b/ots-standalone.gyp
@@ -18,8 +18,8 @@
'-ggdb',
'-W',
'-Wall',
+ '-Werror',
'-Wno-unused-parameter',
- '-fno-strict-aliasing',
'-fPIE',
'-fstack-protector',
],
@@ -34,9 +34,6 @@
'ots-common.gypi',
],
'target_defaults': {
- 'defines': [
- 'OTS_DEBUG',
- ],
'conditions': [
['OS=="linux"', {
'cflags': [
@@ -101,6 +98,22 @@
},
},
{
+ 'target_name': 'freetype2',
+ 'type': 'none',
+ 'conditions': [
+ ['OS=="linux"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!(pkg-config freetype2 --cflags)',
+ ],
+ 'ldflags': [
+ '<!(pkg-config freetype2 --libs)',
+ ],
+ },
+ }],
+ ],
+ },
+ {
'target_name': 'idempotent',
'type': 'executable',
'sources': [
@@ -120,5 +133,64 @@
}],
],
},
+ {
+ 'target_name': 'ot-sanitise',
+ 'type': 'executable',
+ 'sources': [
+ 'test/ot-sanitise.cc',
+ 'test/file-stream.h',
+ ],
+ 'dependencies': [
+ 'ots',
+ ],
+ },
+ ],
+ 'conditions': [
+ ['OS=="linux" or OS=="mac"', {
+ 'targets': [
+ {
+ 'target_name': 'validator_checker',
+ 'type': 'executable',
+ 'sources': [
+ 'test/validator-checker.cc',
+ ],
+ 'dependencies': [
+ 'ots',
+ ],
+ 'conditions': [
+ ['OS=="linux"', {
+ 'dependencies': [
+ 'freetype2',
+ ]
+ }],
+ ],
+ },
+ {
+ 'target_name': 'perf',
+ 'type': 'executable',
+ 'sources': [
+ 'test/perf.cc',
+ ],
+ 'dependencies': [
+ 'ots',
+ ],
+ },
+ ],
+ }],
+ ['OS=="linux"', {
+ 'targets': [
+ {
+ 'target_name': 'side_by_side',
+ 'type': 'executable',
+ 'sources': [
+ 'test/side-by-side.cc',
+ ],
+ 'dependencies': [
+ 'freetype2',
+ 'ots',
+ ],
+ },
+ ],
+ }],
],
}