2021-01-20 08:34:08 -05:00
|
|
|
# Makefile for micropython on Raspberry Pi RP2
|
|
|
|
#
|
|
|
|
# This is a simple wrapper around cmake
|
|
|
|
|
2021-04-05 16:57:18 -04:00
|
|
|
BOARD ?= PICO
|
|
|
|
|
|
|
|
BUILD ?= build-$(BOARD)
|
2021-01-20 08:34:08 -05:00
|
|
|
|
|
|
|
$(VERBOSE)MAKESILENT = -s
|
|
|
|
|
2021-04-05 16:57:18 -04:00
|
|
|
CMAKE_ARGS = -DMICROPY_BOARD=$(BOARD)
|
2021-02-23 17:57:14 -05:00
|
|
|
|
|
|
|
ifdef USER_C_MODULES
|
|
|
|
CMAKE_ARGS += -DUSER_C_MODULES=${USER_C_MODULES}
|
|
|
|
endif
|
|
|
|
|
2021-01-20 08:34:08 -05:00
|
|
|
all:
|
2021-02-23 17:57:14 -05:00
|
|
|
[ -d $(BUILD) ] || cmake -S . -B $(BUILD) -DPICO_BUILD_DOCS=0 ${CMAKE_ARGS}
|
2021-01-20 08:34:08 -05:00
|
|
|
$(MAKE) $(MAKESILENT) -C $(BUILD)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) -rf $(BUILD)
|
2021-08-17 06:40:20 -04:00
|
|
|
|
|
|
|
GIT_SUBMODULES += lib/pico-sdk lib/tinyusb
|
|
|
|
|
|
|
|
submodules:
|
|
|
|
$(MAKE) -f ../../py/mkrules.mk GIT_SUBMODULES="$(GIT_SUBMODULES)" submodules
|