CONFIGURATION!
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
KCONFIG = scripts/kconfig
|
||||
CONFIG_FILE = .config
|
||||
AUTOHEADER = src/core/config.hpp
|
||||
|
||||
export KCONFIG_CONFIG = $(CURDIR)/$(CONFIG_FILE)
|
||||
export KCONFIG_AUTOHEADER = $(CURDIR)/$(AUTOHEADER)
|
||||
export KCONFIG_AUTOCONFIG = $(CURDIR)/include/config/auto.conf
|
||||
|
||||
.PHONY: all linux pico clean kconfig
|
||||
|
||||
all: linux pico
|
||||
|
||||
linux: $(AUTOHEADER)
|
||||
mkdir -p build-linux
|
||||
(cd build-linux && cmake .. -DBUILD_FOR_PICO=OFF && make -j$(nproc))
|
||||
|
||||
pico: $(AUTOHEADER)
|
||||
mkdir -p build-pico
|
||||
(cd build-pico && cmake .. -DBUILD_FOR_PICO=ON && make -j$(nproc))
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# kconfig targets
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
config: scripts/kconfig/conf FORCE
|
||||
$< Kconfig
|
||||
|
||||
nconfig: scripts/kconfig/nconf FORCE
|
||||
$< Kconfig
|
||||
$(MAKE) syncconfig
|
||||
|
||||
menuconfig: scripts/kconfig/mconf FORCE
|
||||
$< Kconfig
|
||||
$(MAKE) syncconfig
|
||||
|
||||
gconfig: scripts/kconfig/gconf FORCE
|
||||
$< Kconfig
|
||||
$(MAKE) syncconfig
|
||||
|
||||
xconfig: scripts/kconfig/qconf FORCE
|
||||
$< Kconfig
|
||||
$(MAKE) syncconfig
|
||||
|
||||
oldconfig: scripts/kconfig/conf FORCE
|
||||
$< --oldconfig Kconfig
|
||||
|
||||
olddefconfig: scripts/kconfig/conf FORCE
|
||||
$< --olddefconfig Kconfig
|
||||
|
||||
defconfig: scripts/kconfig/conf FORCE
|
||||
$< --defconfig=defconfig Kconfig
|
||||
|
||||
savedefconfig: scripts/kconfig/conf FORCE
|
||||
$< --savedefconfig=defconfig Kconfig
|
||||
|
||||
allnoconfig: scripts/kconfig/conf FORCE
|
||||
$< --allnoconfig Kconfig
|
||||
|
||||
randconfig: scripts/kconfig/conf FORCE
|
||||
$< --randconfig Kconfig
|
||||
|
||||
syncconfig: scripts/kconfig/conf $(CONFIG_FILE) FORCE
|
||||
$< --syncconfig Kconfig
|
||||
|
||||
$(CONFIG_FILE):
|
||||
$(MAKE) olddefconfig
|
||||
|
||||
$(AUTOHEADER): $(CONFIG_FILE) Kconfig scripts/kconfig/conf
|
||||
$(MAKE) syncconfig
|
||||
|
||||
scripts/kconfig/conf scripts/kconfig/mconf scripts/kconfig/nconf:
|
||||
$(MAKE) -C scripts/kconfig $(@F)
|
||||
|
||||
scripts/kconfig/gconf scripts/kconfig/qconf:
|
||||
$(MAKE) -C scripts/kconfig $(@F)
|
||||
|
||||
FORCE:
|
||||
Reference in New Issue
Block a user