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