SConscript 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. src += ['hwtimer_sample.c']
  11. if GetDepend('PERIPHERAL_SAMPLES_USING_I2C'):
  12. src += ['i2c_aht10_sample.c']
  13. if GetDepend('PERIPHERAL_SAMPLES_USING_IWDG'):
  14. src += ['iwdg_sample.c']
  15. if GetDepend('PERIPHERAL_SAMPLES_USING_LED_BLINK'):
  16. src += ['led_blink_sample.c']
  17. if GetDepend('PERIPHERAL_SAMPLES_USING_PIN'):
  18. src += Glob('pin_beep_sample.c')
  19. if GetDepend('PERIPHERAL_SAMPLES_USING_PWM'):
  20. src += ['pwm_led_sample.c']
  21. if GetDepend('PERIPHERAL_SAMPLES_USING_RTC'):
  22. src += ['rtc_sample.c']
  23. if GetDepend('PERIPHERAL_SAMPLES_USING_SD'):
  24. src += ['sd_sample.c']
  25. if GetDepend('PERIPHERAL_SAMPLES_USING_SERIAL'):
  26. src += Glob('uart_sample.c')
  27. if GetDepend('PERIPHERAL_SAMPLES_USING_SERIAL_DMA'):
  28. src += Glob('uart_dma_sample.c')
  29. if GetDepend('PERIPHERAL_SAMPLES_USING_SPI'):
  30. src += Glob('spi_w25q_sample.c')
  31. group = DefineGroup('peripheral-samples', src, depend = ['PKG_USING_PERIPHERAL_SAMPLES'], CPPPATH = include_path)
  32. Return('group')