Skip to content

wxrayut/ccg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ› οΈ ccg β€” Compile Command Generator

A Unix/Linux shell script to generate compile_commands.json for C projects.

πŸš€ Features

  • Generate compile_commands.json for any C project
  • Supports custom compiler, language standard, source/include directories, and compile flags
  • Filter by file extensions
  • Exclude directories from scanning
  • Configurable indentation level in output JSON
  • Verbose mode for detailed output

πŸ“₯ Installation

git clone https://github.com/wxrayut/ccg.git
cd ccg

chmod +x ccg.sh

πŸ§ͺ Test source

A full dummy C project is included in the test/ folder for testing.

πŸ‘¨πŸ»β€πŸ’» Usage

./ccg.sh \
  --directory test \
  --output compile_commands.json \
  --compiler gcc \
  --std c11 \
  --flags "-Wall -O2" \
  --extensions c,h \
  --verbose

πŸ’– Support

If you find this useful, don’t forget to ⭐ star the repo and share it with others!

πŸ“ License

MIT License Β© wxrayut

About

πŸ› οΈ A Unix/Linux shell script to generate compile_commands.json for C projects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published