moved the logging-related executables into an intelligent location
diff --git a/aos/linux_code/core/core.cc b/aos/linux_code/core.cc
similarity index 91%
rename from aos/linux_code/core/core.cc
rename to aos/linux_code/core.cc
index c8cec67..a9a58d1 100644
--- a/aos/linux_code/core/core.cc
+++ b/aos/linux_code/core.cc
@@ -10,6 +10,8 @@
// Initializes shared memory. This is the only file that will create the shared
// memory file if it doesn't already exist (and set everything up).
+//
+// Will also create the file given as a first argument.
int main(int argc, char **argv) {
aos::InitCreate();
diff --git a/aos/linux_code/core/core.gyp b/aos/linux_code/core/core.gyp
deleted file mode 100644
index d68168b..0000000
--- a/aos/linux_code/core/core.gyp
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'core',
- 'type': 'executable',
- 'sources': [
- 'core.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- ],
- },
- {
- 'target_name': 'BinaryLogReader',
- 'type': 'executable',
- 'sources': [
- 'BinaryLogReader.cpp',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/linux_code/linux_code.gyp:configuration',
- ],
- },
- {
- 'target_name': 'LogStreamer',
- 'type': 'executable',
- 'sources': [
- 'LogStreamer.cpp',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
- ],
- },
- {
- 'target_name': 'LogDisplayer',
- 'type': 'executable',
- 'sources': [
- 'LogDisplayer.cpp',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/linux_code/linux_code.gyp:init',
- ],
- },
- ],
-}
diff --git a/aos/linux_code/linux_code.gyp b/aos/linux_code/linux_code.gyp
index 49be0ce..7a83c59 100644
--- a/aos/linux_code/linux_code.gyp
+++ b/aos/linux_code/linux_code.gyp
@@ -23,5 +23,15 @@
'<(AOS)/build/aos.gyp:logging',
],
},
+ {
+ 'target_name': 'core',
+ 'type': 'executable',
+ 'sources': [
+ 'core.cc',
+ ],
+ 'dependencies': [
+ 'init',
+ ],
+ },
],
}
diff --git a/aos/linux_code/core/LogFileCommon.h b/aos/linux_code/logging/binary_log_file.h
similarity index 96%
rename from aos/linux_code/core/LogFileCommon.h
rename to aos/linux_code/logging/binary_log_file.h
index 23ddc62..6ce20cd 100644
--- a/aos/linux_code/core/LogFileCommon.h
+++ b/aos/linux_code/logging/binary_log_file.h
@@ -1,5 +1,5 @@
-#ifndef AOS_LINUX_CODE_CORE_LOG_FILE_COMMON_H_
-#define AOS_LINUX_CODE_CORE_LOG_FILE_COMMON_H_
+#ifndef AOS_LINUX_CODE_LOGGING_BINARY_LOG_FILE_H_
+#define AOS_LINUX_CODE_LOGGING_BINARY_LOG_FILE_H_
#include <stdio.h>
#include <errno.h>
@@ -196,4 +196,4 @@
} // namespace logging
} // namespace aos
-#endif
+#endif // AOS_LINUX_CODE_LOGGING_BINARY_LOG_FILE_H_
diff --git a/aos/linux_code/core/BinaryLogReader.cpp b/aos/linux_code/logging/binary_log_writer.cc
similarity index 97%
rename from aos/linux_code/core/BinaryLogReader.cpp
rename to aos/linux_code/logging/binary_log_writer.cc
index 74cc95c..48e9cf1 100644
--- a/aos/linux_code/core/BinaryLogReader.cpp
+++ b/aos/linux_code/logging/binary_log_writer.cc
@@ -12,7 +12,7 @@
#include <map>
#include "aos/linux_code/logging/linux_logging.h"
-#include "aos/linux_code/core/LogFileCommon.h"
+#include "aos/linux_code/logging/binary_log_file.h"
#include "aos/linux_code/init.h"
#include "aos/linux_code/configuration.h"
diff --git a/aos/linux_code/core/LogDisplayer.cpp b/aos/linux_code/logging/log_displayer.cc
similarity index 98%
rename from aos/linux_code/core/LogDisplayer.cpp
rename to aos/linux_code/logging/log_displayer.cc
index 3a98dd4..988c307 100644
--- a/aos/linux_code/core/LogDisplayer.cpp
+++ b/aos/linux_code/logging/log_displayer.cc
@@ -7,7 +7,7 @@
#include <inttypes.h>
#include <errno.h>
-#include "aos/linux_code/core/LogFileCommon.h"
+#include "aos/linux_code/logging/binary_log_file.h"
#include "aos/common/logging/logging_impl.h"
namespace {
diff --git a/aos/linux_code/core/LogStreamer.cpp b/aos/linux_code/logging/log_streamer.cc
similarity index 94%
rename from aos/linux_code/core/LogStreamer.cpp
rename to aos/linux_code/logging/log_streamer.cc
index d570489..ad351e7 100644
--- a/aos/linux_code/core/LogStreamer.cpp
+++ b/aos/linux_code/logging/log_streamer.cc
@@ -11,7 +11,7 @@
#include <inttypes.h>
#include "aos/linux_code/logging/linux_logging.h"
-#include "aos/linux_code/core/LogFileCommon.h"
+#include "aos/linux_code/logging/binary_log_file.h"
#include "aos/linux_code/init.h"
#include "aos/linux_code/ipc_lib/queue.h"
#include "aos/common/logging/logging_impl.h"
diff --git a/aos/linux_code/logging/logging.gyp b/aos/linux_code/logging/logging.gyp
index dfb189c..96c197f 100644
--- a/aos/linux_code/logging/logging.gyp
+++ b/aos/linux_code/logging/logging.gyp
@@ -1,4 +1,40 @@
{
'targets': [
+ {
+ 'target_name': 'binary_log_writer',
+ 'type': 'executable',
+ 'sources': [
+ 'binary_log_writer.cc',
+ ],
+ 'dependencies': [
+ '<(AOS)/build/aos.gyp:logging',
+ '<(AOS)/linux_code/linux_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:configuration',
+ ],
+ },
+ {
+ 'target_name': 'log_streamer',
+ 'type': 'executable',
+ 'sources': [
+ 'log_streamer.cc',
+ ],
+ 'dependencies': [
+ '<(AOS)/build/aos.gyp:logging',
+ '<(AOS)/linux_code/linux_code.gyp:init',
+ '<(AOS)/common/common.gyp:time',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
+ ],
+ },
+ {
+ 'target_name': 'log_displayer',
+ 'type': 'executable',
+ 'sources': [
+ 'log_displayer.cc',
+ ],
+ 'dependencies': [
+ '<(AOS)/build/aos.gyp:logging',
+ '<(AOS)/linux_code/linux_code.gyp:init',
+ ],
+ },
],
}