diff --git a/bsp/allwinner/d1/SConstruct b/bsp/allwinner/d1/SConstruct index db8b60f1f2..a11d33f72e 100644 --- a/bsp/allwinner/d1/SConstruct +++ b/bsp/allwinner/d1/SConstruct @@ -44,13 +44,13 @@ d1_library = 'sunxi-hal' rtconfig.BSP_LIBRARY_TYPE = d1_library # include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, d1_library, 'SConscript'))) +objs.extend(SConscript(os.path.join(libraries_path_prefix, d1_library, 'SConscript'), variant_dir='build/libraries/sunxi-hal', duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'))) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'), variant_dir='build/libraries/drivers', duplicate=0)) # include libos -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'libos', 'SConscript'))) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'libos', 'SConscript'), variant_dir='build/libraries/libos', duplicate=0)) stack_size = 4096 diff --git a/bsp/allwinner/d1s/SConstruct b/bsp/allwinner/d1s/SConstruct index 4efd6064d4..1b1b2cc6e0 100644 --- a/bsp/allwinner/d1s/SConstruct +++ b/bsp/allwinner/d1s/SConstruct @@ -79,13 +79,13 @@ hal_library = 'sunxi-hal' rtconfig.BSP_LIBRARY_TYPE = hal_library # include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, hal_library, 'SConscript'))) +objs.extend(SConscript(os.path.join(libraries_path_prefix, hal_library, 'SConscript'), variant_dir='build/libraries/sunxi-hal', duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'))) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript'), variant_dir='build/libraries/drivers', duplicate=0)) # include libos -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'libos', 'SConscript'))) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'libos', 'SConscript'), variant_dir='build/libraries/libos', duplicate=0)) if rtconfig.PLATFORM == 'gcc': env['LINKCOM'] = '$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS -Wl,--start-group $_LIBFLAGS -Wl,--end-group' diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/SConscript b/bsp/allwinner/libraries/sunxi-hal/hal/SConscript index f851a7d10e..a22bcdcb12 100644 --- a/bsp/allwinner/libraries/sunxi-hal/hal/SConscript +++ b/bsp/allwinner/libraries/sunxi-hal/hal/SConscript @@ -221,7 +221,7 @@ rtc_path = [cwd + '/../include/hal/rtc'] twi_src = [] twi_path = [] if GetDepend('DRIVERS_TWI'): - twi_src += [cwd + '/source/twi/hal_twi.c'] + twi_src += ['source/twi/hal_twi.c'] twi_path += [cwd + '/source/twi'] udc_src = Split('''