forked from wuhanstudio/rt-u8g2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConscript
201 lines (134 loc) · 6.66 KB
/
SConscript
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
from building import *
import rtconfig
# get current directory
cwd = GetCurrentDir()
# The set of source files associated with this SConscript file.
src = Glob('src/*.c')
src += Glob('port/*.c')
src += Glob('port/*.cpp')
if(GetDepend('PKG_USING_U8G2_V100') or GetDepend('PKG_USING_U8G2_V110') or GetDepend('PKG_USING_U8G2_V120')):
if GetDepend('U8G2_USING_SW_I2C_SSD1306'):
src += Glob('examples/legacy/ssd1306_12864_sw_i2c_example.c')
if GetDepend('U8G2_USING_HW_I2C_SSD1306'):
src += Glob('examples/legacy/ssd1306_12864_hw_i2c_example.c')
if GetDepend('U8G2_USING_SW_SPI_SSD1306'):
src += Glob('examples/legacy/ssd1306_12864_4wire_sw_spi_example.c')
if GetDepend('U8G2_USING_HW_SPI_SSD1306'):
src += Glob('examples/legacy/ssd1306_12864_4wire_hw_spi_example.c')
if GetDepend('U8G2_USING_8080_ST7920'):
src += Glob('examples/legacy/st7920_12864_8080_example.c')
if GetDepend('U8G2_USING_I2C_YL40'):
src += Glob('examples/yl_40_example.c')
else:
# Basic Examples
if GetDepend('U8G2_USING_SW_I2C_SSD1306'):
src += Glob('examples/ssd1306_12864_sw_i2c_example.cpp')
if GetDepend('U8G2_USING_HW_I2C_SSD1306'):
src += Glob('examples/ssd1306_12864_hw_i2c_example.cpp')
if GetDepend('U8G2_USING_SW_SPI_SSD1306'):
src += Glob('examples/ssd1306_12864_4wire_sw_spi_example.cpp')
if GetDepend('U8G2_USING_HW_SPI_SSD1306'):
src += Glob('examples/ssd1306_12864_4wire_hw_spi_example.cpp')
if GetDepend('U8G2_USING_8080_ST7920'):
src += Glob('examples/st7920_12864_8080_example.cpp')
if GetDepend('U8G2_USING_I2C_YL40'):
src += Glob('examples/yl_40_example.c')
# Frame Buffer Examples
if GetDepend('U8G2_USING_FRAME_EXAMPLE_FONT_USAGE'):
src += Glob('examples/full_buffer/FontUsage.cpp')
if GetDepend('U8G2_USING_FRAME_EXAMPLE_FPS'):
src += Glob('examples/full_buffer/FPS.cpp')
if GetDepend('U8G2_USING_FRAME_EXAMPLE_GRAPHIC_TEST'):
src += Glob('examples/full_buffer/GraphicsTest.cpp')
if GetDepend('U8G2_USING_FRAME_EXAMPLE_HELLO_WORLD'):
src += Glob('examples/full_buffer/HelloWorld.cpp')
if GetDepend('U8G2_USING_FRAME_EXAMPLE_ICON_MENU'):
src += Glob('examples/full_buffer/IconMenu.cpp')
if GetDepend('U8G2_USING_FRAME_EXAMPLE_PRINT_UTF8'):
src += Glob('examples/full_buffer/PrintUTF8.cpp')
if GetDepend('U8G2_USING_FRAME_EXAMPLE_SELECTION_LIST'):
src += Glob('examples/full_buffer/SelectionList.cpp')
if GetDepend('U8G2_USING_FRAME_EXAMPLE_U8G2_LOGO'):
src += Glob('examples/full_buffer/U8g2Logo.cpp')
if GetDepend('U8G2_USING_FRAME_EXAMPLE_UPDATE_AREA'):
src += Glob('examples/full_buffer/UpdateArea.cpp')
if GetDepend('U8G2_USING_FRAME_EXAMPLE_WEATHER'):
src += Glob('examples/full_buffer/Weather.cpp')
# Page Buffer Examples
if GetDepend('U8G2_USING_PAGE_EXAMPLE_CHINESE'):
src += Glob('examples/page_buffer/Chinese.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_CLIP_WINDOW'):
src += Glob('examples/page_buffer/ClipWindow.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_CLOCK'):
src += Glob('examples/page_buffer/Clock.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_CONTRAST_TEST'):
src += Glob('examples/page_buffer/ContrastTest.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_DEVANAGARI'):
src += Glob('examples/page_buffer/Devanagari.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_DIRECT_ACCESS'):
src += Glob('examples/page_buffer/DirectAccess.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_DRAW_LOG'):
src += Glob('examples/page_buffer/DrawLog.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_EXT_UTF8'):
src += Glob('examples/page_buffer/ExtUTF8.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_FLIP_MODE'):
src += Glob('examples/page_buffer/FlipMode_pb.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_FPS'):
src += Glob('examples/page_buffer/FPS_pb.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_GRAPHIC_TEST'):
src += Glob('examples/page_buffer/GraphicsTest_pb.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_HELLO_WORLD'):
src += Glob('examples/page_buffer/HelloWorld_pb.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_ICON_MENU'):
src += Glob('examples/page_buffer/IconMenu_pb.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_JAPANESE'):
src += Glob('examples/page_buffer/Japanese.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_KOREAN'):
src += Glob('examples/page_buffer/Korean.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_POWER_SAVE_TEST'):
src += Glob('examples/page_buffer/PowerSaveTest.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_PRINT_HELLO_WORLD'):
src += Glob('examples/page_buffer/PrintHelloWorld.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_SCROLLING_TEXT'):
src += Glob('examples/page_buffer/ScrollingText.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_SCROLLING_LIST'):
src += Glob('examples/page_buffer/SelectionList_pb.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_SERIAL'):
src += Glob('examples/page_buffer/Serial.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_STATE_BUFFER_LOOP'):
src += Glob('examples/page_buffer/StateBufferLoop.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_TERMINAL'):
src += Glob('examples/page_buffer/Terminal_pb.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_U8G2_LOGO'):
src += Glob('examples/page_buffer/U8g2Logo_pb.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_UPDATE_PARTLY'):
src += Glob('examples/page_buffer/UpdatePartly_pb.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_WEATHER'):
src += Glob('examples/page_buffer/Weather_pb.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_XBM'):
src += Glob('examples/page_buffer/XBM.cpp')
if GetDepend('U8G2_USING_PAGE_EXAMPLE_XOR_TEST'):
src += Glob('examples/page_buffer/XORTest.cpp')
# U8x8 Examples
if GetDepend('U8G2_USING_U8x8_EXAMPLE_16x16_FONT'):
src += Glob('examples/u8x8/16x16Font.cpp')
if GetDepend('U8G2_USING_U8x8_EXAMPLE_FLIP_MODE'):
src += Glob('examples/u8x8/FlipMode.cpp')
if GetDepend('U8G2_USING_U8x8_EXAMPLE_GRAPHIC_TEST'):
src += Glob('examples/u8x8/GraphicsTest_8x8.cpp')
if GetDepend('U8G2_USING_U8x8_EXAMPLE_HELLO_WORLD'):
src += Glob('examples/u8x8/HelloWorld_8x8.cpp')
if GetDepend('U8G2_USING_U8x8_EXAMPLE_MESSAGE_BOX'):
src += Glob('examples/u8x8/MessageBox_8x8.cpp')
if GetDepend('U8G2_USING_U8x8_EXAMPLE_TERMINAL'):
src += Glob('examples/u8x8/Terminal_8x8.cpp')
# Game Examples
if GetDepend('U8G2_USING_GAME_EXAMPLE_SPACE_TRASH'):
src += Glob('examples/games/SpaceTrash.cpp')
if GetDepend('U8G2_USING_GAME_EXAMPLE_TREX'):
src += Glob('examples/games/TRex.cpp')
path = [cwd + '/']
path += [cwd + '/port']
LOCAL_CCFLAGS = ''
group = DefineGroup('U8G2', src, depend = ['PKG_USING_U8G2'], CPPPATH = path, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
Return('group')