From: Steven Seungcheol Lee Date: Fri, 8 Sep 2023 05:10:22 +0000 (+0900) Subject: Makefile: add standalone build X-Git-Tag: v2.7~148 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0d5befe87641ab54d0e5155943babe331c9b7720;p=users%2Fsagi%2Fnvme-cli.git Makefile: add standalone build 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 --- diff --git a/Makefile b/Makefile index 10d16f08..7f44364c 100644 --- 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}