-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathproject.build
36 lines (28 loc) · 981 Bytes
/
project.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
ifeq ($(OS),Windows_NT)
CMAKE = $(PLUMBL_SDK_BASE)/tools/cmake/bin/cmake.exe
else
CMAKE = $(PLUMBL_SDK_BASE)/tools/cmake/bin/cmake
endif
RM = $(CMAKE) -E remove_directory
#cmake definition config
cmake_definition+= -DTOOLCHAIN_PREFIX=${TOOLCHAIN_PREFIX}
cmake_definition+= -DCHIP_FAMILY=${CHIP_FAMILY}
cmake_definition+= -DCHIP=${CHIP}
cmake_definition+= -DUSBIP=${USBIP}
cmake_definition+= -DUSB_DCD=${USB_DCD}
cmake_definition+= -DBOARD=${BOARD}
cmake_definition+= -DDEBUG=${DEBUG}
cmake_definition+= -DBL_TYPE=${BL_TYPE}
cmake_definition+= -DUSE_MCU_BOOT=${USE_MCU_BOOT}
cmake_definition+= -DRTT_VIEWER=${RTT_VIEWER}
build:Makefile
@$(CMAKE) -S . -B build -G "Unix Makefiles" $(cmake_definition)
cd build && make -j4
ninja:
@$(CMAKE) -S . -B build -G "Ninja" $(cmake_definition)
cd build && ninja -j4
clean:
$(RM) build
menuconfig:
python $(PLUMBL_SDK_BASE)/tools/kconfig/menuconfig.py
.PHONY:build clean menuconfig