From 500647968c2159e03452e118e3953e594e44a8c0 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Wed, 9 Jul 2014 22:05:41 -0700 Subject: [PATCH] Prepping poly. --- src/alloy/alloy.h | 4 -- src/poly/poly-private.h | 19 ++++++++++ src/poly/poly.cc | 15 ++++++++ src/poly/poly.h | 17 +++++++++ src/poly/sources.gypi | 30 +++++++++++++++ xenia.gyp | 84 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 165 insertions(+), 4 deletions(-) create mode 100644 src/poly/poly-private.h create mode 100644 src/poly/poly.cc create mode 100644 src/poly/poly.h create mode 100644 src/poly/sources.gypi diff --git a/src/alloy/alloy.h b/src/alloy/alloy.h index f65e8d5a6..72dbf7c06 100644 --- a/src/alloy/alloy.h +++ b/src/alloy/alloy.h @@ -19,10 +19,6 @@ #include -// TODO(benvanik): based on platform/config/etc. -#include - - namespace alloy { } // namespace alloy diff --git a/src/poly/poly-private.h b/src/poly/poly-private.h new file mode 100644 index 000000000..d4095d575 --- /dev/null +++ b/src/poly/poly-private.h @@ -0,0 +1,19 @@ +/** + ****************************************************************************** + * Xenia : Xbox 360 Emulator Research Project * + ****************************************************************************** + * Copyright 2014 Ben Vanik. All rights reserved. * + * Released under the BSD license - see LICENSE in the root for more details. * + ****************************************************************************** + */ + +#ifndef POLY_POLY_PRIVATE_H_ +#define POLY_POLY_PRIVATE_H_ + +#include + +namespace poly { + +} // namespace poly + +#endif // POLY_POLY_PRIVATE_H_ diff --git a/src/poly/poly.cc b/src/poly/poly.cc new file mode 100644 index 000000000..51b85164e --- /dev/null +++ b/src/poly/poly.cc @@ -0,0 +1,15 @@ +/** + ****************************************************************************** + * Xenia : Xbox 360 Emulator Research Project * + ****************************************************************************** + * Copyright 2014 Ben Vanik. All rights reserved. * + * Released under the BSD license - see LICENSE in the root for more details. * + ****************************************************************************** + */ + +#include +#include + +namespace poly { + +} // namespace poly diff --git a/src/poly/poly.h b/src/poly/poly.h new file mode 100644 index 000000000..061fd09c1 --- /dev/null +++ b/src/poly/poly.h @@ -0,0 +1,17 @@ +/** + ****************************************************************************** + * Xenia : Xbox 360 Emulator Research Project * + ****************************************************************************** + * Copyright 2014 Ben Vanik. All rights reserved. * + * Released under the BSD license - see LICENSE in the root for more details. * + ****************************************************************************** + */ + +#ifndef POLY_POLY_H_ +#define POLY_POLY_H_ + +namespace poly { + +} // namespace poly + +#endif // POLY_POLY_H_ diff --git a/src/poly/sources.gypi b/src/poly/sources.gypi new file mode 100644 index 000000000..91b1b6c4f --- /dev/null +++ b/src/poly/sources.gypi @@ -0,0 +1,30 @@ +# Copyright 2014 Ben Vanik. All Rights Reserved. +{ + 'sources': [ + 'poly-private.h', + 'poly.cc', + 'poly.h', + ], + + 'conditions': [ + ['OS == "mac" or OS == "linux"', { + 'sources': [ + ], + }], + ['OS == "linux"', { + 'sources': [ + ], + }], + ['OS == "mac"', { + 'sources': [ + ], + }], + ['OS == "win"', { + 'sources': [ + ], + }], + ], + + 'includes': [ + ], +} diff --git a/xenia.gyp b/xenia.gyp index 28dfca299..e00108f76 100644 --- a/xenia.gyp +++ b/xenia.gyp @@ -192,6 +192,86 @@ }, 'targets': [ + { + 'target_name': 'poly', + 'product_name': 'poly', + 'type': 'static_library', + + 'dependencies': [ + 'gflags', + ], + + 'conditions': [ + ['OS == "mac"', { + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fno-operator-names', + ], + }, + }], + ['OS == "linux"', { + 'cflags': [ + '-fno-operator-names', + ], + }], + ], + + 'export_dependent_settings': [ + 'gflags', + ], + + 'direct_dependent_settings': { + 'include_dirs': [ + 'src/', + ], + + 'target_conditions': [ + ['_type=="shared_library"', { + 'cflags': [ + ], + }], + ['_type=="executable"', { + 'conditions': [ + ['OS == "win"', { + 'libraries': [ + 'kernel32', + 'user32', + 'ole32', + 'ntdll', + 'advapi32', + ], + }], + ['OS == "mac"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + ], + }, + }], + ['OS == "linux"', { + 'libraries': [ + '-lpthread', + '-ldl', + ], + }], + ], + }], + ], + }, + + 'cflags': [ + ], + + 'include_dirs': [ + '.', + 'src/', + '<(INTERMEDIATE_DIR)', + ], + + 'includes': [ + 'src/poly/sources.gypi', + ], + }, + { 'target_name': 'alloy', 'product_name': 'alloy', @@ -201,6 +281,7 @@ 'beaengine', 'gflags', 'llvm', + 'poly', ], 'conditions': [ @@ -222,6 +303,7 @@ 'beaengine', 'gflags', 'llvm', + 'poly', ], 'direct_dependent_settings': { @@ -284,10 +366,12 @@ 'dependencies': [ 'gflags', 'alloy', + 'poly', ], 'export_dependent_settings': [ 'gflags', 'alloy', + 'poly', ], 'direct_dependent_settings': {