brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 1 | # This file has all of the aos targets. |
| 2 | # For the cRIO, shared_library means to build a .out file, NOT a shared library. |
| 3 | # This means that depending on shared libraries doesn't work very well. |
| 4 | # Shared libraries don't seem to be supported by the powerpc-wrs-vxworks |
| 5 | # tools and gyp doesn't like a static_library that depends on static_librarys. |
| 6 | { |
| 7 | 'variables': { |
| 8 | 'conditions': [ |
| 9 | ['OS=="crio"', { |
| 10 | 'libaos_source_files': [ |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 11 | '<(AOS)/crio/Talon.cpp', |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 12 | ], |
| 13 | }, { |
| 14 | 'libaos_source_files': [ |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 15 | '<(AOS)/atom_code/async_action/AsyncAction_real.cpp', |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 16 | ], |
| 17 | } |
| 18 | ], |
| 19 | ], |
| 20 | }, |
| 21 | 'targets': [ |
| 22 | { |
| 23 | 'target_name': 'logging', |
| 24 | 'type': 'static_library', |
Brian Silverman | f665d69 | 2013-02-17 22:11:39 -0800 | [diff] [blame] | 25 | 'sources': [ |
| 26 | '<(AOS)/common/logging/logging_impl.cc', |
| 27 | ], |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 28 | 'conditions': [ |
| 29 | ['OS=="crio"', { |
| 30 | 'sources': [ |
Brian Silverman | f665d69 | 2013-02-17 22:11:39 -0800 | [diff] [blame] | 31 | '<(AOS)/crio/logging/crio_logging.cc', |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 32 | ], |
| 33 | 'dependencies': [ |
| 34 | '<(EXTERNALS):WPILib', |
Brian Silverman | a9cbe30 | 2013-03-12 18:41:44 -0700 | [diff] [blame^] | 35 | # TODO(brians): socket should only depend on the interface |
| 36 | #'<(AOS)/common/network/network.gyp:socket', |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 37 | ] |
| 38 | }, { |
| 39 | 'sources': [ |
Brian Silverman | f665d69 | 2013-02-17 22:11:39 -0800 | [diff] [blame] | 40 | '<(AOS)/atom_code/logging/atom_logging.cc', |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 41 | ], |
| 42 | 'dependencies': [ |
| 43 | '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:ipc_lib', |
| 44 | ], |
| 45 | 'export_dependent_settings': [ |
| 46 | '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:ipc_lib', |
| 47 | ] |
| 48 | }], |
| 49 | ], |
| 50 | 'dependencies': [ |
| 51 | '<(AOS)/common/common.gyp:time', |
Brian Silverman | f665d69 | 2013-02-17 22:11:39 -0800 | [diff] [blame] | 52 | '<(AOS)/common/common.gyp:once', |
| 53 | '<(AOS)/common/common.gyp:mutex', |
| 54 | '<(AOS)/common/common.gyp:die', |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 55 | ], |
| 56 | }, |
| 57 | { |
| 58 | # Private to make Brian happy. Don't use elsewhere in so targets or risk things |
| 59 | # breaking. |
| 60 | 'target_name': 'aos_swig', |
| 61 | 'type': 'static_library', |
| 62 | 'sources': [ |
| 63 | '<(AOS)/aos.swig', |
| 64 | ], |
| 65 | 'variables': { |
| 66 | 'package': 'aos', |
| 67 | }, |
| 68 | 'dependencies': [ |
| 69 | '<(AOS)/common/common.gyp:queues', |
| 70 | ], |
| 71 | 'includes': ['../build/swig.gypi'], |
| 72 | }, |
| 73 | { |
Brian Silverman | a9cbe30 | 2013-03-12 18:41:44 -0700 | [diff] [blame^] | 74 | 'target_name': 'aos_core', |
| 75 | 'type': 'static_library', |
| 76 | 'sources': [ |
| 77 | #'<(AOS)/aos_core.h' |
| 78 | ], |
| 79 | 'conditions': [ |
| 80 | ['OS=="atom"', { |
| 81 | 'dependencies': [ |
| 82 | '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:ipc_lib', |
| 83 | '<(AOS)/atom_code/atom_code.gyp:init', |
| 84 | ], |
| 85 | 'export_dependent_settings': [ |
| 86 | '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:ipc_lib', |
| 87 | '<(AOS)/atom_code/atom_code.gyp:init', |
| 88 | ], |
| 89 | }, { |
| 90 | 'dependencies': [ |
| 91 | '<(EXTERNALS):WPILib', |
| 92 | ], |
| 93 | 'export_dependent_settings': [ |
| 94 | '<(EXTERNALS):WPILib', |
| 95 | ], |
| 96 | }] |
| 97 | ], |
| 98 | }, |
| 99 | { |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 100 | 'target_name': 'libaos', |
| 101 | 'type': 'static_library', |
| 102 | 'sources': ['<@(libaos_source_files)'], |
| 103 | 'sources/': [['exclude', '_test\.c[cp]*$']], |
| 104 | 'dependencies': [ |
| 105 | '<(AOS)/common/messages/messages.gyp:aos_queues', |
| 106 | 'logging', |
| 107 | '<(EXTERNALS):WPILib', |
| 108 | ], |
| 109 | 'export_dependent_settings': [ |
| 110 | '<(AOS)/common/messages/messages.gyp:aos_queues', |
| 111 | '<(EXTERNALS):WPILib', |
| 112 | ], |
| 113 | 'conditions': [ |
| 114 | ['OS=="atom"', { |
| 115 | 'dependencies': [ |
| 116 | '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:ipc_lib', |
| 117 | ], |
| 118 | }] |
| 119 | ], |
| 120 | }, |
| 121 | { |
| 122 | 'target_name': 'aos_shared_lib', |
| 123 | 'type': 'shared_library', |
| 124 | 'sources': ['<@(libaos_source_files)'], |
| 125 | 'sources/': [['exclude', '_test\.c[cp]*$']], |
| 126 | 'variables': {'no_rsync': 1}, |
| 127 | 'dependencies': [ |
| 128 | '<(AOS)/common/messages/messages.gyp:queues_so', |
| 129 | '<(AOS)/common/common.gyp:queues', |
| 130 | 'aos_swig', |
| 131 | '<(EXTERNALS):WPILib', |
| 132 | ], |
| 133 | 'export_dependent_settings': [ |
| 134 | '<(AOS)/common/messages/messages.gyp:queues_so', |
| 135 | '<(EXTERNALS):WPILib', |
| 136 | 'aos_swig', |
| 137 | ], |
| 138 | 'direct_dependent_settings': { |
| 139 | 'variables': { |
| 140 | 'jni_libs': [ |
| 141 | 'aos_shared_lib', |
| 142 | ], |
| 143 | }, |
| 144 | }, |
| 145 | }, |
| 146 | { |
| 147 | # A target that has all the same dependencies as libaos and aos_shared_lib |
| 148 | # without any queues so that the queues can get the necessary headers without |
| 149 | # creating circular dependencies. |
| 150 | 'target_name': 'aos_internal_nolib', |
| 151 | 'type': 'none', |
| 152 | 'dependencies': [ |
| 153 | 'aos/ResourceList.h', |
| 154 | '<(EXTERNALS):WPILib', |
| 155 | ], |
| 156 | 'export_dependent_settings': [ |
| 157 | 'aos/ResourceList.h', |
| 158 | '<(EXTERNALS):WPILib', |
| 159 | ], |
| 160 | }, |
| 161 | { |
| 162 | 'target_name': 'aos/ResourceList.h', |
| 163 | 'type': 'static_library', |
| 164 | 'direct_dependent_settings': { |
| 165 | 'include_dirs': [ |
| 166 | '<(SHARED_INTERMEDIATE_DIR)/ResourceList', |
| 167 | ], |
| 168 | }, |
| 169 | 'hard_dependency': 1, |
| 170 | 'actions': [ |
| 171 | { |
| 172 | 'variables': { |
| 173 | 'script': '<(AOS)/build/gen_resource_list.rb' |
| 174 | }, |
| 175 | 'action_name': 'gen_aos_ResourceList_h', |
| 176 | 'inputs': ['<(script)'], |
| 177 | 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/ResourceList/aos/ResourceList.h'], |
| 178 | 'message': 'Generating', |
| 179 | 'action': ['ruby', '<(script)', '<(SHARED_INTERMEDIATE_DIR)/ResourceList/aos',], |
| 180 | }, |
| 181 | ], |
| 182 | }, |
| 183 | ], |
| 184 | } |