it took me 4 different online tutorials, 3 different makefile examples, 4 actual makefiles from actual projects (including one that was apparently done really crappy and not at all according to best practices) and talking with my dad (who programs stuff as a job yadda yadda) all together before i even started to somewhat understand how exactly its suppose to work or why its even necessary
anyway, if you wanna make a makefile tutorial, maybe start by explaining why the fuck theyre useful and (if you're talking about C projects) explain what the fuck a .o file is and shit?
because generally every single thread/discussion ive seen on this goes as follows:
"how do i build a multi-file C project?"
"oh use a makefile"
"how do i make a makefile"
explains how make works and why it can make things easier
notice that at no point has the idea that "wait i need to explain .o files and linking" come up whatsoever even though its an essential part of understand how multi-file C projects get built (and thus, how to write a makefile for them)
notice too that this is about as specific a question someone can ask without already knowing about the details of compiling large C projects
so while the questions that need to be answered here are "what are .o files", "how do i combine multiple .o files into one executable".etc, without already knowing that stuff you cant ask the "right" questions
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!