22
22
23
23
24
24
def parse_args (extra_args , lv_cflags , board ):
25
-
26
- print ('macOS: parse_args' )
27
25
global heap_size
28
26
unix_argParser = ArgumentParser (prefix_chars = '-' )
29
27
@@ -51,8 +49,6 @@ def parse_args(extra_args, lv_cflags, board):
51
49
52
50
53
51
def build_commands (_ , extra_args , script_dir , lv_cflags , board ):
54
- print ('macOS: build_commands' )
55
-
56
52
global variant
57
53
variant = board
58
54
@@ -70,9 +66,6 @@ def build_commands(_, extra_args, script_dir, lv_cflags, board):
70
66
f'LV_CFLAGS="{ lv_cflags } "' ,
71
67
f'LV_PORT=unix' ,
72
68
f'USER_C_MODULES="{ script_dir } /ext_mod"' ,
73
- f'"CFLAGS=-Wno-missing-field-initializers -Wno-unused-function -I{ script_dir } /lib/micropython -I{ script_dir } /lib/micropython/ports/unix"' ,
74
- f'"LCD_BUS_CFLAGS=-Wno-missing-field-initializers -Wno-unused-function -I{ script_dir } /lib/micropython -I{ script_dir } /lib/micropython/ports/unix"' ,
75
- f'"CFLAGS_EXTRA=-Wno-missing-field-initializers -Wno-unused-function"'
76
69
])
77
70
unix_cmd .extend (extra_args )
78
71
@@ -87,8 +80,6 @@ def build_commands(_, extra_args, script_dir, lv_cflags, board):
87
80
88
81
89
82
def build_manifest (target , script_dir , lvgl_api , displays , indevs , frozen_manifest ):
90
- print ('macOS: build_manifest' )
91
-
92
83
global SCRIPT_PATH
93
84
94
85
SCRIPT_PATH = script_dir
@@ -104,22 +95,16 @@ def build_manifest(target, script_dir, lvgl_api, displays, indevs, frozen_manife
104
95
105
96
106
97
def clean ():
107
- print ('macOS: clean' )
108
-
109
98
spawn (clean_cmd )
110
99
111
100
112
101
def _run (c , spinner = False , cmpl = False ):
113
- print ('macOS - COMMAND:' , c )
114
-
115
102
res , _ = spawn (c , spinner = spinner , cmpl = cmpl )
116
103
if res != 0 :
117
104
sys .exit (res )
118
105
119
106
120
107
def build_sdl ():
121
- print ('macOS: build_sdl' )
122
-
123
108
global variant
124
109
125
110
if variant is None :
@@ -149,8 +134,6 @@ def build_sdl():
149
134
150
135
151
136
def submodules ():
152
- print ('macOS: submodules' )
153
-
154
137
if not os .path .exists ('lib/SDL/include' ):
155
138
cmd_ = [
156
139
'git' ,
@@ -171,8 +154,6 @@ def submodules():
171
154
172
155
173
156
def compile (): # NOQA
174
- print ('macOS: compile' )
175
-
176
157
main_path = 'lib/micropython/ports/unix/main.c'
177
158
178
159
with open (main_path , 'rb' ) as f :
@@ -228,24 +209,21 @@ def compile(): # NOQA
228
209
with open (mpconfigvariant_common_path , 'w' ) as f :
229
210
f .write (mpconfigvariant_common )
230
211
231
- for makefile_path in (
232
- 'lib/micropython/ports/unix/Makefile' ,
233
- 'lib/micropython/py/dynruntime.mk'
234
- ):
235
-
236
- with open (makefile_path , 'rb' ) as f :
237
- data = f .read ().decode ('utf-8' )
238
-
239
- data = data .replace ('-Werror' , '' )
240
-
241
- with open (makefile_path , 'wb' ) as f :
242
- f .write (data .encode ('utf-8' ))
212
+ # for makefile_path in (
213
+ # 'lib/micropython/ports/unix/Makefile',
214
+ # 'lib/micropython/py/dynruntime.mk'
215
+ # ):
216
+ #
217
+ # with open(makefile_path, 'rb') as f:
218
+ # data = f.read().decode('utf-8')
219
+ #
220
+ # data = data.replace('-Werror', '')
221
+ #
222
+ # with open(makefile_path, 'wb') as f:
223
+ # f.write(data.encode('utf-8'))
243
224
244
225
build_sdl ()
245
226
246
- print ('CC:' , os .environ .get ('CC' , '' ))
247
- print ('CFLAGS:' , os .environ .get ('CFLAGS' , '' ))
248
-
249
227
os .environ ['CC' ] = 'gcc'
250
228
return_code , _ = spawn (compile_cmd )
251
229
if return_code != 0 :
0 commit comments