]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Makefile: add standalone build
authorSteven Seungcheol Lee <sc108.lee@samsung.com>
Fri, 8 Sep 2023 05:10:22 +0000 (14:10 +0900)
committerDaniel Wagner <wagi@monom.org>
Wed, 11 Oct 2023 13:09:23 +0000 (15:09 +0200)
To handover build binary for different environment users
Build result checked with ldd below
[root@localhost .build]# ldd nvme
        not a dynamic executable
Do not run libnvme tests(set subproject revision successful build)
Disable keyutils on libnvme(pkgconfig always find shared first when -llib is given)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Makefile

index 10d16f0891a7cdb9ffb14b2a71060b2e1a3ee0a3..7f44364cd080ff10f71b6d4396607e96f8d92066 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -54,3 +54,11 @@ rpm:
 debug:
        meson ${BUILD-DIR} --buildtype=debug
        ninja -C ${BUILD-DIR}
+
+.PHONY: static
+static:
+       meson ${BUILD-DIR} --buildtype=release \
+               --default-library=static -Dc_link_args="-static" \
+               --wrap-mode=forcefallback \
+               -Dlibnvme:tests=false -Dlibnvme:keyutils=disabled
+       ninja -C ${BUILD-DIR}