mirror of https://github.com/Desuuuu/klipper.git
scripts: Convert build from Linux Kconfig to new kconfiglib
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
928fc0df72
commit
a4e5a19e68
22
Makefile
22
Makefile
|
@ -8,9 +8,6 @@
|
||||||
OUT=out/
|
OUT=out/
|
||||||
|
|
||||||
# Kconfig includes
|
# Kconfig includes
|
||||||
export HOSTCC := $(CC)
|
|
||||||
export CONFIG_SHELL := sh
|
|
||||||
export KCONFIG_AUTOHEADER := autoconf.h
|
|
||||||
export KCONFIG_CONFIG := $(CURDIR)/.config
|
export KCONFIG_CONFIG := $(CURDIR)/.config
|
||||||
-include $(KCONFIG_CONFIG)
|
-include $(KCONFIG_CONFIG)
|
||||||
|
|
||||||
|
@ -98,22 +95,21 @@ $(OUT)klipper.elf: $(OBJS_klipper.elf)
|
||||||
|
|
||||||
################ Kconfig rules
|
################ Kconfig rules
|
||||||
|
|
||||||
define do-kconfig
|
$(OUT)autoconf.h: $(KCONFIG_CONFIG)
|
||||||
$(Q)mkdir -p $(OUT)/scripts/kconfig/lxdialog
|
@echo " Building $@"
|
||||||
$(Q)mkdir -p $(OUT)/include/config
|
$(Q)mkdir -p $(OUT)
|
||||||
$(Q)$(MAKE) -C $(OUT) -f $(CURDIR)/scripts/kconfig/Makefile srctree=$(CURDIR) src=scripts/kconfig obj=scripts/kconfig Q=$(Q) Kconfig=$(CURDIR)/src/Kconfig $1
|
$(Q) KCONFIG_AUTOHEADER=$@ $(PYTHON) lib/kconfiglib/genconfig.py src/Kconfig
|
||||||
endef
|
|
||||||
|
|
||||||
$(OUT)autoconf.h : $(KCONFIG_CONFIG) ; $(call do-kconfig, silentoldconfig)
|
$(KCONFIG_CONFIG) olddefconfig: src/Kconfig
|
||||||
$(KCONFIG_CONFIG): src/Kconfig ; $(call do-kconfig, olddefconfig)
|
$(Q)$(PYTHON) lib/kconfiglib/olddefconfig.py src/Kconfig
|
||||||
%onfig: ; $(call do-kconfig, $@)
|
|
||||||
help: ; $(call do-kconfig, $@)
|
|
||||||
|
|
||||||
|
menuconfig:
|
||||||
|
$(Q)$(PYTHON) lib/kconfiglib/menuconfig.py src/Kconfig
|
||||||
|
|
||||||
################ Generic rules
|
################ Generic rules
|
||||||
|
|
||||||
# Make definitions
|
# Make definitions
|
||||||
.PHONY : all clean distclean FORCE
|
.PHONY : all clean distclean olddefconfig menuconfig FORCE
|
||||||
.DELETE_ON_ERROR:
|
.DELETE_ON_ERROR:
|
||||||
|
|
||||||
all: $(target-y)
|
all: $(target-y)
|
||||||
|
|
Loading…
Reference in New Issue