diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:05 +0000 |
commit | 1cc8413aaf5f8fa6595aece1933462c096e88639 (patch) | |
tree | e97b4f25c511372d73bdd96c389c5f468d99138a /Makefile | |
parent | Initial commit. (diff) | |
download | nvme-cli-1cc8413aaf5f8fa6595aece1933462c096e88639.tar.xz nvme-cli-1cc8413aaf5f8fa6595aece1933462c096e88639.zip |
Adding upstream version 2.4+really2.3.upstream/2.4+really2.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..10d16f0 --- /dev/null +++ b/Makefile @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of nvme. +# Copyright (c) 2021 Dell Inc. +# +# Authors: Martin Belanger <Martin.Belanger@dell.com> +# +NAME := nvme +.DEFAULT_GOAL := ${NAME} +BUILD-DIR := .build + +${BUILD-DIR}: + meson $@ + @echo "Configuration located in: $@" + @echo "-------------------------------------------------------" + +.PHONY: ${NAME} +${NAME}: ${BUILD-DIR} + ninja -C ${BUILD-DIR} + +.PHONY: clean +clean: +ifneq ("$(wildcard ${BUILD-DIR})","") + ninja -C ${BUILD-DIR} -t $@ +endif + +.PHONY: purge +purge: +ifneq ("$(wildcard ${BUILD-DIR})","") + rm -rf ${BUILD-DIR} +endif + +.PHONY: install dist +install dist: ${BUILD-DIR} + cd ${BUILD-DIR} && meson $@ + +.PHONY: uninstall +uninstall: + cd ${BUILD-DIR} && meson --internal uninstall + +.PHONY: test +test: ${BUILD-DIR} + ninja -C ${BUILD-DIR} $@ + +.PHONY: rpm +rpm: + meson ${BUILD-DIR} \ + -Dudevrulesdir=$(shell rpm --eval '%{_udevrulesdir}') \ + -Dsystemddir=$(shell rpm --eval '%{_unitdir}') \ + -Ddocs=man -Ddocs-build=true + rpmbuild -ba ${BUILD-DIR}/nvme.spec --define "_builddir ${BUILD-DIR}" -v + +.PHONY: debug +debug: + meson ${BUILD-DIR} --buildtype=debug + ninja -C ${BUILD-DIR} |