Commit Graph

2 Commits

Author SHA1 Message Date
Simon Glass
c314785548 examples: Correct dependencies for ulib
We need to check for the ulib library before building any examples. Add
this and ensure that the examples are rebuilt if the library changes.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-11 15:19:22 -06:00
Simon Glass
4ba77a661f ulib: Refactor the Makefile to support multiple programs
The current Makefile for the ulib examples is not very easy to modify.

Split it into three parts:
- config.mk containing the variables used by the build tools
- a list of programs and the objects in each one
- rules.mk with some rules to make it all work

Use sys-objs to indicate objects which should be built with system
headers. Use U-Boot headers by default.

With this it is fairly simply to add a new program. Of course we could
make use of U-Boot's kbuild implementation to tidy this up, but the
purpose of the examples is to show how to do things outside the U-Boot
build system.

Co-developed-by: Claude <noreply@anthropic.com>
Co-developed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-10 03:35:59 -06:00