forked from linux-nvme/libnvme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (36 loc) · 814 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of libnvme.
# Copyright (c) 2021 Dell Inc.
#
# Authors: Martin Belanger <[email protected]>
#
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: test
test: ${BUILD-DIR}
ninja -C ${BUILD-DIR} $@
.PHONY: rpm
rpm: dist
rpmbuild -ba ${BUILD-DIR}/libnvme.spec