mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-20 05:56:32 +00:00
18
Makefile
18
Makefile
@ -5,6 +5,16 @@ ifeq ($(EMULATOR), )
|
||||
export EMULATOR=__NO_EMULATION__
|
||||
endif
|
||||
|
||||
# 计算cpu核心数
|
||||
NPROCS:=1
|
||||
OS:=$(shell uname -s)
|
||||
|
||||
ifeq ($(OS),Linux)
|
||||
NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)
|
||||
endif
|
||||
ifeq ($(OS),Darwin) # Assume Mac OS X
|
||||
NPROCS:=$(shell system_profiler | awk '/Number Of CPUs/{print $4}{next;}')
|
||||
endif
|
||||
|
||||
export ARCH=__x86_64__
|
||||
export ROOT_PATH=$(shell pwd)
|
||||
@ -59,5 +69,11 @@ clean:
|
||||
cd .. ;\
|
||||
done
|
||||
|
||||
cppcheck-xml:
|
||||
cppcheck kernel user --platform=unix64 --std=c11 -I user/libs/ -I=kernel/ --force -j $(NPROCS) --xml 2> cppcheck.xml
|
||||
|
||||
cppcheck:
|
||||
cppcheck kernel user --platform=unix64 --std=c11 -I user/libs/ -I=kernel/ --force -j $(NPROCS)
|
||||
|
||||
gdb:
|
||||
gdb -n -x tools/.gdbinit
|
||||
gdb -n -x tools/.gdbinit
|
||||
|
Reference in New Issue
Block a user