2
2
import platform
3
3
import shutil
4
4
import scons_argv
5
- complie_helper = scons_argv .get_compile_config ()
5
+ compile_helper = scons_argv .get_compile_config ()
6
6
7
7
from awtk_config_common import TKC_STATIC_LIBS
8
8
from awtk_config_common import joinPath , toWholeArchive , genIdlAndDefEx , setEnvSpawn , genDllLinkFlags , copySharedLib , cleanSharedLib , scons_db_check_and_remove
@@ -45,7 +45,7 @@ def lcd_devices_is_egl(lcd_devices):
45
45
# LCD_DEVICES='egl_for_x11'
46
46
# LCD_DEVICES='egl_for_gbm'
47
47
# LCD_DEVICES='egl_for_wayland'
48
- LCD_DEVICES = complie_helper .get_value ('LCD_DEVICES' , LCD_DEVICES )
48
+ LCD_DEVICES = compile_helper .get_value ('LCD_DEVICES' , LCD_DEVICES )
49
49
50
50
NANOVG_BACKEND = ''
51
51
VGCANVAS = 'NANOVG'
@@ -57,7 +57,7 @@ def lcd_devices_is_egl(lcd_devices):
57
57
#os.environ['USE_SSE2'] = 'true'
58
58
#os.environ['USE_SSSE3'] = 'true'
59
59
#VGCANVAS='NANOVG_PLUS'
60
- VGCANVAS = complie_helper .get_value ('VGCANVAS' , VGCANVAS )
60
+ VGCANVAS = compile_helper .get_value ('VGCANVAS' , VGCANVAS )
61
61
62
62
if LCD_DEVICES == 'fb' or LCD_DEVICES == 'drm' or LCD_DEVICES == 'wayland' :
63
63
LCD = 'LINUX_FB'
@@ -71,7 +71,7 @@ def lcd_devices_is_egl(lcd_devices):
71
71
#INPUT_ENGINE='t9'
72
72
#INPUT_ENGINE='t9ext'
73
73
INPUT_ENGINE = 'pinyin'
74
- INPUT_ENGINE = complie_helper .get_value ('INPUT_ENGINE' , INPUT_ENGINE )
74
+ INPUT_ENGINE = compile_helper .get_value ('INPUT_ENGINE' , INPUT_ENGINE )
75
75
76
76
COMMON_CCFLAGS = ' -DHAS_STD_MALLOC -DHAS_STDIO -DHAS_FAST_MEMCPY -DWITH_VGCANVAS -DWITH_UNICODE_BREAK '
77
77
COMMON_CCFLAGS = COMMON_CCFLAGS + ' -DLOAD_ASSET_WITH_MMAP=1 -DWITH_SOCKET=1 '
@@ -103,7 +103,7 @@ def lcd_devices_is_egl(lcd_devices):
103
103
COMMON_CCFLAGS = COMMON_CCFLAGS + ' -DWITH_IME_NULL '
104
104
105
105
GRAPHIC_BUFFER = 'default'
106
- if complie_helper .get_value ('WITH_CUSTOM_GRAPHIC_BUFFER' , False ) :
106
+ if compile_helper .get_value ('WITH_CUSTOM_GRAPHIC_BUFFER' , False ) :
107
107
GRAPHIC_BUFFER = 'custom'
108
108
#GRAPHIC_BUFFER='jzgpu'
109
109
#if GRAPHIC_BUFFER == 'jzgpu':
@@ -150,37 +150,37 @@ def lcd_devices_is_egl(lcd_devices):
150
150
#TOOLS_PREFIX='/opt/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/bin/'
151
151
#TOOLS_PREFIX='/Users/jim/android/android-ndk-r21d/toolchains/llvm/prebuilt/darwin-x86_64/bin/'
152
152
153
- TOOLS_PREFIX = complie_helper .get_unique_value ('TOOLS_PREFIX' , TOOLS_PREFIX )
154
- TSLIB_LIB_DIR = complie_helper .get_unique_value ('TSLIB_LIB_DIR' , TSLIB_LIB_DIR )
155
- TSLIB_INC_DIR = complie_helper .get_unique_value ('TSLIB_INC_DIR' , TSLIB_INC_DIR )
156
- OS_FLAGS = complie_helper .get_value ('OS_FLAGS' , OS_FLAGS )
157
- OS_LINKFLAGS = complie_helper .get_value ('OS_LINKFLAGS' , OS_LINKFLAGS )
153
+ TOOLS_PREFIX = compile_helper .get_unique_value ('TOOLS_PREFIX' , TOOLS_PREFIX )
154
+ TSLIB_LIB_DIR = compile_helper .get_unique_value ('TSLIB_LIB_DIR' , TSLIB_LIB_DIR )
155
+ TSLIB_INC_DIR = compile_helper .get_unique_value ('TSLIB_INC_DIR' , TSLIB_INC_DIR )
156
+ OS_FLAGS = compile_helper .get_value ('OS_FLAGS' , OS_FLAGS )
157
+ OS_LINKFLAGS = compile_helper .get_value ('OS_LINKFLAGS' , OS_LINKFLAGS )
158
158
159
159
TARGET_ARCH = platform .architecture ();
160
160
161
- if complie_helper .get_value ('PLATFORM' , 'linux' ) == 'android' :
161
+ if compile_helper .get_value ('PLATFORM' , 'linux' ) == 'android' :
162
162
# for android
163
163
TSLIB_LIB_DIR = ''
164
164
TSLIB_INC_DIR = ''
165
- CC = TOOLS_PREFIX + complie_helper .get_value ('TOOLS_CC' , 'armv7a-linux-androideabi16-clang' )
166
- CXX = TOOLS_PREFIX + complie_helper .get_value ('TOOLS_CXX' , 'armv7a-linux-androideabi16-clang++' )
167
- LD = TOOLS_PREFIX + complie_helper .get_value ('TOOLS_LD' , 'arm-linux-androideabi-ld' )
168
- AR = TOOLS_PREFIX + complie_helper .get_value ('TOOLS_AR' , 'arm-linux-androideabi-ar' )
169
- STRIP = TOOLS_PREFIX + complie_helper .get_value ('TOOLS_STRIP' , 'arm-linux-androideabi-strip' )
170
- RANLIB = TOOLS_PREFIX + complie_helper .get_value ('TOOLS_RANLIB' , 'arm-linux-androideabi-ranlib' )
165
+ CC = TOOLS_PREFIX + compile_helper .get_value ('TOOLS_CC' , 'armv7a-linux-androideabi16-clang' )
166
+ CXX = TOOLS_PREFIX + compile_helper .get_value ('TOOLS_CXX' , 'armv7a-linux-androideabi16-clang++' )
167
+ LD = TOOLS_PREFIX + compile_helper .get_value ('TOOLS_LD' , 'arm-linux-androideabi-ld' )
168
+ AR = TOOLS_PREFIX + compile_helper .get_value ('TOOLS_AR' , 'arm-linux-androideabi-ar' )
169
+ STRIP = TOOLS_PREFIX + compile_helper .get_value ('TOOLS_STRIP' , 'arm-linux-androideabi-strip' )
170
+ RANLIB = TOOLS_PREFIX + compile_helper .get_value ('TOOLS_RANLIB' , 'arm-linux-androideabi-ranlib' )
171
171
OS_LINKFLAGS = ' -Wl,--allow-multiple-definition '
172
- OS_LIBS = complie_helper .get_value ('OS_LIBS' , []) + ['stdc++' , 'm' ]
172
+ OS_LIBS = compile_helper .get_value ('OS_LIBS' , []) + ['stdc++' , 'm' ]
173
173
OS_FLAGS = '-Wall -Os -DFB_DEVICE_FILENAME=\\ \" \" /dev/graphics/fb0\\ \" \" '
174
174
else :
175
- CC = TOOLS_PREFIX + complie_helper .get_value ('TOOLS_CC' , 'gcc' )
176
- CXX = TOOLS_PREFIX + complie_helper .get_value ('TOOLS_CXX' , 'g++' )
177
- LD = TOOLS_PREFIX + complie_helper .get_value ('TOOLS_LD' , 'g++' )
178
- AR = TOOLS_PREFIX + complie_helper .get_value ('TOOLS_AR' , 'ar' )
179
- RANLIB = TOOLS_PREFIX + complie_helper .get_value ('TOOLS_RANLIB' , 'ranlib' )
180
- STRIP = TOOLS_PREFIX + complie_helper .get_value ('TOOLS_STRIP' , 'strip' )
181
- OS_LIBS = complie_helper .get_value ('OS_LIBS' , []) + ['stdc++' , 'pthread' , 'rt' , 'm' , 'dl' ]
182
-
183
- OS_DEBUG = complie_helper .get_value ('DEBUG' , False )
175
+ CC = TOOLS_PREFIX + compile_helper .get_value ('TOOLS_CC' , 'gcc' )
176
+ CXX = TOOLS_PREFIX + compile_helper .get_value ('TOOLS_CXX' , 'g++' )
177
+ LD = TOOLS_PREFIX + compile_helper .get_value ('TOOLS_LD' , 'g++' )
178
+ AR = TOOLS_PREFIX + compile_helper .get_value ('TOOLS_AR' , 'ar' )
179
+ RANLIB = TOOLS_PREFIX + compile_helper .get_value ('TOOLS_RANLIB' , 'ranlib' )
180
+ STRIP = TOOLS_PREFIX + compile_helper .get_value ('TOOLS_STRIP' , 'strip' )
181
+ OS_LIBS = compile_helper .get_value ('OS_LIBS' , []) + ['stdc++' , 'pthread' , 'rt' , 'm' , 'dl' ]
182
+
183
+ OS_DEBUG = compile_helper .get_value ('DEBUG' , False )
184
184
if OS_DEBUG :
185
185
OS_FLAGS += ' -g -O0 '
186
186
else :
@@ -213,10 +213,10 @@ def lcd_devices_is_egl(lcd_devices):
213
213
COMMON_CCFLAGS = COMMON_CCFLAGS + ' -DWITH_EVENT_RECORDER_PLAYER=1 '
214
214
COMMON_CCFLAGS = COMMON_CCFLAGS + ' -DWITH_WIDGET_TYPE_CHECK=1 '
215
215
216
- if complie_helper .get_value ('ENABLE_CURSOR' , True ) :
216
+ if compile_helper .get_value ('ENABLE_CURSOR' , True ) :
217
217
COMMON_CCFLAGS = COMMON_CCFLAGS + ' -DENABLE_CURSOR '
218
218
219
- if complie_helper .get_value ('WITH_G2D' , True ) :
219
+ if compile_helper .get_value ('WITH_G2D' , True ) :
220
220
COMMON_CCFLAGS = COMMON_CCFLAGS + ' -DWITH_G2D '
221
221
222
222
if TSLIB_LIB_DIR != '' :
@@ -228,7 +228,7 @@ def lcd_devices_is_egl(lcd_devices):
228
228
LIBPATH = [LIB_DIR , BIN_DIR ] + OS_LIBPATH
229
229
CCFLAGS = OS_FLAGS + COMMON_CCFLAGS
230
230
231
- if complie_helper .get_value ('EXTERN_CODE' , None ) != None :
231
+ if compile_helper .get_value ('EXTERN_CODE' , None ) != None :
232
232
LINKFLAGS = OS_LINKFLAGS + toWholeArchive (['__extern_code' ])
233
233
234
234
STATIC_LIBS = ['awtk_global' , 'fscript_ext_widgets' , 'extwidgets' , 'widgets' , 'awtk_linux_fb' , 'base' , 'gpinyin' , 'linebreak' , 'fribidi' ]
@@ -297,8 +297,8 @@ def lcd_devices_is_egl(lcd_devices):
297
297
LIBPATH = [TSLIB_LIB_DIR ] + LIBPATH ;
298
298
CPPPATH = [TSLIB_INC_DIR ] + CPPPATH ;
299
299
300
- LIBPATH += complie_helper .get_value ('OS_LIBPATH' , [])
301
- CPPPATH += complie_helper .get_value ('OS_CPPPATH' , [])
300
+ LIBPATH += compile_helper .get_value ('OS_LIBPATH' , [])
301
+ CPPPATH += compile_helper .get_value ('OS_CPPPATH' , [])
302
302
303
303
os .environ ['LCD' ] = LCD
304
304
os .environ ['LCD_DEVICES' ] = LCD_DEVICES
0 commit comments