File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -19,26 +19,31 @@ define CODAL_PATCH
1919 cat codal.patch | git -C $(CODAL_DIR ) apply -
2020endef
2121
22- .PHONY : all codal_build libmicropython clean
22+ .PHONY : all codal_cmake codal_build libmicropython clean
2323
2424all : codal_build
2525
26+ # Create output directory, run cmake, and make sure codal libraries exist (via cmake)
27+ codal_cmake :
28+ $(MKDIR ) -p $(BUILD )
29+ $(call CODAL_PATCH)
30+ (cd $( BUILD) && cmake ../$( CODAL_DIR) -DCMAKE_BUILD_TYPE=RelWithDebInfo)
31+ $(call CODAL_CLEAN)
32+
33+ # Build the codal app and make the final HEX file
2634codal_build : libmicropython
2735 $(call CODAL_PATCH)
2836 make -C $(BUILD )
2937 $(call CODAL_CLEAN)
3038 arm-none-eabi-size $(CODAL_BUILD ) /MICROBIT
3139 $(PYTHON3 ) addlayouttable.py $(SRC_HEX ) $(SRC_MAP ) -o $(DEST_HEX )
3240
41+ # Build the MicroPython component
3342libmicropython : $(CODAL_LIBRARIES ) $(BUILD )
3443 $(call CODAL_CLEAN)
3544 $(MAKE ) -C codal_port
3645
37- $(CODAL_LIBRARIES ) $(BUILD ) :
38- $(MKDIR ) -p $(BUILD )
39- $(call CODAL_PATCH)
40- (cd $( BUILD) && cmake ../$( CODAL_DIR) -DCMAKE_BUILD_TYPE=RelWithDebInfo)
41- $(call CODAL_CLEAN)
46+ $(CODAL_LIBRARIES ) $(BUILD ) : codal_cmake
4247
4348clean :
4449 $(MAKE ) -C codal_port clean
You can’t perform that action at this time.
0 commit comments