libusb_stm32.scons 525 B

123456789101112131415161718192021222324252627282930
  1. Import("env")
  2. env.Append(
  3. CPPPATH=[
  4. "#/lib/libusb_stm32/inc",
  5. ],
  6. SDK_HEADERS=env.GlobRecursive(
  7. "*.h",
  8. Dir("libusb_stm32/inc"),
  9. ),
  10. )
  11. libenv = env.Clone(FW_LIB_NAME="usb_stm32")
  12. libenv.ApplyLibFlags()
  13. libenv.Append(
  14. CPPDEFINES=[
  15. ("USB_PMASIZE", "0x400"),
  16. ],
  17. )
  18. sources = [
  19. "libusb_stm32/src/usbd_core.c",
  20. "libusb_stm32/src/usbd_stm32wb55_devfs.c",
  21. ]
  22. lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
  23. libenv.Install("${LIB_DIST_DIR}", lib)
  24. Return("lib")