SConscript 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. from building import *
  2. src = []
  3. cwd = GetCurrentDir()
  4. include_path = [cwd]
  5. if GetDepend('PERIPHERAL_SAMPLES_USING_ADC'):
  6. src += ['adc_vol_sample.c']
  7. if GetDepend('PERIPHERAL_SAMPLES_USING_CAN'):
  8. src += ['can_sample.c']
  9. if GetDepend('PERIPHERAL_SAMPLES_USING_HWTIMER'):
  10. if GetDepend('RT_USING_CLOCK_TIME'): # if use the clock_time subsystem
  11. src += ['clock_timer_sample.c']
  12. else:
  13. src += ['hwtimer_sample.c']
  14. if GetDepend('PERIPHERAL_SAMPLES_USING_I2C'):
  15. src += ['i2c_aht10_sample.c']
  16. if GetDepend('PERIPHERAL_SAMPLES_USING_IWDG'):
  17. src += ['iwdg_sample.c']
  18. if GetDepend('PERIPHERAL_SAMPLES_USING_LED_BLINK'):
  19. src += ['led_blink_sample.c']
  20. if GetDepend('PERIPHERAL_SAMPLES_USING_PIN'):
  21. src += Glob('pin_beep_sample.c')
  22. if GetDepend('PERIPHERAL_SAMPLES_USING_PWM'):
  23. src += ['pwm_led_sample.c']
  24. if GetDepend('PERIPHERAL_SAMPLES_USING_RTC'):
  25. src += ['rtc_sample.c']
  26. if GetDepend('PERIPHERAL_SAMPLES_USING_SD'):
  27. src += ['sd_sample.c']
  28. if GetDepend('PERIPHERAL_SAMPLES_USING_SERIAL'):
  29. src += Glob('uart_sample.c')
  30. if GetDepend('PERIPHERAL_SAMPLES_USING_SERIAL_DMA'):
  31. src += Glob('uart_dma_sample.c')
  32. if GetDepend('PERIPHERAL_SAMPLES_USING_SPI'):
  33. src += Glob('spi_w25q_sample.c')
  34. if GetDepend('PERIPHERAL_SAMPLES_USING_DRV'):
  35. src += Glob('drv_sample.c')
  36. group = DefineGroup('peripheral-samples', src, depend = ['PKG_USING_PERIPHERAL_SAMPLES'], CPPPATH = include_path)
  37. Return('group')