You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
897 B

  1. ################################################################################
  2. #
  3. ################################################################################
  4. DIR_MIDDLEWARE_STM = cubemx/Middlewares/ST/STM32_USB_Device_Library/Core/Src
  5. SOURCE_MIDDLEWARE_STM = \
  6. usbd_core.c \
  7. usbd_ctlreq.c \
  8. usbd_ioreq.c
  9. SOURCE += $(addprefix $(DIR_MIDDLEWARE_STM)/,$(SOURCE_MIDDLEWARE_STM))
  10. # Build .c files
  11. $(OUT)/$(DIR_MIDDLEWARE_STM):
  12. @$(MKDIR) $@
  13. $(OUT)/$(DIR_MIDDLEWARE_STM)/%.o: $(DIR_MIDDLEWARE_STM)/%.c | $(OUT)/$(DIR_MIDDLEWARE_STM)
  14. $(VERBOSE)$(ECHO) '[CC] $<'
  15. $(VERBOSE)$(CC) $(CFLAGS) $(CFLAGS_MIDDLEWARE_STM) -o "$@" "$<"
  16. $(OUT)/$(DIR_MIDDLEWARE_STM)/%.d: $(DIR_MIDDLEWARE_STM)/%.c | $(OUT)/$(DIR_MIDDLEWARE_STM)
  17. @set -e; rm -f $@; \
  18. $(CC) $(CFLAGS) $(CFLAGS_STM) -MM $< > $@.$$$$; \
  19. sed 's,\($<\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
  20. rm -f $@.$$$$; [ -s $@ ] || rm -f $@