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