Import('RTT_ROOT') Import('rtconfig') from building import * cwd = GetCurrentDir() src = [] for p in os.listdir(cwd) : if p.endswith(".c"): src += [p] if not GetDepend(['RT_USING_PIN']): src.remove(['luat_gpio_rtt.c']) if not GetDepend(['BSP_USING_ADC']): src.remove('luat_adc_rtt.c') if not GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']): src.remove('luat_i2c_rtt.c') if not GetDepend(['RT_USING_SPI']): src.remove('luat_spi_rtt.c') if not GetDepend(['RT_USING_PWM']): src.remove('luat_pwm_rtt.c') if not GetDepend(['RT_USING_HWCRYPTO']): src.remove('luat_crypto_rtt.c') if not GetDepend(['FINSH_USING_MSH']): src.remove('luat_msh_rtt.c') if not GetDepend(['RT_USING_WIFI']): src.remove('luat_lib_wlan.c') if not GetDepend(['RT_WLAN_MANAGE_ENABLE']): src.remove('rtt_airkiss.c') if not GetDepend(['RT_USING_SAL']): src.remove('webclient.c') src.remove('luat_netclient_rtt.c') if not GetDepend(['SAL_USING_POSIX']): src.remove('luat_socket_rtt.c') src.remove('luat_http_rtt.c') if not GetDepend(['PKG_USING_U8G2']): src.remove('luat_disp_rtt.c') CPPPATH = [cwd] group = DefineGroup('rtt', src, depend = [], CPPPATH = CPPPATH) Return('group')