microbit-foundation / micropython-microbit-v2

Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
MIT License
41 stars 22 forks source link

codal_port/Makefile: Keep C/C++ flags set up by MicroPython lib. #210

Closed microbit-carlos closed 1 month ago

microbit-carlos commented 1 month ago

This to be able to create C/C++ modules without modifying files in this repository, as shown in https://github.com/microbit-foundation/micropython-cpp-module-example.

Comparing the flags used before and after this patch:

The makeqstrdefs.py extra flags added:

-I. -I../codal_app -I../../lib -I../../lib/codal/libraries/codal-nrf52/inc/cmsis -I../../lib/codal/libraries/codal-nrf52/nrfx -I../../lib/codal/libraries/codal-nrf52/nrfx/drivers/include -I../../lib/codal/libraries/codal-nrf52/nrfx/hal -I../../lib/codal/libraries/codal-nrf52/nrfx/mdk -I../../lib/micropython -I../../lib/micropython/ports/nrf
dpgeorge commented 1 month ago

This change looks good to me. This is how we do it in MicroPython itself (use += for most Makefile variables).

dpgeorge commented 1 month ago

This to be able to create C/C++ modules without modifying files in this repository

That's a good example!