This PR adds a new make target, `clang-tidy` to run clang-tidy on all C++ sources.
Only a dummy check is enabled, as this patch applies the minimal number of fixes
to compile headers and sources with clang without the header. In a subsequent PR,
more checks will be enabled and the files will be formatted.
`clang-tidy` can be executed using `make -C sim clang-tidy`. It will automatically
apply fixes to known issues.
The build system includes 3 targets caching the classpath containing compiled jars to be used by subsequent java invocations, fully bypassing the slow sbt setup on repeated invocations to SBT.
The `target-agnostic.mk` file is a monolith that performs too many tasks at once.
This PR splits it into multiple independent files to delimit the different tasks.
Also moves definitions closer together for clarity. Existing external users of
`target-agnostic.mk` can include the individual splits they are interested in.