>>105839179
>>gotta make separate declarations inside header files
because (stupidly) the language doesn't support hoisting.
>cpp, h
the difference between these is convention. they're both source files.
>make
>>barely any tutorials on how to create a proper (c)make that recursively finds all your files
make is just a scripting language to abstract away incremental builds by handling timestamp comparison and syntax sugar over your shell, it has nothing to do with c/c++. it's language (and task) agnostic.
to compile your program, you invoke the compiler from your shell:
$ cc myfile.c -o mybinaryname
for linking multiple files
$ cc myfile1.c myfile2.c -o mybinaryname
thus, using the power of your shell
$ cc src/*.c -o mybinaryname
of course, this is the naive invocation. you should understand the different configuration options your compiler exposes via flags, like how to delay linking, how to statically link things, set various warnings and settings on/off, set optimization levels, etc.
it's ultimately up to you to structure your project in a non-retarded way so that building is simple, and avoid ridiculous shitware like cmake and autotools that layer needless complexity and obscurity on top of the build process.
if your shell isn't shit, you should be able to glob recursive wildcards via
$ cc src/**/*.c
after you've mastered building from the shell, only then should you learn to use make. and forget about the meta-build systems entirely. the value proposition of make over a basic bitch shell script only makes sense once your compile times are more than like 10 seconds for a full rebuild.
>why don't other languages do this
because they have stronger opinions on their build process, and there are trade-offs to doing it that way. i'd rather debug a shell build script than cargo, quite frankly.
your os provides the facilities and utilities for ever aspect of development, you don't really need more.