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': [ |
| 11 | '<!@(find <(AOS)/crio/controls <(AOS)/crio/messages <(AOS)/crio/motor_server <(AOS)/crio/shared_libs -name *.c -or -name *.cpp -or -name *.cc)', |
| 12 | '<(AOS)/crio/Talon.cpp', |
| 13 | '<(AOS)/common/die.cc', |
| 14 | ], |
| 15 | }, { |
| 16 | 'libaos_source_files': [ |
| 17 | '<(AOS)/atom_code/camera/Buffers.cpp', |
| 18 | '<(AOS)/atom_code/async_action/AsyncAction_real.cpp', |
| 19 | '<(AOS)/atom_code/init.cc', |
| 20 | '<(AOS)/atom_code/ipc_lib/mutex.cpp', |
| 21 | '<(AOS)/common/die.cc', |
| 22 | ], |
| 23 | } |
| 24 | ], |
| 25 | ], |
| 26 | }, |
| 27 | 'targets': [ |
| 28 | { |
| 29 | 'target_name': 'logging', |
| 30 | 'type': 'static_library', |
| 31 | 'conditions': [ |
| 32 | ['OS=="crio"', { |
| 33 | 'sources': [ |
| 34 | '<(AOS)/crio/logging/crio_logging.cpp', |
| 35 | ], |
| 36 | 'dependencies': [ |
| 37 | '<(EXTERNALS):WPILib', |
| 38 | ] |
| 39 | }, { |
| 40 | 'sources': [ |
| 41 | '<(AOS)/atom_code/logging/atom_logging.cpp' |
| 42 | ], |
| 43 | 'dependencies': [ |
| 44 | '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:ipc_lib', |
| 45 | ], |
| 46 | 'export_dependent_settings': [ |
| 47 | '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:ipc_lib', |
| 48 | ] |
| 49 | }], |
| 50 | ], |
| 51 | 'dependencies': [ |
| 52 | '<(AOS)/common/common.gyp:time', |
| 53 | ], |
| 54 | }, |
| 55 | { |
| 56 | # Private to make Brian happy. Don't use elsewhere in so targets or risk things |
| 57 | # breaking. |
| 58 | 'target_name': 'aos_swig', |
| 59 | 'type': 'static_library', |
| 60 | 'sources': [ |
| 61 | '<(AOS)/aos.swig', |
| 62 | ], |
| 63 | 'variables': { |
| 64 | 'package': 'aos', |
| 65 | }, |
| 66 | 'dependencies': [ |
| 67 | '<(AOS)/common/common.gyp:queues', |
| 68 | ], |
| 69 | 'includes': ['../build/swig.gypi'], |
| 70 | }, |
| 71 | { |
| 72 | 'target_name': 'libaos', |
| 73 | 'type': 'static_library', |
| 74 | 'sources': ['<@(libaos_source_files)'], |
| 75 | 'sources/': [['exclude', '_test\.c[cp]*$']], |
| 76 | 'dependencies': [ |
| 77 | '<(AOS)/common/messages/messages.gyp:aos_queues', |
| 78 | 'logging', |
| 79 | '<(EXTERNALS):WPILib', |
| 80 | ], |
| 81 | 'export_dependent_settings': [ |
| 82 | '<(AOS)/common/messages/messages.gyp:aos_queues', |
| 83 | '<(EXTERNALS):WPILib', |
| 84 | ], |
| 85 | 'conditions': [ |
| 86 | ['OS=="atom"', { |
| 87 | 'dependencies': [ |
| 88 | '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:ipc_lib', |
| 89 | ], |
| 90 | }] |
| 91 | ], |
| 92 | }, |
| 93 | { |
| 94 | 'target_name': 'aos_shared_lib', |
| 95 | 'type': 'shared_library', |
| 96 | 'sources': ['<@(libaos_source_files)'], |
| 97 | 'sources/': [['exclude', '_test\.c[cp]*$']], |
| 98 | 'variables': {'no_rsync': 1}, |
| 99 | 'dependencies': [ |
| 100 | '<(AOS)/common/messages/messages.gyp:queues_so', |
| 101 | '<(AOS)/common/common.gyp:queues', |
| 102 | 'aos_swig', |
| 103 | '<(EXTERNALS):WPILib', |
| 104 | ], |
| 105 | 'export_dependent_settings': [ |
| 106 | '<(AOS)/common/messages/messages.gyp:queues_so', |
| 107 | '<(EXTERNALS):WPILib', |
| 108 | 'aos_swig', |
| 109 | ], |
| 110 | 'direct_dependent_settings': { |
| 111 | 'variables': { |
| 112 | 'jni_libs': [ |
| 113 | 'aos_shared_lib', |
| 114 | ], |
| 115 | }, |
| 116 | }, |
| 117 | }, |
| 118 | { |
| 119 | # A target that has all the same dependencies as libaos and aos_shared_lib |
| 120 | # without any queues so that the queues can get the necessary headers without |
| 121 | # creating circular dependencies. |
| 122 | 'target_name': 'aos_internal_nolib', |
| 123 | 'type': 'none', |
| 124 | 'dependencies': [ |
| 125 | 'aos/ResourceList.h', |
| 126 | '<(EXTERNALS):WPILib', |
| 127 | ], |
| 128 | 'export_dependent_settings': [ |
| 129 | 'aos/ResourceList.h', |
| 130 | '<(EXTERNALS):WPILib', |
| 131 | ], |
| 132 | }, |
| 133 | { |
| 134 | 'target_name': 'aos/ResourceList.h', |
| 135 | 'type': 'static_library', |
| 136 | 'direct_dependent_settings': { |
| 137 | 'include_dirs': [ |
| 138 | '<(SHARED_INTERMEDIATE_DIR)/ResourceList', |
| 139 | ], |
| 140 | }, |
| 141 | 'hard_dependency': 1, |
| 142 | 'actions': [ |
| 143 | { |
| 144 | 'variables': { |
| 145 | 'script': '<(AOS)/build/gen_resource_list.rb' |
| 146 | }, |
| 147 | 'action_name': 'gen_aos_ResourceList_h', |
| 148 | 'inputs': ['<(script)'], |
| 149 | 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/ResourceList/aos/ResourceList.h'], |
| 150 | 'message': 'Generating', |
| 151 | 'action': ['ruby', '<(script)', '<(SHARED_INTERMEDIATE_DIR)/ResourceList/aos',], |
| 152 | }, |
| 153 | ], |
| 154 | }, |
| 155 | ], |
| 156 | } |