From b1322ac720b4a04175dae0e60e627e81e19f1cb9 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 21 Feb 2021 18:11:26 +0200 Subject: Kconfig --- drivers/makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'drivers/makefile') diff --git a/drivers/makefile b/drivers/makefile index 0d9071a..ad255c4 100644 --- a/drivers/makefile +++ b/drivers/makefile @@ -1,2 +1,20 @@ CXX_OBJ += drivers/cga.o \ drivers/serial.o + +HWH := drivers/hardware.h +autogen := $(autogen) $(HWH) + +$(HWH): .config + @echo " GEN $@" + @echo \/\* autogenerated hardware description \*\/ > $(HWH) + @echo \#pragma once >> $(HWH) +ifdef CONFIG_video0_enable + @echo \#define HAS_VIDEO0 >> $(HWH) + @echo $(CONFIG_VIDEO0_CLASS) video0\; >> $(HWH) + @echo constexpr bool video0_console = true\; >> $(HWH) +endif +ifdef CONFIG_serial0_enable + @echo \#define HAS_SERIAL0 >> $(HWH) + @echo $(CONFIG_SERIAL0_CLASS) serial0\; >> $(HWH) + @echo constexpr bool serial0_console = true\; >> $(HWH) +endif -- cgit v1.2.1