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.

37 lines
1.5 KiB

  1. # Note for new boards -- CTPC and CONVERT_TO_PROTON_C are deprecated terms
  2. # and should not be replicated for new boards. These will be removed from
  3. # documentation as well as existing keymaps in due course.
  4. ifeq ($(strip $(CTPC)), yes)
  5. CONVERT_TO_PROTON_C=yes
  6. endif
  7. ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
  8. CONVERT_TO=proton_c
  9. cpfirmware: ctpc_warning
  10. .INTERMEDIATE: ctpc_warning
  11. ctpc_warning: elf
  12. $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
  13. $(info The `CONVERT_TO_PROTON_C` and `CTPC` options are soon to be deprecated.)
  14. $(info Boards should be changed to use `CONVERT_TO=proton_c` instead.)
  15. $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
  16. endif
  17. # TODO: opt in rather than assume everything uses a pro micro
  18. PIN_COMPATIBLE ?= promicro
  19. ifneq ($(CONVERT_TO),)
  20. # glob to search each platfrorm and/or check for valid converter
  21. CONVERTER := $(wildcard $(PLATFORM_PATH)/*/converters/$(PIN_COMPATIBLE)_to_$(CONVERT_TO)/)
  22. ifeq ($(CONVERTER),)
  23. $(call CATASTROPHIC_ERROR,Converting from '$(PIN_COMPATIBLE)' to '$(CONVERT_TO)' not possible!)
  24. endif
  25. TARGET := $(TARGET)_$(CONVERT_TO)
  26. # Configure any defaults
  27. OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]'))
  28. OPT_DEFS += -DCONVERTER_ENABLED
  29. VPATH += $(CONVERTER)
  30. # Finally run any converter specific logic
  31. include $(CONVERTER)/converter.mk
  32. endif