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
19
19
cat codal.patch | git -C $(CODAL_DIR ) apply -
20
20
endef
21
21
22
- .PHONY : all codal_build libmicropython clean
22
+ .PHONY : all codal_cmake codal_build libmicropython clean
23
23
24
24
all : codal_build
25
25
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
26
34
codal_build : libmicropython
27
35
$(call CODAL_PATCH)
28
36
make -C $(BUILD )
29
37
$(call CODAL_CLEAN)
30
38
arm-none-eabi-size $(CODAL_BUILD ) /MICROBIT
31
39
$(PYTHON3 ) addlayouttable.py $(SRC_HEX ) $(SRC_MAP ) -o $(DEST_HEX )
32
40
41
+ # Build the MicroPython component
33
42
libmicropython : $(CODAL_LIBRARIES ) $(BUILD )
34
43
$(call CODAL_CLEAN)
35
44
$(MAKE ) -C codal_port
36
45
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
42
47
43
48
clean :
44
49
$(MAKE ) -C codal_port clean
You can’t perform that action at this time.
0 commit comments