forked from osresearch/LEDscape
/
ledscape.gyp
131 lines (128 loc) · 2.89 KB
/
ledscape.gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
'targets': [
{
'target_name': 'pasm',
'type': 'executable',
'sources': [
'am335x/pasm/pasm.c',
'am335x/pasm/pasm.h',
'am335x/pasm/pasmdbg.h',
'am335x/pasm/pasmdot.c',
'am335x/pasm/pasmexp.c',
'am335x/pasm/pasmmacro.c',
'am335x/pasm/pasmop.c',
'am335x/pasm/pasmpp.c',
'am335x/pasm/pasmstruct.c',
'am335x/pasm/pru_ins.h',
],
},
{
'target_name': 'pruss',
'type': 'static_library',
'include_dirs': [
"am335x/app_loader/include",
],
'link_settings': {
'libraries': [
'-lpthread'
]
},
'direct_dependent_settings': {
'include_dirs': [
"am335x/app_loader/include",
],
},
'sources': [
'am335x/app_loader/include/pruss_intc_mapping.h',
'am335x/app_loader/include/prussdrv.h',
'am335x/app_loader/interface/__prussdrv.h',
'am335x/app_loader/interface/prussdrv.c',
],
},
{
'target_name': 'ledscape',
'type': 'static_library',
'dependencies': [
'pruss',
'pasm',
],
'include_dirs': [
'.',
'<(INTERMEDIATE_DIR)',
],
'direct_dependent_settings': {
'include_dirs': [
'.',
],
},
'sources': [
'ledscape.c',
'ledscape.h',
'pru.c',
'pru.h',
'ws281x.p',
'<(INTERMEDIATE_DIR)/ws281x.pi',
'<(INTERMEDIATE_DIR)/ws281x_bin.h',
],
'rules': [
{
'rule_name': 'preprocess PRU image',
'extension': '.p',
'outputs': [
'<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).pi',
],
'action': [
'<@(preprocess_asm)',
'<(RULE_INPUT_PATH)',
'<@(_outputs)',
],
},
{
'rule_name': 'process PRU image',
'extension': '.pi',
'outputs': [
'<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT)_bin.h',
],
'action': [
'<(pasm)',
'-V3',
'-c',
'-C<(RULE_INPUT_ROOT)_PRUcode',
'<(RULE_INPUT_PATH)',
'<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT)',
],
},
],
},
{
'target_name': 'rgb-test',
'type': 'executable',
'dependencies': [
'ledscape',
],
'link_settings': {
'libraries': [
'-lm'
]
},
'sources': [
'rgb-test.c',
],
},
],
'target_defaults': {
'cflags': [
'-std=c99',
'-O3',
],
},
'variables': {
'pasm': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)pasm<(EXECUTABLE_SUFFIX)',
'preprocess_asm': ['python', 'preprocess_asm.py'],
},
'make_global_settings': [
['CC','/usr/bin/clang'],
['CXX','/usr/bin/clang++'],
['LINK','/usr/bin/clang++'],
],
}