kconf2h - kernel config transltion to C headers

Kernel menuconfig is cool way how to configure files and enable/disable some flag/constants inside source here is small tool that converts files like

CONFIG_CORE=y
CONFIG_OS_LINUX=y
# CONFIG_OS_NETBSD is not set
# CONFIG_FUTURE is not set
CONFIG_DRAW=y
CONFIG_GL=y
CONFIG_SDL2=y
CONFIG_TUI=y
CONFIG_HW=y
CONFIG_HW_LIB_ORIG=y
# CONFIG_HW_LIB_R820T is not set
CONFIG_HW_ALSA=y
# CONFIG_HW_NO_AUDIO is not set
CONFIG_MOD=y
CONFIG_MOD_FM_DEMOD=y
# CONFIG_PROTO is not set

to just c headers

#define CONFIG_CORE
#define CONFIG_OS_LINUX
#define CONFIG_DRAW
#define CONFIG_GL
#define CONFIG_SDL2
#define CONFIG_TUI
#define CONFIG_HW
#define CONFIG_HW_LIB_ORIG
#define CONFIG_HW_ALSA
#define CONFIG_MOD
#define CONFIG_MOD_FM_DEMOD

doesnt support anything else except yes/no

Tested

OS Arch
Linux 32/64bit intel

Source

git clone http://git.main.lv/cgit.cgi/kconfig2h.git

or

git clone https://github.com/FreeArtMan/kconfig2h.git

Compile

just

make

should be enought