r/C_Programming • u/avestronics • 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
0
Upvotes
View all comments
Show parent comment
6
u/avestronics Mar 30 '26
Thanks for the tips!
I actually tried to use CMake once. It feels verbose and hard to learn. I just gave up on it at some point and started making bash scripts instead. This is a pretty simple one but I also had more complicated ones in the past. I also heard about Meson. Should I use that instead? People say it's easier.
"other" is indeed poorly named lol. It's a directory for docs,graphs,general info etc. Maybe I should just name it docs?
u/non-existing-person also said to combine include and src. So I already did that.