cleaned up LOTS of build-related stuff
There were a lot of things that were relying on transitive #include
and/or gyp dependencies that I fixed.
I also got rid of all references to libaos and a lot of references to
aos/aos_core.h and its build target.
This in preparation for removing libaos completely.
diff --git a/aos/atom_code/camera/HTTPStreamer.cpp b/aos/atom_code/camera/HTTPStreamer.cpp
index ad339a8..a5d42b1 100644
--- a/aos/atom_code/camera/HTTPStreamer.cpp
+++ b/aos/atom_code/camera/HTTPStreamer.cpp
@@ -16,8 +16,9 @@
#include <vector>
#include "aos/common/Configuration.h"
-#include "aos/aos_core.h"
+#include "aos/atom_code/init.h"
#include "aos/atom_code/camera/Buffers.h"
+#include "aos/common/logging/logging.h"
namespace aos {
namespace camera {
@@ -385,4 +386,9 @@
} // namespace camera
} // namespace aos
-AOS_RUN_NRT(aos::camera::HTTPStreamer)
+int main() {
+ ::aos::InitNRT();
+ ::aos::camera::HTTPStreamer streamer;
+ streamer.Run();
+ ::aos::Cleanup();
+}
diff --git a/aos/atom_code/camera/Reader.cpp b/aos/atom_code/camera/Reader.cpp
index 2c07332..b9dc36d 100644
--- a/aos/atom_code/camera/Reader.cpp
+++ b/aos/atom_code/camera/Reader.cpp
@@ -13,9 +13,10 @@
#include <string>
#include <inttypes.h>
-#include "aos/aos_core.h"
+#include "aos/atom_code/init.h"
#include "aos/atom_code/camera/V4L2.h"
#include "aos/atom_code/camera/Buffers.h"
+#include "aos/common/logging/logging.h"
#define CLEAR(x) memset(&(x), 0, sizeof(x))
@@ -407,5 +408,9 @@
} // namespace camera
} // namespace aos
-AOS_RUN_NRT(aos::camera::Reader)
-
+int main() {
+ ::aos::InitNRT();
+ ::aos::camera::Reader reader;
+ reader.Run();
+ ::aos::Cleanup();
+}
diff --git a/aos/atom_code/camera/camera.gyp b/aos/atom_code/camera/camera.gyp
index b8e8dd3..270fb4f 100644
--- a/aos/atom_code/camera/camera.gyp
+++ b/aos/atom_code/camera/camera.gyp
@@ -7,7 +7,6 @@
'jni.cpp',
],
'dependencies': [
- '<(AOS)/build/aos.gyp:aos_shared_lib',
'<(AOS)/common/network/network.gyp:socket_so',
'<(AOS)/common/common.gyp:timing_so',
'<(AOS)/atom_code/messages/messages.gyp:messages_so',
@@ -15,7 +14,6 @@
'<(EXTERNALS):libjpeg',
],
'export_dependent_settings': [
- '<(AOS)/build/aos.gyp:aos_shared_lib',
'<(AOS)/common/network/network.gyp:socket_so',
'<(AOS)/common/common.gyp:timing_so',
'<(AOS)/atom_code/messages/messages.gyp:messages_so',
@@ -65,6 +63,7 @@
'dependencies': [
'buffers',
'<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/build/aos.gyp:logging',
],
},
{
@@ -76,6 +75,7 @@
'dependencies': [
'buffers',
'<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/build/aos.gyp:logging',
],
},
],
diff --git a/aos/atom_code/core/LogDisplayer.cpp b/aos/atom_code/core/LogDisplayer.cpp
index d106119..cd664f9 100644
--- a/aos/atom_code/core/LogDisplayer.cpp
+++ b/aos/atom_code/core/LogDisplayer.cpp
@@ -8,7 +8,6 @@
#include <errno.h>
#include "aos/atom_code/core/LogFileCommon.h"
-#include "aos/aos_core.h"
#include "aos/common/logging/logging_impl.h"
namespace {
diff --git a/aos/atom_code/input/JoystickInput.cpp b/aos/atom_code/input/JoystickInput.cpp
index c2a4ce2..2c3b3b9 100644
--- a/aos/atom_code/input/JoystickInput.cpp
+++ b/aos/atom_code/input/JoystickInput.cpp
@@ -1,6 +1,5 @@
#include "aos/atom_code/input/JoystickInput.h"
-#include "aos/aos_core.h"
#include "aos/common/Configuration.h"
#include "aos/common/network/ReceiveSocket.h"
#include "aos/common/messages/RobotState.q.h"
diff --git a/aos/atom_code/ipc_lib/ipc_lib.gyp b/aos/atom_code/ipc_lib/ipc_lib.gyp
index 4dd0fa9..1ff1890 100644
--- a/aos/atom_code/ipc_lib/ipc_lib.gyp
+++ b/aos/atom_code/ipc_lib/ipc_lib.gyp
@@ -26,7 +26,7 @@
],
'dependencies': [
'<(EXTERNALS):gtest',
- '<(AOS)/build/aos.gyp:libaos',
+ 'ipc_lib',
],
},
{
@@ -37,7 +37,7 @@
],
'dependencies': [
'<(EXTERNALS):gtest',
- '<(AOS)/build/aos.gyp:libaos',
+ 'ipc_lib',
],
},
{
@@ -48,7 +48,8 @@
],
'dependencies': [
'<(EXTERNALS):gtest',
- '<(AOS)/build/aos.gyp:libaos',
+ 'ipc_lib',
+ '<(AOS)/build/aos.gyp:logging',
],
},
],
diff --git a/aos/atom_code/ipc_lib/mutex.cpp b/aos/atom_code/ipc_lib/mutex.cpp
index 4753e78..6bf5df5 100644
--- a/aos/atom_code/ipc_lib/mutex.cpp
+++ b/aos/atom_code/ipc_lib/mutex.cpp
@@ -5,8 +5,8 @@
#include <stdio.h>
#include <string.h>
-#include "aos/aos_core.h"
#include "aos/common/type_traits.h"
+#include "aos/common/logging/logging.h"
namespace aos {
diff --git a/aos/atom_code/ipc_lib/queue_test.cpp b/aos/atom_code/ipc_lib/queue_test.cpp
index d4eb700..6fb6eca 100644
--- a/aos/atom_code/ipc_lib/queue_test.cpp
+++ b/aos/atom_code/ipc_lib/queue_test.cpp
@@ -8,7 +8,6 @@
#include "gtest/gtest.h"
-#include "aos/aos_core.h"
#include "aos/atom_code/ipc_lib/sharedmem_test_setup.h"
#include "aos/common/type_traits.h"
diff --git a/aos/atom_code/messages/messages.gyp b/aos/atom_code/messages/messages.gyp
index a5286cc..05dec59 100644
--- a/aos/atom_code/messages/messages.gyp
+++ b/aos/atom_code/messages/messages.gyp
@@ -8,11 +8,9 @@
'DriverStationDisplay.cpp',
],
'dependencies': [
- '<(AOS)/build/aos.gyp:aos_shared_lib',
'<(AOS)/build/aos.gyp:logging',
],
'export_dependent_settings': [
- '<(AOS)/build/aos.gyp:aos_shared_lib',
],
'direct_dependent_settings': {
'variables': {
diff --git a/aos/atom_code/output/HTTPServer.cpp b/aos/atom_code/output/HTTPServer.cpp
index b0d6b93..b593938 100644
--- a/aos/atom_code/output/HTTPServer.cpp
+++ b/aos/atom_code/output/HTTPServer.cpp
@@ -10,7 +10,6 @@
#include "event2/event.h"
-#include "aos/aos_core.h"
#include "aos/common/scoped_fd.h"
#include "aos/common/unique_malloc_ptr.h"
diff --git a/aos/atom_code/output/evhttp_ctemplate_emitter.cc b/aos/atom_code/output/evhttp_ctemplate_emitter.cc
index ed2a83f..9c3ac17 100644
--- a/aos/atom_code/output/evhttp_ctemplate_emitter.cc
+++ b/aos/atom_code/output/evhttp_ctemplate_emitter.cc
@@ -1,6 +1,6 @@
#include "aos/atom_code/output/evhttp_ctemplate_emitter.h"
-#include "aos/aos_core.h"
+#include "aos/common/logging/logging.h"
namespace aos {
namespace http {
diff --git a/aos/atom_code/output/motor_output.cc b/aos/atom_code/output/motor_output.cc
index 2a92437..d324da1 100644
--- a/aos/atom_code/output/motor_output.cc
+++ b/aos/atom_code/output/motor_output.cc
@@ -3,8 +3,8 @@
#include <math.h>
#include "aos/common/Configuration.h"
-#include "aos/aos_core.h"
#include "aos/common/control_loop/Timing.h"
+#include "aos/common/logging/logging.h"
namespace aos {
diff --git a/aos/atom_code/output/output.gyp b/aos/atom_code/output/output.gyp
index 2dfcd0e..6fb5956 100644
--- a/aos/atom_code/output/output.gyp
+++ b/aos/atom_code/output/output.gyp
@@ -9,13 +9,14 @@
'ctemplate_cache.cc',
],
'dependencies': [
- '<(AOS)/build/aos.gyp:libaos',
'<(EXTERNALS):libevent',
'<(EXTERNALS):ctemplate',
'<(AOS)/common/common.gyp:once',
+ '<(AOS)/common/common.gyp:common',
+ '<(AOS)/common/common.gyp:scoped_fd',
+ '<(AOS)/build/aos.gyp:logging',
],
'export_dependent_settings': [
-# Our headers #include headers from both of these.
'<(EXTERNALS):libevent',
'<(EXTERNALS):ctemplate',
],
@@ -31,6 +32,7 @@
'<(AOS)/common/common.gyp:common',
'<(AOS)/common/common.gyp:timing',
'<(EXTERNALS):WPILib-NetworkRobotValues',
+ '<(AOS)/build/aos.gyp:logging',
],
'export_dependent_settings': [
'<(AOS)/common/network/network.gyp:socket',