---
outline: deep
---

# Generate Config Files

For details on config header generation, see: [Config Header API](/api/description/project-target#add_configfiles).

We can use `add_configfiles` to automatically generate configuration files such as `config.h`.

## Basic Example

<FileExplorer rootFilesDir="examples/configuration/add_configfiles/basic" />

### Build and Run

```bash
$ xmake
$ xmake run
```
