2 # Shown below is a simplified dependency graph of the OpenZFS provided
3 # libraries. Administrative commands (`zfs`, `zpool`, etc) interface with
4 # the kernel modules using the `libzfs.so` and `libzfs_core.so` libraries.
5 # These libraries provide a stable ABI across OpenZFS point releases.
7 # The `libzpool.so` library is a user space build of the DMU and SPA layers
8 # used to implement debugging tools (zdb) and code validation tools (ztest).
9 # These library interfaces are subject to change at any time.
12 # CMDS: zhack/ztest/zdb/ zfs/zpool/zed/
13 # raidz_{test,bench} zinject/zstream
15 # LIBS: | | libzfsbootenv*
18 # libzpool libzfs* ----------------+
20 # libicp --/ | | \ / | | \------- libshare
22 # libzstd ---/ | \ / | \--------- libuutil
24 # libunicode --/ \ / \ | |
26 # libzutil libzfs_core* | |
30 # libtpool -------------/ | | | \---- libnvpair* | | |
32 # libefi -----------------/ | \------ libavl* --------/ |
34 # \-------- libspl ----+------/
36 # * - A stable ABI is provided for these libraries
39 # NB: GNU Automake Manual, Chapter 8.3.5: Libtool Convenience Libraries
40 # These nine libraries are intermediary build components.
42 SUBDIRS = libavl libicp libshare libspl libtpool libzstd
43 CPPCHECKDIRS = libavl libicp libnvpair libshare libspl libtpool libunicode
44 CPPCHECKDIRS += libuutil libzfs libzfs_core libzfsbootenv libzpool libzutil
48 CPPCHECKDIRS += libefi
51 # libnvpair is installed as part of the final build product
52 # libzutil depends on it, so it must be compiled before libzutil
55 # libzutil depends on libefi if present
56 SUBDIRS += libzutil libunicode
58 # These five libraries, which are installed as the final build product,
59 # incorporate the eight convenience libraries given above.
60 DISTLIBS = libuutil libzfs_core libzfs libzpool libzfsbootenv
61 SUBDIRS += $(DISTLIBS)
64 # An ABI is stored for each of these libraries. Note that libzpool.so
65 # is only linked against by ztest and zdb and no stable ABI is provided.
66 ABILIBS = libnvpair libuutil libzfs_core libzfs libzfsbootenv
68 PHONY = checkabi storeabi cppcheck
70 set -e ; for dir in $(ABILIBS) ; do \
71 $(MAKE) -C $$dir checkabi ; \
75 set -e ; for dir in $(ABILIBS) ; do \
76 $(MAKE) -C $$dir storeabi ; \
79 cppcheck: $(CPPCHECKDIRS)
80 set -e ; for dir in $(CPPCHECKDIRS) ; do \
81 $(MAKE) -C $$dir cppcheck ; \