Whenever I’ve done any hobbyist kernel devel, I’ve preferred to have something like an include/x86_64/arch folder and and include/arm/arch folder. Then I’d have, in the Makefile, cc -I include/${ARCH}, and in *.c:
#include <arch/whatever.h>
IMO it’s cleaner than symlinks (which I’ve seen in certain projects), and less likely to confuse than
Ooh, interesting. I program in C fairly regularly, and I didn’t know about macro calls in #include statements
I like it
Whenever I’ve done any hobbyist kernel devel, I’ve preferred to have something like an
include/x86_64/arch
folder and andinclude/arm/arch
folder. Then I’d have, in theMakefile
,cc -I include/${ARCH}
, and in*.c
:IMO it’s cleaner than symlinks (which I’ve seen in certain projects), and less likely to confuse than
Very fun! Some are even useful.