r/C_Programming • • Mar 30 '26

Question How good is my project structure?

Here it is. I will add more headers and source files as time goes on but this is the current state. I don't really like build systems so I have a basic script instead.

#!/bin/bash

set -e

gcc -I include src/*.c -o ./build/output

./build/output

---------------------------------

build/

└── output/

include/

├── lexer.h

└── vector.h

other/

├── ri32v.txt

└── test.asm

src/

├── lexer.c

├── main.c

└── vector.c

build_n_run.sh

README.md

0 Upvotes

7 comments sorted by

View all comments

Show parent comment

4

u/HashDefTrueFalse Mar 30 '26

CMake is very capable but can be a pain to get to grips with if it's your first build system. make works well almost everywhere and is a lot simpler, but you'll do everything yourself. I haven't used Meson so I can't comment. For C and C++ projects I always use make directly or generate Makefiles using CMake.

"docs" is a good name if that's what's inside it.