analogdevicesinc / no-OS

Software drivers in C for systems without an operating system
http://analogdevicesinc.github.io/no-OS/
Other
971 stars 1.67k forks source link

tools: generic.mk: add NO_OS_INC_DIRS build var for pulling header files #2375

Open commodo opened 1 week ago

commodo commented 1 week ago

Pull Request Description

This is inspired by the SRC_DIRS build variable, but only focuses on include files. Using the SRC_DIRS can be problematic, as it pulls every .c & .h file from a directory.

But in some cases, we just want to pull in the header files. These header files will only get compiled if a .c file pulls them in.

If this build variable is unspecified, it will be empty, so nothing will be done (to potentially affect current projects).

PR Type

PR Checklist

commodo commented 1 week ago

Changelog v1 -> v2: