summaryrefslogtreecommitdiff
path: root/md/writeup/kconf2h.md
blob: d8ae040d9946907e8d736753c3acaa586c2fa0e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
title: kconf2h - kernel config transltion to C headers

# 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

```text
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

```text
#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

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

or 

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

## Compile

just 

```sh
make
```

should be enought