Remove all of the GYP files
All of the info is in the Bazel ones now.
Change-Id: I85e0058360e64a875b2e4c379d62447383763bdd
diff --git a/aos/build/aos.gyp b/aos/build/aos.gyp
deleted file mode 100644
index bbdb2c9..0000000
--- a/aos/build/aos.gyp
+++ /dev/null
@@ -1,65 +0,0 @@
-# Converted to bazel
-# This file has all of the aos targets.
-{
- 'targets': [
- # A target for things used by the logging implementation (except die) to
- # depend on that allows linking successfully with logging calls. However,
- # executables containing targets that depend on this still need a dependency
- # on logging somewhere or else they won't link.
- {
- 'target_name': 'logging_interface',
- 'type': 'static_library',
- 'sources': [
- '<(AOS)/common/logging/logging_interface.cc',
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'sources': [
- '<(AOS)/linux_code/logging/linux_interface.cc',
- '<(AOS)/common/logging/context.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:complex_thread_local',
- ],
- }],
- ],
- 'dependencies': [
- '<(AOS)/common/common.gyp:die',
- '<(AOS)/common/libc/libc.gyp:aos_strerror',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/libc/libc.gyp:aos_strerror',
- ],
- },
- {
- 'target_name': 'logging',
- 'type': 'static_library',
- 'sources': [
- '<(AOS)/common/logging/logging_impl.cc',
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'sources': [
- '<(AOS)/linux_code/logging/linux_logging.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
- '<(AOS)/common/common.gyp:time',
- ],
- 'export_dependent_settings': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
- ],
- }],
- ],
- 'dependencies': [
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/common.gyp:once',
- 'logging_interface',
- '<(AOS)/common/common.gyp:queue_types',
- ],
- 'export_dependent_settings': [
- 'logging_interface',
- ],
- },
- ],
-}
diff --git a/aos/build/aos.gypi b/aos/build/aos.gypi
deleted file mode 100644
index 5889546..0000000
--- a/aos/build/aos.gypi
+++ /dev/null
@@ -1,306 +0,0 @@
-# This file gets passed to gyp with -I so that it gets included everywhere.
-{
- 'variables': {
- 'AOS': '<(DEPTH)/aos',
-# A directory with everything in it ignored from source control.
- 'TMPDIR': '<(DEPTH)/aos/build/temp',
- 'aos_abs': '<!(readlink -f <(DEPTH)/aos)', # for use in non-path contexts
-# The .gyp file that has targets for the various external libraries.
- 'EXTERNALS': '<(AOS)/build/externals.gyp',
-# The directory that gets rsynced to the target.
- 'rsync_dir': '<(PRODUCT_DIR)/outputs',
-# The directory for executables that don't get rsynced to the target.
- 'other_outputs_dir': '<(PRODUCT_DIR)/other_outputs',
-# The directory that executables that depend on <(EXTERNALS):gtest get put into.
- 'test_dir': '<(PRODUCT_DIR)/tests',
-
-# Stuck into a variable (with a space on the end) to make disabling it easy.
- 'ccache': '<!(which ccache) ',
-
- 'disable_sanitizers': [
- # Bad alignment is just slow on x86 and traps on ARM, so we'll find
- # it other ways, and some x86 code does it on purpose.
- 'alignment',
- ],
- },
- 'conditions': [
- ['PLATFORM=="linux-arm_frc-gcc"', {
- 'make_global_settings': [
- ['CC', '<(ccache)<!(which arm-frc-linux-gnueabi-gcc-4.9)'],
- ['CXX', '<(ccache)<!(which arm-frc-linux-gnueabi-g++-4.9)'],
- ['LINK_wrapper', '<!(realpath -s <(AOS)/build/strip_debuglink) <!(which arm-frc-linux-gnueabi-objcopy)'],
- ],
- },
- ], ['PLATFORM=="linux-arm_frc-clang"', {
- 'variables': {
- 'arm-clang-symlinks': '<!(realpath -s <(AOS)/build/arm-clang-symlinks)',
- 'arm-clang-sysroot': '<(arm-clang-symlinks)/sysroot',
-# Flags that should be passed to all compile/link/etc commands.
- 'platflags': [
- '-target', 'armv7a-frc-linux-gnueabi',
- '-mfloat-abi=softfp',
- '--sysroot=<(arm-clang-sysroot)',
-
- # TODO(brians): See if it will run with this enabled.
- #-mhwdiv=arm,thumb
- ],
- },
- 'make_global_settings': [
- ['CC', '<(ccache)<(arm-clang-symlinks)/bin/clang'],
- ['CXX', '<(ccache)<(arm-clang-symlinks)/bin/clang++'],
- ['LINK_wrapper', '<!(realpath -s <(AOS)/build/strip_debuglink) <!(which arm-frc-linux-gnueabi-objcopy)'],
- ],
- 'target_defaults': {
- 'cflags': [
- '<@(platflags)',
- ],
- 'cflags_cc': [
- '-isystem', '<(arm-clang-sysroot)/include/c++/4.9.1',
- '-isystem', '<(arm-clang-sysroot)/include/c++/4.9.1/arm-frc-linux-gnueabi',
- ],
- 'ldflags': [
- '<@(platflags)',
- '-L/usr/lib/x86_64-linux-gnu/gcc/arm-frc-linux-gnueabi/4.9.1',
- '-L<(arm-clang-symlinks)/more_libs',
- '-B/usr/lib/x86_64-linux-gnu/gcc/arm-frc-linux-gnueabi/4.9.1',
- ],
- },
- },
- ], ['PLATFORM=="linux-amd64-clang"', {
- 'make_global_settings': [
- ['CC', '<(ccache)<!(which clang)'],
- ['CXX', '<(ccache)<!(which clang++)'],
- ],
- },
- ], ['PLATFORM=="linux-amd64-gcc_4.8"', {
- 'make_global_settings': [
- ['CC', '<(ccache)/opt/clang-3.5/bin/gcc'],
- ['CXX', '<(ccache)/opt/clang-3.5/bin/g++'],
- ],
- },
- ], ['SANITIZER!="none"', {
- 'target_defaults': {
- 'cflags': [
- '-fsanitize=<(SANITIZER)',
- ],
- 'ldflags': [
- '-fsanitize=<(SANITIZER)',
- ],
- 'defines': [
-# GCC doesn't have __has_feature, so we have to use this instead.
- 'AOS_SANITIZER_<(SANITIZER)',
- ],
- },
- },
- ], ['SANITIZER!="none" and COMPILER!="gcc"', {
- 'target_defaults': {
- 'cflags': [
- '-fno-sanitize-recover',
- '-fno-sanitize=<!(echo <(disable_sanitizers) | sed "s/ /,/g")',
- ],
- },
- },
- ], ['SANITIZER!="thread"', {
- 'libraries': [
- '<!(readlink -f <(AOS)/../output/compiled-<(ARCHITECTURE)<(EXTERNALS_EXTRA)/gperftools-2.3-prefix/lib/libtcmalloc.a)',
- '<!(readlink -f <(AOS)/../output/compiled-<(ARCHITECTURE)<(EXTERNALS_EXTRA)/libunwind-1.1-prefix/lib/libunwind.a)',
- ],
- },
- ], ['EXTERNALS_EXTRA=="-fPIE"', {
- 'target_defaults': {
- 'cflags': [
- '-fPIE',
- ],
- 'ldflags': [
- '-fPIE',
- ],
- 'link_settings': {
- 'ldflags': [
- '-pie',
- ],
- },
- },
- },
- ], ['SANITIZER=="memory"', {
- 'target_defaults': {
- 'cflags': [
- '-fsanitize-memory-track-origins',
- ],
- 'ldflags': [
- '-fsanitize-memory-track-origins',
- ],
- },
- },
- ],
- ],
- 'target_defaults': {
- 'defines': [
- '__STDC_FORMAT_MACROS',
- '__STDC_CONSTANT_MACROS',
- '__STDC_LIMIT_MACROS',
- 'AOS_ARCHITECTURE_<(ARCHITECTURE)',
- '_FILE_OFFSET_BITS=64',
- ],
- 'ldflags': [
- '-pipe',
- '-pthread',
- ],
- 'libraries': [
- '-lm',
- '-lrt',
- ],
- 'cflags': [
- '-pipe',
-
- '-pthread',
-
- '-Wall',
- '-Wextra',
- '-Wswitch-enum',
- '-Wpointer-arith',
- '-Wstrict-aliasing=2',
- '-Wcast-qual',
- '-Wcast-align',
- '-Wwrite-strings',
- '-Wtype-limits',
- '-Wsign-compare',
- '-Wformat=2',
- '-Werror',
-
- '-ggdb3',
- # Generate debugging info that gdb 7.4.1 can understand (Wheezy).
- # TODO(Brian): Remove this once we upgrade to Jessie.
- '-gdwarf-3',
- ],
- 'cflags_c': [
- '-std=gnu99',
- ],
- 'cflags_cc': [
- '-std=gnu++11',
- ],
- 'include_dirs': [
- '<(DEPTH)',
- ],
- # These have to be here because apparently gyp evaluates target_conditions
- # even if the target is never used.
- 'variables': {
- # Set this to 1 to disable rsyncing the file to the target.
- 'no_rsync%': 0,
- # Set this to 1 if this file is a test that should not be run by
- # `build.py tests`.
- 'is_special_test%': 0,
- },
- 'conditions': [
- ['DEBUG=="yes"', {
- 'defines': [
- 'AOS_DEBUG=1',
- ],
- 'conditions': [
- ['COMPILER!="clang"', {
- 'cflags': [
- '-Og',
- ],
- },
- ], ['COMPILER=="clang" and SANITIZER=="none"', {
- 'cflags': [
- '-O0',
- ],
- },
- ], ['COMPILER=="clang" and SANITIZER!="none"', {
- 'cflags': [
- '-O1',
- ],
- }
- ]
- ],
- 'cflags': [
- '-fno-omit-frame-pointer',
- ],
- }, { # 'DEBUG=="no"'
- 'defines': [
- 'AOS_DEBUG=0',
- '_FORTIFY_SOURCE=2',
- ],
- 'conditions': [
- # TODO(Brian): Remove this special case once we get a new enough
- # GCC here that it supports -Oz.
- ['COMPILER=="gcc" and ARCHITECTURE=="arm_frc"', {
- 'cflags': [
- '-Os',
- ],
- 'ldflags': [
- '-Os',
- ],
- }, {
- 'cflags': [
- '-Oz',
- ],
- 'ldflags': [
- '-Oz',
- ],
- }
- ], ['ARCHITECTURE=="amd64"', {
- 'cflags': [
- '-fstack-protector-all',
- ],
- }
- ],
- ],
- 'cflags': [
- '-fomit-frame-pointer',
- ],
- }
- ], ['OS=="linux" and ARCHITECTURE=="arm" and COMPILER=="gcc" and DEBUG=="yes"', {
- 'cflags': [
- # GCC doesn't like letting us use r7 (which is also the frame
- # pointer) to pass the syscall number to the kernel even when
- # it's marked as clobbered.
- # See <https://bugzilla.mozilla.org/show_bug.cgi?id=633436> for
- # some more discussion.
- '-fomit-frame-pointer',
- ],
- }
- ],
- ['ARCHITECTURE=="arm"', {
- 'cflags': [
- '-mcpu=cortex-a9',
- '-mfpu=neon',
- '-mfloat-abi=softfp',
- ],
- 'ldflags': [
- '-mcpu=cortex-a9',
- '-mfpu=neon',
- '-mfloat-abi=softfp',
- ],
- }],
- ['COMPILER=="gcc"', {
- 'cflags': [
- '-Wunused-local-typedefs',
- ],
- 'defines': [
- '__has_feature(n)=0'
- ],
- }], ['COMPILER=="clang"', {
- 'cflags': [
- '-fcolor-diagnostics',
- '-fmessage-length=80',
- '-fmacro-backtrace-limit=0',
- ],
- 'defines': [
- # This tells clang's optimizer the same thing.
- '__builtin_assume_aligned(p, a)=({ const typeof(p) my_p_ = (p); ((((uintptr_t)my_p_ % (a)) == 0u) ? my_p_ : (__builtin_unreachable(), (my_p_))); })',
- ],
- }],
- ],
- 'target_conditions': [
-# Default to putting outputs into rsync_dir.
- ['no_rsync==0 and _type!="static_library"', {
- 'product_dir': '<(rsync_dir)',
- },
- ], ['no_rsync==1 and _type!="static_library"', {
- 'product_dir': '<(other_outputs_dir)',
- },
- ],
- ],
- },
-}
diff --git a/aos/build/aos_all.gyp b/aos/build/aos_all.gyp
deleted file mode 100644
index b546087..0000000
--- a/aos/build/aos_all.gyp
+++ /dev/null
@@ -1,55 +0,0 @@
-# This file has the executables etc that AOS builds.
-# User .gyp files for the prime should depend on :Prime.
-{
- 'targets': [
- {
- 'target_name': 'Prime',
- 'type': 'none',
- 'variables': {
- 'no_rsync': 1,
- },
- 'dependencies': [
- 'Common',
- '<(AOS)/linux_code/linux_code.gyp:core',
- '<(AOS)/linux_code/logging/logging.gyp:binary_log_writer',
- '<(AOS)/linux_code/logging/logging.gyp:log_streamer',
- '<(AOS)/linux_code/logging/logging.gyp:log_displayer',
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:raw_queue_test',
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:ipc_stress_test',
- '<(AOS)/linux_code/starter/starter.gyp:starter_exe',
- '<(AOS)/linux_code/linux_code.gyp:complex_thread_local_test',
- '<(AOS)/common/common.gyp:stl_mutex_test',
- '<(AOS)/linux_code/linux_code.gyp:dump_rtprio',
- '<(AOS)/common/actions/actions.gyp:action_test',
- ],
- },
- {
- 'target_name': 'Common',
- 'type': 'none',
- 'variables': {
- 'no_rsync': 1,
- },
- 'dependencies': [
- '<(AOS)/common/common.gyp:type_traits_test',
- '<(AOS)/common/common.gyp:time_test',
- '<(AOS)/common/common.gyp:mutex_test',
- '<(AOS)/common/common.gyp:condition_test',
- '<(AOS)/common/common.gyp:once_test',
- '<(AOS)/common/common.gyp:event_test',
- '<(AOS)/common/common.gyp:queue_testutils_test',
- '<(AOS)/common/common.gyp:transaction_test',
- '<(AOS)/common/logging/logging.gyp:logging_impl_test',
- '<(AOS)/common/util/util.gyp:options_test',
- '<(AOS)/common/common.gyp:queue_test',
- '<(AOS)/common/common.gyp:die_test',
- '<(AOS)/common/common.gyp:queue_types_test',
- '<(AOS)/common/util/util.gyp:trapezoid_profile_test',
- '<(AOS)/common/util/util.gyp:wrapping_counter_test',
- '<(AOS)/common/libc/libc.gyp:dirname_test',
- '<(AOS)/common/libc/libc.gyp:aos_strerror_test',
- '<(AOS)/common/libc/libc.gyp:aos_strsignal_test',
- '<(AOS)/common/util/util.gyp:run_command_test',
- ],
- },
- ],
-}
diff --git a/aos/build/arm-clang-symlinks/README b/aos/build/arm-clang-symlinks/README
deleted file mode 100644
index 75210a5..0000000
--- a/aos/build/arm-clang-symlinks/README
+++ /dev/null
@@ -1,11 +0,0 @@
-This directory has symlinks to various other files to help clang figure out how
-to cross compile for arm with FIRST's toolchain setup.
-
-sysroot/ has symlinks to various places so it can be used as a sysroot when
- compiling.
-bin/ has symlinks to the various tools so clang can find the native toolchain.
-more_libs/ has modified files of several psuedo-shared-objects which are
- actually linker scripts as distributed with the FIRST toolchain. For some
- reason, I can't get the linker to follow the documented behavior of
- prefixing the absolute paths contained in them with the sysroot, so we have
- copies which don't have any paths.
diff --git a/aos/build/arm-clang-symlinks/bin/as b/aos/build/arm-clang-symlinks/bin/as
deleted file mode 120000
index f5bd4f8..0000000
--- a/aos/build/arm-clang-symlinks/bin/as
+++ /dev/null
@@ -1 +0,0 @@
-/usr/bin/arm-frc-linux-gnueabi-as
\ No newline at end of file
diff --git a/aos/build/arm-clang-symlinks/bin/clang b/aos/build/arm-clang-symlinks/bin/clang
deleted file mode 120000
index c456250..0000000
--- a/aos/build/arm-clang-symlinks/bin/clang
+++ /dev/null
@@ -1 +0,0 @@
-/usr/bin/clang
\ No newline at end of file
diff --git a/aos/build/arm-clang-symlinks/bin/clang++ b/aos/build/arm-clang-symlinks/bin/clang++
deleted file mode 120000
index 2932265..0000000
--- a/aos/build/arm-clang-symlinks/bin/clang++
+++ /dev/null
@@ -1 +0,0 @@
-/usr/bin/clang++
\ No newline at end of file
diff --git a/aos/build/arm-clang-symlinks/bin/ld b/aos/build/arm-clang-symlinks/bin/ld
deleted file mode 120000
index a12d1ed..0000000
--- a/aos/build/arm-clang-symlinks/bin/ld
+++ /dev/null
@@ -1 +0,0 @@
-/usr/bin/arm-frc-linux-gnueabi-ld
\ No newline at end of file
diff --git a/aos/build/arm-clang-symlinks/more_libs/libc.so b/aos/build/arm-clang-symlinks/more_libs/libc.so
deleted file mode 100644
index 714bcfe..0000000
--- a/aos/build/arm-clang-symlinks/more_libs/libc.so
+++ /dev/null
@@ -1,5 +0,0 @@
-/* GNU ld script
- Use the shared library, but some functions are only in
- the static library, so try that secondarily. */
-OUTPUT_FORMAT(elf32-littlearm)
-GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.3 ) )
diff --git a/aos/build/arm-clang-symlinks/more_libs/libpthread.so b/aos/build/arm-clang-symlinks/more_libs/libpthread.so
deleted file mode 100644
index 71f034f..0000000
--- a/aos/build/arm-clang-symlinks/more_libs/libpthread.so
+++ /dev/null
@@ -1,5 +0,0 @@
-/* GNU ld script
- Use the shared library, but some functions are only in
- the static library, so try that secondarily. */
-OUTPUT_FORMAT(elf32-littlearm)
-GROUP ( libpthread.so.0 libpthread_nonshared.a )
diff --git a/aos/build/arm-clang-symlinks/sysroot/include b/aos/build/arm-clang-symlinks/sysroot/include
deleted file mode 120000
index f4878ac..0000000
--- a/aos/build/arm-clang-symlinks/sysroot/include
+++ /dev/null
@@ -1 +0,0 @@
-/usr/arm-frc-linux-gnueabi/include
\ No newline at end of file
diff --git a/aos/build/arm-clang-symlinks/sysroot/lib b/aos/build/arm-clang-symlinks/sysroot/lib
deleted file mode 120000
index 5a01f30..0000000
--- a/aos/build/arm-clang-symlinks/sysroot/lib
+++ /dev/null
@@ -1 +0,0 @@
-/usr/arm-frc-linux-gnueabi/lib
\ No newline at end of file
diff --git a/aos/build/arm-clang-symlinks/sysroot/usr b/aos/build/arm-clang-symlinks/sysroot/usr
deleted file mode 120000
index 5d4ffd7..0000000
--- a/aos/build/arm-clang-symlinks/sysroot/usr
+++ /dev/null
@@ -1 +0,0 @@
-/usr/arm-frc-linux-gnueabi/usr
\ No newline at end of file
diff --git a/aos/build/bin-ld.gold/ld b/aos/build/bin-ld.gold/ld
deleted file mode 120000
index af8591b..0000000
--- a/aos/build/bin-ld.gold/ld
+++ /dev/null
@@ -1 +0,0 @@
-/usr/bin/ld.gold
\ No newline at end of file
diff --git a/aos/build/build.py b/aos/build/build.py
deleted file mode 100755
index 0c8898b..0000000
--- a/aos/build/build.py
+++ /dev/null
@@ -1,1010 +0,0 @@
-#!/usr/bin/python3
-
-import sys
-import subprocess
-import re
-import os
-import os.path
-import string
-import shutil
-import errno
-import queue
-import threading
-import pty
-import signal
-
-class TestThread(threading.Thread):
- """Runs 1 test and keeps track of its current state.
-
- A TestThread is either waiting to start the test, actually running it, done,
- running it, or stopped. The first 3 always happen in that order and can
- change to stopped at any time.
-
- It will finish (ie join() will return) once the process has exited, at which
- point accessing process to see the status is OK.
-
- Attributes:
- executable: The file path of the executable to run.
- args: A tuple of arguments to give the executable.
- env: The environment variables to set.
- done_queue: A queue.Queue to place self on once done running the test.
- start_semaphore: A threading.Semaphore to wait on before starting.
- process_lock: A lock around process.
- process: The currently executing test process or None. Synchronized by
- process_lock.
- stopped: True if we're stopped.
- output: A queue of lines of output from the test.
- """
-
- class OutputCopier(threading.Thread):
- """Copies the output of a test from its output pty into a queue.
-
- This is necessary because otherwise everything locks up if the test writes
- too much output and fills up the pty's buffer.
- """
-
- def __init__(self, name, fd, queue):
- super(TestThread.OutputCopier, self).__init__(
- name=(name + '.OutputCopier'))
-
- self.fd = fd
- self.queue = queue
-
- def run(self):
- with os.fdopen(self.fd) as to_read:
- try:
- for line in to_read:
- self.queue.put(line)
- except IOError as e:
-# An EIO from the master side of the pty means we hit the end.
- if e.errno == errno.EIO:
- return
- else:
- raise e
-
- def __init__(self, executable, args, env, done_queue, start_semaphore):
- super(TestThread, self).__init__(
- name=os.path.split(executable)[-1])
-
- self.executable = executable
- self.args = args
- self.env = env
- self.done_queue = done_queue
- self.start_semaphore = start_semaphore
-
- self.output = queue.Queue()
-
- self.process_lock = threading.Lock()
- self.process = None
- self.stopped = False
- self.returncode = None
- self.output_copier = None
-
- def run(self):
- def setup_test_process():
-# Shove it into its own process group so we can kill any subprocesses easily.
- os.setpgid(0, 0)
-
- with self.start_semaphore:
- with self.process_lock:
- if self.stopped:
- return
- test_output('Starting test %s...' % self.name)
- output_to_read, subprocess_output = pty.openpty()
- self.output_copier = TestThread.OutputCopier(self.name, output_to_read,
- self.output)
- self.output_copier.start()
- try:
- with self.process_lock:
- self.process = subprocess.Popen((self.name,) + self.args,
- executable=self.executable,
- env=self.env,
- stderr=subprocess.STDOUT,
- stdout=subprocess_output,
- stdin=open(os.devnull, 'r'),
- preexec_fn=setup_test_process)
- finally:
- os.close(subprocess_output)
- self.process.wait()
- with self.process_lock:
- self.returncode = self.process.returncode
- self.process = None
- if not self.stopped:
- self.output_copier.join()
- self.done_queue.put(self)
-
- def kill_process(self):
- """Forcibly terminates any running process."""
- with self.process_lock:
- if not self.process:
- return
- try:
- os.killpg(self.process.pid, signal.SIGKILL)
- except OSError as e:
- if e.errno == errno.ESRCH:
- # We don't really care if it's already gone.
- pass
- else:
- raise e
- def stop(self):
- """Changes self to the stopped state."""
- with self.process_lock:
- self.stopped = True
-
-def aos_path():
- """Returns:
- A relative path to the aos directory.
- """
- return os.path.join(os.path.dirname(__file__), '..')
-
-def get_ip():
- """Retrieves the IP address to download code to."""
- FILENAME = os.path.normpath(os.path.join(aos_path(), '..',
- 'output', 'ip_address.txt'))
- if not os.access(FILENAME, os.R_OK):
- os.makedirs(os.path.dirname(FILENAME), exist_ok=True)
- with open(FILENAME, 'w') as f:
- f.write('roboRIO-971.local')
- with open(FILENAME, 'r') as f:
- return f.readline().strip()
-
-def get_temp_dir():
- """Retrieves the temporary directory to use when downloading."""
- return '/home/admin/tmp/aos_downloader'
-
-def get_target_dir():
- """Retrieves the tempory deploy directory for downloading code."""
- return '/home/admin/robot_code'
-
-def user_output(message):
- """Prints message to the user."""
- print('build.py: ' + message, file=sys.stderr)
-
-# A lock to avoid making a mess intermingling test-related messages.
-test_output_lock = threading.RLock()
-def test_output(message):
- """Prints message to the user. Intended for messages related to tests."""
- with test_output_lock:
- print('tests: ' + message, file=sys.stdout)
-
-def call_download_externals(argument):
- """Calls download_externals.sh for a given set of externals.
-
- Args:
- argument: The argument to pass to the shell script to tell it what to
- download.
- """
- subprocess.check_call(
- (os.path.join(aos_path(), 'build', 'download_externals.sh'),
- argument),
- stdin=open(os.devnull, 'r'))
-
-class Processor(object):
- """Represents a processor architecture we can build for."""
-
- class UnknownPlatform(Exception):
- def __init__(self, message):
- super(Processor.UnknownPlatform, self).__init__()
- self.message = message
-
- class Platform(object):
- """Represents a single way to build the code."""
-
- def outdir(self):
- """Returns:
- The path of the directory build outputs get put in to.
- """
- return os.path.join(
- aos_path(), '..', 'output', self.outname())
- def build_ninja(self):
- """Returns:
- The path of the build.ninja file.
- """
- return os.path.join(self.outdir(), 'build.ninja')
-
- def do_deploy(self, dry_run, command):
- """Helper for subclasses to implement deploy.
-
- Args:
- dry_run: If True, prints the command instead of actually running it.
- command: A tuple of command-line arguments.
- """
- real_command = (('echo',) + command) if dry_run else command
- subprocess.check_call(real_command, stdin=open(os.devnull, 'r'))
-
- def deploy(self, dry_run):
- """Downloads the compiled code to the target computer."""
- raise NotImplementedError('deploy should be overriden')
- def outname(self):
- """Returns:
- The name of the directory the code will be compiled to.
- """
- raise NotImplementedError('outname should be overriden')
- def os(self):
- """Returns:
- The name of the operating system this platform is for.
-
- This will be used as the value of the OS gyp variable.
- """
- raise NotImplementedError('os should be overriden')
- def gyp_platform(self):
- """Returns:
- The platform name the .gyp files know.
-
- This will be used as the value of the PLATFORM gyp variable.
- """
- raise NotImplementedError('gyp_platform should be overriden')
- def architecture(self):
- """Returns:
- The processor architecture for this platform.
-
- This will be used as the value of the ARCHITECTURE gyp variable.
- """
- raise NotImplementedError('architecture should be overriden')
- def compiler(self):
- """Returns:
- The compiler used for this platform.
-
- Everything before the first _ will be used as the value of the
- COMPILER gyp variable and the whole thing will be used as the value
- of the FULL_COMPILER gyp variable.
- """
- raise NotImplementedError('compiler should be overriden')
- def sanitizer(self):
- """Returns:
- The sanitizer used on this platform.
-
- This will be used as the value of the SANITIZER gyp variable.
-
- "none" if there isn't one.
- """
- raise NotImplementedError('sanitizer should be overriden')
- def debug(self):
- """Returns:
- Whether or not this platform compiles with debugging information.
-
- The DEBUG gyp variable will be set to "yes" or "no" based on this.
- """
- raise NotImplementedError('debug should be overriden')
- def build_env(self):
- """Returns:
- A map of environment variables to set while building this platform.
- """
- raise NotImplementedError('build_env should be overriden')
- def priority(self):
- """Returns:
- A relative priority for this platform relative to other ones.
-
- Higher priority platforms will get built, tested, etc first. Generally,
- platforms which give higher-quality compiler errors etc should come first.
- """
- return 0
-
- def check_installed(self, platforms, is_deploy):
- """Makes sure that everything necessary to build platforms are installed."""
- raise NotImplementedError('check_installed should be overriden')
- def parse_platforms(self, platforms_string):
- """Args:
- string: A user-supplied string saying which platforms to select.
-
- Returns:
- A tuple of Platform objects.
-
- Raises:
- Processor.UnknownPlatform: Parsing string didn't work out.
- """
- raise NotImplementedError('parse_platforms should be overriden')
- def extra_gyp_flags(self):
- """Returns:
- A tuple of extra flags to pass to gyp (if any).
- """
- return ()
- def modify_ninja_file(self, ninja_file):
- """Modifies a freshly generated ninja file as necessary.
-
- Args:
- ninja_file: Path to the file to modify.
- """
- pass
- def download_externals(self, platforms):
- """Calls download_externals as appropriate to build platforms.
-
- Args:
- platforms: A list of platforms to download external libraries for.
- """
- raise NotImplementedError('download_externals should be overriden')
-
- def do_check_installed(self, other_packages):
- """Helper for subclasses to implement check_installed.
-
- Args:
- other_packages: A tuple of platform-specific packages to check for."""
- all_packages = other_packages
- # Necessary to build stuff.
- all_packages += ('ccache', 'make')
- # Necessary to download stuff to build.
- all_packages += ('wget', 'git', 'subversion', 'patch', 'unzip', 'bzip2')
- # Necessary to build externals stuff.
- all_packages += ('python', 'gcc', 'g++')
- not_found = []
- try:
- # TODO(brians): Check versions too.
- result = subprocess.check_output(
- ('dpkg-query',
- r"--showformat='${binary:Package}\t${db:Status-Abbrev}\n'",
- '--show') + all_packages,
- stdin=open(os.devnull, 'r'),
- stderr=subprocess.STDOUT)
- for line in result.decode('utf-8').rstrip().splitlines(True):
- match = re.match('^([^\t]+)\t[^i][^i]$', line)
- if match:
- not_found.append(match.group(1))
- except subprocess.CalledProcessError as e:
- output = e.output.decode('utf-8').rstrip()
- for line in output.splitlines(True):
- match = re.match(r'dpkg-query: no packages found matching (.*)',
- line)
- if match:
- not_found.append(match.group(1))
- if not_found:
- user_output('Some packages not installed: %s.' % ', '.join(not_found))
- user_output('Try something like `sudo apt-get install %s`.' %
- ' '.join(not_found))
- exit(1)
-
-class PrimeProcessor(Processor):
- """A Processor subclass for building prime code."""
-
- class Platform(Processor.Platform):
- def __init__(self, architecture, folder, compiler, debug, sanitizer):
- super(PrimeProcessor.Platform, self).__init__()
-
- self.__architecture = architecture
- self.__folder = folder
- self.__compiler = compiler
- self.__debug = debug
- self.__sanitizer = sanitizer
-
- def __repr__(self):
- return 'PrimeProcessor.Platform(architecture=%s, compiler=%s, debug=%s' \
- ', sanitizer=%s)' \
- % (self.architecture(), self.compiler(), self.debug(),
- self.sanitizer())
- def __str__(self):
- return '%s-%s-%s%s-%s' % (self.architecture(), self.folder(),
- self.compiler(),
- '-debug' if self.debug() else '',
- self.sanitizer())
-
- def os(self):
- return 'linux'
- def gyp_platform(self):
- return '%s-%s-%s' % (self.os(), self.architecture(), self.compiler())
- def architecture(self):
- return self.__architecture
- def folder(self):
- return self.__folder
- def compiler(self):
- return self.__compiler
- def sanitizer(self):
- return self.__sanitizer
- def debug(self):
- return self.__debug
-
- def outname(self):
- return str(self)
-
- def priority(self):
- r = 0
- if self.compiler() == 'clang':
- r += 100
- if self.sanitizer() != 'none':
- r -= 50
- elif self.debug():
- r -= 10
- if self.architecture() == 'amd64':
- r += 5
- return r
-
- def deploy(self, dry_run):
- """Downloads code to the prime in a way that avoids clashing too badly with
- starter (like the naive download everything one at a time)."""
- if not self.architecture().endswith('_frc'):
- raise Exception("Don't know how to download code to a %s." %
- self.architecture())
- SUM = 'md5sum'
- TARGET_DIR = get_target_dir()
- TEMP_DIR = get_temp_dir()
- TARGET = 'admin@' + get_ip()
-
- from_dir = os.path.join(self.outdir(), 'outputs')
- sums = subprocess.check_output((SUM,) + tuple(os.listdir(from_dir)),
- stdin=open(os.devnull, 'r'),
- cwd=from_dir)
- to_download = subprocess.check_output(
- ('ssh', TARGET,
- """rm -rf {TMPDIR} && mkdir -p {TMPDIR} && \\
- mkdir -p {TO_DIR} && cd {TO_DIR} \\
- && echo '{SUMS}' | {SUM} -c \\
- |& grep -F FAILED | sed 's/^\\(.*\\): FAILED.*$/\\1/g'""".
- format(TMPDIR=TEMP_DIR, TO_DIR=TARGET_DIR, SUMS=sums.decode('utf-8'),
- SUM=SUM)))
- if not to_download:
- user_output("Nothing to download")
- return
- self.do_deploy(
- dry_run,
- ('scp', '-o', 'Compression yes')
- + tuple([os.path.join(from_dir, f) for f in to_download.decode('utf-8').split('\n')[:-1]])
- + (('%s:%s' % (TARGET, TEMP_DIR)),))
- if not dry_run:
- mv_cmd = ['mv {TMPDIR}/* {TO_DIR} ']
- mv_cmd.append('&& chmod u+s {TO_DIR}/starter_exe ')
- mv_cmd.append('&& echo \'Done moving new executables into place\' ')
- mv_cmd.append('&& bash -c \'sync && sync && sync\'')
- subprocess.check_call(
- ('ssh', TARGET,
- ''.join(mv_cmd).format(TMPDIR=TEMP_DIR, TO_DIR=TARGET_DIR)))
-
- def build_env(self):
- OTHER_SYSROOT = '/usr/lib/llvm-3.5/'
- SYMBOLIZER_PATH = OTHER_SYSROOT + 'bin/llvm-symbolizer'
- r = {}
- if self.sanitizer() == 'address':
- r['ASAN_SYMBOLIZER_PATH'] = SYMBOLIZER_PATH
- r['ASAN_OPTIONS'] = \
- 'detect_leaks=1:check_initialization_order=1:strict_init_order=1' \
- ':detect_stack_use_after_return=1:detect_odr_violation=2' \
- ':allow_user_segv_handler=1'
- elif self.sanitizer() == 'memory':
- r['MSAN_SYMBOLIZER_PATH'] = SYMBOLIZER_PATH
- elif self.sanitizer() == 'thread':
- r['TSAN_OPTIONS'] = 'external_symbolizer_path=' + SYMBOLIZER_PATH
- # This is apparently the default for newer versions, which disagrees
- # with documentation, so just turn it on explicitly.
- r['TSAN_OPTIONS'] += ':detect_deadlocks=1'
- # Print more useful stacks for mutex locking order problems.
- r['TSAN_OPTIONS'] += ':second_deadlock_stack=1'
-
- r['CCACHE_COMPRESS'] = 'yes'
- r['CCACHE_DIR'] = os.path.abspath(os.path.join(aos_path(), '..', 'output',
- 'ccache_dir'))
- r['CCACHE_HASHDIR'] = 'yes'
- if self.compiler().startswith('clang'):
- # clang doesn't like being run directly on the preprocessed files.
- r['CCACHE_CPP2'] = 'yes'
- # Without this, ccache slows down because of the generated header files.
- # The race condition that this opens up isn't a problem because the build
- # system finishes modifying header files before compiling anything that
- # uses them.
- r['CCACHE_SLOPPINESS'] = 'include_file_mtime'
-
- if self.architecture() == 'amd64':
- r['PATH'] = os.path.join(aos_path(), 'build', 'bin-ld.gold') + \
- ':' + os.environ['PATH']
-
- return r
-
- ARCHITECTURES = ('arm_frc', 'amd64')
- COMPILERS = ('clang', 'gcc')
- SANITIZERS = ('address', 'undefined', 'integer', 'memory', 'thread', 'none')
- SANITIZER_TEST_WARNINGS = {
- 'memory': (True,
-"""We don't have all of the libraries instrumented which leads to lots of false
- errors with msan (especially stdlibc++).
- TODO(brians): Figure out a way to deal with it."""),
- }
- PIE_SANITIZERS = ('memory', 'thread')
-
- def __init__(self, folder, is_test, is_deploy):
- super(PrimeProcessor, self).__init__()
-
- self.__folder = folder
-
- platforms = []
- for architecture in PrimeProcessor.ARCHITECTURES:
- for compiler in PrimeProcessor.COMPILERS:
- for debug in [True, False]:
- if architecture == 'amd64' and compiler == 'gcc':
- # We don't have a compiler to use here.
- continue
- platforms.append(
- self.Platform(architecture, folder, compiler, debug, 'none'))
- for sanitizer in PrimeProcessor.SANITIZERS:
- for compiler in ('clang',):
- if compiler == 'gcc_4.8' and (sanitizer == 'undefined' or
- sanitizer == 'integer' or
- sanitizer == 'memory'):
- # GCC 4.8 doesn't support these sanitizers.
- continue
- if sanitizer == 'none':
- # We already added sanitizer == 'none' above.
- continue
- platforms.append(
- self.Platform('amd64', folder, compiler, True, sanitizer))
- self.__platforms = frozenset(platforms)
-
- if is_test:
- default_platforms = self.select_platforms(architecture='amd64',
- debug=True)
- for sanitizer, warning in PrimeProcessor.SANITIZER_TEST_WARNINGS.items():
- if warning[0]:
- default_platforms -= self.select_platforms(sanitizer=sanitizer)
- elif is_deploy:
- default_platforms = self.select_platforms(architecture='arm_frc',
- compiler='gcc',
- debug=False)
- else:
- default_platforms = self.select_platforms(debug=False)
- self.__default_platforms = frozenset(default_platforms)
-
- def folder(self):
- return self.__folder
- def platforms(self):
- return self.__platforms
- def default_platforms(self):
- return self.__default_platforms
-
- def download_externals(self, platforms):
- to_download = set()
- for architecture in PrimeProcessor.ARCHITECTURES:
- pie_sanitizers = set()
- for sanitizer in PrimeProcessor.PIE_SANITIZERS:
- pie_sanitizers.update(self.select_platforms(architecture=architecture,
- sanitizer=sanitizer))
- if platforms & pie_sanitizers:
- to_download.add(architecture + '-fPIE')
-
- if platforms & (self.select_platforms(architecture=architecture) -
- pie_sanitizers):
- to_download.add(architecture)
-
- for download_target in to_download:
- call_download_externals(download_target)
-
- def parse_platforms(self, platform_string):
- if platform_string is None:
- return self.default_platforms()
- r = self.default_platforms()
- for part in platform_string.split(','):
- if part == 'all':
- r = self.platforms()
- elif part[0] == '+':
- r = r | self.select_platforms_string(part[1:])
- elif part[0] == '-':
- r = r - self.select_platforms_string(part[1:])
- elif part[0] == '=':
- r = self.select_platforms_string(part[1:])
- else:
- selected = self.select_platforms_string(part)
- r = r - (self.platforms() - selected)
- if not r:
- r = selected
- return r
-
- def select_platforms(self, architecture=None, compiler=None, debug=None,
- sanitizer=None):
- r = []
- for platform in self.platforms():
- if architecture is None or platform.architecture() == architecture:
- if compiler is None or platform.compiler() == compiler:
- if debug is None or platform.debug() == debug:
- if sanitizer is None or platform.sanitizer() == sanitizer:
- r.append(platform)
- return set(r)
-
- def select_platforms_string(self, platforms_string):
- architecture, compiler, debug, sanitizer = None, None, None, None
- for part in platforms_string.split('-'):
- if part in PrimeProcessor.ARCHITECTURES:
- architecture = part
- elif part in PrimeProcessor.COMPILERS:
- compiler = part
- elif part in ['debug', 'dbg']:
- debug = True
- elif part in ['release', 'nodebug', 'ndb']:
- debug = False
- elif part in PrimeProcessor.SANITIZERS:
- sanitizer = part
- elif part == 'all':
- architecture = compiler = debug = sanitizer = None
- elif part == self.folder():
- pass
- else:
- raise Processor.UnknownPlatform(
- '"%s" not recognized as a platform string component.' % part)
- return self.select_platforms(
- architecture=architecture,
- compiler=compiler,
- debug=debug,
- sanitizer=sanitizer)
-
- def check_installed(self, platforms, is_deploy):
- packages = set(('lzip', 'm4', 'realpath'))
- packages.add('ruby')
- packages.add('clang-3.5')
- packages.add('clang-format-3.5')
- for platform in platforms:
- if platform.compiler() == 'clang' or platform.compiler() == 'gcc_4.8':
- packages.add('clang-3.5')
- if platform.compiler() == 'gcc_4.8':
- packages.add('libcloog-isl3:amd64')
- if is_deploy:
- packages.add('openssh-client')
- elif platform.architecture == 'arm_frc':
- packages.add('gcc-4.9-arm-frc-linux-gnueabi')
- packages.add('g++-4.9-arm-frc-linux-gnueabi')
-
- self.do_check_installed(tuple(packages))
-
-def strsignal(num):
- # It ends up with SIGIOT instead otherwise, which is weird.
- if num == signal.SIGABRT:
- return 'SIGABRT'
- # SIGCLD is a weird way to spell it.
- if num == signal.SIGCHLD:
- return 'SIGCHLD'
-
- SIGNALS_TO_NAMES = dict((getattr(signal, n), n)
- for n in dir(signal) if n.startswith('SIG')
- and '_' not in n)
- return SIGNALS_TO_NAMES.get(num, 'Unknown signal %d' % num)
-
-def main():
- sys.argv.pop(0)
- exec_name = sys.argv.pop(0)
- def print_help(exit_status=None, message=None):
- if message:
- print(message)
- sys.stdout.write(
-"""Usage: {name} [-j n] [action] [-n] [platform] [target|extra_flag]...
-Arguments:
- -j, --jobs Explicitly specify how many jobs to run at a time.
- Defaults to the number of processors + 2.
- -n, --dry-run Don't actually do whatever.
- Currently only meaningful for deploy.
- action What to do. Defaults to build.
- build: Build the code.
- clean: Remove all the built output.
- tests: Build and then run tests.
- deploy: Build and then download.
- environment: Dump the environment for building.
- platform What variants of the code to build.
- Defaults to something reasonable.
- See below for details.
- target... Which targets to build/test/etc.
- Defaults to everything.
- extra_flag... Extra flags associated with the targets.
- --gtest_*: Arguments to pass on to tests.
- --print_logs, --log_file=*: More test arguments.
-
-Specifying targets:
- Targets are combinations of architecture, compiler, and debug flags. Which
- ones actually get run is built up as a set. It defaults to something
- reasonable for the action (specified below).
- The platform specification (the argument given to this script) is a comma-
- separated sequence of hyphen-separated platforms, each with an optional
- prefix.
- Each selector (the things separated by commas) selects all of the platforms
- which match all of its components. Its effect on the set of current platforms
- depends on the prefix character.
- Here are the prefix characters:
- + Adds the selected platforms.
- - Removes the selected platforms.
- = Sets the current set to the selected platforms.
- [none] Removes all non-selected platforms.
- If this makes the current set empty, acts like =.
- There is also the special psuedo-platform "all" which selects all platforms.
- All of the available platforms:
- {all_platforms}
- Default platforms for deploying:
- {deploy_platforms}
- Default platforms for testing:
- {test_platforms}
- Default platforms for everything else:
- {default_platforms}
-
-Examples of specifying targets:
- build everything: "all"
- only build things with clang: "clang"
- build everything that uses GCC 4.8 (not just the defaults): "=gcc_4.8"
- build all of the arm targets that use clang: "clang-arm" or "arm-clang"
-""".format(
- name=exec_name,
- all_platforms=str_platforms(PrimeProcessor('folder', False, False).platforms()),
- deploy_platforms=str_platforms(PrimeProcessor('folder', False, True).default_platforms()),
- test_platforms=str_platforms(PrimeProcessor('folder', True, False).default_platforms()),
- default_platforms=str_platforms(PrimeProcessor('folder', False, False).default_platforms()),
- ))
- if exit_status is not None:
- sys.exit(exit_status)
-
- def sort_platforms(platforms):
- return sorted(
- platforms, key=lambda platform: (-platform.priority(), str(platform)))
-
- def str_platforms(platforms):
- r = []
- for platform in sort_platforms(platforms):
- r.append(str(platform))
- if len(r) > 1:
- r[-1] = 'and ' + r[-1]
- return ', '.join(r)
-
- class Arguments(object):
- def __init__(self):
- self.jobs = os.sysconf('SC_NPROCESSORS_ONLN') + 2
- self.action_name = 'build'
- self.dry_run = False
- self.targets = []
- self.platform = None
- self.extra_flags = []
-
- args = Arguments()
-
- if len(sys.argv) < 2:
- print_help(1, 'Not enough arguments')
- args.processor = sys.argv.pop(0)
- args.folder = sys.argv.pop(0)
- args.main_gyp = sys.argv.pop(0)
- VALID_ACTIONS = ['build', 'clean', 'deploy', 'tests', 'environment']
- while sys.argv:
- arg = sys.argv.pop(0)
- if arg == '-j' or arg == '--jobs':
- args.jobs = int(sys.argv.pop(0))
- continue
- if arg in VALID_ACTIONS:
- args.action_name = arg
- continue
- if arg == '-n' or arg == '--dry-run':
- if args.action_name != 'deploy':
- print_help(1, '--dry-run is only valid for deploy')
- args.dry_run = True
- continue
- if arg == '-h' or arg == '--help':
- print_help(0)
- if (re.match('^--gtest_.*$', arg) or arg == '--print-logs' or
- re.match('^--log_file=.*$', arg)):
- if args.action_name == 'tests':
- args.extra_flags.append(arg)
- continue
- else:
- print_help(1, '%s is only valid for tests' % arg)
- if args.platform:
- args.targets.append(arg)
- else:
- args.platform = arg
-
- if args.processor == 'prime':
- processor = PrimeProcessor(args.folder,
- args.action_name == 'tests',
- args.action_name == 'deploy')
- else:
- print_help(1, message='Unknown processor "%s".' % args.processor)
-
- unknown_platform_error = None
- try:
- platforms = processor.parse_platforms(args.platform)
- except Processor.UnknownPlatform as e:
- unknown_platform_error = e.message
- args.targets.insert(0, args.platform)
- platforms = processor.parse_platforms(None)
- if not platforms:
- print_help(1, 'No platforms selected')
-
- processor.check_installed(platforms, args.action_name == 'deploy')
- processor.download_externals(platforms)
-
- class ToolsConfig(object):
- def __init__(self):
- self.variables = {'AOS': aos_path()}
- with open(os.path.join(aos_path(), 'build', 'tools_config'), 'r') as f:
- for line in f:
- if line[0] == '#':
- pass
- elif line.isspace():
- pass
- else:
- new_name, new_value = line.rstrip().split('=')
- for name, value in self.variables.items():
- new_value = new_value.replace('${%s}' % name, value)
- self.variables[new_name] = new_value
- def __getitem__(self, key):
- return self.variables[key]
-
- tools_config = ToolsConfig()
-
- def handle_clean_error(function, path, excinfo):
- _, _ = function, path
- if issubclass(OSError, excinfo[0]):
- if excinfo[1].errno == errno.ENOENT:
- # Who cares if the file we're deleting isn't there?
- return
- raise excinfo[1]
-
- def need_to_run_gyp(platform):
- """Determines if we need to run gyp again or not.
-
- The generated build files are supposed to re-run gyp again themselves, but
- that doesn't work (or at least it used to not) and we sometimes want to
- modify the results anyways.
-
- Args:
- platform: The platform to check for.
- """
- if not os.path.exists(platform.build_ninja()):
- return True
- if os.path.getmtime(__file__) > os.path.getmtime(platform.build_ninja()):
- return True
- dirs = os.listdir(os.path.join(aos_path(), '..'))
- # Looking through these folders takes a long time and isn't useful.
- if dirs.count('output'):
- dirs.remove('output')
- if dirs.count('.git'):
- dirs.remove('.git')
- return not not subprocess.check_output(
- ('find',) + tuple(os.path.join(aos_path(), '..', d) for d in dirs)
- + ('-newer', platform.build_ninja(),
- '(', '-name', '*.gyp', '-or', '-name', '*.gypi', ')'),
- stdin=open(os.devnull, 'r'))
-
- def env(platform):
- """Makes sure we pass through important environmental variables.
-
- Returns:
- An environment suitable for passing to subprocess.Popen and friends.
- """
- build_env = dict(platform.build_env())
- if not 'TERM' in build_env:
- build_env['TERM'] = os.environ['TERM']
- if not 'PATH' in build_env:
- build_env['PATH'] = os.environ['PATH']
- return build_env
-
- sorted_platforms = sort_platforms(platforms)
- user_output('Building %s...' % str_platforms(sorted_platforms))
-
- if args.action_name == 'tests':
- for sanitizer, warning in PrimeProcessor.SANITIZER_TEST_WARNINGS.items():
- warned_about = platforms & processor.select_platforms(sanitizer=sanitizer)
- if warned_about:
- user_output(warning[1])
- if warning[0]:
- # TODO(brians): Add a --force flag or something to override this?
- user_output('Refusing to run tests for sanitizer %s.' % sanitizer)
- exit(1)
-
- num = 1
- for platform in sorted_platforms:
- user_output('Building %s (%d/%d)...' % (platform, num, len(platforms)))
- if args.action_name == 'clean':
- shutil.rmtree(platform.outdir(), onerror=handle_clean_error)
- elif args.action_name == 'environment':
- user_output('Environment for building <<END')
- for name, value in env(platform).items():
- print('%s=%s' % (name, value))
- print('END')
- else:
- if need_to_run_gyp(platform):
- user_output('Running gyp...')
- gyp = subprocess.Popen(
- (tools_config['GYP'],
- '--check',
- '--depth=%s' % os.path.join(aos_path(), '..'),
- '--no-circular-check',
- '-f', 'ninja',
- '-I%s' % os.path.join(aos_path(), 'build', 'aos.gypi'),
- '-I/dev/stdin', '-Goutput_dir=output',
- '-DOS=%s' % platform.os(),
- '-DPLATFORM=%s' % platform.gyp_platform(),
- '-DARCHITECTURE=%s' % platform.architecture(),
- '-DCOMPILER=%s' % platform.compiler().split('_')[0],
- '-DFULL_COMPILER=%s' % platform.compiler(),
- '-DDEBUG=%s' % ('yes' if platform.debug() else 'no'),
- '-DSANITIZER=%s' % platform.sanitizer(),
- '-DEXTERNALS_EXTRA=%s' %
- ('-fPIE' if platform.sanitizer() in PrimeProcessor.PIE_SANITIZERS
- else '')) +
- processor.extra_gyp_flags() + (args.main_gyp,),
- stdin=subprocess.PIPE)
- gyp.communicate(("""
-{
- 'target_defaults': {
- 'configurations': {
- '%s': {}
- }
- }
-}""" % platform.outname()).encode())
- if gyp.returncode:
- user_output("Running gyp failed!")
- exit(1)
- processor.modify_ninja_file(platform.build_ninja())
- user_output('Done running gyp')
- else:
- user_output("Not running gyp")
-
- try:
- call = (tools_config['NINJA'],
- '-C', platform.outdir()) + tuple(args.targets)
- if args.jobs:
- call += ('-j', str(args.jobs))
- subprocess.check_call(call,
- stdin=open(os.devnull, 'r'),
- env=env(platform))
- except subprocess.CalledProcessError as e:
- if unknown_platform_error is not None:
- user_output(unknown_platform_error)
- raise e
-
- if args.action_name == 'deploy':
- platform.deploy(args.dry_run)
- elif args.action_name == 'tests':
- dirname = os.path.join(platform.outdir(), 'tests')
- done_queue = queue.Queue()
- running = []
- test_start_semaphore = threading.Semaphore(args.jobs)
- if args.targets:
- to_run = []
- for target in args.targets:
- if target.endswith('_test'):
- to_run.append(target)
- else:
- to_run = os.listdir(dirname)
- for f in to_run:
- thread = TestThread(os.path.join(dirname, f), tuple(args.extra_flags),
- env(platform), done_queue,
- test_start_semaphore)
- running.append(thread)
- thread.start()
- try:
- while running:
- done = done_queue.get()
- running.remove(done)
- with test_output_lock:
- test_output('Output from test %s:' % done.name)
- try:
- while True:
- line = done.output.get(False)
- if not sys.stdout.isatty():
- # Remove color escape codes.
- line = re.sub(r'\x1B\[[0-9;]*[a-zA-Z]', '', line)
- sys.stdout.write(line)
- except queue.Empty:
- pass
- if not done.returncode:
- test_output('Test %s succeeded' % done.name)
- else:
- if done.returncode < 0:
- sig = -done.returncode
- test_output('Test %s was killed by signal %d (%s)' % \
- (done.name, sig, strsignal(sig)))
- elif done.returncode != 1:
- test_output('Test %s exited with %d' % \
- (done.name, done.returncode))
- else:
- test_output('Test %s failed' % done.name)
- user_output('Aborting because of test failure for %s.' % \
- platform)
- exit(1)
- finally:
- if running:
- test_output('Killing other tests...')
-# Stop all of them before killing processes because otherwise stopping some of
-# them tends to let other ones that are waiting to start go.
- for thread in running:
- thread.stop()
- for thread in running:
- test_output('\tKilling %s' % thread.name)
- thread.kill_process()
- thread.kill_process()
- test_output('Waiting for other tests to die')
- for thread in running:
- thread.kill_process()
- thread.join()
- test_output('Done killing other tests')
-
- user_output('Done building %s (%d/%d)' % (platform, num, len(platforms)))
- num += 1
-
-if __name__ == '__main__':
- main()
diff --git a/aos/build/download_externals.sh b/aos/build/download_externals.sh
deleted file mode 100755
index ca49fd2..0000000
--- a/aos/build/download_externals.sh
+++ /dev/null
@@ -1,222 +0,0 @@
-#!/bin/bash
-
-#set -x
-set -e
-
-AOS=$(readlink -f $(dirname $0)/..)
-. $(dirname $0)/tools_config
-
-# A separate variable for stuff that should be in LDFLAGS for everything because
-# the value from CONFIGURE_FLAGS has to get overriden in some places.
-ALL_LDFLAGS=""
-
-# Flags that should get passed to all configure scripts.
-# Some of them need to set LDFLAGS separately to work around stupid configure
-# scripts, so we can't just set that here.
-CONFIGURE_FLAGS=""
-
-if [ "$1" == "arm" ]; then
- COMPILED=${EXTERNALS}/../compiled-arm
-
- CROSS_COMPILE=arm-linux-gnueabihf-
-
- export CC=${CROSS_COMPILE}gcc-4.7
- export CXX=${CROSS_COMPILE}g++-4.7
- export CFLAGS="-mcpu=cortex-a8 -mfpu=neon"
- export CXXFLAGS="-mcpu=cortex-a8 -mfpu=neon"
- export OBJDUMP=${CROSS_COMPILE}objdump
- CONFIGURE_FLAGS="--host=arm-linux-gnueabihf CC=${CC} CXX=${CXX} CFLAGS=\"${CFLAGS}\" CXXFLAGS=\"${CXXFLAGS}\" OBJDUMP=${OBJDUMP}"
-elif [ "$1" == "arm_frc" ]; then
- COMPILED=${EXTERNALS}/../compiled-arm_frc
-
- CROSS_COMPILE=arm-frc-linux-gnueabi-
-
- export CC=${CROSS_COMPILE}gcc-4.9
- export CXX=${CROSS_COMPILE}g++-4.9
- export CFLAGS="-mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp"
- export CXXFLAGS="-mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp"
- export OBJDUMP=${CROSS_COMPILE}objdump
- CONFIGURE_FLAGS="--host=arm-frc-linux-gnueabi CC=${CC} CXX=${CXX} CFLAGS=\"${CFLAGS}\" CXXFLAGS=\"${CXXFLAGS}\" OBJDUMP=${OBJDUMP}"
-elif [ "$1" == "amd64" ]; then
- COMPILED=${EXTERNALS}/../compiled-amd64
-elif [ "$1" == "amd64-fPIE" ]; then
- COMPILED=${EXTERNALS}/../compiled-amd64-fPIE
-
- export CFLAGS="-fPIE"
- export CXXFLAGS="-fPIE"
- ALL_LDFLAGS="-fPIE"
- export LDFLAGS=${ALL_LDFLAGS}
- CONFIGURE_FLAGS="CFLAGS=\"${CFLAGS}\" CXXFLAGS=\"${CXXFLAGS}\" LDFLAGS=\"${LDFLAGS}\""
-else
- echo "Unknown platform $1 to download externals for." 1>&2
- exit 1
-fi
-
-TMPDIR=/tmp/$$-aos-tmpdir
-mkdir -p ${EXTERNALS}
-[[ -n "${COMPILED}" ]] && mkdir -p ${COMPILED}
-
-# get and build ninja
-[ -d ${NINJA_DIR} ] || git clone --branch ${NINJA_RELEASE} https://github.com/martine/ninja.git ${NINJA_DIR}
-[ -x ${NINJA} ] || env -i "PATH=$PATH" ${NINJA_DIR}/bootstrap.py
-
-# get gyp
-[ -d ${GYP_DIR} ] || ( svn co http://gyp.googlecode.com/svn/trunk -r ${GYP_REVISION} ${GYP_DIR} && patch -p1 -d ${GYP_DIR} < ${AOS}/externals/gyp.patch )
-
-# get eigen
-EIGEN_VERSION=3.2.1
-EIGEN_DIR=${EXTERNALS}/eigen-${EIGEN_VERSION}
-[ -f ${EIGEN_DIR}.tar.bz2 ] || wget http://bitbucket.org/eigen/eigen/get/${EIGEN_VERSION}.tar.bz2 -O ${EIGEN_DIR}.tar.bz2
-[ -d ${EIGEN_DIR} ] || ( mkdir ${EIGEN_DIR} && tar --strip-components=1 -C ${EIGEN_DIR} -xf ${EIGEN_DIR}.tar.bz2 )
-
-# get gtest
-GTEST_VERSION=1.6.0
-GTEST_DIR=${EXTERNALS}/gtest-${GTEST_VERSION}-p2
-GTEST_ZIP=${EXTERNALS}/gtest-${GTEST_VERSION}.zip
-[ -f ${GTEST_ZIP} ] || wget http://googletest.googlecode.com/files/gtest-${GTEST_VERSION}.zip -O ${GTEST_ZIP}
-[ -d ${GTEST_DIR} ] || ( unzip ${GTEST_ZIP} -d ${TMPDIR} && mv ${TMPDIR}/gtest-${GTEST_VERSION} ${GTEST_DIR} && cd ${GTEST_DIR} && patch -p1 < ${AOS}/externals/gtest.patch )
-
-# get and build libjpeg
-LIBJPEG_VERSION=8d
-LIBJPEG_DIR=${COMPILED}/jpeg-${LIBJPEG_VERSION}
-# NOTE: this directory ends up in #include names
-LIBJPEG_PREFIX=${COMPILED}/libjpeg
-LIBJPEG_LIB=${LIBJPEG_PREFIX}/lib/libjpeg.a
-LIBJPEG_TAR=${EXTERNALS}/jpegsrc.v${LIBJPEG_VERSION}.tar.gz
-[ -f ${LIBJPEG_TAR} ] || wget http://www.ijg.org/files/jpegsrc.v${LIBJPEG_VERSION}.tar.gz -O ${LIBJPEG_TAR}
-[ -d ${LIBJPEG_DIR} ] || ( mkdir ${LIBJPEG_DIR} && tar --strip-components=1 -C ${LIBJPEG_DIR} -xf ${LIBJPEG_TAR} )
-[ -f ${LIBJPEG_LIB} ] || bash -c \
- "cd ${LIBJPEG_DIR} && ./configure --disable-shared \
- ${CONFIGURE_FLAGS} --prefix=`readlink -f ${LIBJPEG_PREFIX}` \
- && make && make install"
-
-# get and build ctemplate
-# This is the next revision after the 2.2 release and it only adds spaces to
-# make gcc 4.7 with --std=c++11 happy (user-defined string literals...).
-CTEMPLATE_VERSION=129
-CTEMPLATE_TAR=${EXTERNALS}/ctemplate-${CTEMPLATE_VERSION}.tar.gz
-CTEMPLATE_DIR=${COMPILED}/ctemplate-${CTEMPLATE_VERSION}
-CTEMPLATE_PREFIX=${CTEMPLATE_DIR}-prefix
-CTEMPLATE_LIB=${CTEMPLATE_PREFIX}/lib/libctemplate.a
-CTEMPLATE_URL=http://ctemplate.googlecode.com
-if [[ "${CTEMPLATE_VERSION}" =~ /\./ ]]; then
- CTEMPLATE_URL=${CTEMPLATE_URL}/files/ctemplate-${CTEMPLATE_VERSION}.tar.gz
- [ -f ${CTEMPLATE_TAR} ] || \
- wget ${CTEMPLATE_URL} -O ${CTEMPLATE_TAR}
- [ -d ${CTEMPLATE_DIR} ] || ( mkdir ${CTEMPLATE_DIR} && tar \
- --strip-components=1 -C ${CTEMPLATE_DIR} -xf ${CTEMPLATE_TAR} )
-else
- CTEMPLATE_URL=${CTEMPLATE_URL}/svn/trunk
- [ -d ${CTEMPLATE_DIR} ] || \
- svn checkout ${CTEMPLATE_URL} -r ${CTEMPLATE_VERSION} ${CTEMPLATE_DIR}
-fi
-[ -f ${CTEMPLATE_LIB} ] || bash -c "cd ${CTEMPLATE_DIR} && \
- ./configure --disable-shared \
- ${CONFIGURE_FLAGS} --prefix=`readlink -f ${CTEMPLATE_PREFIX}` \
- && make && make install"
-
-# get and build gflags
-GFLAGS_VERSION=2.0
-GFLAGS_TAR=${EXTERNALS}/gflags-${GFLAGS_VERSION}.tar.gz
-GFLAGS_DIR=${COMPILED}/gflags-${GFLAGS_VERSION}
-GFLAGS_PREFIX=${GFLAGS_DIR}-prefix
-GFLAGS_LIB=${GFLAGS_PREFIX}/lib/libgflags.a
-GFLAGS_URL=https://gflags.googlecode.com/files/gflags-${GFLAGS_VERSION}.tar.gz
-[ -f ${GFLAGS_TAR} ] || wget ${GFLAGS_URL} -O ${GFLAGS_TAR}
-[ -d ${GFLAGS_DIR} ] || ( mkdir ${GFLAGS_DIR} && tar \
- --strip-components=1 -C ${GFLAGS_DIR} -xf ${GFLAGS_TAR} )
-[ -f ${GFLAGS_LIB} ] || bash -c "cd ${GFLAGS_DIR} && ./configure \
- ${CONFIGURE_FLAGS} --prefix=`readlink -f ${GFLAGS_PREFIX}` \
- && make && make install"
-
-# get and build libevent
-LIBEVENT_VERSION=2.0.21
-LIBEVENT_TAR=${EXTERNALS}/libevent-${LIBEVENT_VERSION}.tar.gz
-LIBEVENT_DIR=${COMPILED}/libevent-${LIBEVENT_VERSION}
-LIBEVENT_PREFIX=${LIBEVENT_DIR}-prefix
-LIBEVENT_LIB=${LIBEVENT_PREFIX}/lib/libevent.a
-LIBEVENT_URL=https://github.com/downloads/libevent/libevent
-LIBEVENT_URL=${LIBEVENT_URL}/libevent-${LIBEVENT_VERSION}-stable.tar.gz
-[ -f ${LIBEVENT_TAR} ] || wget ${LIBEVENT_URL} -O ${LIBEVENT_TAR}
-[ -d ${LIBEVENT_DIR} ] || ( mkdir ${LIBEVENT_DIR} && tar \
- --strip-components=1 -C ${LIBEVENT_DIR} -xf ${LIBEVENT_TAR} )
-[ -f ${LIBEVENT_LIB} ] || bash -c "cd ${LIBEVENT_DIR} && ./configure \
- ${CONFIGURE_FLAGS} --prefix=`readlink -f ${LIBEVENT_PREFIX}` \
- && make && make install"
-
-# get and build gmp
-GMP_VERSION=5.1.3
-GMP_TAR=${EXTERNALS}/gmp-${GMP_VERSION}.tar.lz
-GMP_DIR=${COMPILED}/gmp-${GMP_VERSION}
-GMP_PREFIX=${GMP_DIR}-prefix
-GMP_LIB=${GMP_PREFIX}/lib/libgmp.a
-GMP_URL=https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.lz
-[ -f ${GMP_TAR} ] || wget ${GMP_URL} -O ${GMP_TAR}
-[ -d ${GMP_DIR} ] || ( mkdir ${GMP_DIR} && tar \
- --strip-components=1 -C ${GMP_DIR} -xf ${GMP_TAR} )
-[ -f ${GMP_LIB} ] || bash -c "cd ${GMP_DIR} && ./configure \
- ${CONFIGURE_FLAGS} --prefix=$(readlink -f ${GMP_PREFIX}) \
- && make && make install"
-
-# get and build libcdd
-LIBCDD_VERSION=094g
-LIBCDD_TAR=${EXTERNALS}/libcdd-${LIBCDD_VERSION}.tar.gz
-LIBCDD_DIR=${COMPILED}/libcdd-${LIBCDD_VERSION}
-LIBCDD_PREFIX=${LIBCDD_DIR}-prefix
-LIBCDD_LIB=${LIBCDD_PREFIX}/lib/libcdd.a
-LIBCDD_URL=ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cddlib-${LIBCDD_VERSION}.tar.gz
-[ -f ${LIBCDD_TAR} ] || \
- wget ${LIBCDD_URL} -O ${LIBCDD_TAR}
-[ -d ${LIBCDD_DIR} ] || ( mkdir ${LIBCDD_DIR} && tar \
- --strip-components=1 -C ${LIBCDD_DIR} -xf ${LIBCDD_TAR} )
-[ -f ${LIBCDD_LIB} ] || \
- bash -c "cd ${LIBCDD_DIR} && ./configure \
- --disable-shared ${CONFIGURE_FLAGS} \
- LDFLAGS=\"${ALL_LDFLAGS} -L${GMP_PREFIX}/lib\" \
- --prefix=$(readlink -f ${LIBCDD_PREFIX}) \
- && make gmpdir=${GMP_PREFIX} && make install"
-
-# get and build libunwind
-LIBUNWIND_VERSION=1.1
-LIBUNWIND_TAR=${EXTERNALS}/libunwind-${LIBUNWIND_VERSION}.tar.gz
-LIBUNWIND_DIR=${COMPILED}/libunwind-${LIBUNWIND_VERSION}
-LIBUNWIND_PREFIX=${LIBUNWIND_DIR}-prefix
-LIBUNWIND_LIB=${LIBUNWIND_PREFIX}/lib/libunwind.a
-LIBUNWIND_URL=http://download.savannah.gnu.org/releases/libunwind/libunwind-${LIBUNWIND_VERSION}.tar.gz
-[ -f ${LIBUNWIND_TAR} ] || \
- wget ${LIBUNWIND_URL} -O ${LIBUNWIND_TAR}
-[ -d ${LIBUNWIND_DIR} ] || ( mkdir ${LIBUNWIND_DIR} && tar \
- --strip-components=1 -C ${LIBUNWIND_DIR} -xf ${LIBUNWIND_TAR} )
-[ -f ${LIBUNWIND_LIB} ] || \
- bash -c "cd ${LIBUNWIND_DIR} && ./configure \
- --prefix=$(readlink -f ${LIBUNWIND_PREFIX}) \
- ${CONFIGURE_FLAGS} \
- && make && make install"
-
-# get and build gperftools
-GPERFTOOLS_VERSION=2.3
-GPERFTOOLS_TAR=${EXTERNALS}/gperftools-${GPERFTOOLS_VERSION}.tar.gz
-GPERFTOOLS_DIR=${COMPILED}/gperftools-${GPERFTOOLS_VERSION}
-GPERFTOOLS_PREFIX=${GPERFTOOLS_DIR}-prefix
-TCMALLOC_LIB=${GPERFTOOLS_PREFIX}/lib/libtcmalloc.a
-GPERFTOOLS_URL=https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.3.tar.gz
-[ -f ${GPERFTOOLS_TAR} ] || \
- wget ${GPERFTOOLS_URL} -O ${GPERFTOOLS_TAR}
-[ -d ${GPERFTOOLS_DIR} ] || ( mkdir ${GPERFTOOLS_DIR} && tar \
- --strip-components=1 -C ${GPERFTOOLS_DIR} -xf ${GPERFTOOLS_TAR} )
-[ -f ${TCMALLOC_LIB} ] || \
- bash -c "cd ${GPERFTOOLS_DIR} && ./configure \
- ${CONFIGURE_FLAGS} --prefix=$(readlink -f ${GPERFTOOLS_PREFIX}) \
- LDFLAGS=\"${ALL_LDFLAGS} -L${LIBUNWIND_PREFIX}/lib -Wl,-rpath-link=${LIBUNWIND_PREFIX}/lib\" \
- CPPFLAGS=\"-I ${LIBUNWIND_PREFIX}/include\" \
- && make && make install"
-
-# get and build seasocks
-SEASOCKS_VERSION=1.1.2
-SEASOCKS_PATCH=1
-SEASOCKS_DIR=${EXTERNALS}/seasocks-${SEASOCKS_VERSION}-p${SEASOCKS_PATCH}
-[ -d ${SEASOCKS_DIR} ] || ( git clone --branch v${SEASOCKS_VERSION} \
- https://github.com/mattgodbolt/seasocks.git ${SEASOCKS_DIR} && \
- patch -p1 -d ${SEASOCKS_DIR} < ${AOS}/externals/seasocks.patch )
-
-rm -rf ${TMPDIR}
diff --git a/aos/build/externals.gyp b/aos/build/externals.gyp
deleted file mode 100644
index eac3247..0000000
--- a/aos/build/externals.gyp
+++ /dev/null
@@ -1,219 +0,0 @@
-# This file has targets for various external libraries.
-# download_externals.sh makes sure that all of them have been downloaded.
-{
- 'variables': {
- 'externals': '<(AOS)/../output/downloaded',
- 'externals_abs': '<!(readlink -f ../../output/downloaded)',
- 'compiled': '<(externals)/../compiled-<(ARCHITECTURE)<(EXTERNALS_EXTRA)',
- 'compiled_abs': '<(externals_abs)/../compiled-<(ARCHITECTURE)<(EXTERNALS_EXTRA)',
-
-# These versions have to be kept in sync with the ones in download_externals.sh.
- 'eigen_version': '3.2.1',
- 'gtest_version': '1.6.0-p2',
- 'ctemplate_version': '129',
- 'gflags_version': '2.0',
- 'compiler_rt_version': 'RELEASE_32_final',
- 'libevent_version': '2.0.21',
- 'libcdd_version': '094g',
- 'stm32flash_commit': '8399fbe1baf2b7d097746786458021d92895d71b',
- 'seasocks_version': '1.1.2-p1',
-
- 'allwpilib': '<(AOS)/externals/allwpilib',
- 'forwpilib': '<(AOS)/externals/forwpilib',
- },
- 'targets': [
- {
- 'target_name': 'WPILib',
- 'type': 'static_library',
- 'variables': {
- 'header_dirs': [
- '<(forwpilib)',
- '<(allwpilib)/wpilibc/wpilibC++/include',
- '<(allwpilib)/wpilibc/wpilibC++Devices/include',
- '<(allwpilib)/hal/include',
- '<(allwpilib)/hal/lib/Athena/FRC_FPGA_ChipObject',
- '<(allwpilib)/hal/lib/Athena',
- ],
- },
- 'include_dirs': [
- '<@(header_dirs)'
- ],
- 'cflags': [
- '-Wno-error',
- '-fno-strict-aliasing',
- '-O0',
- ],
- 'sources': [
- '<!@(ls <(allwpilib)/wpilibc/wpilibC++/src/*.cpp)',
- '<!@(ls <(allwpilib)/wpilibc/wpilibC++Devices/src/*.cpp)',
- '<!@(ls <(allwpilib)/wpilibc/wpilibC++Devices/src/Internal/*.cpp)',
- '<!@(ls <(allwpilib)/hal/lib/Athena/*.cpp)',
- '<!@(ls <(allwpilib)/hal/lib/Athena/ctre/*.cpp)',
- '<(forwpilib)/dma.cc',
- ],
- 'link_settings': {
- 'library_dirs': [
- '<(allwpilib)/ni-libraries',
- ],
- 'libraries': [
- '-lpthread',
- '-lFRC_NetworkCommunication',
- '-lRoboRIO_FRC_ChipObject',
- '-lNiFpgaLv',
- '-lNiFpga',
- '-lNiRioSrv',
- '-lspi',
- '-li2c',
- ],
- },
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<@(header_dirs)'
- ],
- },
- },
- {
- 'target_name': 'opencv',
- 'type': 'none',
- 'link_settings': {
- 'libraries': [
- '-lopencv_core',
- '-lopencv_imgproc',
- ],
- },
- },
- {
- 'target_name': 'libevent',
- 'type': 'none',
- 'link_settings': {
- 'libraries': ['<(compiled_abs)/libevent-<(libevent_version)-prefix/lib/libevent.a'],
- },
- 'direct_dependent_settings': {
- 'include_dirs': ['<(compiled)/libevent-<(libevent_version)-prefix/include'],
- },
- },
- {
- 'target_name': 'eigen',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'cflags': [
- '-isystem', '<(externals)/eigen-<(eigen_version)'
- ],
- },
- },
- {
- 'target_name': 'libjpeg',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'libraries': ['<(compiled_abs)/libjpeg/lib/libjpeg.a'],
- 'cflags': [
- '-isystem', '<(compiled)',
- ],
- },
- },
- {
-# Dependents should only use the "gtest/gtest_prod.h" header.
-# This target is NOT the correct one for "aos/common/gtest_prod.h". That one is
-# aos/common/common.gyp:gtest_prod. This target just deals with setting up to
-# use the gtest header.
- 'target_name': 'gtest_prod',
- 'type': 'static_library',
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(externals)/gtest-<(gtest_version)/include'
- ],
- },
- },
- {
- 'target_name': 'gtest',
- 'type': 'static_library',
- 'sources': [
- '<(externals)/gtest-<(gtest_version)/src/gtest-all.cc',
- '<(AOS)/testing/gtest_main.cc',
- ],
- 'include_dirs': [
- '<(externals)/gtest-<(gtest_version)',
- ],
- 'dependencies': [
- 'gtest_prod',
- ],
- 'export_dependent_settings': [
- 'gtest_prod',
- ],
- 'cflags!': ['-Werror'],
- 'direct_dependent_settings': {
- 'include_dirs': ['<(externals)/gtest-<(gtest_version)/include'],
- 'target_conditions': [
- ['_type=="executable" and is_special_test==0', {
- 'product_dir': '<(test_dir)',
- },
- ], ['_type=="executable" and is_special_test==1', {
- 'product_dir': '<(test_dir)-special',
- },
- ],
- ],
- },
- },
- {
- 'target_name': 'ctemplate',
- 'type': 'none',
- 'link_settings': {
- 'libraries': ['<(compiled_abs)/ctemplate-<(ctemplate_version)-prefix/lib/libctemplate.a'],
- },
- 'direct_dependent_settings': {
- 'include_dirs': ['<(compiled)/ctemplate-<(ctemplate_version)-prefix/include'],
- },
- },
- {
- 'target_name': 'gflags',
- 'type': 'none',
- 'link_settings': {
- 'libraries': ['<(compiled_abs)/gflags-<(gflags_version)-prefix/lib/libgflags.a'],
- },
- 'direct_dependent_settings': {
- 'include_dirs': ['<(compiled)/gflags-<(gflags_version)-prefix/include'],
- },
- },
- {
- 'target_name': 'libcdd',
- 'type': 'none',
- 'link_settings': {
- 'libraries': ['<(compiled_abs)/libcdd-<(libcdd_version)-prefix/lib/libcdd.a'],
- },
- 'direct_dependent_settings': {
- 'include_dirs': ['<(compiled_abs)/'],
- },
- },
- {
- 'target_name': 'seasocks',
- 'type': 'static_library',
- 'sources': [
- '<!@(find <(externals)/seasocks-<(seasocks_version)/src/main/c -name *.cpp)',
- ],
- 'include_dirs': [
- '<(AOS)/externals/seasocks',
- '<(externals_abs)/seasocks-<(seasocks_version)/src/main/c',
- ],
- 'cflags': [
- '-Wno-unused-parameter',
- '-Wno-format-nonliteral',
- '-Wno-error=cast-align',
- '-Wno-switch-enum',
- '-Wno-cast-qual',
- '-Wno-error=strict-aliasing',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(AOS)/externals/seasocks',
- '<(externals)/seasocks-<(seasocks_version)/src/main/c',
- ],
- 'cflags': [
- # Since seasocks/WebSocket.h has functions implemented that don't use
- # their parameters, the compilation of http_status would fail without
- # the following exception.
- '-Wno-unused-parameter',
- ],
- },
- },
- ],
-}
diff --git a/aos/build/queues.gypi b/aos/build/queues.gypi
deleted file mode 100644
index 4d9fec2..0000000
--- a/aos/build/queues.gypi
+++ /dev/null
@@ -1,80 +0,0 @@
-# Include this file in any target that needs to use files generated from queue
-# etc. definitions.
-#
-# To use, create a target of the following form:
-# {
-# 'target_name': 'my_queues',
-# 'type': 'static_library', # or any other type that can handle .cc files
-# 'sources': [
-# 'aos/example/Queue.q',
-# 'aos/example/ControlLoop.q',
-# ],
-# 'variables': {
-# 'header_path': 'aos/example',
-# },
-# 'includes': ['path/to/queues.gypi'],
-# },
-# Code that depends on this target will be able to #include
-# "aos/example/Queue.q.h" and "aos/example/ControlLoop.q.h".
-#
-# using <http://src.chromium.org/svn/trunk/src/build/protoc.gypi> as an
-# example of how this should work
-{
- 'variables': {
- 'prefix_dir': '<(SHARED_INTERMEDIATE_DIR)/<!(echo <(header_path) | sed "s/[^A-Za-z0-9]/_/g")',
- 'out_dir': '<(prefix_dir)/<(_target_name)/<(header_path)',
- 'output_h': '<(out_dir)/<(RULE_INPUT_ROOT).q.h',
- 'output_cc': '<(out_dir)/<(RULE_INPUT_ROOT).q.cc',
- 'no_rsync': 1,
- 'aos_q_dependent_paths%': [],
- },
- 'rules': [
- {
- 'variables': {
- 'script': '<(AOS)/build/queues/compiler.rb',
- },
- 'rule_name': 'genqueue',
- 'extension': 'q',
- 'outputs': [
- '<(output_h)',
- '<(output_cc)',
- ],
- 'inputs': [
- '<(script)',
- '<!@(find <(AOS)/build/queues/ -name *.rb)',
- '<(AOS)/common/queue.h',
- '<(AOS)/common/time.h',
- '>@(aos_q_dependent_paths)',
- ],
- 'action': ['ruby', '<(script)',
- '-I', '<(DEPTH)',
- '<(RULE_INPUT_PATH)',
- '-cpp_out',
- '<(header_path)',
- '-cpp_base',
- '<(prefix_dir)/<(_target_name)'],
- 'message': 'Generating C++ code for <(header_path)/<(RULE_INPUT_PATH)',
- 'process_outputs_as_sources': 1,
- },
- ],
- 'include_dirs': [
- '<(prefix_dir)/<(_target_name)',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(prefix_dir)/<(_target_name)',
- ],
- 'variables': {
- 'aos_q_dependent_paths': ['<@(_sources)'],
- },
- },
- 'dependencies': [
- '<(AOS)/common/common.gyp:queues',
- '<(AOS)/common/common.gyp:once',
- '<(AOS)/common/common.gyp:queue_types',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/common.gyp:queues',
- ],
- 'hard_dependency': 1,
-}
diff --git a/aos/build/strip_debuglink b/aos/build/strip_debuglink
deleted file mode 100755
index fce95e6..0000000
--- a/aos/build/strip_debuglink
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/dash
-
-set -e
-
-OBJCOPY=$1
-shift
-
-# The arguments after any -o flags.
-OUTPUT=`echo "$@" | awk \
- 'BEGIN { RS=" " }; output { print ; output = 0 }; /-o/ { output = 1 }'`
-DEBUG_DIR=$(dirname $(dirname ${OUTPUT}))/unstripped_files
-mkdir -p ${DEBUG_DIR}
-DEBUG_FILE=${DEBUG_DIR}/$(basename ${OUTPUT}).full
-
-"$@"
-
-cp ${OUTPUT} ${DEBUG_FILE}
-${OBJCOPY} --strip-debug --add-gnu-debuglink=${DEBUG_FILE} ${OUTPUT}
diff --git a/aos/build/tools_config b/aos/build/tools_config
deleted file mode 100644
index 88931af..0000000
--- a/aos/build/tools_config
+++ /dev/null
@@ -1,15 +0,0 @@
-# This is a shell fragment that sets up variables related to where the tools
-# that download_externals.sh downloads so build.sh can use.
-# It also gets parsed by build.py, so it has to stay just variable assignments
-# and comments.
-
-EXTERNALS=${AOS}/../output/downloaded
-
-NINJA_RELEASE=v1.4.0
-NINJA_DIR=${EXTERNALS}/ninja-${NINJA_RELEASE}
-NINJA=${NINJA_DIR}/ninja
-
-# From chromium@154360:trunk/src/DEPS.
-GYP_REVISION=1738
-GYP_DIR=${EXTERNALS}/gyp-${GYP_REVISION}
-GYP=${GYP_DIR}/gyp
diff --git a/aos/common/actions/actions.gyp b/aos/common/actions/actions.gyp
deleted file mode 100644
index 69c9c7a..0000000
--- a/aos/common/actions/actions.gyp
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'action_lib',
- 'type': 'static_library',
- 'sources': [
- 'actions.cc',
- 'actor.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:queues',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(AOS)/common/util/util.gyp:phased_loop',
- ],
- 'export_dependent_settings': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:queues',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(AOS)/common/util/util.gyp:phased_loop',
- ],
- },
- {
- 'target_name': 'action_queue',
- 'type': 'static_library',
- 'sources': ['actions.q'],
- 'variables': {
- 'header_path': 'aos/common/actions',
- },
- 'includes': ['../../build/queues.gypi'],
- },
- {
- 'target_name': 'test_action_queue',
- 'type': 'static_library',
- 'sources': ['test_action.q'],
- 'variables': {
- 'header_path': 'aos/common/actions',
- },
- 'dependencies': [
- 'action_queue',
- ],
- 'export_dependent_settings': [
- 'action_queue',
- ],
- 'includes': ['../../build/queues.gypi'],
- },
- {
- 'target_name': 'action_test',
- 'type': 'executable',
- 'sources': [
- 'action_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'action_lib',
- 'test_action_queue',
- '<(AOS)/common/common.gyp:queue_testutils',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/common.gyp:queues',
- '<(AOS)/common/common.gyp:time',
- 'action_queue',
- '<(AOS)/common/common.gyp:event',
- ],
- },
- ],
-}
diff --git a/aos/common/common.gyp b/aos/common/common.gyp
deleted file mode 100644
index 14619ad..0000000
--- a/aos/common/common.gyp
+++ /dev/null
@@ -1,393 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'test_queue',
- 'type': 'static_library',
- 'sources': [
- 'test_queue.q',
- ],
- 'variables': {
- 'header_path': 'aos/common',
- },
- 'includes': ['../build/queues.gypi'],
- },
- {
- 'target_name': 'queue_testutils',
- 'type': 'static_library',
- 'sources': [
- 'queue_testutils.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- 'once',
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:shared_mem',
- 'mutex',
- '<(EXTERNALS):gtest',
- ],
- 'export_dependent_settings': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:shared_mem',
- ],
- },
- {
- 'target_name': 'time',
- 'type': 'static_library',
- 'sources': [
- 'time.cc'
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging_interface',
- 'mutex',
- ],
- },
- {
- 'target_name': 'queue_types',
- 'type': 'static_library',
- 'variables': {
- 'print_field_cc': '<(SHARED_INTERMEDIATE_DIR)/print_field.cc',
- 'queue_primitives_h': '<(SHARED_INTERMEDIATE_DIR)/aos_queue_primitives/aos/common/queue_primitives.h',
- },
- 'sources': [
- 'queue_types.cc',
- '<(print_field_cc)',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging_interface',
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:shared_mem',
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:core_lib',
- 'mutex',
- 'time',
- ],
- 'export_dependent_settings': [
- 'time',
- ],
- 'actions': [
- {
- 'variables': {
- 'script': '<(AOS)/build/queues/print_field.rb',
- },
- 'action_name': 'gen_print_field',
- 'inputs': [
- '<(script)',
- '<!@(find <(AOS)/build/queues/ -name *.rb)',
- ],
- 'outputs': [
- '<(print_field_cc)',
- ],
- 'action': ['ruby', '<(script)', '<(print_field_cc)'],
- 'message': 'Generating print_field.cc',
- },
- {
- 'variables': {
- 'script': '<(AOS)/build/queues/queue_primitives.rb',
- },
- 'action_name': 'gen_queue_primitives',
- 'inputs': [
- '<(script)',
- '<!@(find <(AOS)/build/queues/ -name *.rb)',
- ],
- 'outputs': [
- '<(queue_primitives_h)',
- ],
- 'action': ['ruby', '<(script)', '<(queue_primitives_h)'],
- 'message': 'Generating queue_primitives.h',
- },
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/aos_queue_primitives',
- ],
- },
- 'hard_dependency': 1,
- },
- {
- 'target_name': 'queue_types_test',
- 'type': 'executable',
- 'sources': [
- 'queue_types_test.cc',
- ],
- 'dependencies': [
- 'queue_types',
- '<(EXTERNALS):gtest',
- 'test_queue',
- '<(AOS)/build/aos.gyp:logging',
- 'queue_testutils',
- ],
- },
- {
- 'target_name': 'queues',
- 'type': 'static_library',
- 'sources': [
- 'queue.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
- 'time',
- ],
- 'export_dependent_settings': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
- 'time',
- ],
- },
- {
- 'target_name': 'scoped_fd',
- 'type': 'static_library',
- 'sources': [
- # 'scoped_fd.h'
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- ],
- 'export_dependent_settings': [
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
- {
- 'target_name': 'queue_test',
- 'type': 'executable',
- 'sources': [
- 'queue_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'queue_testutils',
- 'test_queue',
- '<(AOS)/common/util/util.gyp:thread',
- 'die',
- ],
- },
- {
- 'target_name': 'type_traits_test',
- 'type': 'executable',
- 'sources': [
- 'type_traits_test.cpp',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- ],
- },
- {
- 'target_name': 'gtest_prod',
- 'type': 'static_library',
- },
- {
- 'target_name': 'once',
- 'type': 'static_library',
- 'dependencies': [
- ':gtest_prod',
- ],
- 'export_dependent_settings': [
- ':gtest_prod',
- ],
- },
- {
- 'target_name': 'once_test',
- 'type': 'executable',
- 'sources': [
- 'once_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'once',
- ],
- },
- {
- 'target_name': 'time_test',
- 'type': 'executable',
- 'sources': [
- 'time_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'time',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/util/util.gyp:death_test_log_implementation',
- ],
- },
- {
- 'target_name': 'die',
- 'type': 'static_library',
- 'sources': [
- 'die.cc',
- ],
- 'dependencies': [
- '<(AOS)/common/libc/libc.gyp:aos_strerror',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/libc/libc.gyp:aos_strerror',
- ],
- },
- {
- 'target_name': 'condition',
- 'type': 'static_library',
- 'sources': [
- '<(AOS)/linux_code/ipc_lib/condition.cc',
- ],
- 'dependencies': [
- 'mutex',
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
- '<(AOS)/build/aos.gyp:logging_interface',
- ],
- 'export_dependent_settings': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
- ],
- },
- {
- 'target_name': 'mutex',
- 'type': 'static_library',
- 'sources': [
- '<(AOS)/linux_code/ipc_lib/mutex.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
- '<(AOS)/build/aos.gyp:logging_interface',
- ],
- 'export_dependent_settings': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
- ],
- },
- {
- 'target_name': 'event',
- 'type': 'static_library',
- 'sources': [
- '<(AOS)/linux_code/ipc_lib/event.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
- 'time',
- '<(AOS)/build/aos.gyp:logging_interface',
- ],
- 'export_dependent_settings': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
- 'time',
- ],
- },
- {
- 'target_name': 'queue_testutils_test',
- 'type': 'executable',
- 'sources': [
- 'queue_testutils_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'queue_testutils',
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
- {
- 'target_name': 'mutex_test',
- 'type': 'executable',
- 'sources': [
- 'mutex_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'mutex',
- 'die',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/util/util.gyp:death_test_log_implementation',
- '<(AOS)/common/util/util.gyp:thread',
- '<(AOS)/common/common.gyp:time',
- 'queue_testutils',
- ],
- },
- {
- 'target_name': 'event_test',
- 'type': 'executable',
- 'sources': [
- 'event_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'event',
- 'queue_testutils',
- 'time',
- ],
- },
- {
- 'target_name': 'condition_test',
- 'type': 'executable',
- 'sources': [
- 'condition_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'condition',
- '<(AOS)/common/util/util.gyp:thread',
- 'time',
- 'mutex',
- '<(AOS)/build/aos.gyp:logging',
- 'queue_testutils',
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:core_lib',
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
- 'die',
- '<(AOS)/common/util/util.gyp:thread',
- ],
- },
- {
- 'target_name': 'die_test',
- 'type': 'executable',
- 'sources': [
- 'die_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'die',
- ],
- },
- {
- 'target_name': 'stl_mutex',
- 'type': 'static_library',
- 'sources': [
- #'stl_mutex.h'
- ],
- 'dependencies': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
- '<(AOS)/build/aos.gyp:logging',
- ],
- 'export_dependent_settings': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
- {
- 'target_name': 'stl_mutex_test',
- 'type': 'executable',
- 'sources': [
- 'stl_mutex_test.cc',
- ],
- 'dependencies': [
- 'stl_mutex',
- '<(EXTERNALS):gtest',
- 'queue_testutils',
- '<(AOS)/common/util/util.gyp:thread',
- 'die',
- ],
- },
- {
- 'target_name': 'transaction',
- 'type': 'static_library',
- 'sources': [
- #'transaction.h',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging_interface',
- ],
- 'export_dependent_settings': [
- '<(AOS)/build/aos.gyp:logging_interface',
- ],
- },
- {
- 'target_name': 'transaction_test',
- 'type': 'executable',
- 'sources': [
- 'transaction_test.cc',
- ],
- 'dependencies': [
- 'transaction',
- '<(EXTERNALS):gtest',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/util/util.gyp:death_test_log_implementation',
- ],
- },
- ],
-}
diff --git a/aos/common/controls/controls.gyp b/aos/common/controls/controls.gyp
deleted file mode 100644
index 8af66be..0000000
--- a/aos/common/controls/controls.gyp
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'replay_control_loop',
- 'type': 'static_library',
- 'sources': [
- #'replay_control_loop.h',
- ],
- 'dependencies': [
- '<(AOS)/common/common.gyp:queues',
- 'control_loop',
- '<(AOS)/linux_code/logging/logging.gyp:log_replay',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/common.gyp:time',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/common.gyp:queues',
- 'control_loop',
- '<(AOS)/linux_code/logging/logging.gyp:log_replay',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/common.gyp:time',
- ],
- },
- {
- 'target_name': 'control_loop_test',
- 'type': 'static_library',
- 'sources': [
- 'control_loop_test.cc',
- ],
- 'dependencies': [
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/messages/messages.gyp:robot_state',
- '<(EXTERNALS):gtest',
- '<(AOS)/common/common.gyp:queue_testutils',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):gtest',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/common.gyp:queue_testutils',
- ],
- },
- {
- 'target_name': 'polytope',
- 'type': 'static_library',
- 'sources': [
- #'polytope.h',
- ],
- 'dependencies': [
- '<(EXTERNALS):eigen',
- '<(EXTERNALS):libcdd',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):eigen',
- '<(EXTERNALS):libcdd',
- ],
- },
- {
- 'target_name': 'control_loop_queues',
- 'type': 'static_library',
- 'sources': [ 'control_loops.q' ],
- 'variables': {
- 'header_path': 'aos/common/controls',
- },
- 'includes': ['../../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'control_loop',
- 'type': 'static_library',
- 'sources': [
- 'control_loop.cc',
- ],
- 'dependencies': [
- '<(AOS)/common/messages/messages.gyp:robot_state',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/common.gyp:time',
- 'control_loop_queues',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/util/util.gyp:log_interval',
- '<(AOS)/common/common.gyp:queues',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/messages/messages.gyp:robot_state',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/common.gyp:time',
- 'control_loop_queues',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/util/util.gyp:log_interval',
- '<(AOS)/common/common.gyp:queues',
- ],
- },
- ],
-}
diff --git a/aos/common/input/input.gyp b/aos/common/input/input.gyp
deleted file mode 100644
index 5674ce7..0000000
--- a/aos/common/input/input.gyp
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'driver_station_data',
- 'type': 'static_library',
- 'sources': [
- 'driver_station_data.cc',
- ],
- 'dependencies': [
- '<(AOS)/common/messages/messages.gyp:robot_state',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/messages/messages.gyp:robot_state',
- ],
- },
- ],
-}
diff --git a/aos/common/libc/libc.gyp b/aos/common/libc/libc.gyp
deleted file mode 100644
index 6b409f0..0000000
--- a/aos/common/libc/libc.gyp
+++ /dev/null
@@ -1,63 +0,0 @@
-# Converted to bazel
-{
- 'targets': [
- {
- 'target_name': 'aos_strsignal',
- 'type': 'static_library',
- 'sources': [
- 'aos_strsignal.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging_interface',
- ],
- },
- {
- 'target_name': 'aos_strsignal_test',
- 'type': 'executable',
- 'sources': [
- 'aos_strsignal_test.cc',
- ],
- 'dependencies': [
- 'aos_strsignal',
- '<(EXTERNALS):gtest',
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
- {
- 'target_name': 'dirname',
- 'type': 'static_library',
- 'sources': [
- 'dirname.cc',
- ],
- },
- {
- 'target_name': 'dirname_test',
- 'type': 'executable',
- 'sources': [
- 'dirname_test.cc',
- ],
- 'dependencies': [
- 'dirname',
- '<(EXTERNALS):gtest',
- ],
- },
- {
- 'target_name': 'aos_strerror',
- 'type': 'static_library',
- 'sources': [
- 'aos_strerror.cc',
- ],
- },
- {
- 'target_name': 'aos_strerror_test',
- 'type': 'executable',
- 'sources': [
- 'aos_strerror_test.cc',
- ],
- 'dependencies': [
- 'aos_strerror',
- '<(EXTERNALS):gtest',
- ],
- },
- ],
-}
diff --git a/aos/common/logging/logging.gyp b/aos/common/logging/logging.gyp
deleted file mode 100644
index d797a3a..0000000
--- a/aos/common/logging/logging.gyp
+++ /dev/null
@@ -1,51 +0,0 @@
-# Converted to bazel
-{
- 'targets': [
- {
- 'target_name': 'logging_impl_test',
- 'type': 'executable',
- 'sources': [
- 'logging_impl_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
- {
- 'target_name': 'queue_logging',
- 'type': 'static_library',
- 'sources': [
- 'queue_logging.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:die',
- '<(AOS)/common/common.gyp:queue_types',
- ],
- 'export_dependent_settings': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:die',
- ],
- },
- {
- 'target_name': 'matrix_logging',
- 'type': 'static_library',
- 'sources': [
- 'matrix_logging.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:die',
- '<(AOS)/common/common.gyp:queue_types',
- '<(EXTERNALS):eigen',
- ],
- 'export_dependent_settings': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:die',
- '<(AOS)/common/common.gyp:queue_types',
- '<(EXTERNALS):eigen',
- ],
- },
- ],
-}
diff --git a/aos/common/messages/messages.gyp b/aos/common/messages/messages.gyp
deleted file mode 100644
index ab336b9..0000000
--- a/aos/common/messages/messages.gyp
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'robot_state',
- 'type': 'static_library',
- 'sources': [
- 'robot_state.q',
- ],
- 'variables': {
- 'header_path': 'aos/common/messages',
- },
- 'includes': ['../../build/queues.gypi'],
- },
- ],
-}
diff --git a/aos/common/network/network.gyp b/aos/common/network/network.gyp
deleted file mode 100644
index cf52f9f..0000000
--- a/aos/common/network/network.gyp
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'team_number',
- 'type': 'static_library',
- 'sources': [
- 'team_number.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:configuration',
- '<(AOS)/common/common.gyp:once',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/util/util.gyp:string_to_num',
- ],
- },
- {
- 'target_name': 'socket',
- 'type': 'static_library',
- 'sources': [
- 'receive_socket.cc',
- 'send_socket.cc',
- 'socket.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/util/util.gyp:inet_addr',
- '<(AOS)/linux_code/linux_code.gyp:configuration',
- ],
- 'export_dependent_settings': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:time',
- ],
- },
- ],
-}
diff --git a/aos/common/util/util.gyp b/aos/common/util/util.gyp
deleted file mode 100644
index e9a37c9..0000000
--- a/aos/common/util/util.gyp
+++ /dev/null
@@ -1,153 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'run_command',
- 'type': 'static_library',
- 'sources': [
- 'run_command.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging_interface',
- ],
- },
- {
- 'target_name': 'run_command_test',
- 'type': 'executable',
- 'sources': [
- 'run_command_test.cc',
- ],
- 'dependencies': [
- 'run_command',
- '<(EXTERNALS):gtest',
- '<(AOS)/build/aos.gyp:logging',
- 'thread',
- ],
- },
- {
- 'target_name': 'death_test_log_implementation',
- 'type': 'static_library',
- 'sources': [
- #'death_test_log_implementation',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- ],
- 'export_dependent_settings': [
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
- {
- 'target_name': 'inet_addr',
- 'type': 'static_library',
- 'sources': [
- 'inet_addr.cc',
- ],
- },
- {
- 'target_name': 'phased_loop',
- 'type': 'static_library',
- 'sources': [
- 'phased_loop.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:time',
- ],
- },
- {
- 'target_name': 'log_interval',
- 'type': 'static_library',
- 'sources': [
- #'log_interval.h',
- ],
- 'dependencies': [
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/build/aos.gyp:logging',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
- {
- 'target_name': 'string_to_num',
- 'type': 'static_library',
- 'sources': [
- #'string_to_num.h',
- ],
- },
- {
- 'target_name': 'string_to_num_test',
- 'type': 'executable',
- 'sources': [
- 'string_to_num_test.cc',
- ],
- 'dependencies': [
- ':string_to_num',
- '<(EXTERNALS):gtest',
- ],
- },
- {
- 'target_name': 'thread',
- 'type': 'static_library',
- 'sources': [
- 'thread.cc',
- ],
- },
- {
- 'target_name': 'trapezoid_profile',
- 'type': 'static_library',
- 'sources': [
- 'trapezoid_profile.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):eigen',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/build/aos.gyp:logging',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):eigen',
- '<(AOS)/common/common.gyp:time',
- ],
- },
- {
- 'target_name': 'trapezoid_profile_test',
- 'type': 'executable',
- 'sources': [
- 'trapezoid_profile_test.cc',
- ],
- 'dependencies': [
- ':trapezoid_profile',
- '<(EXTERNALS):gtest',
- ],
- },
- {
- 'target_name': 'wrapping_counter',
- 'type': 'static_library',
- 'sources': [
- 'wrapping_counter.cc',
- ],
- },
- {
- 'target_name': 'wrapping_counter_test',
- 'type': 'executable',
- 'sources': [
- 'wrapping_counter_test.cc',
- ],
- 'dependencies': [
- 'wrapping_counter',
- '<(EXTERNALS):gtest',
- ],
- },
- {
- 'target_name': 'options_test',
- 'type': 'executable',
- 'sources': [
- 'options_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- ],
- },
- ],
-}
diff --git a/aos/externals/gtest.patch b/aos/externals/gtest.patch
deleted file mode 100644
index f0ee200..0000000
--- a/aos/externals/gtest.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-diff --git src/gtest-port.cc b/src/gtest-port.cc
-index b860d48..acb459b 100644
---- a/src/gtest-port.cc
-+++ b/src/gtest-port.cc
-@@ -35,6 +35,8 @@
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
-+#include <sys/types.h>
-+#include <dirent.h>
-
- #if GTEST_OS_WINDOWS_MOBILE
- # include <windows.h> // For TerminateProcess()
-@@ -98,6 +98,21 @@ size_t GetThreadCount() {
- }
- }
-
-+#elif GTEST_OS_LINUX
-+
-+size_t GetThreadCount() {
-+ size_t thread_count = 0;
-+ if (DIR *dir = opendir("/proc/self/task")) {
-+ while (dirent *entry = readdir(dir)) {
-+ if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0) {
-+ ++thread_count;
-+ }
-+ }
-+ closedir(dir);
-+ }
-+ return thread_count;
-+}
-+
- #else
-
- size_t GetThreadCount() {
-diff --git a/src/gtest-death-test.cc b/src/gtest-death-test.cc
-index 8b2e413..faad3a4 100644
---- a/src/gtest-death-test.cc
-+++ b/src/gtest-death-test.cc
-@@ -44,6 +44,8 @@
- # include <fcntl.h>
- # include <limits.h>
- # include <stdarg.h>
-+# include <sys/time.h>
-+# include <sys/resource.h>
-
- # if GTEST_OS_WINDOWS
- # include <windows.h>
-@@ -898,6 +900,11 @@ inline char** GetEnviron() { return environ; }
- // This function is called in a clone()-ed process and thus must avoid
- // any potentially unsafe operations like malloc or libc functions.
- static int ExecDeathTestChildMain(void* child_arg) {
-+ rlimit core_rlimit;
-+ core_rlimit.rlim_cur = 0;
-+ core_rlimit.rlim_max = 0;
-+ GTEST_DEATH_TEST_CHECK_SYSCALL_(setrlimit(RLIMIT_CORE, &core_rlimit));
-+
- ExecDeathTestArgs* const args = static_cast<ExecDeathTestArgs*>(child_arg);
- GTEST_DEATH_TEST_CHECK_SYSCALL_(close(args->close_fd));
diff --git a/aos/externals/gyp.patch b/aos/externals/gyp.patch
deleted file mode 100644
index b09b67d..0000000
--- a/aos/externals/gyp.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -rupN before/pylib/gyp/input.py after/pylib/gyp/input.py
---- before/pylib/gyp/input.py 2012-11-20 16:38:09.394784918 -0800
-+++ after/pylib/gyp/input.py 2012-11-20 16:39:10.527105964 -0800
-@@ -2412,17 +2412,6 @@ def ValidateSourcesInTarget(target, targ
- basename = os.path.basename(name) # Don't include extension.
- basenames.setdefault(basename, []).append(source)
-
-- error = ''
-- for basename, files in basenames.iteritems():
-- if len(files) > 1:
-- error += ' %s: %s\n' % (basename, ' '.join(files))
--
-- if error:
-- print('static library %s has several files with the same basename:\n' %
-- target + error + 'Some build systems, e.g. MSVC08, '
-- 'cannot handle that.')
-- raise GypError('Duplicate basenames in sources section, see list above')
--
-
- def ValidateRulesInTarget(target, target_dict, extra_sources_for_rules):
- """Ensures that the rules sections in target_dict are valid and consistent,
diff --git a/aos/externals/seasocks.patch b/aos/externals/seasocks.patch
deleted file mode 100644
index e98c65d..0000000
--- a/aos/externals/seasocks.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/src/main/c/HybiPacketDecoder.cpp b/src/main/c/HybiPacketDecoder.cpp
-index f0fdefe..c2971b2 100644
---- a/src/main/c/HybiPacketDecoder.cpp
-+++ b/src/main/c/HybiPacketDecoder.cpp
-@@ -27,6 +27,7 @@
- #include "internal/LogStream.h"
-
- #include <arpa/inet.h>
-+#include <string.h>
-
- namespace seasocks {
-
-@@ -56,18 +57,24 @@ HybiPacketDecoder::MessageState HybiPacketDecoder::decodeNextMessage(std::vector
- auto ptr = _messageStart + 2;
- if (payloadLength == 126) {
- if (_buffer.size() < 4) { return NoMessage; }
-- payloadLength = htons(*reinterpret_cast<const uint16_t*>(&_buffer[ptr]));
-+ uint16_t raw_length;
-+ memcpy(&raw_length, &_buffer[ptr], sizeof(raw_length));
-+ payloadLength = htons(raw_length);
- ptr += 2;
- } else if (payloadLength == 127) {
- if (_buffer.size() < 10) { return NoMessage; }
-- payloadLength = __bswap_64(*reinterpret_cast<const uint64_t*>(&_buffer[ptr]));
-+ uint64_t raw_length;
-+ memcpy(&raw_length, &_buffer[ptr], sizeof(raw_length));
-+ payloadLength = __bswap_64(raw_length);
- ptr += 8;
- }
- uint32_t mask = 0;
- if (maskBit) {
- // MASK is set.
- if (_buffer.size() < ptr + 4) { return NoMessage; }
-- mask = htonl(*reinterpret_cast<const uint32_t*>(&_buffer[ptr]));
-+ uint32_t raw_length;
-+ memcpy(&raw_length, &_buffer[ptr], sizeof(raw_length));
-+ mask = htonl(raw_length);
- ptr += 4;
- }
- auto bytesLeftInBuffer = _buffer.size() - ptr;
diff --git a/aos/linux_code/ipc_lib/ipc_lib.gyp b/aos/linux_code/ipc_lib/ipc_lib.gyp
deleted file mode 100644
index 974a9f6..0000000
--- a/aos/linux_code/ipc_lib/ipc_lib.gyp
+++ /dev/null
@@ -1,111 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'aos_sync',
- 'type': 'static_library',
- 'sources': [
- 'aos_sync.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging_interface',
- '<(AOS)/common/common.gyp:once',
- ],
- },
- {
- 'target_name': 'core_lib',
- 'type': 'static_library',
- 'sources': [
- 'core_lib.c',
- ],
- 'dependencies': [
- 'aos_sync',
- 'shared_mem',
- ],
- 'export_dependent_settings': [
- 'aos_sync',
- ],
- },
- {
- 'target_name': 'shared_mem',
- 'type': 'static_library',
- 'sources': [
- 'shared_mem.c',
- ],
- 'dependencies': [
- 'aos_sync',
- '<(AOS)/build/aos.gyp:logging_interface',
- ],
- 'export_dependent_settings': [
- 'aos_sync',
- ],
- },
- {
- 'target_name': 'queue',
- 'type': 'static_library',
- 'sources': [
- 'queue.cc',
- ],
- 'dependencies': [
- '<(AOS)/common/common.gyp:condition',
- '<(AOS)/common/common.gyp:mutex',
- 'core_lib',
- '<(AOS)/build/aos.gyp:logging_interface',
- ],
- 'export_dependent_settings': [
- '<(AOS)/build/aos.gyp:logging_interface',
- ],
- },
- {
- 'target_name': 'raw_queue_test',
- 'type': 'executable',
- 'sources': [
- 'raw_queue_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'queue',
- '<(AOS)/build/aos.gyp:logging',
- 'core_lib',
- '<(AOS)/common/common.gyp:queue_testutils',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/common.gyp:die',
- '<(AOS)/common/util/util.gyp:thread',
- '<(AOS)/common/util/util.gyp:death_test_log_implementation',
- ],
- },
- {
- 'target_name': 'ipc_stress_test',
- 'type': 'executable',
- 'sources': [
- 'ipc_stress_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/common.gyp:queue_testutils',
- '<(AOS)/common/common.gyp:mutex',
- 'core_lib',
- '<(AOS)/common/common.gyp:die',
- '<(AOS)/common/libc/libc.gyp:dirname',
- '<(AOS)/common/libc/libc.gyp:aos_strsignal',
- '<(AOS)/build/aos.gyp:logging',
- ],
- 'variables': {
- 'is_special_test': 1,
- },
- },
- {
- 'target_name': 'scoped_message_ptr',
- 'type': 'static_library',
- 'sources': [
- #'scoped_message_ptr.h',
- ],
- 'dependencies': [
- 'queue',
- ],
- 'export_dependent_settings': [
- 'queue',
- ],
- },
- ],
-}
diff --git a/aos/linux_code/linux_code.gyp b/aos/linux_code/linux_code.gyp
deleted file mode 100644
index c8ea24c..0000000
--- a/aos/linux_code/linux_code.gyp
+++ /dev/null
@@ -1,77 +0,0 @@
-# Converted to bazel
-{
- 'targets': [
- {
- 'target_name': 'dump_rtprio',
- 'type': 'executable',
- 'variables': {
- 'no_rsync': 1,
- },
- 'sources': [
- 'dump_rtprio.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:time',
- ],
- },
- {
- 'target_name': 'complex_thread_local',
- 'type': 'static_library',
- 'sources': [
- 'complex_thread_local.cc',
- ],
- 'dependencies': [
- '<(AOS)/common/common.gyp:once',
- '<(AOS)/common/common.gyp:die',
- ],
- },
- {
- 'target_name': 'complex_thread_local_test',
- 'type': 'executable',
- 'sources': [
- 'complex_thread_local_test.cc',
- ],
- 'dependencies': [
- 'complex_thread_local',
- '<(EXTERNALS):gtest',
- '<(AOS)/common/util/util.gyp:thread',
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
- {
- 'target_name': 'init',
- 'type': 'static_library',
- 'sources': [
- 'init.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:shared_mem',
- '<(AOS)/common/common.gyp:die',
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
- {
- 'target_name': 'configuration',
- 'type': 'static_library',
- 'sources': [
- 'configuration.cc',
- ],
- 'dependencies': [
- '<(AOS)/common/common.gyp:once',
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
- {
- 'target_name': 'core',
- 'type': 'executable',
- 'sources': [
- 'core.cc',
- ],
- 'dependencies': [
- 'init',
- '<(AOS)/common/util/util.gyp:run_command',
- ],
- },
- ],
-}
diff --git a/aos/linux_code/logging/logging.gyp b/aos/linux_code/logging/logging.gyp
deleted file mode 100644
index 2ae9e0b..0000000
--- a/aos/linux_code/logging/logging.gyp
+++ /dev/null
@@ -1,73 +0,0 @@
-{
- 'targets': [
- # linux_* is dealt with by aos/build/aos.gyp:logging.
- {
- 'target_name': 'log_replay',
- 'type': 'static_library',
- 'sources': [
- 'log_replay.cc',
- ],
- 'dependencies': [
- 'binary_log_file',
- '<(AOS)/common/common.gyp:queues',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
- ],
- },
- {
- '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',
- '<(AOS)/common/common.gyp:die',
- 'binary_log_file',
- '<(AOS)/common/common.gyp:queue_types',
- ],
- },
- {
- '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',
- 'binary_log_file',
- '<(AOS)/common/common.gyp:queue_types',
- '<(AOS)/linux_code/linux_code.gyp:configuration',
- ],
- },
- {
- 'target_name': 'binary_log_file',
- 'type': 'static_library',
- 'sources': [
- 'binary_log_file.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- ],
- 'export_dependent_settings': [
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
- ],
-}
diff --git a/aos/linux_code/starter/starter.gyp b/aos/linux_code/starter/starter.gyp
deleted file mode 100644
index 9a16647..0000000
--- a/aos/linux_code/starter/starter.gyp
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'starter_exe',
- 'type': 'executable',
- 'sources': [
- 'starter.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(EXTERNALS):libevent',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:once',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/libc/libc.gyp:aos_strsignal',
- '<(AOS)/common/util/util.gyp:run_command',
- ],
- 'copies': [
- {
- 'destination': '<(rsync_dir)',
- 'files': [
- 'starter.sh',
- ],
- },
- ],
- },
- ],
-}
diff --git a/aos/prime/input/input.gyp b/aos/prime/input/input.gyp
deleted file mode 100644
index 25ba45d..0000000
--- a/aos/prime/input/input.gyp
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'joystick_input',
- 'type': 'static_library',
- 'sources': [
- 'joystick_input.cc',
- ],
- 'dependencies': [
- '<(AOS)/common/input/input.gyp:driver_station_data',
- '<(AOS)/common/messages/messages.gyp:robot_state',
- '<(AOS)/common/network/network.gyp:socket',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/input/input.gyp:driver_station_data',
- ],
- },
- ],
-}
diff --git a/doc/gyp_to_bazel.py b/doc/gyp_to_bazel.py
deleted file mode 100755
index aa30eb9..0000000
--- a/doc/gyp_to_bazel.py
+++ /dev/null
@@ -1,425 +0,0 @@
-#!/usr/bin/python3
-
-# This script converts simple Gyp files to their Bazel equivalents.
-# It is not intended to be particularly extensible; it is only going to be used
-# once over all of our code and then forgotten about.
-# This "only has to work on exactly the code we have now" property also means
-# it's pretty picky about many things and doesn't try to handle anything
-# beyond what we actually have.
-#
-# It takes a list of folders to deal with.
-#
-# Running this script requires PyYAML <pyyaml.org> to be installed.
-
-import sys
-import os
-import yaml
-import collections
-import re
-
-'''Converts a Gyp filename to its Bazel equivalent.
-
-Args:
- gyp_file_name: The name of the gyp file this is contained in.
- This is important for resolving relative paths etc.
- file: The name of the file to deal with.
-'''
-def gyp_file_to_bazel(gyp_file_name, file):
- if file.startswith('<(AOS)/'):
- return '//aos' + file[6:]
- elif file.startswith('<(DEPTH)/'):
- return '//' + file[9:]
- else:
- if '(' in file:
- raise RuntimeError('Bad variable in file "%s"' % file)
- split_gyp = os.path.dirname(gyp_file_name).split('/')
- rest = []
- dotdots = 0
- doing_dotdots = True
- for component in file.split('/'):
- if component == '..':
- dotdots += 1
- if not doing_dotdots:
- raise RuntimeError('Bad use of .. in file "%s"' % file)
- else:
- doing_dotdots = False
- rest.append(component)
- return '/'.join(['/'] + split_gyp[:-dotdots] + rest)
-
-'''Converts a Gyp target to its Bazel equivalent.
-
-Args:
- gyp_file_name: The name of the gyp file this is contained in.
- This is important for resolving relative paths etc.
- target: The name of the target to deal with.
-'''
-def gyp_target_to_bazel(gyp_file_name, target):
- if not ':' in target:
- if '.' in target:
- raise RuntimeError('Have a filename instead of a target: "%s"' % target)
- return ':' + target
- if target[0] == ':':
- return target
-
- # These thin wrappers won't be copied.
- if target == '<(AOS)/build/aos.gyp:logging':
- return '//aos/common/logging'
- if target == '<(AOS)/build/aos.gyp:logging_interface':
- return '//aos/common/logging:logging_interface'
-
- # These are getting moved to the right place manually.
- if target == '<(AOS)/common/common.gyp:condition':
- return '//aos/linux_code/ipc_lib:condition'
- if target == '<(AOS)/common/common.gyp:mutex':
- return '//aos/linux_code/ipc_lib:mutex'
- if target == '<(AOS)/common/common.gyp:event':
- return '//aos/linux_code/ipc_lib:event'
-
- # By building ..., we can mostly ignore these.
- if (target == '<(AOS)/build/aos_all.gyp:Prime' or
- target == '../../frc971/frc971.gyp:All'):
- return '//aos:prime_binaries'
-
- split = target.split(':')
- if len(split) != 2:
- raise RuntimeError('Not sure how to parse target "%s"' % target)
-
- if split[0] == '<(EXTERNALS)':
- return '//third_party/' + split[1]
-
- split_path = split[0].rsplit('/', 1)
- if len(split_path) != 2:
- raise RuntimeError('TODO(Brian): Handle referring to this .gyp file as %s!' % split[0])
- if not split_path[1].endswith('.gyp'):
- raise RuntimeError('Not sure how to deal with gyp filename "%s"' % split[0])
-
- folder = gyp_file_to_bazel(gyp_file_name, split_path[0])
-
- if not folder.endswith(split_path[1][:-4]):
- raise RuntimeError('Not sure how to deal with non-matching gyp file "%s"' % target)
-
- return '%s:%s' % (folder, split[1])
-
-'''Represents a Bazel build target.
-
-Subclasses represent actual concrete things which are emitted into a BUILD
-file.'''
-class BuildTarget(object):
- def __init__(self, type, name):
- self.__type = type
- self.__name = name
-
- def add_dep(self, bazel_dep):
- self.__deps.append(bazel_dep)
-
- def _type(self):
- return self.__type
-
- '''Returns a collections.OrderedDict with all of the attributes on the
- Bazel rule this represents.
-
- Subclasses are expected to override this and add their own attributes
- in the appropriate order.'''
- def attrs(self):
- r = collections.OrderedDict()
- r['name'] = self.__name
- return r
-
- '''Returns a set of load statements.
-
- Subclasses are expected to override this and add their own loads.
-
- Each element of the result is the arguments to a single load call.'''
- def loads(self):
- return set()
-
- '''Returns the Bazel representation of a given object as an attribute
- value.'''
- def __to_bazel_string(o):
- if isinstance(o, str):
- return repr(o)
- if hasattr(o, '__iter__'):
- r = ['[']
- for c in o:
- r.append(' %s,' % BuildTarget.__to_bazel_string(c))
- r.append(' ]')
- return '\n'.join(r)
- else:
- return str(o)
-
- def __str__(self):
- r = [self.__type + '(']
- for name, value in self.attrs().items():
- if value:
- r.append(' %s = %s,' % (name, BuildTarget.__to_bazel_string(value)))
- r.append(')')
- return '\n'.join(r)
-
-'''Represents a cc_* target.'''
-class CcBuildTarget(BuildTarget):
- def __init__(self, type, name):
- if not type.startswith('cc_'):
- raise
-
- super(CcBuildTarget, self).__init__(type, name)
-
- self.__srcs = []
- self.__hdrs = []
- self.__deps = []
- self.__tags = []
-
- def add_src(self, src):
- self.__srcs.append(src)
-
- def add_hdr(self, hdr):
- self.__hdrs.append(hdr)
-
- def add_dep(self, dep):
- self.__deps.append(dep)
-
- def add_tag(self, tag):
- if self._type() != 'cc_test':
- raise RuntimeError(
- 'Trying to add tag %s to non-test type %s' % (tag, self._type()))
- self.__tags.append(tag)
-
- def attrs(self):
- unique_deps = []
- for dep in self.__deps:
- if dep not in unique_deps:
- unique_deps.append(dep)
- r = super(CcBuildTarget, self).attrs();
- r['srcs'] = self.__srcs
- r['hdrs'] = self.__hdrs
- r['tags'] = self.__tags
- r['deps'] = unique_deps
- return r
-
-'''Represents a filegroup target.'''
-class FilegroupTarget(BuildTarget):
- def __init__(self, name):
- super(FilegroupTarget, self).__init__('filegroup', name)
-
- self.__srcs = []
-
- def add_src(self, src):
- self.__srcs.append(src)
-
- def attrs(self):
- r = super(FilegroupTarget, self).attrs();
- r['srcs'] = self.__srcs
- return r
-
-'''Represents a queue_library target.'''
-class QueueTarget(BuildTarget):
- def __init__(self, name):
- super(QueueTarget, self).__init__('queue_library', name)
-
- self.__srcs = []
- self.__deps = []
-
- def add_src(self, src):
- self.__srcs.append(src)
-
- def add_dep(self, dep):
- self.__deps.append(dep)
-
- def loads(self):
- return set((('/aos/build/queues', 'queue_library'),))
-
- def attrs(self):
- r = super(QueueTarget, self).attrs();
- r['srcs'] = self.__srcs
- r['deps'] = self.__deps
- return r
-
-def _warn_attr(keys_to_handle, name, gyp_file_name, attr):
- if attr in keys_to_handle:
- print('Target %s in %s has %s' % (name, gyp_file_name, attr),
- file=sys.stderr)
- keys_to_handle.remove(attr)
-
-def main(argv):
- for d in argv:
- build_targets = []
-
- d = d.rstrip('/')
- gyp_file_name = os.path.join(d, os.path.split(d)[-1] + '.gyp')
- with open(gyp_file_name, 'r') as gyp_file:
- gyp = yaml.load(gyp_file)
- if 'targets' not in gyp:
- print('No targets entry found in %s!' % gyp_file_name, file=sys.stderr)
- return 1
- if list(gyp.keys()) != ['targets']:
- print('Unknown keys of %s from %s' % (gyp.keys(), gyp_file_name),
- file=sys.stderr)
- targets = gyp['targets']
- for gyp_target in targets:
- target = None
- keys_to_handle = set(gyp_target.keys())
- if 'export_dependent_settings' in gyp_target:
- keys_to_handle.remove('export_dependent_settings')
- name = gyp_target['target_name']
- keys_to_handle.remove('target_name')
- _warn_attr(keys_to_handle, name, gyp_file_name, 'actions')
- _warn_attr(keys_to_handle, name, gyp_file_name, 'conditions')
- _warn_attr(keys_to_handle, name, gyp_file_name, 'copies')
- _warn_attr(keys_to_handle, name, gyp_file_name, 'hard_dependency')
- _warn_attr(keys_to_handle, name, gyp_file_name,
- 'direct_dependent_settings')
-
- # These are getting moved to the right place manually.
- if gyp_file_name == 'aos/common/common.gyp':
- if name == 'condition' or name == 'mutex' or name == 'event':
- continue
- # By building ..., this becomes irrelevant.
- if gyp_file_name == 'frc971/frc971.gyp':
- if name == 'All':
- continue
-
- if 'variables' in gyp_target:
- if 'no_rsync' in gyp_target['variables']:
- del gyp_target['variables']['no_rsync']
-
- type = gyp_target['type']
- keys_to_handle.remove('type')
- if (type in ['static_library', 'executable'] and
- not 'includes' in gyp_target):
- cc_type = {
- 'static_library': 'cc_library',
- 'executable': 'cc_binary',
- }[type]
- if re.match('.*_test$', name) and cc_type == 'cc_binary':
- cc_type = 'cc_test'
- target = CcBuildTarget(cc_type, name)
-
- if 'dependencies' in gyp_target:
- for dep in gyp_target['dependencies']:
- target.add_dep(gyp_target_to_bazel(gyp_file_name, dep))
- keys_to_handle.remove('dependencies')
- if 'sources' in gyp_target:
- for src in gyp_target['sources']:
- # In //aos/common:queue_types, this will get dealt with manually
- # along with the actions.
- if src == '<(print_field_cc)':
- continue
-
- if '/' in src:
- raise RuntimeError(
- 'Bad folder for %s in target %s in %s' % (src, name,
- gyp_file_name))
-
- target.add_src(src)
-
- # This is sort of a heuristic: if there's a header file matching
- # the source file, add it as an hdr. This is going to require some
- # manual cleanup, but it'll be close.
- src_filename = os.path.join(os.path.dirname(gyp_file_name), src)
- if not os.path.exists(src_filename):
- raise RuntimeError(
- 'Can not find source %s in target %s' % (src_filename,
- name))
- header = src_filename.rsplit('.', 2)[0] + '.h'
- if os.path.exists(header):
- target.add_hdr(src.rsplit('.', 2)[0] + '.h')
- keys_to_handle.remove('sources')
- if 'variables' in gyp_target:
- vars = gyp_target['variables']
- if 'is_special_test' in vars:
- if vars['is_special_test'] != 1:
- raise RuntimeError(
- 'Unexpected is_special_test value in target %s' % name)
- target.add_tag('manual')
- del vars['is_special_test']
- elif type == 'none':
- target = FilegroupTarget(name)
- for dep in gyp_target['dependencies']:
- target.add_src(gyp_target_to_bazel(gyp_file_name, dep))
- keys_to_handle.remove('dependencies')
- elif 'includes' in gyp_target:
- includes = gyp_target['includes']
- keys_to_handle.remove('includes')
- if len(includes) != 1:
- raise RuntimeError(
- 'Not sure how to handle multiple includes in %s' % gyp_target)
- include = gyp_file_to_bazel(gyp_file_name, includes[0])
- if include == '//aos/build/queues.gypi':
- vars = gyp_target['variables']
- keys_to_handle.remove('variables')
- if 'header_path' not in vars:
- raise RuntimeError(
- 'No header_path for target %s in %s' % (name, gyp_file_name))
- if list(vars.keys()) != ['header_path']:
- raise RuntimeError(
- 'Extra variables for target %s in %s' % (name, gyp_file_name))
- if vars['header_path'] != os.path.dirname(gyp_file_name):
- raise RuntimeError(
- 'Incorrect header_path for target %s in %s' % (name,
- gyp_file_name))
-
- target = QueueTarget(name)
- for src in gyp_target['sources']:
- if '/' in src:
- raise RuntimeError(
- '.q src %s in bad dir for target %s in %s' % (src,
- name,
- gyp_file_name))
- target.add_src(src)
- keys_to_handle.remove('sources')
- if 'dependencies' in gyp_target:
- for dep in gyp_target['dependencies']:
- target.add_dep(gyp_target_to_bazel(gyp_file_name, dep))
- keys_to_handle.remove('dependencies')
- else:
- raise RuntimeError(
- 'Unknown include %s for target %s in %s' % (include, name,
- gyp_file_name))
- else:
- raise RuntimeError(
- 'Unknown type %s for target %s in %s' % (type, name, gyp_file_name))
-
- if not target:
- raise
-
- if (gyp_file_name == 'y2015/http_status/http_status.gyp' and
- name == 'http_status'):
- # We'll handle these manually.
- keys_to_handle.remove('include_dirs')
- if (gyp_file_name == 'aos/common/common.gyp' and
- name == 'queue_types'):
- # These will get handled manually as part of dealing with the
- # actions.
- keys_to_handle.remove('variables')
-
- # If there were variables but they all got deleted, then we don't
- # actually have any more to handle.
- if 'variables' in keys_to_handle and not gyp_target['variables']:
- keys_to_handle.remove('variables')
- if keys_to_handle:
- raise RuntimeError(
- 'Unhandled keys for target %s in %s: %s' % (name, gyp_file_name,
- keys_to_handle))
- build_targets.append(target)
-
- if not build_targets:
- print('No output targets for %s' % d, file=sys.stderr)
- continue
-
- with open(os.path.join(d, 'BUILD'), 'w') as build_file:
- build_file.write(
- 'package(default_visibility = [\'//visibility:public\'])\n')
- loads = set()
- for t in build_targets:
- loads |= t.loads()
- if loads:
- build_file.write('\n')
- for load in sorted(loads):
- build_file.write('load(%s)\n' % (', '.join([repr(part) for part
- in load])))
- for t in build_targets:
- build_file.write('\n')
- build_file.write(str(t))
- build_file.write('\n')
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv[1:]))
diff --git a/doc/run_gyp_to_bazel.sh b/doc/run_gyp_to_bazel.sh
deleted file mode 100755
index 039ca6e..0000000
--- a/doc/run_gyp_to_bazel.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-# This script runs doc/gyp_to_bazel for most of our code base.
-# We're skipping bot3 for now because it's under active development.
-
-set -e
-set -u
-
-run_for_folder() {
- PYTHONPATH=${HOME}/pyyaml-3.11-prefix/lib/python3.4/site-packages/ find $1 \
- -type d \
- -exec bash -c '[[ -r {}/$(basename {}).gyp ]] && doc/gyp_to_bazel.py {}' \;
- find $1 -type f \( -name '*.gyp' -or -name '*.gypi' \) \
- -exec bash -c '[[ $(basename $(dirname {})).gyp = $(basename {}) ]] || \
- echo Need to manually convert {} >&2' \;
-}
-
-# Manual work on the other folders has started, so we don't want this script to
-# automatically overwrite that work.
-exit 0
-
-run_for_folder bot3
-
-run_for_folder aos
-run_for_folder frc971
-run_for_folder y2014
-run_for_folder y2015
-run_for_folder vision
diff --git a/frc971/autonomous/autonomous.gyp b/frc971/autonomous/autonomous.gyp
deleted file mode 100644
index e36a532..0000000
--- a/frc971/autonomous/autonomous.gyp
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'auto_queue',
- 'type': 'static_library',
- 'sources': ['auto.q'],
- 'variables': {
- 'header_path': 'frc971/autonomous',
- },
- 'includes': ['../../aos/build/queues.gypi'],
- },
- ],
-}
diff --git a/frc971/control_loops/control_loops.gyp b/frc971/control_loops/control_loops.gyp
deleted file mode 100644
index ff62bac..0000000
--- a/frc971/control_loops/control_loops.gyp
+++ /dev/null
@@ -1,112 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'team_number_test_environment',
- 'type': 'static_library',
- 'sources': [
- 'team_number_test_environment.cc'
- ],
- 'dependencies': [
- '<(AOS)/common/network/network.gyp:team_number',
- '<(EXTERNALS):gtest',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):gtest',
- ],
- },
- {
- 'target_name': 'state_feedback_loop_test',
- 'type': 'executable',
- 'sources': [
- 'state_feedback_loop_test.cc',
- ],
- 'dependencies': [
- 'state_feedback_loop',
- '<(EXTERNALS):gtest',
- ],
- },
- {
- 'target_name': 'hall_effect_tracker',
- 'type': 'static_library',
- 'sources': [
- #'hall_effect_tracker.h',
- ],
- 'dependencies': [
- 'queues',
- ],
- 'export_dependent_settings': [
- 'queues',
- ],
- },
- {
- 'target_name': 'queues',
- 'type': 'static_library',
- 'sources': [
- 'control_loops.q',
- ],
- 'variables': {
- 'header_path': 'frc971/control_loops',
- },
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'position_sensor_sim_test',
- 'type': 'executable',
- 'sources': [
- 'position_sensor_sim_test.cc',
- ],
- 'dependencies': [
- 'queues',
- 'position_sensor_sim',
- '<(EXTERNALS):gtest',
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
- {
- 'target_name': 'position_sensor_sim',
- 'type': 'static_library',
- 'sources': [
- 'position_sensor_sim.cc',
- ],
- 'dependencies': [
- 'queues',
- 'gaussian_noise',
- ],
- },
- {
- 'target_name': 'gaussian_noise',
- 'type': 'static_library',
- 'sources': [
- 'gaussian_noise.cc',
- ],
- },
- {
- 'target_name': 'coerce_goal',
- 'type': 'static_library',
- 'sources': [
- 'coerce_goal.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):eigen',
- '<(AOS)/common/controls/controls.gyp:polytope',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):eigen',
- '<(AOS)/common/controls/controls.gyp:polytope',
- ],
- },
- {
- 'target_name': 'state_feedback_loop',
- 'type': 'static_library',
- 'sources': [
- #'state_feedback_loop.h'
- ],
- 'dependencies': [
- '<(EXTERNALS):eigen',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):eigen',
- ],
- },
- ],
-}
diff --git a/frc971/control_loops/voltage_cap/voltage_cap.gyp b/frc971/control_loops/voltage_cap/voltage_cap.gyp
deleted file mode 100644
index 08bd27a..0000000
--- a/frc971/control_loops/voltage_cap/voltage_cap.gyp
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'voltage_cap',
- 'type': 'static_library',
- 'sources': [
- 'voltage_cap.cc',
- ],
- },
- {
- 'target_name': 'voltage_cap_test',
- 'type': 'executable',
- 'sources': [
- 'voltage_cap_test.cc',
- ],
- 'dependencies': [
- 'voltage_cap',
- '<(EXTERNALS):gtest',
- '<(AOS)/common/common.gyp:queue_testutils',
- ],
- },
- ],
-}
diff --git a/frc971/frc971.gyp b/frc971/frc971.gyp
deleted file mode 100644
index 0f38180..0000000
--- a/frc971/frc971.gyp
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'All',
- 'type': 'none',
- 'dependencies': [
- '<(AOS)/build/aos_all.gyp:Prime',
-
- 'control_loops/control_loops.gyp:state_feedback_loop_test',
- 'control_loops/control_loops.gyp:position_sensor_sim_test',
- 'zeroing/zeroing.gyp:zeroing_test',
- 'control_loops/voltage_cap/voltage_cap.gyp:voltage_cap_test',
- ],
- },
- ],
-}
diff --git a/frc971/queues/queues.gyp b/frc971/queues/queues.gyp
deleted file mode 100644
index 1818f89..0000000
--- a/frc971/queues/queues.gyp
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'gyro',
- 'type': 'static_library',
- 'sources': [
- 'gyro.q',
- ],
- 'variables': {
- 'header_path': 'frc971/queues',
- },
- 'includes': ['../../aos/build/queues.gypi'],
- },
- ],
-}
diff --git a/frc971/wpilib/wpilib.gyp b/frc971/wpilib/wpilib.gyp
deleted file mode 100644
index 997b810..0000000
--- a/frc971/wpilib/wpilib.gyp
+++ /dev/null
@@ -1,165 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'logging_queue',
- 'type': 'static_library',
- 'sources': [
- 'logging.q',
- ],
- 'variables': {
- 'header_path': 'frc971/wpilib',
- },
- 'includes': [ '../../aos/build/queues.gypi' ],
- },
- {
- 'target_name': 'encoder_and_potentiometer',
- 'type': 'static_library',
- 'sources': [
- 'encoder_and_potentiometer.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):WPILib',
- 'dma_edge_counting',
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:mutex',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):WPILib',
- 'dma_edge_counting',
- '<(AOS)/common/common.gyp:mutex',
- ],
- },
- {
- 'target_name': 'dma_edge_counting',
- 'type': 'static_library',
- 'sources': [
- 'dma_edge_counting.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):WPILib',
- '<(AOS)/build/aos.gyp:logging',
- 'hall_effect',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):WPILib',
- 'hall_effect',
- ],
- },
- {
- 'target_name': 'interrupt_edge_counting',
- 'type': 'static_library',
- 'sources': [
- 'interrupt_edge_counting.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):WPILib',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:stl_mutex',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/linux_code/linux_code.gyp:init',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):WPILib',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:stl_mutex',
- ],
- },
- {
- 'target_name': 'buffered_pcm',
- 'type': 'static_library',
- 'sources': [
- 'buffered_solenoid.cc',
- 'buffered_pcm.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):WPILib',
- '<(AOS)/build/aos.gyp:logging',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):WPILib',
- ],
- },
- {
- 'target_name': 'gyro_interface',
- 'type': 'static_library',
- 'sources': [
- 'gyro_interface.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):WPILib',
- '<(AOS)/build/aos.gyp:logging',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):WPILib',
- ],
- },
- {
- 'target_name': 'gyro_sender',
- 'type': 'static_library',
- 'sources': [
- 'gyro_sender.cc',
- ],
- 'dependencies': [
- '<(DEPTH)/frc971/queues/queues.gyp:gyro',
- 'gyro_interface',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/messages/messages.gyp:robot_state',
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/common.gyp:time',
- ],
- 'export_dependent_settings': [
- 'gyro_interface',
- '<(AOS)/common/common.gyp:time',
- ],
- },
- {
- 'target_name': 'loop_output_handler',
- 'type': 'static_library',
- 'sources': [
- 'loop_output_handler.cc',
- ],
- 'dependencies': [
- '<(AOS)/common/common.gyp:scoped_fd',
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/util/util.gyp:log_interval',
- '<(AOS)/common/messages/messages.gyp:robot_state',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/common.gyp:scoped_fd',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/util/util.gyp:log_interval',
- ],
- },
- {
- 'target_name': 'joystick_sender',
- 'type': 'static_library',
- 'sources': [
- 'joystick_sender.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):WPILib',
- '<(AOS)/common/messages/messages.gyp:robot_state',
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/network/network.gyp:team_number',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- ],
- },
- {
- 'target_name': 'hall_effect',
- 'type': 'static_library',
- 'sources': [
- #'hall_effect.h',
- ],
- 'dependencies': [
- '<(EXTERNALS):WPILib',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):WPILib',
- ],
- },
- ],
-}
diff --git a/frc971/zeroing/zeroing.gyp b/frc971/zeroing/zeroing.gyp
deleted file mode 100644
index 0a7a2fc..0000000
--- a/frc971/zeroing/zeroing.gyp
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'zeroing',
- 'type': 'static_library',
- 'sources': [
- 'zeroing.cc',
- ],
- 'dependencies': [
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:queues',
- ],
- 'export_dependent_settings': [
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:queues',
- ],
- },
- {
- 'target_name': 'zeroing_test',
- 'type': 'executable',
- 'sources': [
- 'zeroing_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- '<(AOS)/common/common.gyp:queue_testutils',
- 'zeroing',
- '<(AOS)/common/util/util.gyp:thread',
- '<(AOS)/common/common.gyp:die',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:position_sensor_sim',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:queues',
- ],
- },
- ],
-}
diff --git a/output/.gitignore b/output/.gitignore
deleted file mode 100644
index d675b14..0000000
--- a/output/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-/prime/
-/crio/
-/flasher/
-/compiled-*/
-/ip_address.txt
-/ccache_dir/
-
-/crio/
-/crio-debug/
-
-/arm_frc-[^-]*-[^-]*/
-/arm_frc-[^-]*-debug-[^-]*/
-/amd64-[^-]*-[^-]*/
-/amd64-[^-]*-debug-[^-]*/
-/bot3-[^-]*-[^-]*-[^-]*/
-/bot3-[^-]*-[^-]*-debug-[^-]*/
diff --git a/output/downloaded/.gitignore b/output/downloaded/.gitignore
deleted file mode 100644
index b59b5d2..0000000
--- a/output/downloaded/.gitignore
+++ /dev/null
@@ -1,21 +0,0 @@
-/ctemplate-129.tar.gz
-/ctemplate-129/
-/eigen-3.2.1.tar.bz2
-/eigen-3.2.1/
-/gtest-1.6.0-p2/
-/gtest-1.6.0.zip
-/gyp-1738/
-/jpeg-8d/
-/jpegsrc.v8d.tar.gz
-/libjpeg/
-/ninja-v1.4.0/
-/gflags-2.0.tar.gz
-/gflags-2.0/
-/libevent-2.0.21.tar.gz
-/libevent-2.0.21/
-/libcdd-094g.tar.gz
-/libcdd-094g/
-/gmp-5.1.3.tar.lz
-/gperftools-2.3.tar.gz
-/libunwind-1.1.tar.gz
-/seasocks-1.1.2-p1/
diff --git a/y2014_bot3/prime/build.sh b/y2014_bot3/prime/build.sh
deleted file mode 100755
index b730cff..0000000
--- a/y2014_bot3/prime/build.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-cd $(dirname $0)
-
-exec ../../aos/build/build.py $0 prime y2014_bot3 prime.gyp "$@"
diff --git a/y2015/actors/actors.gyp b/y2015/actors/actors.gyp
deleted file mode 100644
index f4989f0..0000000
--- a/y2015/actors/actors.gyp
+++ /dev/null
@@ -1,630 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'binaries',
- 'type': 'none',
- 'dependencies': [
- 'drivetrain_action',
- 'score_action',
- 'score_action_test',
- 'pickup_action',
- 'stack_action',
- 'stack_and_lift_action',
- 'stack_and_hold_action',
- 'held_to_lift_action',
- 'can_pickup_action',
- 'horizontal_can_pickup_action',
- 'lift_action',
- 'stack_action_test',
- ],
- },
- {
- 'target_name': 'drivetrain_action_queue',
- 'type': 'static_library',
- 'sources': ['drivetrain_action.q'],
- 'variables': {
- 'header_path': 'y2015/actors',
- },
- 'dependencies': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- ],
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'drivetrain_action_lib',
- 'type': 'static_library',
- 'sources': [
- 'drivetrain_actor.cc',
- ],
- 'dependencies': [
- 'drivetrain_action_queue',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(EXTERNALS):eigen',
- '<(AOS)/common/util/util.gyp:trapezoid_profile',
- '<(DEPTH)/y2015/control_loops/drivetrain/drivetrain.gyp:drivetrain_queue',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'drivetrain_action_queue',
- ],
- },
- {
- 'target_name': 'drivetrain_action',
- 'type': 'executable',
- 'sources': [
- 'drivetrain_actor_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'drivetrain_action_queue',
- 'drivetrain_action_lib',
- ],
- },
- {
- 'target_name' : 'fridge_profile_lib',
- 'type' : 'static_library',
- 'sources' : [
- 'fridge_profile_lib.cc',
- ],
- 'dependencies' : [
- '<(AOS)/build/aos.gyp:logging_interface',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(DEPTH)/y2015/control_loops/fridge/fridge.gyp:fridge_queue',
- ],
- 'export_dependent_settings' : [
- '<(AOS)/build/aos.gyp:logging_interface',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(DEPTH)/y2015/control_loops/fridge/fridge.gyp:fridge_queue',
- ],
- },
- {
- 'target_name': 'score_action_queue',
- 'type': 'static_library',
- 'sources': ['score_action.q'],
- 'variables': {
- 'header_path': 'y2015/actors',
- },
- 'dependencies': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- ],
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'score_action_lib',
- 'type': 'static_library',
- 'sources': [
- 'score_actor.cc',
- ],
- 'dependencies': [
- 'score_action_queue',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(DEPTH)/y2015/control_loops/fridge/fridge.gyp:fridge_queue',
- '<(EXTERNALS):eigen',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'score_action_queue',
- '<(EXTERNALS):eigen',
- ],
- },
- {
- 'target_name': 'score_action',
- 'type': 'executable',
- 'sources': [
- 'score_actor_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'score_action_queue',
- 'score_action_lib',
- ],
- },
- {
- 'target_name': 'score_action_test',
- 'type': 'executable',
- 'sources': [
- 'score_actor_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- '<(AOS)/common/common.gyp:queue_testutils',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/common.gyp:queues',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(DEPTH)/y2015/control_loops/fridge/fridge.gyp:fridge_queue',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:team_number_test_environment',
- 'score_action_queue',
- 'score_action_lib',
- ],
- },
- {
- 'target_name': 'pickup_action_queue',
- 'type': 'static_library',
- 'sources': ['pickup_action.q'],
- 'variables': {
- 'header_path': 'y2015/actors',
- },
- 'dependencies': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- ],
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'pickup_action_lib',
- 'type': 'static_library',
- 'sources': [
- 'pickup_actor.cc',
- ],
- 'dependencies': [
- 'pickup_action_queue',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(DEPTH)/y2015/control_loops/claw/claw.gyp:claw_queue',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'pickup_action_queue',
- ],
- },
- {
- 'target_name': 'pickup_action',
- 'type': 'executable',
- 'sources': [
- 'pickup_actor_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'pickup_action_queue',
- 'pickup_action_lib',
- ],
- },
- {
- 'target_name': 'can_pickup_action_queue',
- 'type': 'static_library',
- 'sources': ['can_pickup_action.q'],
- 'variables': {
- 'header_path': 'y2015/actors',
- },
- 'dependencies': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- ],
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'can_pickup_action_lib',
- 'type': 'static_library',
- 'sources': [
- 'can_pickup_actor.cc',
- ],
- 'dependencies': [
- 'fridge_profile_lib',
- 'can_pickup_action_queue',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(DEPTH)/y2015/control_loops/claw/claw.gyp:claw_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- ],
- 'export_dependent_settings': [
- 'fridge_profile_lib',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'can_pickup_action_queue',
- ],
- },
- {
- 'target_name': 'can_pickup_action',
- 'type': 'executable',
- 'sources': [
- 'can_pickup_actor_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'can_pickup_action_queue',
- 'can_pickup_action_lib',
- ],
- },
- {
- 'target_name': 'horizontal_can_pickup_action_queue',
- 'type': 'static_library',
- 'sources': ['horizontal_can_pickup_action.q'],
- 'variables': {
- 'header_path': 'y2015/actors',
- },
- 'dependencies': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- ],
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'horizontal_can_pickup_action_lib',
- 'type': 'static_library',
- 'sources': [
- 'horizontal_can_pickup_actor.cc',
- ],
- 'dependencies': [
- 'fridge_profile_lib',
- 'horizontal_can_pickup_action_queue',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(DEPTH)/y2015/control_loops/claw/claw.gyp:claw_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- ],
- 'export_dependent_settings': [
- 'fridge_profile_lib',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'horizontal_can_pickup_action_queue',
- ],
- },
- {
- 'target_name': 'horizontal_can_pickup_action',
- 'type': 'executable',
- 'sources': [
- 'horizontal_can_pickup_actor_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'horizontal_can_pickup_action_queue',
- 'horizontal_can_pickup_action_lib',
- ],
- },
- {
- 'target_name': 'held_to_lift_action_queue',
- 'type': 'static_library',
- 'sources': ['held_to_lift_action.q'],
- 'variables': {
- 'header_path': 'y2015/actors',
- },
- 'dependencies': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- 'lift_action_params',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- 'lift_action_params',
- ],
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'held_to_lift_action_lib',
- 'type': 'static_library',
- 'sources': [
- 'held_to_lift_actor.cc',
- ],
- 'dependencies': [
- 'fridge_profile_lib',
- 'held_to_lift_action_queue',
- 'lift_action_lib',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(DEPTH)/y2015/control_loops/claw/claw.gyp:claw_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'held_to_lift_action_queue',
- 'fridge_profile_lib',
- ],
- },
- {
- 'target_name': 'held_to_lift_action',
- 'type': 'executable',
- 'sources': [
- 'held_to_lift_actor_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'held_to_lift_action_queue',
- 'held_to_lift_action_lib',
- ],
- },
- {
- 'target_name': 'stack_and_hold_action_queue',
- 'type': 'static_library',
- 'sources': ['stack_and_hold_action.q'],
- 'variables': {
- 'header_path': 'y2015/actors',
- },
- 'dependencies': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- 'stack_action_params',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- 'stack_action_params',
- ],
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'stack_and_hold_action_lib',
- 'type': 'static_library',
- 'sources': [
- 'stack_and_hold_actor.cc',
- ],
- 'dependencies': [
- 'fridge_profile_lib',
- 'stack_and_hold_action_queue',
- 'stack_action_lib',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(DEPTH)/y2015/control_loops/claw/claw.gyp:claw_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'stack_and_hold_action_queue',
- 'fridge_profile_lib',
- ],
- },
- {
- 'target_name': 'stack_and_hold_action',
- 'type': 'executable',
- 'sources': [
- 'stack_and_hold_actor_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'stack_and_hold_action_queue',
- 'stack_and_hold_action_lib',
- ],
- },
- {
- 'target_name': 'stack_and_lift_action_queue',
- 'type': 'static_library',
- 'sources': ['stack_and_lift_action.q'],
- 'variables': {
- 'header_path': 'y2015/actors',
- },
- 'dependencies': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- 'stack_action_params',
- 'lift_action_params',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- 'stack_action_params',
- 'lift_action_params',
- ],
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'stack_and_lift_action_lib',
- 'type': 'static_library',
- 'sources': [
- 'stack_and_lift_actor.cc',
- ],
- 'dependencies': [
- 'fridge_profile_lib',
- 'stack_and_lift_action_queue',
- 'stack_action_lib',
- 'lift_action_lib',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(DEPTH)/y2015/control_loops/claw/claw.gyp:claw_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'stack_and_lift_action_queue',
- 'fridge_profile_lib',
- ],
- },
- {
- 'target_name': 'stack_and_lift_action',
- 'type': 'executable',
- 'sources': [
- 'stack_and_lift_actor_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'stack_and_lift_action_queue',
- 'stack_and_lift_action_lib',
- ],
- },
- {
- # This is a wrapper target to avoid adding the directory with a stale
- # stack_action_params.q.h to the compiler's include path.
- 'target_name': 'stack_action_queue',
- 'type': 'none',
- 'dependencies': ['stack_action_queue_real'],
- 'export_dependent_settings': ['stack_action_queue_real'],
- },
- {
- 'target_name': 'stack_action_queue_real',
- 'type': 'static_library',
- 'sources': [
- 'stack_action.q',
- ],
- 'variables': {
- 'header_path': 'y2015/actors',
- },
- 'dependencies': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- 'stack_action_params',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- 'stack_action_params',
- ],
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'stack_action_params',
- 'type': 'static_library',
- 'sources': [
- 'stack_action_params.q',
- ],
- 'variables': {
- 'header_path': 'y2015/actors',
- },
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'stack_action_test',
- 'type': 'executable',
- 'sources': [
- 'stack_actor_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- '<(AOS)/common/common.gyp:queue_testutils',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/common.gyp:queues',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(DEPTH)/y2015/control_loops/fridge/fridge.gyp:fridge_queue',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:team_number_test_environment',
- 'stack_action_queue',
- 'stack_action_lib',
- ],
- },
- {
- 'target_name': 'stack_action_lib',
- 'type': 'static_library',
- 'sources': [
- 'stack_actor.cc',
- ],
- 'dependencies': [
- 'fridge_profile_lib',
- 'stack_action_queue',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(DEPTH)/y2015/control_loops/claw/claw.gyp:claw_queue',
- ],
- 'export_dependent_settings': [
- 'fridge_profile_lib',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'stack_action_queue',
- ],
- },
- {
- 'target_name': 'stack_action',
- 'type': 'executable',
- 'sources': [
- 'stack_actor_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'stack_action_queue',
- 'stack_action_lib',
- ],
- },
- {
- # This is a wrapper target to avoid adding the directory with a stale
- # lift_action_params.q.h to the compiler's include path.
- 'target_name': 'lift_action_queue',
- 'type': 'none',
- 'dependencies': ['lift_action_queue_real'],
- 'export_dependent_settings': ['lift_action_queue_real'],
- },
- {
- 'target_name': 'lift_action_queue_real',
- 'type': 'static_library',
- 'sources': [
- 'lift_action.q',
- ],
- 'variables': {
- 'header_path': 'y2015/actors',
- },
- 'dependencies': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- 'lift_action_params',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- 'lift_action_params',
- ],
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'lift_action_params',
- 'type': 'static_library',
- 'sources': [
- 'lift_action_params.q',
- ],
- 'variables': {
- 'header_path': 'y2015/actors',
- },
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'lift_action_lib',
- 'type': 'static_library',
- 'sources': [
- 'lift_actor.cc',
- ],
- 'dependencies': [
- 'fridge_profile_lib',
- 'lift_action_queue',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(DEPTH)/y2015/control_loops/claw/claw.gyp:claw_queue',
- ],
- 'export_dependent_settings': [
- 'fridge_profile_lib',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'lift_action_queue',
- ],
- },
- {
- 'target_name': 'lift_action',
- 'type': 'executable',
- 'sources': [
- 'lift_actor_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'lift_action_queue',
- 'lift_action_lib',
- ],
- },
- ],
-}
diff --git a/y2015/autonomous/autonomous.gyp b/y2015/autonomous/autonomous.gyp
deleted file mode 100644
index f514a81..0000000
--- a/y2015/autonomous/autonomous.gyp
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'auto_lib',
- 'type': 'static_library',
- 'sources': [
- 'auto.cc',
- ],
- 'dependencies': [
- '<(DEPTH)/frc971/autonomous/autonomous.gyp:auto_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(DEPTH)/y2015/control_loops/drivetrain/drivetrain.gyp:drivetrain_queue',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/util/util.gyp:trapezoid_profile',
- '<(AOS)/build/aos.gyp:logging',
- '<(DEPTH)/y2015/actors/actors.gyp:drivetrain_action_lib',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(DEPTH)/y2015/control_loops/claw/claw.gyp:claw_queue',
- '<(DEPTH)/y2015/control_loops/fridge/fridge.gyp:fridge_queue',
- '<(DEPTH)/y2015/actors/actors.gyp:stack_action_lib',
- '<(DEPTH)/y2015/actors/actors.gyp:held_to_lift_action_lib',
- '<(DEPTH)/y2015/actors/actors.gyp:pickup_action_lib',
- ':auto_queue',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/controls/controls.gyp:control_loop',
- ],
- },
- {
- 'target_name': 'auto',
- 'type': 'executable',
- 'sources': [
- 'auto_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(DEPTH)/frc971/autonomous/autonomous.gyp:auto_queue',
- 'auto_lib',
- ],
- },
- {
- 'target_name': 'auto_queue',
- 'type': 'static_library',
- 'sources': ['auto.q'],
- 'variables': {
- 'header_path': 'y2015/autonomous',
- },
- 'includes': ['../../aos/build/queues.gypi'],
- },
- ],
-}
diff --git a/y2015/control_loops/claw/claw.gyp b/y2015/control_loops/claw/claw.gyp
deleted file mode 100644
index 780f065..0000000
--- a/y2015/control_loops/claw/claw.gyp
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'replay_claw',
- 'type': 'executable',
- 'variables': {
- 'no_rsync': 1,
- },
- 'sources': [
- 'replay_claw.cc',
- ],
- 'dependencies': [
- 'claw_queue',
- '<(AOS)/common/controls/controls.gyp:replay_control_loop',
- '<(AOS)/linux_code/linux_code.gyp:init',
- ],
- },
- {
- 'target_name': 'claw_queue',
- 'type': 'static_library',
- 'sources': ['claw.q'],
- 'variables': {
- 'header_path': 'y2015/control_loops/claw',
- },
- 'dependencies': [
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:queues',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:queues',
-
- ],
- 'includes': ['../../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'claw_lib',
- 'type': 'static_library',
- 'sources': [
- 'claw.cc',
- 'claw_motor_plant.cc',
- ],
- 'dependencies': [
- 'claw_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/util/util.gyp:trapezoid_profile',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(DEPTH)/frc971/zeroing/zeroing.gyp:zeroing',
- ],
- 'export_dependent_settings': [
- 'claw_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/util/util.gyp:trapezoid_profile',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(DEPTH)/frc971/zeroing/zeroing.gyp:zeroing',
- ],
- },
- {
- 'target_name': 'claw_lib_test',
- 'type': 'executable',
- 'sources': [
- 'claw_lib_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'claw_lib',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(AOS)/common/controls/controls.gyp:control_loop_test',
- '<(AOS)/common/common.gyp:time',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:position_sensor_sim',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:team_number_test_environment',
- ],
- },
- {
- 'target_name': 'claw',
- 'type': 'executable',
- 'sources': [
- 'claw_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- 'claw_lib',
- ],
- },
- ],
-}
diff --git a/y2015/control_loops/drivetrain/drivetrain.gyp b/y2015/control_loops/drivetrain/drivetrain.gyp
deleted file mode 100644
index 4333258..0000000
--- a/y2015/control_loops/drivetrain/drivetrain.gyp
+++ /dev/null
@@ -1,103 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'replay_drivetrain',
- 'type': 'executable',
- 'variables': {
- 'no_rsync': 1,
- },
- 'sources': [
- 'replay_drivetrain.cc',
- ],
- 'dependencies': [
- 'drivetrain_queue',
- '<(AOS)/common/controls/controls.gyp:replay_control_loop',
- '<(AOS)/linux_code/linux_code.gyp:init',
- ],
- },
- {
- 'target_name': 'drivetrain_queue',
- 'type': 'static_library',
- 'sources': ['drivetrain.q'],
- 'variables': {
- 'header_path': 'y2015/control_loops/drivetrain',
- },
- 'dependencies': [
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- ],
- 'includes': ['../../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'polydrivetrain_plants',
- 'type': 'static_library',
- 'sources': [
- 'polydrivetrain_dog_motor_plant.cc',
- 'drivetrain_dog_motor_plant.cc',
- ],
- 'dependencies': [
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- ],
- 'export_dependent_settings': [
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- ],
- },
- {
- 'target_name': 'drivetrain_lib',
- 'type': 'static_library',
- 'sources': [
- 'drivetrain.cc',
- 'polydrivetrain_cim_plant.cc',
- ],
- 'dependencies': [
- 'drivetrain_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(AOS)/common/controls/controls.gyp:polytope',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:coerce_goal',
- '<(DEPTH)/frc971/queues/queues.gyp:gyro',
- '<(AOS)/common/util/util.gyp:log_interval',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/logging/logging.gyp:matrix_logging',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/controls/controls.gyp:polytope',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:coerce_goal',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- 'drivetrain_queue',
- ],
- },
- {
- 'target_name': 'drivetrain_lib_test',
- 'type': 'executable',
- 'sources': [
- 'drivetrain_lib_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'drivetrain_queue',
- 'drivetrain_lib',
- '<(AOS)/common/controls/controls.gyp:control_loop_test',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(DEPTH)/frc971/queues/queues.gyp:gyro',
- '<(AOS)/common/common.gyp:queues',
- ],
- },
- {
- 'target_name': 'drivetrain',
- 'type': 'executable',
- 'sources': [
- 'drivetrain_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- 'drivetrain_lib',
- 'drivetrain_queue',
- ],
- },
- ],
-}
diff --git a/y2015/control_loops/fridge/fridge.gyp b/y2015/control_loops/fridge/fridge.gyp
deleted file mode 100644
index 76844c4..0000000
--- a/y2015/control_loops/fridge/fridge.gyp
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'replay_fridge',
- 'type': 'executable',
- 'variables': {
- 'no_rsync': 1,
- },
- 'sources': [
- 'replay_fridge.cc',
- ],
- 'dependencies': [
- 'fridge_queue',
- '<(AOS)/common/controls/controls.gyp:replay_control_loop',
- '<(AOS)/linux_code/linux_code.gyp:init',
- ],
- },
- {
- 'target_name': 'fridge_queue',
- 'type': 'static_library',
- 'sources': ['fridge.q'],
- 'variables': {
- 'header_path': 'y2015/control_loops/fridge',
- },
- 'dependencies': [
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:queues',
- '<(DEPTH)/frc971/zeroing/zeroing.gyp:zeroing',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:queues',
- '<(DEPTH)/frc971/zeroing/zeroing.gyp:zeroing',
- ],
- 'includes': ['../../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'fridge_lib',
- 'type': 'static_library',
- 'sources': [
- 'fridge.cc',
- 'integral_arm_plant.cc',
- 'elevator_motor_plant.cc',
- ],
- 'dependencies': [
- 'fridge_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(AOS)/common/util/util.gyp:trapezoid_profile',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(DEPTH)/frc971/control_loops/voltage_cap/voltage_cap.gyp:voltage_cap',
- ],
- 'export_dependent_settings': [
- 'fridge_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(AOS)/common/util/util.gyp:trapezoid_profile',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- ],
- },
- {
- 'target_name': 'fridge_lib_test',
- 'type': 'executable',
- 'sources': [
- 'fridge_lib_test.cc',
- 'arm_motor_plant.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'fridge_lib',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(AOS)/common/controls/controls.gyp:control_loop_test',
- '<(AOS)/common/common.gyp:time',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:position_sensor_sim',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:team_number_test_environment',
- ],
- },
- {
- 'target_name': 'fridge',
- 'type': 'executable',
- 'sources': [
- 'fridge_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- 'fridge_lib',
- ],
- },
- ],
-}
diff --git a/y2015/http_status/http_status.gyp b/y2015/http_status/http_status.gyp
deleted file mode 100644
index c78a1fc..0000000
--- a/y2015/http_status/http_status.gyp
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'http_status',
- 'type': 'executable',
- 'sources': [
- 'http_status.cc',
- ],
- 'actions': [
- {
- 'action_name': 'http_status_gen_embedded',
- 'inputs': [
- '<!@(find ./www_defaults)',
- '<(AOS)/externals/seasocks/gen_embedded.py',
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/http_status/y2015/http_status/embedded.h',
- ],
- 'action': [
- 'python', '<(AOS)/externals/seasocks/gen_embedded.py', '<(_outputs)',
- ],
- },
- ],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/http_status/'
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/build/aos.gyp:logging',
- '<(EXTERNALS):seasocks',
- '<(DEPTH)/y2015/control_loops/claw/claw.gyp:claw_queue',
- '<(DEPTH)/y2015/control_loops/fridge/fridge.gyp:fridge_queue',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/common.gyp:time',
- ],
- 'copies': [
- {
- 'destination': '<(rsync_dir)',
- 'files': [
- 'www',
- ],
- },
- ],
- },
- ],
-}
diff --git a/y2015/prime/build.sh b/y2015/prime/build.sh
deleted file mode 100755
index 46cff40..0000000
--- a/y2015/prime/build.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-cd $(dirname $0)
-
-exec ../../aos/build/build.py $0 prime y2015 prime.gyp "$@"
diff --git a/y2015/prime/compile_loop.sh b/y2015/prime/compile_loop.sh
deleted file mode 100755
index de6b0d3..0000000
--- a/y2015/prime/compile_loop.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-# Runs `build.sh all` and then waits for a file to be modified in a loop.
-# Useful for making changes to the code while continuously making sure they
-# compile.
-# Requires the util-linux and inotify-tools packages.
-
-chrt -i -p 0 $$
-ionice -c 3 -p $$
-
-while true; do
- $(dirname $0)/build.sh all
- echo 'compile_loop.sh: Waiting for a file modification...' 1>&2
- inotifywait -e close_write -r aos frc971 bbb_cape
- echo 'compile_loop.sh: Done waiting for a file modification' 1>&2
-done
diff --git a/y2015/prime/prime.gyp b/y2015/prime/prime.gyp
deleted file mode 100644
index 5a8b006..0000000
--- a/y2015/prime/prime.gyp
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'All',
- 'type': 'none',
- 'dependencies': [
- '../../frc971/frc971.gyp:All',
-
- '../control_loops/drivetrain/drivetrain.gyp:drivetrain',
- '../control_loops/drivetrain/drivetrain.gyp:drivetrain_lib_test',
- '../control_loops/drivetrain/drivetrain.gyp:replay_drivetrain',
- '../control_loops/fridge/fridge.gyp:fridge',
- '../control_loops/fridge/fridge.gyp:fridge_lib_test',
- '../control_loops/fridge/fridge.gyp:replay_fridge',
- '../control_loops/claw/claw.gyp:claw',
- '../control_loops/claw/claw.gyp:claw_lib_test',
- '../control_loops/claw/claw.gyp:replay_claw',
- '../autonomous/autonomous.gyp:auto',
- '../y2015.gyp:joystick_reader',
- '../http_status/http_status.gyp:http_status',
- '../util/util.gyp:kinematics_test',
- '../actors/actors.gyp:binaries',
- ],
- 'copies': [
- {
- 'destination': '<(rsync_dir)',
- 'files': [
- 'start_list.txt',
- ],
- },
- ],
- 'conditions': [
- ['ARCHITECTURE=="arm_frc"', {
- 'dependencies': [
- '../wpilib/wpilib.gyp:wpilib_interface',
- ],
- }],
- ],
- },
- ],
-}
diff --git a/y2015/util/util.gyp b/y2015/util/util.gyp
deleted file mode 100644
index 00079c1..0000000
--- a/y2015/util/util.gyp
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'kinematics',
- 'type': 'static_library',
- 'sources': [
- #'kinematics.h',
- ],
- 'dependencies': [
- '<(EXTERNALS):eigen',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):eigen',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- ],
- },
- {
- 'target_name': 'kinematics_test',
- 'type': 'executable',
- 'sources': [
- 'kinematics_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- '<(AOS)/common/common.gyp:queue_testutils',
- '<(AOS)/build/aos.gyp:logging',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:team_number_test_environment',
- 'kinematics'
- ],
- },
- ],
-}
diff --git a/y2015/wpilib/wpilib.gyp b/y2015/wpilib/wpilib.gyp
deleted file mode 100644
index 74e45bd..0000000
--- a/y2015/wpilib/wpilib.gyp
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'wpilib_interface',
- 'type': 'executable',
- 'sources': [
- 'wpilib_interface.cc'
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/common.gyp:stl_mutex',
- '<(AOS)/build/aos.gyp:logging',
- '<(EXTERNALS):WPILib',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(DEPTH)/y2015/control_loops/drivetrain/drivetrain.gyp:drivetrain_queue',
- '<(DEPTH)/y2015/control_loops/fridge/fridge.gyp:fridge_queue',
- '<(DEPTH)/y2015/control_loops/claw/claw.gyp:claw_queue',
- '<(DEPTH)/y2015/autonomous/autonomous.gyp:auto_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(AOS)/common/util/util.gyp:log_interval',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/messages/messages.gyp:robot_state',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/messages/messages.gyp:robot_state',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:hall_effect',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:joystick_sender',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:loop_output_handler',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:buffered_pcm',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:gyro_sender',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:dma_edge_counting',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:interrupt_edge_counting',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:encoder_and_potentiometer',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:queues',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:logging_queue',
- ],
- },
- ],
-}
diff --git a/y2015/y2015.gyp b/y2015/y2015.gyp
deleted file mode 100644
index 8abafb8..0000000
--- a/y2015/y2015.gyp
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'constants',
- 'type': 'static_library',
- 'sources': [
- 'constants.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:once',
- '<(AOS)/common/network/network.gyp:team_number',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(DEPTH)/y2015/control_loops/drivetrain/drivetrain.gyp:polydrivetrain_plants',
- ],
- 'export_dependent_settings': [
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- ],
- },
- {
- 'target_name': 'joystick_reader',
- 'type': 'executable',
- 'sources': [
- 'joystick_reader.cc',
- ],
- 'dependencies': [
- '<(AOS)/prime/input/input.gyp:joystick_input',
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/util/util.gyp:log_interval',
- '<(AOS)/common/actions/actions.gyp:action_lib',
-
- '<(DEPTH)/frc971/queues/queues.gyp:gyro',
- '<(DEPTH)/y2015/control_loops/claw/claw.gyp:claw_queue',
- '<(DEPTH)/y2015/control_loops/drivetrain/drivetrain.gyp:drivetrain_queue',
- '<(DEPTH)/y2015/control_loops/fridge/fridge.gyp:fridge_queue',
- '<(DEPTH)/y2015/y2015.gyp:constants',
- '<(DEPTH)/y2015/autonomous/autonomous.gyp:auto_queue',
- '<(DEPTH)/frc971/autonomous/autonomous.gyp:auto_queue',
- '<(DEPTH)/y2015/actors/actors.gyp:stack_action_lib',
- '<(DEPTH)/y2015/actors/actors.gyp:stack_and_lift_action_lib',
- '<(DEPTH)/y2015/actors/actors.gyp:stack_and_hold_action_lib',
- '<(DEPTH)/y2015/actors/actors.gyp:pickup_action_lib',
- '<(DEPTH)/y2015/actors/actors.gyp:lift_action_lib',
- '<(DEPTH)/y2015/actors/actors.gyp:held_to_lift_action_lib',
- '<(DEPTH)/y2015/actors/actors.gyp:can_pickup_action_lib',
- '<(DEPTH)/y2015/actors/actors.gyp:score_action_lib',
- '<(DEPTH)/y2015/actors/actors.gyp:horizontal_can_pickup_action_lib',
- '<(DEPTH)/y2015/actors/actors.gyp:fridge_profile_lib',
- ],
- },
- ],
-}
diff --git a/y2015_bot3/actors/actors.gyp b/y2015_bot3/actors/actors.gyp
deleted file mode 100644
index 8e1c2c6..0000000
--- a/y2015_bot3/actors/actors.gyp
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'binaries',
- 'type': 'none',
- 'dependencies': [
- 'drivetrain_action_bot3',
- ],
- },
- {
- 'target_name': 'drivetrain_action_queue',
- 'type': 'static_library',
- 'sources': ['drivetrain_action.q'],
- 'variables': {
- 'header_path': 'bot3/actors',
- },
- 'dependencies': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_queue',
- ],
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'drivetrain_action_lib',
- 'type': 'static_library',
- 'sources': [
- 'drivetrain_actor.cc',
- ],
- 'dependencies': [
- 'drivetrain_action_queue',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(EXTERNALS):eigen',
- '<(AOS)/common/util/util.gyp:trapezoid_profile',
- '<(DEPTH)/bot3/control_loops/drivetrain/drivetrain.gyp:drivetrain_queue',
- '<(DEPTH)/bot3/control_loops/drivetrain/drivetrain.gyp:drivetrain_lib',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'drivetrain_action_queue',
- ],
- },
- {
- 'target_name': 'drivetrain_action_bot3',
- 'type': 'executable',
- 'sources': [
- 'drivetrain_actor_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/actions/actions.gyp:action_lib',
- 'drivetrain_action_queue',
- 'drivetrain_action_lib',
- ],
- },
- ],
-}
diff --git a/y2015_bot3/autonomous/autonomous.gyp b/y2015_bot3/autonomous/autonomous.gyp
deleted file mode 100644
index 11dd524..0000000
--- a/y2015_bot3/autonomous/autonomous.gyp
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'auto_queue',
- 'type': 'static_library',
- 'sources': ['auto.q'],
- 'variables': {
- 'header_path': 'bot3/autonomous',
- },
- 'includes': ['../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'auto_lib',
- 'type': 'static_library',
- 'sources': [
- 'auto.cc',
- ],
- 'dependencies': [
- 'auto_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(DEPTH)/bot3/control_loops/drivetrain/drivetrain.gyp:drivetrain_queue',
- '<(DEPTH)/bot3/control_loops/drivetrain/drivetrain.gyp:drivetrain_lib',
- '<(DEPTH)/bot3/actors/actors.gyp:drivetrain_action_lib',
- '<(DEPTH)/bot3/control_loops/elevator/elevator.gyp:elevator_queue',
- '<(DEPTH)/bot3/control_loops/intake/intake.gyp:intake_queue',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/util/util.gyp:trapezoid_profile',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/controls/controls.gyp:control_loop',
- ],
- },
- {
- 'target_name': 'auto_bot3',
- 'type': 'executable',
- 'sources': [
- 'auto_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- 'auto_queue',
- 'auto_lib',
- ],
- },
- ],
-}
diff --git a/y2015_bot3/bot3.gyp b/y2015_bot3/bot3.gyp
deleted file mode 100644
index 1a710d9..0000000
--- a/y2015_bot3/bot3.gyp
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'joystick_reader_bot3',
- 'type': 'executable',
- 'sources': [
- 'joystick_reader.cc',
- ],
- 'dependencies': [
- '<(AOS)/prime/input/input.gyp:joystick_input',
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/util/util.gyp:log_interval',
- '<(AOS)/common/actions/actions.gyp:action_lib',
-
- '<(DEPTH)/frc971/queues/queues.gyp:gyro',
- '<(DEPTH)/bot3/control_loops/elevator/elevator.gyp:elevator_lib',
- '<(DEPTH)/bot3/control_loops/drivetrain/drivetrain.gyp:drivetrain_queue',
- '<(DEPTH)/bot3/control_loops/elevator/elevator.gyp:elevator_queue',
- '<(DEPTH)/bot3/control_loops/intake/intake.gyp:intake_queue',
- '<(DEPTH)/bot3/autonomous/autonomous.gyp:auto_queue',
- ],
- },
- ],
-}
diff --git a/y2015_bot3/control_loops/control_loops.gyp b/y2015_bot3/control_loops/control_loops.gyp
deleted file mode 100644
index 0c49272..0000000
--- a/y2015_bot3/control_loops/control_loops.gyp
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'position_sensor_sim',
- 'type': 'static_library',
- 'sources': ['position_sensor_sim.cc'],
- 'dependencies': [
- '<(DEPTH)/bot3/control_loops/elevator/elevator.gyp:elevator_queue',
- ],
- },
- ],
-}
diff --git a/y2015_bot3/control_loops/drivetrain/drivetrain.gyp b/y2015_bot3/control_loops/drivetrain/drivetrain.gyp
deleted file mode 100644
index 92678d1..0000000
--- a/y2015_bot3/control_loops/drivetrain/drivetrain.gyp
+++ /dev/null
@@ -1,105 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'replay_drivetrain_bot3',
- 'type': 'executable',
- 'variables': {
- 'no_rsync': 1,
- },
- 'sources': [
- 'replay_drivetrain.cc',
- ],
- 'dependencies': [
- 'drivetrain_queue',
- '<(AOS)/common/controls/controls.gyp:replay_control_loop',
- '<(AOS)/linux_code/linux_code.gyp:init',
- ],
- },
- {
- 'target_name': 'drivetrain_queue',
- 'type': 'static_library',
- 'sources': ['drivetrain.q'],
- 'variables': {
- 'header_path': 'bot3/control_loops/drivetrain',
- },
- 'dependencies': [
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- ],
- 'includes': ['../../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'polydrivetrain_plants',
- 'type': 'static_library',
- 'sources': [
- 'polydrivetrain_dog_motor_plant.cc',
- 'drivetrain_dog_motor_plant.cc',
- ],
- 'dependencies': [
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- ],
- 'export_dependent_settings': [
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- ],
- },
- {
- 'target_name': 'drivetrain_lib',
- 'type': 'static_library',
- 'sources': [
- 'drivetrain.cc',
- 'polydrivetrain_cim_plant.cc',
- 'drivetrain_dog_motor_plant.cc',
- 'polydrivetrain_dog_motor_plant.cc',
- ],
- 'dependencies': [
- 'drivetrain_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(AOS)/common/controls/controls.gyp:polytope',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:coerce_goal',
- '<(DEPTH)/frc971/queues/queues.gyp:gyro',
- '<(AOS)/common/util/util.gyp:log_interval',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/logging/logging.gyp:matrix_logging',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/controls/controls.gyp:polytope',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:coerce_goal',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- 'drivetrain_queue',
- ],
- },
- {
- 'target_name': 'drivetrain_lib_test_bot3',
- 'type': 'executable',
- 'sources': [
- 'drivetrain_lib_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'drivetrain_queue',
- 'drivetrain_lib',
- '<(AOS)/common/controls/controls.gyp:control_loop_test',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(DEPTH)/frc971/queues/queues.gyp:gyro',
- '<(AOS)/common/common.gyp:queues',
- '<(AOS)/common/network/network.gyp:team_number',
- ],
- },
- {
- 'target_name': 'drivetrain_bot3',
- 'type': 'executable',
- 'sources': [
- 'drivetrain_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- 'drivetrain_lib',
- 'drivetrain_queue',
- ],
- },
- ],
-}
diff --git a/y2015_bot3/control_loops/elevator/elevator.gyp b/y2015_bot3/control_loops/elevator/elevator.gyp
deleted file mode 100644
index c184429..0000000
--- a/y2015_bot3/control_loops/elevator/elevator.gyp
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'elevator_queue',
- 'type': 'static_library',
- 'sources': ['elevator.q'],
- 'variables': {
- 'header_path': 'bot3/control_loops/elevator',
- },
- 'dependencies': [
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:queues',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:queues',
- ],
- 'includes': ['../../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'elevator_lib',
- 'type': 'static_library',
- 'sources': [
- 'elevator.cc',
- 'elevator_motor_plant.cc',
- 'integral_elevator_motor_plant.cc',
- ],
- 'dependencies': [
- 'elevator_queue',
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(AOS)/common/util/util.gyp:trapezoid_profile',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(DEPTH)/frc971/control_loops/voltage_cap/voltage_cap.gyp:voltage_cap',
- ],
- 'export_dependent_settings': [
- 'elevator_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(AOS)/common/util/util.gyp:trapezoid_profile',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- ],
- },
- {
- 'target_name': 'elevator_lib_test',
- 'type': 'executable',
- 'sources': [
- 'elevator_lib_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'elevator_lib',
- '<(DEPTH)/bot3/control_loops/control_loops.gyp:position_sensor_sim',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(AOS)/common/controls/controls.gyp:control_loop_test',
- '<(AOS)/common/common.gyp:time',
- ],
- },
- {
- 'target_name': 'elevator',
- 'type': 'executable',
- 'sources': [
- 'elevator_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- 'elevator_lib',
- ],
- },
- ],
-}
diff --git a/y2015_bot3/control_loops/intake/intake.gyp b/y2015_bot3/control_loops/intake/intake.gyp
deleted file mode 100644
index 41f1b7f..0000000
--- a/y2015_bot3/control_loops/intake/intake.gyp
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'intake_queue',
- 'type': 'static_library',
- 'sources': ['intake.q'],
- 'variables': {
- 'header_path': 'bot3/control_loops/intake',
- },
- 'dependencies': [
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/controls/controls.gyp:control_loop_queues',
- ],
- 'includes': ['../../../aos/build/queues.gypi'],
- },
- {
- 'target_name': 'intake_lib',
- 'type': 'static_library',
- 'sources': [
- 'intake.cc',
- ],
- 'dependencies': [
- 'intake_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- ],
- 'export_dependent_settings': [
- 'intake_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- ],
- },
- {
- 'target_name': 'intake_lib_test',
- 'type': 'executable',
- 'sources': [
- 'intake_lib_test.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):gtest',
- 'intake_lib',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop',
- '<(AOS)/common/controls/controls.gyp:control_loop_test',
- '<(AOS)/common/common.gyp:time',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:team_number_test_environment',
- ],
- },
- {
- 'target_name': 'intake',
- 'type': 'executable',
- 'sources': [
- 'intake_main.cc',
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- 'intake_lib',
- ],
- },
- ],
-}
diff --git a/y2015_bot3/prime/build.sh b/y2015_bot3/prime/build.sh
deleted file mode 100755
index 9586590..0000000
--- a/y2015_bot3/prime/build.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-cd $(dirname $0)
-
-exec ../../aos/build/build.py $0 prime bot3 prime.gyp "$@"
diff --git a/y2015_bot3/prime/prime.gyp b/y2015_bot3/prime/prime.gyp
deleted file mode 100644
index bbc59ad..0000000
--- a/y2015_bot3/prime/prime.gyp
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'All',
- 'type': 'none',
- 'dependencies': [
- '../../frc971/frc971.gyp:All',
-
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:state_feedback_loop_test',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:position_sensor_sim_test',
- '../control_loops/drivetrain/drivetrain.gyp:drivetrain_bot3',
- '../control_loops/drivetrain/drivetrain.gyp:drivetrain_lib_test_bot3',
- '../control_loops/drivetrain/drivetrain.gyp:replay_drivetrain_bot3',
- '../control_loops/intake/intake.gyp:intake',
- '../control_loops/intake/intake.gyp:intake_lib_test',
- '../bot3.gyp:joystick_reader_bot3',
- '../control_loops/elevator/elevator.gyp:elevator',
- '../control_loops/elevator/elevator.gyp:elevator_lib_test',
- #'../control_loops/elevator/elevator.gyp:replay_elevator',
- '../autonomous/autonomous.gyp:auto_bot3',
- '../actors/actors.gyp:binaries',
- ],
- 'copies': [
- {
- 'destination': '<(rsync_dir)',
- 'files': [
- 'start_list.txt',
- ],
- },
- ],
- 'conditions': [
- ['ARCHITECTURE=="arm_frc"', {
- 'dependencies': [
- '../wpilib/wpilib.gyp:wpilib_interface_bot3',
- ],
- }],
- ],
- },
- ],
-}
diff --git a/y2015_bot3/wpilib/wpilib.gyp b/y2015_bot3/wpilib/wpilib.gyp
deleted file mode 100644
index 81f2e9a..0000000
--- a/y2015_bot3/wpilib/wpilib.gyp
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'wpilib_interface_bot3',
- 'type': 'executable',
- 'sources': [
- 'wpilib_interface.cc'
- ],
- 'dependencies': [
- '<(AOS)/linux_code/linux_code.gyp:init',
- '<(AOS)/common/common.gyp:stl_mutex',
- '<(AOS)/build/aos.gyp:logging',
- '<(EXTERNALS):WPILib',
- '<(DEPTH)/bot3/control_loops/drivetrain/drivetrain.gyp:drivetrain_queue',
- '<(AOS)/common/controls/controls.gyp:control_loop',
- '<(AOS)/common/util/util.gyp:log_interval',
- '<(AOS)/common/common.gyp:time',
- '<(AOS)/common/logging/logging.gyp:queue_logging',
- '<(AOS)/common/messages/messages.gyp:robot_state',
- '<(AOS)/common/util/util.gyp:phased_loop',
- '<(AOS)/common/messages/messages.gyp:robot_state',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:hall_effect',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:joystick_sender',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:loop_output_handler',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:buffered_pcm',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:gyro_sender',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:queues',
- '<(DEPTH)/frc971/wpilib/wpilib.gyp:logging_queue',
- '<(DEPTH)/bot3/autonomous/autonomous.gyp:auto_queue',
- '<(DEPTH)/bot3/control_loops/drivetrain/drivetrain.gyp:drivetrain_lib',
- '<(DEPTH)/bot3/control_loops/elevator/elevator.gyp:elevator_lib',
- '<(DEPTH)/bot3/control_loops/intake/intake.gyp:intake_lib',
- ],
- },
- ],
-}