diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:40:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:40:20 +0000 |
commit | 2dba2525fb35dcfc79aad5bdf6c92e790d69635c (patch) | |
tree | ac8ac7d3960922094733bac6d9a5300da7171c56 /Makefile | |
parent | Initial commit. (diff) | |
download | libnvme-upstream.tar.xz libnvme-upstream.zip |
Adding upstream version 1.3.upstream/1.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..768338a --- /dev/null +++ b/Makefile @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of libnvme. +# Copyright (c) 2021 Dell Inc. +# +# Authors: Martin Belanger <Martin.Belanger@dell.com> +# +NAME := libnvme +.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: ${BUILD-DIR} + git archive --format=tar HEAD > libnvme.tar + tar rf libnvme.tar ${BUILD-DIR}/libnvme.spec + gzip -f -9 libnvme.tar + rpmbuild -ta libnvme.tar.gz -v |