aboutsummaryrefslogtreecommitdiff
path: root/drivers/makefile
blob: 9405f0b33ef1885ccc80d195ac07c9df13151632 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CXX_OBJ += drivers/cga.o \
	   drivers/serial.o \
	   drivers/keyboard.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