32 lines
660 B
Makefile
32 lines
660 B
Makefile
# Makefile for micropython on Raspberry Pi RP2
|
|
#
|
|
# This is a simple wrapper around cmake
|
|
|
|
BOARD ?= PICO
|
|
|
|
BUILD ?= build-$(BOARD)
|
|
|
|
$(VERBOSE)MAKESILENT = -s
|
|
|
|
CMAKE_ARGS = -DMICROPY_BOARD=$(BOARD)
|
|
|
|
ifdef USER_C_MODULES
|
|
CMAKE_ARGS += -DUSER_C_MODULES=${USER_C_MODULES}
|
|
endif
|
|
|
|
ifneq ($(FROZEN_MANIFEST),)
|
|
CMAKE_ARGS += -DMICROPY_FROZEN_MANIFEST=${FROZEN_MANIFEST}
|
|
endif
|
|
|
|
all:
|
|
[ -d $(BUILD) ] || cmake -S . -B $(BUILD) -DPICO_BUILD_DOCS=0 ${CMAKE_ARGS}
|
|
$(MAKE) $(MAKESILENT) -C $(BUILD)
|
|
|
|
clean:
|
|
$(RM) -rf $(BUILD)
|
|
|
|
GIT_SUBMODULES += lib/mbedtls lib/pico-sdk lib/tinyusb
|
|
|
|
submodules:
|
|
$(MAKE) -f ../../py/mkrules.mk GIT_SUBMODULES="$(GIT_SUBMODULES)" submodules
|